plugins/Gallery.php
changeset 37 3afbd6374442
parent 29 205d0534a0f2
child 39 e9a7e37bdadd
equal deleted inserted replaced
36:60e80cd47b61 37:3afbd6374442
    21 
    21 
    22 $magick_path = getConfig('imagemagick_path');
    22 $magick_path = getConfig('imagemagick_path');
    23 if ( !file_exists($magick_path) || !is_executable($magick_path) )
    23 if ( !file_exists($magick_path) || !is_executable($magick_path) )
    24 {
    24 {
    25   $fn = basename(__FILE__);
    25   $fn = basename(__FILE__);
    26   setConfig("plugin_$fn", '0');
       
    27   // set disabled flag with new plugin system
    26   // set disabled flag with new plugin system
    28   if ( defined('ENANO_ATLEAST_1_1') && defined('PLUGIN_DISABLED') )
    27   if ( defined('ENANO_ATLEAST_1_1') && defined('PLUGIN_DISABLED') )
    29   {
    28   {
    30     $q = $db->sql_query('UPDATE ' . table_prefix . "plugins SET plugin_flags = plugin_flags | " . PLUGIN_DISABLED . " WHERE plugin_filename = 'Gallery.php';");
    29     $q = $db->sql_query('UPDATE ' . table_prefix . "plugins SET plugin_flags = plugin_flags | " . PLUGIN_DISABLED . " WHERE plugin_filename = 'Gallery.php';");
    31     if ( !$q )
    30     if ( !$q )
    32       $db->_die();
    31       $db->_die();
       
    32 	  
       
    33     // kill off cache
       
    34     global $cache;
       
    35     $cache->purge('plugins');
       
    36   }
       
    37   else
       
    38   {
       
    39     // old plugin system
       
    40     setConfig("plugin_$fn", '0');
    33   }
    41   }
    34   
    42   
    35   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>');
    43   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>');
    36 }
    44 }
    37 
    45