Fixed a few bugs with plugin management and importing of old plugin metadata
authorDan
Mon, 22 Dec 2008 18:51:05 -0500
changeset 791 e6094f56f941
parent 790 e210589fb79d
child 792 b55b87e5fafd
Fixed a few bugs with plugin management and importing of old plugin metadata
includes/plugins.php
plugins/admin/PluginManager.php
--- a/includes/plugins.php	Mon Dec 22 13:31:07 2008 -0500
+++ b/includes/plugins.php	Mon Dec 22 18:51:05 2008 -0500
@@ -520,6 +520,7 @@
   {
     global $db, $session, $paths, $template, $plugins; // Common objects
     global $lang;
+    global $cache;
     
     if ( defined('ENANO_DEMO_MODE') )
     {
@@ -621,6 +622,8 @@
     
     endswitch;
     
+    $cache->purge('plugins');
+    
     return $return;
   }
   
@@ -738,6 +741,8 @@
     
     endswitch;
     
+    $cache->purge('plugins');
+    
     return $return;
   }
   
@@ -961,6 +966,8 @@
     
     endswitch;
     
+    $cache->purge('plugins');
+    
     return $return;
   }
   
--- a/plugins/admin/PluginManager.php	Mon Dec 22 13:31:07 2008 -0500
+++ b/plugins/admin/PluginManager.php	Mon Dec 22 18:51:05 2008 -0500
@@ -275,8 +275,8 @@
                   if ( $row['config_value'] == '0' )
                   {
                     $fn_db = $db->escape($plugin_filename);
-                    $q = $db->sql_query('UPDATE ' . table_prefix . "plugins SET plugin_flags = plugin_flags | " . PLUGIN_DISABLED . " WHERE plugin_filename = '$fn_db';");
-                    if ( !$q )
+                    $e = $db->sql_query('UPDATE ' . table_prefix . "plugins SET plugin_flags = plugin_flags | " . PLUGIN_DISABLED . " WHERE plugin_filename = '$fn_db';");
+                    if ( !$e )
                       $db->die_json();
                   }
                 }