1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 17:01:43 +02:00

More plugin class optimization

This commit is contained in:
Cameron
2019-01-13 14:08:46 -08:00
parent c63574c07d
commit 4becf60d28
2 changed files with 14 additions and 4 deletions

View File

@@ -101,6 +101,8 @@ class e_plugin
if(empty($this->_ids))
{
// e107::getDebug()->log("Running e_plugin::_initIDs()");
// e107::getDebug()->log(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS));
$this->_initIDs();
}
@@ -517,11 +519,15 @@ class e_plugin
$path = $row['plugin_path'];
$this->_ids[$path] = (int) $row['plugin_id'];
if(!empty($row['plugin_installflag']) && !isset($pref[$path]))
if(!empty($row['plugin_installflag']) )
{
$this->_installed[$path] = $row['plugin_version'];
$cfg->setPref('plug_installed/'.$path, $row['plugin_version']);
$save = true;
if(!isset($pref[$path]))
{
$cfg->setPref('plug_installed/'.$path, $row['plugin_version']);
$save = true;
}
}
$this->_addons[$path] = !empty($row['plugin_addons']) ? explode(',',$row['plugin_addons']) : null;// $path;

View File

@@ -585,7 +585,11 @@ 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);
e107::getCache()->clear_sys('Config_'.$this->alias.'_backup');
e107::getDebug()->log(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2));
if(deftrue('e_DEBUG'))
{
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2);
$log->logMessage(print_a($backtrace,true), E_MESSAGE_DEBUG);
}
}
}