update _ install code, and try to get info direct from dcModules
This commit is contained in:
parent
3758459308
commit
9f3a2e6f2d
12
_install.php
12
_install.php
@ -12,21 +12,19 @@
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$dc_min = '2.7';
|
||||
$mod_id = 'zoneclearFeedServer';
|
||||
$dc_min = $this->modules[$mod_id]['requires'][0][1];
|
||||
|
||||
try {
|
||||
# Check module version
|
||||
if (version_compare(
|
||||
$core->getVersion($mod_id),
|
||||
$core->plugins->moduleInfo($mod_id, 'version'),
|
||||
$this->moduleInfo($mod_id, 'version'),
|
||||
'>='
|
||||
)) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -86,12 +84,10 @@ try {
|
||||
# Set module version
|
||||
$core->setVersion(
|
||||
$mod_id,
|
||||
$core->plugins->moduleInfo($mod_id, 'version')
|
||||
$this->moduleInfo($mod_id, 'version')
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user