mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Fixes #3741 - Issue with plugins, menus disappearing or displaying as being uninstalled.
This commit is contained in:
@@ -526,7 +526,7 @@ class e_plugin
|
|||||||
|
|
||||||
$path = $row['plugin_path'];
|
$path = $row['plugin_path'];
|
||||||
|
|
||||||
if(!in_array($path,$detected))
|
if(!empty($detected) && !in_array($path,$detected))
|
||||||
{
|
{
|
||||||
$toRemove[] = (int) $row['plugin_id'];
|
$toRemove[] = (int) $row['plugin_id'];
|
||||||
continue;
|
continue;
|
||||||
@@ -542,6 +542,7 @@ class e_plugin
|
|||||||
if(!isset($pref[$path]))
|
if(!isset($pref[$path]))
|
||||||
{
|
{
|
||||||
$cfg->setPref('plug_installed/'.$path, $row['plugin_version']);
|
$cfg->setPref('plug_installed/'.$path, $row['plugin_version']);
|
||||||
|
e107::getAdminLog()->addDebug($path)->save("plug_installed pref updated");
|
||||||
$save = true;
|
$save = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -565,7 +566,8 @@ class e_plugin
|
|||||||
|
|
||||||
if($sql->delete('plugin', "plugin_id IN (".$delList.")"))
|
if($sql->delete('plugin', "plugin_id IN (".$delList.")"))
|
||||||
{
|
{
|
||||||
e107::getDebug()->log("Deleted missing plugins with id(s): ".$delList);
|
e107::getAdminLog()->addDebug("Deleted missing plugins with id(s): ".$delList)->save("Plugin Table Updated");
|
||||||
|
// e107::getDebug()->log("Deleted missing plugins with id(s): ".$delList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,6 +587,7 @@ class e_plugin
|
|||||||
if(!$id = $sql->insert('plugin',$row))
|
if(!$id = $sql->insert('plugin',$row))
|
||||||
{
|
{
|
||||||
e107::getDebug()->log("Unable to insert plugin data into table".print_a($row,true));
|
e107::getDebug()->log("Unable to insert plugin data into table".print_a($row,true));
|
||||||
|
e107::getAdminLog()->addDebug("Unable to insert plugin data into table".print_a($row,true))->save("plug_installed pref updated");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -593,6 +596,7 @@ class e_plugin
|
|||||||
$runUpdate = true;
|
$runUpdate = true;
|
||||||
|
|
||||||
e107::getDebug()->log("Inserting plugin data into table".print_a($row,true));
|
e107::getDebug()->log("Inserting plugin data into table".print_a($row,true));
|
||||||
|
e107::getAdminLog()->addArray($row)->save("Plugin Table Entry Added");
|
||||||
|
|
||||||
if($row['plugin_installflag'] == 1)
|
if($row['plugin_installflag'] == 1)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user