no more need to set version
This commit is contained in:
parent
0d1f74998c
commit
0ab2e947a0
1 changed files with 8 additions and 8 deletions
14
_install.php
14
_install.php
|
@ -14,14 +14,15 @@ if (!defined('DC_RC_PATH')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$label = basename(__DIR__);
|
try {
|
||||||
$new_version = dcCore::app()->plugins->moduleInfo($label, 'version');
|
if (version_compare(
|
||||||
|
dcCore::app()->getVersion(basename(__DIR__)),
|
||||||
if (version_compare(dcCore::app()->getVersion($label), $new_version, '>=')) {
|
dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version'),
|
||||||
return;
|
'>='
|
||||||
|
)) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
dcCore::app()->blog->settings->addNamespace('myurlhandlers');
|
dcCore::app()->blog->settings->addNamespace('myurlhandlers');
|
||||||
dcCore::app()->blog->settings->myurlhandlers->put(
|
dcCore::app()->blog->settings->myurlhandlers->put(
|
||||||
'url_handlers',
|
'url_handlers',
|
||||||
|
@ -30,7 +31,6 @@ try {
|
||||||
'Personalized URL handlers',
|
'Personalized URL handlers',
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
dcCore::app()->setVersion($label, $new_version);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
Loading…
Reference in a new issue