Fixed some 1.1.7 PHP warnings
authorDan
Wed, 26 Aug 2009 23:21:56 -0400
changeset 37 3afbd6374442
parent 36 60e80cd47b61
child 38 512951548faa
Fixed some 1.1.7 PHP warnings
plugins/Gallery.php
plugins/gallery/viewimage.php
--- a/plugins/Gallery.php	Thu Jul 23 17:22:17 2009 -0400
+++ b/plugins/Gallery.php	Wed Aug 26 23:21:56 2009 -0400
@@ -23,13 +23,21 @@
 if ( !file_exists($magick_path) || !is_executable($magick_path) )
 {
   $fn = basename(__FILE__);
-  setConfig("plugin_$fn", '0');
   // set disabled flag with new plugin system
   if ( defined('ENANO_ATLEAST_1_1') && defined('PLUGIN_DISABLED') )
   {
     $q = $db->sql_query('UPDATE ' . table_prefix . "plugins SET plugin_flags = plugin_flags | " . PLUGIN_DISABLED . " WHERE plugin_filename = 'Gallery.php';");
     if ( !$q )
       $db->_die();
+	  
+    // kill off cache
+    global $cache;
+    $cache->purge('plugins');
+  }
+  else
+  {
+    // old plugin system
+    setConfig("plugin_$fn", '0');
   }
   
   die_semicritical('Snapr can\'t load on this site', '<p>You must have ImageMagick installed and working to use this plugin. The plugin has been disabled, please setup ImageMagick and then re-enable it.</p>');
--- a/plugins/gallery/viewimage.php	Thu Jul 23 17:22:17 2009 -0400
+++ b/plugins/gallery/viewimage.php	Wed Aug 26 23:21:56 2009 -0400
@@ -516,7 +516,7 @@
     }
   }
   
-  function error_404()
+  function error_404($userpage = false)
   {
     echo '<h3>There is no image in the gallery with this ID.</h3>';
     echo '<p>You have requested an image that couldn\'t be looked up. Please check the URL and try again, or visit the <a href="' . makeUrlNS('Special', 'Gallery') . '">Gallery index</a>.</p>';