From 270f1892e0fa34c8a7d1880d1bfecff4bc300790 Mon Sep 17 00:00:00 2001 From: Gilles Crettenand Date: Fri, 12 Jun 2015 15:35:32 +0200 Subject: [PATCH] - put version to a more accessible place - use it for logs and help - bump the version --- NetBiblio.php | 7 +++++++ help.php | 1 + index.php | 5 +---- logs.php | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NetBiblio.php b/NetBiblio.php index 4abd415..e59018f 100644 --- a/NetBiblio.php +++ b/NetBiblio.php @@ -12,9 +12,16 @@ use BSR\Lib\Search\BookSearch; use BSR\Lib\WebService; class NetBiblio extends WebService { + /** @var string $version version number */ + public static $version = '1.0.1'; + private $login = ''; private $client = 'website'; + public function __construct() { + parent::__construct(self::$version); + } + /** * Set the current login and client based on information * from the session. diff --git a/help.php b/help.php index 42b413f..c978042 100644 --- a/help.php +++ b/help.php @@ -8,6 +8,7 @@ use BSR\Lib\Help; require_once('Lib/autoloader.php'); echo Html::template(array( + 'version' => NetBiblio::$version, 'title' => 'Help', 'content' => Help::content(new NetBiblio()), )); diff --git a/index.php b/index.php index 7b4af60..1158010 100644 --- a/index.php +++ b/index.php @@ -2,10 +2,7 @@ namespace BSR; -/** @var string $version version number */ -$ws_version = '1.0.0'; - require_once('Lib/autoloader.php'); -$web = new NetBiblio($ws_version); +$web = new NetBiblio(); $web->Run(); diff --git a/logs.php b/logs.php index 8ebbe03..fe16cb3 100644 --- a/logs.php +++ b/logs.php @@ -10,6 +10,7 @@ require_once('Lib/autoloader.php'); $logs = Logger::getLastLogs(); echo Html::template(array( + 'version' => NetBiblio::$version, 'title' => 'Logs', 'content' => "
$logs
", ));