summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-07-11 19:10:36 +0200
committerRemi Collet <fedora@famillecollet.com>2010-07-11 19:10:36 +0200
commit6e6d59bf0677c6b2d5b92a6abdab15a7ecaf9947 (patch)
tree146b7d1c713d9dbfdcfeaa98358a47cb0b99b775
parenta5fdd45528a85457821ef4739efcd3fc778affde (diff)
move FEDORACLIENT_VERSION to class, so FedoraClient::VERSION
-rw-r--r--class/FedoraClient.php5
-rwxr-xr-xfedcli.php2
-rw-r--r--index.php2
3 files changed, 4 insertions, 5 deletions
diff --git a/class/FedoraClient.php b/class/FedoraClient.php
index c1a10c5..f1ce8f6 100644
--- a/class/FedoraClient.php
+++ b/class/FedoraClient.php
@@ -35,8 +35,6 @@
* @since The begining of times.
*/
-define('FEDORACLIENT_VERSION', '0.1.0-dev');
-
if (!function_exists('curl_version')) {
die("curl extension required\n");
}
@@ -44,6 +42,7 @@ require_once 'Cache/Lite.php';
abstract class FedoraClient
{
+ const VERSION='0.1.0-dev';
protected $url;
private $agent;
private $debug = 0;
@@ -65,7 +64,7 @@ abstract class FedoraClient
if (isset($options['agent']) && !empty($options['agent'])) {
$this->agent = $options['agent'];
} else {
- $this->agent = 'Fedora PHPClient/'.FEDORACLIENT_VERSION;
+ $this->agent = 'Fedora PHPClient/'.self::VERSION;
}
if (isset($options['debug']) && intval($options['debug'])>0) {
$this->debug = intval($options['debug']);
diff --git a/fedcli.php b/fedcli.php
index 1d5f485..40b5b0c 100755
--- a/fedcli.php
+++ b/fedcli.php
@@ -137,7 +137,7 @@ function Version() {
die (Console_Getargs::getHelp($config)."\n");
}
- echo "PHP Fedora Client class version ".FEDORACLIENT_VERSION."\n";
+ echo "PHP Fedora Client class version ".FedoraClient::VERSION."\n";
}
$cmd = array_shift($_SERVER['argv']);
diff --git a/index.php b/index.php
index c4ddb24..0c163b1 100644
--- a/index.php
+++ b/index.php
@@ -70,7 +70,7 @@ try {
);
}
$smarty->assign('rpmphp_version', RPMPHP_VERSION);
-$smarty->assign('fedcli_version', FEDORACLIENT_VERSION);
+$smarty->assign('fedcli_version', FedoraClient::VERSION);
$page_content = $smarty->fetch('index.tpl');
$smarty->assign('page_content', $page_content);