plugins->moduleInfo('dcStats', 'version'); $v_old = $core->getVersion('dcStats'); try { if (version_compare($v_old, $v_new, '>=')) { /** * module is up to date */ return; } else { /** * module is to be installed or updates */ // setup default settings and new plugin version $core->blog->dcStats->initSettings(); $core->setVersion('dcStats', $v_new); unset($v_new, $v_old); return true; } } catch (Exception $e) { $core->error->add(__('Unable to install or update the plugin dcStats')); $core->error->add($e->getMessage()); return false; }