Ignore:
Timestamp:
06/28/11 10:38:43 (9 years ago)
Author:
patdenice
Message:

Work with community

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/external_ImageMagick/trunk/main.inc.php

    r9860 r11541  
    1515add_event_handler('get_admin_plugin_menu_links', 'imagick_exec_init'); 
    1616add_event_handler('ws_add_methods', 'ws_add_method_load_imagick_exec_functions'); 
     17add_event_handler('loc_end_section_init', 'imagick_exec_section_init', 60); 
    1718 
    1819function imagick_exec_init($menu) 
     
    2425    array_push($page['warnings'], l10n('Unable to locate ImageMagick directory. Please fill $conf[\'imagick_directory\'] in your local configuration file.')); 
    2526  } 
    26   elseif (($page['page'] == 'photos_add' or script_basename() == 'uploadify') and test_imagick_exec()) 
     27  elseif ($page['page'] == 'photos_add' and test_imagick_exec()) 
    2728  { 
    2829    include_once(IMAGICK_EXEC_PATH.'imagick.class.php'); 
     
    3031 
    3132  return $menu; 
     33} 
     34 
     35// Only for Community plugin 
     36function imagick_exec_section_init() 
     37{ 
     38  global $page; 
     39   
     40  if (isset($page['section']) and $page['section'] == 'add_photos') 
     41  { 
     42    include_once(IMAGICK_EXEC_PATH.'imagick.class.php'); 
     43  } 
    3244} 
    3345 
     
    4759} 
    4860 
     61if (script_basename() == 'uploadify' and test_imagick_exec()) 
     62{ 
     63  include_once(IMAGICK_EXEC_PATH.'imagick.class.php'); 
     64} 
     65 
    4966?> 
Note: See TracChangeset for help on using the changeset viewer.