no more need to set version
This commit is contained in:
parent
9215a50a6d
commit
82526b75c2
1 changed files with 8 additions and 8 deletions
12
_install.php
12
_install.php
|
@ -14,14 +14,15 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_version = dcCore::app()->plugins->moduleInfo('noodles', 'version');
|
try {
|
||||||
$old_version = dcCore::app()->getVersion('noodles');
|
if (version_compare(
|
||||||
|
dcCore::app()->getVersion('noodles'),
|
||||||
if (version_compare($old_version, $new_version, '>=')) {
|
dcCore::app()->plugins->moduleInfo('noodles', 'version'),
|
||||||
|
'>='
|
||||||
|
)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
dcCore::app()->blog->settings->addNamespace('noodles');
|
dcCore::app()->blog->settings->addNamespace('noodles');
|
||||||
dcCore::app()->blog->settings->noodles->put(
|
dcCore::app()->blog->settings->noodles->put(
|
||||||
'noodles_active',
|
'noodles_active',
|
||||||
|
@ -55,7 +56,6 @@ try {
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
dcCore::app()->setVersion('noodles', $new_version);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
Loading…
Reference in a new issue