diff options
-rw-r--r-- | Zotlabs/Lib/System.php | 11 | ||||
-rw-r--r-- | Zotlabs/Module/Setup.php | 7 | ||||
-rwxr-xr-x | boot.php | 47 | ||||
-rwxr-xr-x | view/tpl/install_settings.tpl | 1 |
4 files changed, 5 insertions, 61 deletions
diff --git a/Zotlabs/Lib/System.php b/Zotlabs/Lib/System.php index 306c90f4a..865cb9a30 100644 --- a/Zotlabs/Lib/System.php +++ b/Zotlabs/Lib/System.php @@ -57,9 +57,7 @@ class System { static public function get_server_role() { - if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['server_role']) - return \App::$config['system']['server_role']; - return 'standard'; + return 'pro'; } static public function get_std_version() { @@ -72,11 +70,8 @@ class System { if(get_directory_realm() != DIRECTORY_REALM) return true; - - foreach(['hubzilla','zap'] as $t) { - if(stristr($p,$t)) - return true; - } + if(in_array(strtolower($p),['hubzilla','zap','red'])) + return true; return false; } } diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index 9c688af01..e114dfc0b 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -324,11 +324,6 @@ class Setup extends \Zotlabs\Web\Controller { $siteurl = trim($_POST['siteurl']); $timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles'); - $server_roles = [ - 'basic' => t('Basic/Minimal Social Networking'), - 'standard' => t('Standard Configuration (default)'), - 'pro' => t('Professional') - ]; $tpl = get_markup_template('install_settings.tpl'); $o .= replace_macros($tpl, array( @@ -348,8 +343,6 @@ class Setup extends \Zotlabs\Web\Controller { '$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')), - '$server_role' => array('server_role', t("Server Configuration/Role"), 'standard','',$server_roles), - '$timezone' => array('timezone', t('Please select a default timezone for your website'), $timezone, '', get_timezones()), '$baseurl' => z_root(), @@ -49,7 +49,7 @@ require_once('include/xchan.php'); require_once('include/hubloc.php'); -define ( 'PLATFORM_NAME', 'hubzilla' ); +define ( 'PLATFORM_NAME', 'red' ); define ( 'STD_VERSION', '2.3' ); define ( 'ZOT_REVISION', '1.2' ); @@ -166,14 +166,6 @@ define ( 'LOGGER_ALL', 4 ); /** - * Server roles - */ - -define ( 'SERVER_ROLE_BASIC', 0x0001 ); -define ( 'SERVER_ROLE_STANDARD', 0x0002 ); -define ( 'SERVER_ROLE_PRO', 0x0004 ); - -/** * registration policies */ @@ -620,15 +612,7 @@ function sys_boot() { $a->convert(); - if(defined('UNO')) { - if(UNO) - App::$config['system']['server_role'] = 'basic'; - else - App::$config['system']['server_role'] = 'standard'; - } - - if(! (array_key_exists('server_role',App::$config['system']) && App::$config['system']['server_role'])) - App::$config['system']['server_role'] = 'standard'; + App::$config['system']['server_role'] = 'pro'; App::$timezone = ((App::$config['system']['timezone']) ? App::$config['system']['timezone'] : 'UTC'); date_default_timezone_set(App::$timezone); @@ -755,7 +739,6 @@ class miniApp { class App { public static $install = false; // true if we are installing the software - public static $role = 0; // server role (constant, not the string) public static $account = null; // account record of the logged-in account public static $channel = null; // channel record of the current channel of the logged-in account public static $observer = null; // xchan record of the page observer @@ -1030,36 +1013,10 @@ class App { } } - public static function get_role() { - if(! self::$role) - return self::set_role(); - return self::$role; - } - - public static function set_role() { - $role_str = \Zotlabs\Lib\System::get_server_role(); - switch($role_str) { - case 'basic': - $role = SERVER_ROLE_BASIC; - break; - case 'pro': - $role = SERVER_ROLE_PRO; - break; - case 'standard': - default: - $role = SERVER_ROLE_STANDARD; - break; - } - self::$role = $role; - return $role; - } - - public static function get_scheme() { return self::$scheme; } - public static function get_hostname() { return self::$hostname; } diff --git a/view/tpl/install_settings.tpl b/view/tpl/install_settings.tpl index f7a0108a8..62dcbb8b3 100755 --- a/view/tpl/install_settings.tpl +++ b/view/tpl/install_settings.tpl @@ -19,7 +19,6 @@ {{include file="field_input.tpl" field=$adminmail}} {{include file="field_input.tpl" field=$siteurl}} -{{include file="field_select.tpl" field=$server_role}} {{include file="field_select_grouped.tpl" field=$timezone}} |