no more need to set version
This commit is contained in:
parent
b5655a7a6b
commit
b5c6ff740a
13
_install.php
13
_install.php
@ -14,14 +14,15 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_version = dcCore::app()->plugins->moduleInfo('dcAdvancedCleaner', 'version');
|
try {
|
||||||
$old_version = dcCore::app()->getVersion('dcAdvancedCleaner');
|
if (version_compare(
|
||||||
|
dcCore::app()->getVersion('dcAdvancedCleaner'),
|
||||||
if (version_compare($old_version, $new_version, '>=')) {
|
dcCore::app()->plugins->moduleInfo('dcAdvancedCleaner', 'version'),
|
||||||
|
'>='
|
||||||
|
)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
dcCore::app()->blog->settings->addNamespace('dcAdvancedCleaner');
|
dcCore::app()->blog->settings->addNamespace('dcAdvancedCleaner');
|
||||||
|
|
||||||
dcCore::app()->blog->settings->dcAdvancedCleaner->put(
|
dcCore::app()->blog->settings->dcAdvancedCleaner->put(
|
||||||
@ -41,8 +42,6 @@ try {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
dcCore::app()->setVersion('dcAdvancedCleaner', $new_version);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
dcCore::app()->error->add($e->getMessage());
|
dcCore::app()->error->add($e->getMessage());
|
||||||
|
Loading…
Reference in New Issue
Block a user