no more need to set version
This commit is contained in:
parent
324f6c470d
commit
d2febcdeba
11
_install.php
11
_install.php
@ -14,10 +14,11 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_version = dcCore::app()->plugins->moduleInfo('activityReport', 'version');
|
if (version_compare(
|
||||||
$old_version = dcCore::app()->getVersion('activityReport');
|
dcCore::app()->getVersion('activityReport'),
|
||||||
|
dcCore::app()->plugins->moduleInfo('activityReport', 'version'),
|
||||||
if (version_compare($old_version, $new_version, '>=')) {
|
'>='
|
||||||
|
)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,8 +55,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('activityReport', $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