aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Admin.php2
-rw-r--r--Zotlabs/Project/System.php23
-rwxr-xr-xboot.php1
-rw-r--r--include/api.php2
-rw-r--r--include/identity.php2
-rw-r--r--include/zot.php2
-rw-r--r--version.inc1
7 files changed, 13 insertions, 20 deletions
diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php
index b22931b1a..5eaede6a6 100644
--- a/Zotlabs/Module/Admin.php
+++ b/Zotlabs/Module/Admin.php
@@ -221,7 +221,7 @@ class Admin extends \Zotlabs\Web\Controller {
'$pending' => array( t('Pending registrations'), $pending),
'$channels' => array( t('Registered channels'), $channels),
'$plugins' => array( t('Active plugins'), $plugins ),
- '$version' => array( t('Version'), RED_VERSION),
+ '$version' => array( t('Version'), STD_VERSION),
'$build' => get_config('system', 'db_version')
));
}
diff --git a/Zotlabs/Project/System.php b/Zotlabs/Project/System.php
index a67742db5..f61313da0 100644
--- a/Zotlabs/Project/System.php
+++ b/Zotlabs/Project/System.php
@@ -4,56 +4,51 @@ namespace Zotlabs\Project;
class System {
- function get_platform_name() {
+ static public function get_platform_name() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['platform_name'])
return \App::$config['system']['platform_name'];
return PLATFORM_NAME;
}
- function get_site_name() {
+ static public function get_site_name() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['sitename'])
return \App::$config['system']['sitename'];
return '';
}
- function get_project_version() {
+ static public function get_project_version() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['hide_version'])
return '';
- return RED_VERSION;
+ return self::get_std_version();
}
- function get_update_version() {
+ static public function get_update_version() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['hide_version'])
return '';
return DB_UPDATE_VERSION;
}
- function get_notify_icon() {
+ static public function get_notify_icon() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['email_notify_icon_url'])
return \App::$config['system']['email_notify_icon_url'];
return z_root() . '/images/hz-white-32.png';
}
- function get_site_icon() {
+ static public function get_site_icon() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['site_icon_url'])
return \App::$config['system']['site_icon_url'];
return z_root() . '/images/hz-32.png';
}
- function get_server_role() {
+ static public function get_server_role() {
if(UNO)
return 'basic';
return 'advanced';
}
- // return the standardised version. Since we can't easily compare
- // before the STD_VERSION definition was applied, we have to treat
- // all prior release versions the same. You can dig through them
- // with other means (such as RED_VERSION) if necessary.
-
- function get_std_version() {
+ static public function get_std_version() {
if(defined('STD_VERSION'))
return STD_VERSION;
return '0.0.0';
diff --git a/boot.php b/boot.php
index 2a8bf0d17..bb78db44f 100755
--- a/boot.php
+++ b/boot.php
@@ -46,7 +46,6 @@ require_once('include/account.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
-define ( 'RED_VERSION', trim(file_get_contents('version.inc')));
define ( 'STD_VERSION', '1.4.4' );
define ( 'ZOT_REVISION', 1 );
diff --git a/include/api.php b/include/api.php
index e64c86695..3b2c71923 100644
--- a/include/api.php
+++ b/include/api.php
@@ -2108,7 +2108,7 @@ require_once('include/api_auth.php');
'shorturllength' => '30',
'hubzilla' => array(
'PLATFORM_NAME' => Zotlabs\Project\System::get_platform_name(),
- 'RED_VERSION' => Zotlabs\Project\System::get_project_version(),
+ 'STD_VERSION' => Zotlabs\Project\System::get_project_version(),
'ZOT_REVISION' => ZOT_REVISION,
'DB_UPDATE_VERSION' => Zotlabs\Project\System::get_update_version()
)
diff --git a/include/identity.php b/include/identity.php
index f50c497cd..c60c846c0 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -491,7 +491,7 @@ function identity_basic_export($channel_id, $items = false) {
// use constants here as otherwise we will have no idea if we can import from a site
// with a non-standard platform and version.
- $ret['compatibility'] = array('project' => PLATFORM_NAME, 'version' => RED_VERSION, 'database' => DB_UPDATE_VERSION, 'server_role' => Zotlabs\Project\System::get_server_role());
+ $ret['compatibility'] = array('project' => PLATFORM_NAME, 'version' => STD_VERSION, 'database' => DB_UPDATE_VERSION, 'server_role' => Zotlabs\Project\System::get_server_role());
$r = q("select * from channel where channel_id = %d limit 1",
intval($channel_id)
diff --git a/include/zot.php b/include/zot.php
index 1ca1b862b..157354afa 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3914,7 +3914,7 @@ function zotinfo($arr) {
$ret['site']['channels'] = channel_total();
- $ret['site']['version'] = Zotlabs\Project\System::get_platform_name() . ' ' . RED_VERSION . '[' . DB_UPDATE_VERSION . ']';
+ $ret['site']['version'] = Zotlabs\Project\System::get_platform_name() . ' ' . STD_VERSION . '[' . DB_UPDATE_VERSION . ']';
$ret['site']['admin'] = get_config('system','admin_email');
diff --git a/version.inc b/version.inc
deleted file mode 100644
index aec5959ca..000000000
--- a/version.inc
+++ /dev/null
@@ -1 +0,0 @@
-2016-05-01.1383H