no more need to set version
This commit is contained in:
parent
d8eaa8c368
commit
35db512230
10
_install.php
10
_install.php
@ -18,10 +18,13 @@ try {
|
||||
# Grab info
|
||||
$mod_id = basename(__DIR__);
|
||||
$dc_min = dcCore::app()->plugins->moduleInfo($mod_id, 'requires')[0][1];
|
||||
$new_version = dcCore::app()->plugins->moduleInfo($mod_id, 'version');
|
||||
|
||||
# Check installed version
|
||||
if (version_compare(dcCore::app()->getVersion($mod_id), $new_version, '>=')) {
|
||||
if (version_compare(
|
||||
dcCore::app()->getVersion($mod_id),
|
||||
dcCore::app()->plugins->moduleInfo($mod_id, 'version'),
|
||||
'>='
|
||||
)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -65,9 +68,6 @@ try {
|
||||
$s->put('periodical_updurl', false, 'boolean', 'Update post url', false, true);
|
||||
$s->put('periodical_pub_order', 'post_dt asc', 'string', 'Order of publication', false, true);
|
||||
|
||||
# Version
|
||||
dcCore::app()->setVersion($mod_id, $new_version);
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
dcCore::app()->error->add($e->getMessage());
|
||||
|
Loading…
Reference in New Issue
Block a user