mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
install/uninstall using plugin.xml doesn't lose setting in plugin table now
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
|
||||||
| $Revision: 1.13 $
|
| $Revision: 1.14 $
|
||||||
| $Date: 2008-02-13 02:58:58 $
|
| $Date: 2008-02-17 03:42:33 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: mcfly_e107 $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -241,13 +241,14 @@ if ($action == 'uninstall')
|
|||||||
{
|
{
|
||||||
$plugin->manage_userclass('remove', $eplug_userclass);
|
$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']]))
|
if (isset($pref['plug_installed'][$plug['plugin_path']]))
|
||||||
{
|
{
|
||||||
unset($pref['plug_installed'][$plug['plugin_path']]);
|
unset($pref['plug_installed'][$plug['plugin_path']]);
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
|
||||||
| $Revision: 1.33 $
|
| $Revision: 1.34 $
|
||||||
| $Date: 2008-02-13 02:58:58 $
|
| $Date: 2008-02-17 03:42:33 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: mcfly_e107 $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -787,14 +787,20 @@ class e107plugin
|
|||||||
$txt .= $this->execute_function($path, $function, 'post');
|
$txt .= $this->execute_function($path, $function, 'post');
|
||||||
|
|
||||||
|
|
||||||
|
$eplug_addons = $this->getAddons($plug['plugin_path']);
|
||||||
|
|
||||||
if($function == 'install' || $function == 'upgrade')
|
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);
|
$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'];
|
$pref['plug_installed'][$plug['plugin_path']] = $plug_vars['version'];
|
||||||
save_prefs();
|
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')
|
if($function == 'install')
|
||||||
{
|
{
|
||||||
$txt .= LAN_INSTALL_SUCCESSFUL."<br />";
|
$txt .= LAN_INSTALL_SUCCESSFUL."<br />";
|
||||||
|
Reference in New Issue
Block a user