no more need to set version
This commit is contained in:
parent
324f6c470d
commit
d2febcdeba
1 changed files with 5 additions and 6 deletions
11
_install.php
11
_install.php
|
@ -14,10 +14,11 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
|||
return null;
|
||||
}
|
||||
|
||||
$new_version = dcCore::app()->plugins->moduleInfo('activityReport', 'version');
|
||||
$old_version = dcCore::app()->getVersion('activityReport');
|
||||
|
||||
if (version_compare($old_version, $new_version, '>=')) {
|
||||
if (version_compare(
|
||||
dcCore::app()->getVersion('activityReport'),
|
||||
dcCore::app()->plugins->moduleInfo('activityReport', 'version'),
|
||||
'>='
|
||||
)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -54,8 +55,6 @@ try {
|
|||
$si = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
|
||||
$changes = $si->synchronize($s);
|
||||
|
||||
dcCore::app()->setVersion('activityReport', $new_version);
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
dcCore::app()->error->add($e->getMessage());
|
||||
|
|
Loading…
Reference in a new issue