mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Fixed E_NOTICE in plugin install/uninstall process
- FIX: e107::coreLan() now loads the lan_admin.php file if the $admin argument is true - FIX: Variable scope of $eplug_folder in e107plugin::uninstall() - FIX: isset() check order in pluginsTest::makePluginReport() - FIX: class2.php: Missing ADMINPERMS constant in CLI mode
This commit is contained in:
@@ -1417,12 +1417,6 @@ define('TIMEOFFSET', $e_deltaTime);
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
$sql->db_Mark_Time('Find/Load Theme');
|
$sql->db_Mark_Time('Find/Load Theme');
|
||||||
|
|
||||||
if(e_ADMIN_AREA) // Load admin phrases ASAP
|
|
||||||
{
|
|
||||||
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(!defined('THEME'))
|
if(!defined('THEME'))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -2032,6 +2026,7 @@ e107::getDebug()->log("Timezone: ".USERTIMEZONE); // remove later on.
|
|||||||
define('USERNAME', 'e107-cli');
|
define('USERNAME', 'e107-cli');
|
||||||
define('USERTHEME', false);
|
define('USERTHEME', false);
|
||||||
define('ADMIN', true);
|
define('ADMIN', true);
|
||||||
|
define('ADMINPERMS', false);
|
||||||
define('GUEST', false);
|
define('GUEST', false);
|
||||||
define('USERCLASS', '');
|
define('USERCLASS', '');
|
||||||
define('USEREMAIL', '');
|
define('USEREMAIL', '');
|
||||||
|
@@ -3145,6 +3145,11 @@ class e107
|
|||||||
*/
|
*/
|
||||||
public static function coreLan($fname, $admin = false)
|
public static function coreLan($fname, $admin = false)
|
||||||
{
|
{
|
||||||
|
if ($admin)
|
||||||
|
{
|
||||||
|
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
||||||
|
}
|
||||||
|
|
||||||
$cstring = 'corelan/'.e_LANGUAGE.'_'.$fname.($admin ? '_admin' : '_front');
|
$cstring = 'corelan/'.e_LANGUAGE.'_'.$fname.($admin ? '_admin' : '_front');
|
||||||
if(self::getRegistry($cstring)) return;
|
if(self::getRegistry($cstring)) return;
|
||||||
|
|
||||||
|
@@ -4311,7 +4311,6 @@ class e107plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function uninstall($id, $options = array())
|
public function uninstall($id, $options = array())
|
||||||
{
|
{
|
||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
@@ -4338,11 +4337,11 @@ class e107plugin
|
|||||||
|
|
||||||
$text = '';
|
$text = '';
|
||||||
//Uninstall Plugin
|
//Uninstall Plugin
|
||||||
|
$eplug_folder = $plug['plugin_path'];
|
||||||
if ($plug['plugin_installflag'] == true)
|
if ($plug['plugin_installflag'] == true)
|
||||||
{
|
{
|
||||||
$this->log("plugin_installflag = true, proceeding to uninstall");
|
$this->log("plugin_installflag = true, proceeding to uninstall");
|
||||||
|
|
||||||
$eplug_folder = $plug['plugin_path'];
|
|
||||||
$_path = e_PLUGIN . $plug['plugin_path'] . '/';
|
$_path = e_PLUGIN . $plug['plugin_path'] . '/';
|
||||||
|
|
||||||
if (file_exists($_path . 'plugin.xml'))
|
if (file_exists($_path . 'plugin.xml'))
|
||||||
@@ -4475,7 +4474,6 @@ class e107plugin
|
|||||||
$this->log("Uninstall completed");
|
$this->log("Uninstall completed");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,10 +42,10 @@
|
|||||||
$debug_text .= "---- Pref: plug_installed (version)\n\n";
|
$debug_text .= "---- Pref: plug_installed (version)\n\n";
|
||||||
$pref = e107::getConfig('core',true,true)->get('plug_installed');
|
$pref = e107::getConfig('core',true,true)->get('plug_installed');
|
||||||
|
|
||||||
$debug_text .= print_r($pref[$pluginDir],true);
|
|
||||||
|
|
||||||
$installedPref = isset($pref[$pluginDir]) ? $pref[$pluginDir] : false;
|
$installedPref = isset($pref[$pluginDir]) ? $pref[$pluginDir] : false;
|
||||||
|
|
||||||
|
$debug_text .= print_r($installedPref,true);
|
||||||
|
|
||||||
$debug_text .= "\n\n---- Plugin Prefs: \n\n";
|
$debug_text .= "\n\n---- Plugin Prefs: \n\n";
|
||||||
$pluginPref = e107::pref($pluginDir);
|
$pluginPref = e107::pref($pluginDir);
|
||||||
$debug_text .= print_r($pluginPref,true);
|
$debug_text .= print_r($pluginPref,true);
|
||||||
|
Reference in New Issue
Block a user