mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
EONE-43 (Bug): Installation (and uninstall) of plugins now working
This commit is contained in:
@@ -301,7 +301,7 @@ class e107plugin
|
|||||||
|
|
||||||
function manage_icons($plugin='',$function='')
|
function manage_icons($plugin='',$function='')
|
||||||
{
|
{
|
||||||
|
|
||||||
if($plugin == '')
|
if($plugin == '')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -311,23 +311,23 @@ class e107plugin
|
|||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$med = e107::getMedia();
|
$med = e107::getMedia();
|
||||||
|
|
||||||
if($function == 'install' || $function == 'upgrade')
|
if($function == 'install' || $function == 'upgrade')
|
||||||
{
|
{
|
||||||
$med->importIcons(e_PLUGIN.$plugin);
|
$med->importIcons(e_PLUGIN.$plugin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($function == 'uninstall')
|
if($function == 'uninstall')
|
||||||
{
|
{
|
||||||
if(vartrue($this->unInstallOpts['delete_ipool'], FALSE))
|
if(vartrue($this->unInstallOpts['delete_ipool'], FALSE))
|
||||||
{
|
{
|
||||||
$status = ($med->removePath(e_PLUGIN.$plugin,'icon')) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
$status = ($med->removePath(e_PLUGIN.$plugin,'icon')) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
||||||
$mes->add('Removing Icons from Media-Manager', $status);
|
$mes->add('Removing Icons from Media-Manager', $status);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ class e107plugin
|
|||||||
|
|
||||||
$mes->add("Userclass: ".$action.": ".$class_name." : ".$class_description, E_MESSAGE_DEBUG);
|
$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
|
$e107->user_class = new user_class_admin; // We need the extra methods of the admin extension
|
||||||
}
|
}
|
||||||
|
@@ -92,6 +92,13 @@ class user_class
|
|||||||
$this->readTree(TRUE); // Initialise the classes on entry
|
$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).
|
* Ensure the tree of userclass data is stored in our object ($this->class_tree).
|
||||||
|
Reference in New Issue
Block a user