From 6bddf9ef511dfacaf5dda83d94da4613d3b08410 Mon Sep 17 00:00:00 2001 From: mcfly Date: Wed, 17 Mar 2010 23:59:52 +0000 Subject: [PATCH] EONE-43 (Bug): Installation (and uninstall) of plugins now working --- e107_handlers/plugin_class.php | 12 ++++++------ e107_handlers/userclass_class.php | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index b581b806b..baf34e16b 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -301,7 +301,7 @@ class e107plugin function manage_icons($plugin='',$function='') { - + if($plugin == '') { return; @@ -311,23 +311,23 @@ class e107plugin $sql = e107::getDb(); $tp = e107::getParser(); $med = e107::getMedia(); - + if($function == 'install' || $function == 'upgrade') { $med->importIcons(e_PLUGIN.$plugin); return; } - + if($function == 'uninstall') { if(vartrue($this->unInstallOpts['delete_ipool'], FALSE)) - { + { $status = ($med->removePath(e_PLUGIN.$plugin,'icon')) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; $mes->add('Removing Icons from Media-Manager', $status); } return; - } + } } @@ -392,7 +392,7 @@ class e107plugin $mes->add("Userclass: ".$action.": ".$class_name." : ".$class_description, E_MESSAGE_DEBUG); - if (!$e107->user_class->isAdmin) + if (!$e107->user_class->isAdmin()) { $e107->user_class = new user_class_admin; // We need the extra methods of the admin extension } diff --git a/e107_handlers/userclass_class.php b/e107_handlers/userclass_class.php index 4c3356ea9..b3144d66e 100644 --- a/e107_handlers/userclass_class.php +++ b/e107_handlers/userclass_class.php @@ -92,6 +92,13 @@ class user_class $this->readTree(TRUE); // Initialise the classes on entry } + /** + * Return value of isAdmin + */ + public function isAdmin() + { + return $this->isAdmin; + } /** * Ensure the tree of userclass data is stored in our object ($this->class_tree).