1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

EONE-43 (Bug): Installation (and uninstall) of plugins now working

This commit is contained in:
mcfly
2010-03-17 23:59:52 +00:00
parent 6f5065c093
commit 6bddf9ef51
2 changed files with 13 additions and 6 deletions

View File

@@ -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
}

View File

@@ -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).