# HG changeset patch # User Dan # Date 1251343316 14400 # Node ID 3afbd6374442e127691a8fb68fd9349cdf3a783c # Parent 60e80cd47b615361c8e517168d875de0d04ce765 Fixed some 1.1.7 PHP warnings diff -r 60e80cd47b61 -r 3afbd6374442 plugins/Gallery.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', '

You must have ImageMagick installed and working to use this plugin. The plugin has been disabled, please setup ImageMagick and then re-enable it.

'); diff -r 60e80cd47b61 -r 3afbd6374442 plugins/gallery/viewimage.php --- 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 '

There is no image in the gallery with this ID.

'; echo '

You have requested an image that couldn\'t be looked up. Please check the URL and try again, or visit the Gallery index.

';