1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

install/uninstall using plugin.xml doesn't lose setting in plugin table now

This commit is contained in:
mcfly
2008-02-17 03:42:33 +00:00
parent 62fd0ca0c1
commit 2f33412cea
2 changed files with 16 additions and 9 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
| $Revision: 1.13 $
| $Date: 2008-02-13 02:58:58 $
| $Revision: 1.14 $
| $Date: 2008-02-17 03:42:33 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
@@ -241,13 +241,14 @@ if ($action == 'uninstall')
{
$plugin->manage_userclass('remove', $eplug_userclass);
}
$sql->db_Update('plugin', "plugin_installflag=0, plugin_version='{$eplug_version}' WHERE plugin_id='{$id}' ");
$plugin->manage_search('remove', $eplug_folder);
$plugin->manage_notify('remove', $eplug_folder);
}
$plugin->manage_search('remove', $eplug_folder);
$plugin->manage_notify('remove', $eplug_folder);
$sql->db_Update('plugin', "plugin_installflag=0, plugin_version='{$eplug_version}' WHERE plugin_id='{$id}' ");
if (isset($pref['plug_installed'][$plug['plugin_path']]))
{
unset($pref['plug_installed'][$plug['plugin_path']]);

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
| $Revision: 1.33 $
| $Date: 2008-02-13 02:58:58 $
| $Revision: 1.34 $
| $Date: 2008-02-17 03:42:33 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
@@ -787,14 +787,20 @@ class e107plugin
$txt .= $this->execute_function($path, $function, 'post');
$eplug_addons = $this->getAddons($plug['plugin_path']);
if($function == 'install' || $function == 'upgrade')
{
$eplug_addons = $this->getAddons($plug_vars['folder']);
$sql->db_Update('plugin', "plugin_installflag = 1, plugin_addons = '{$eplug_addons}', plugin_version = '{$plug_vars['version']}' WHERE plugin_id = ".$id);
$pref['plug_installed'][$plug['plugin_path']] = $plug_vars['version'];
save_prefs();
}
if($function == 'uninstall')
{
$sql->db_Update('plugin', "plugin_installflag = 0, plugin_addons = '{$eplug_addons}', plugin_version = '{$plug_vars['version']}' WHERE plugin_id = ".$id);
}
if($function == 'install')
{
$txt .= LAN_INSTALL_SUCCESSFUL."<br />";