no more need to set version
This commit is contained in:
parent
b6e941b1c8
commit
870bcb024b
@ -17,8 +17,11 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
|||||||
try {
|
try {
|
||||||
$mod_id = basename(__DIR__);
|
$mod_id = basename(__DIR__);
|
||||||
|
|
||||||
$version = dcCore::app()->plugins->moduleInfo($mod_id, 'version');
|
if (version_compare(
|
||||||
if (version_compare(dcCore::app()->getVersion($mod_id), $version, '>=')) {
|
dcCore::app()->getVersion($mod_id),
|
||||||
|
dcCore::app()->plugins->moduleInfo($mod_id, 'version'),
|
||||||
|
'>='
|
||||||
|
)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,8 +43,6 @@ try {
|
|||||||
$si = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
|
$si = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
|
||||||
$changes = $si->synchronize($s);
|
$changes = $si->synchronize($s);
|
||||||
|
|
||||||
dcCore::app()->setVersion($mod_id, $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