no more need to set version
This commit is contained in:
parent
2217d70dd8
commit
6f9334cbbf
1 changed files with 6 additions and 5 deletions
11
_install.php
11
_install.php
|
@ -19,8 +19,12 @@ try {
|
||||||
$mod_id = basename(__DIR__);
|
$mod_id = basename(__DIR__);
|
||||||
|
|
||||||
# check installed version
|
# check installed version
|
||||||
if (version_compare(dcCore::app()->getVersion($mod_id), $new_version, '>=')) {
|
if (version_compare(
|
||||||
return;
|
dcCore::app()->getVersion($mod_id),
|
||||||
|
dcCore::app()->plugins->moduleInfo($mod_id, 'version'),
|
||||||
|
'>='
|
||||||
|
)) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Table is the same for plugins
|
# Table is the same for plugins
|
||||||
|
@ -71,9 +75,6 @@ try {
|
||||||
require_once __DIR__ . '/inc/patch.0.5.php';
|
require_once __DIR__ . '/inc/patch.0.5.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set module version
|
|
||||||
dcCore::app()->setVersion($mod_id, $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 a new issue