Remove unneeded versions

Fixes #97
This commit is contained in:
Dmitriy Simushev 2014-12-24 12:50:27 +00:00
parent 1306efd380
commit 27a23f68c0
6 changed files with 4 additions and 27 deletions

View File

@ -52,11 +52,8 @@ class HomeController extends AbstractController
$page = array( $page = array(
'version' => MIBEW_VERSION, 'version' => MIBEW_VERSION,
'localeLinks' => get_locale_links(), 'localeLinks' => get_locale_links(),
'needUpdate' => version_compare(Settings::get('dbversion'), DB_VERSION, '<'), 'needUpdate' => version_compare(Settings::get('dbversion'), MIBEW_VERSION, '<'),
'profilePage' => $this->generateUrl('operator_edit', array('operator_id' => $operator['operatorid'])), 'profilePage' => $this->generateUrl('operator_edit', array('operator_id' => $operator['operatorid'])),
'updateWizard' => $this->generateUrl('update'),
'newFeatures' => Settings::get('featuresversion') != FEATURES_VERSION,
'featuresPage' => $this->generateUrl('settings_features'),
'isOnline' => $is_online, 'isOnline' => $is_online,
'warnOffline' => true, 'warnOffline' => true,
'title' => getlocal('Home'), 'title' => getlocal('Home'),

View File

@ -43,10 +43,6 @@ class FeaturesController extends AbstractController
'errors' => array(), 'errors' => array(),
); );
if (Settings::get('featuresversion') != FEATURES_VERSION) {
Settings::set('featuresversion', FEATURES_VERSION);
}
// Load all needed options and fill form with them. // Load all needed options and fill form with them.
$options = $this->getOptionsList(); $options = $this->getOptionsList();
foreach ($options as $opt) { foreach ($options as $opt) {

View File

@ -428,7 +428,7 @@ class Installer
'INSERT INTO {config} (vckey, vcvalue) VALUES (:key, :value)', 'INSERT INTO {config} (vckey, vcvalue) VALUES (:key, :value)',
array( array(
':key' => 'dbversion', ':key' => 'dbversion',
':value' => DB_VERSION, ':value' => MIBEW_VERSION,
) )
); );
} }
@ -625,7 +625,7 @@ class Installer
*/ */
protected function tablesNeedUpdate() protected function tablesNeedUpdate()
{ {
return version_compare($this->getDatabaseVersion(), DB_VERSION, '<'); return version_compare($this->getDatabaseVersion(), MIBEW_VERSION, '<');
} }
/** /**

View File

@ -68,7 +68,6 @@ class Settings
// Set default values // Set default values
$this->settings = array( $this->settings = array(
'dbversion' => 0, 'dbversion' => 0,
'featuresversion' => 0,
'title' => 'Your Company', 'title' => 'Your Company',
'hosturl' => 'http://mibew.org', 'hosturl' => 'http://mibew.org',
'logo' => '', 'logo' => '',

View File

@ -22,16 +22,6 @@
*/ */
define('MIBEW_VERSION', '2.0.0-beta.1'); define('MIBEW_VERSION', '2.0.0-beta.1');
/**
* Current version of database structure
*/
define('DB_VERSION', '2.0.0-beta.1');
/**
* Current version of implemented features
*/
define('FEATURES_VERSION', '2.0.0-beta.1');
/** /**
* Prefix for session variables. * Prefix for session variables.
* Provide an ability to instal several mibew instances on one server. * Provide an ability to instal several mibew instances on one server.

View File

@ -10,13 +10,8 @@
{{#override "content"}} {{#override "content"}}
<br/> <br/>
{{#if needUpdate}} {{#if needUpdate}}
<div id="form-message">{{l10n "Please run the <a href=\"{0}\">Update wizard</a> to adjust your database." updateWizard}}</div> <div id="form-message">{{l10n "Please run the <a href=\"{0}\">Update wizard</a> to adjust your database." (route "update")}}</div>
<br/> <br/>
{{else}}
{{#if newFeatures}}
<div><div id="form-message">{{l10n "Congratulations! You now have Mibew Messenger {1} installed. Turn on more features on the <a href=\"{0}\">Optional services</a> page." featuresPage mibewVersion}}</div></div>
<br/>
{{/if}}
{{/if}} {{/if}}
<div id="dashboard"> <div id="dashboard">