mirror of
https://github.com/e107inc/e107.git
synced 2025-05-06 04:06:08 +02:00
Optimized plugin class initialization
This commit is contained in:
parent
07ad8feba8
commit
c63574c07d
@ -506,6 +506,8 @@ class e_plugin
|
|||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$cfg = e107::getConfig();
|
$cfg = e107::getConfig();
|
||||||
|
|
||||||
|
$pref = $cfg->get('plug_installed');
|
||||||
|
|
||||||
$save = false;
|
$save = false;
|
||||||
if ($rows = $sql->retrieve("plugin", "*", "plugin_id != '' ORDER by plugin_path ", true))
|
if ($rows = $sql->retrieve("plugin", "*", "plugin_id != '' ORDER by plugin_path ", true))
|
||||||
{
|
{
|
||||||
@ -515,7 +517,7 @@ class e_plugin
|
|||||||
$path = $row['plugin_path'];
|
$path = $row['plugin_path'];
|
||||||
$this->_ids[$path] = (int) $row['plugin_id'];
|
$this->_ids[$path] = (int) $row['plugin_id'];
|
||||||
|
|
||||||
if(!empty($row['plugin_installflag']))
|
if(!empty($row['plugin_installflag']) && !isset($pref[$path]))
|
||||||
{
|
{
|
||||||
$this->_installed[$path] = $row['plugin_version'];
|
$this->_installed[$path] = $row['plugin_version'];
|
||||||
$cfg->setPref('plug_installed/'.$path, $row['plugin_version']);
|
$cfg->setPref('plug_installed/'.$path, $row['plugin_version']);
|
||||||
|
@ -585,6 +585,7 @@ class e_pref extends e_front_model
|
|||||||
{
|
{
|
||||||
if(!$disallow_logs) $log->logMessage('Backup of <strong>'.$this->alias.' ('.$this->prefid.')</strong> successfully created.', E_MESSAGE_DEBUG, E_MESSAGE_SUCCESS, $session_messages);
|
if(!$disallow_logs) $log->logMessage('Backup of <strong>'.$this->alias.' ('.$this->prefid.')</strong> successfully created.', E_MESSAGE_DEBUG, E_MESSAGE_SUCCESS, $session_messages);
|
||||||
e107::getCache()->clear_sys('Config_'.$this->alias.'_backup');
|
e107::getCache()->clear_sys('Config_'.$this->alias.'_backup');
|
||||||
|
e107::getDebug()->log(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user