Index: /extensions/external_ImageMagick/trunk/main.inc.php
===================================================================
--- /extensions/external_ImageMagick/trunk/main.inc.php	(revision 9860)
+++ /extensions/external_ImageMagick/trunk/main.inc.php	(revision 11541)
@@ -15,4 +15,5 @@
 add_event_handler('get_admin_plugin_menu_links', 'imagick_exec_init');
 add_event_handler('ws_add_methods', 'ws_add_method_load_imagick_exec_functions');
+add_event_handler('loc_end_section_init', 'imagick_exec_section_init', 60);
 
 function imagick_exec_init($menu)
@@ -24,5 +25,5 @@
     array_push($page['warnings'], l10n('Unable to locate ImageMagick directory. Please fill $conf[\'imagick_directory\'] in your local configuration file.'));
   }
-  elseif (($page['page'] == 'photos_add' or script_basename() == 'uploadify') and test_imagick_exec())
+  elseif ($page['page'] == 'photos_add' and test_imagick_exec())
   {
     include_once(IMAGICK_EXEC_PATH.'imagick.class.php');
@@ -30,4 +31,15 @@
 
   return $menu;
+}
+
+// Only for Community plugin
+function imagick_exec_section_init()
+{
+  global $page;
+  
+  if (isset($page['section']) and $page['section'] == 'add_photos')
+  {
+    include_once(IMAGICK_EXEC_PATH.'imagick.class.php');
+  }
 }
 
@@ -47,3 +59,8 @@
 }
 
+if (script_basename() == 'uploadify' and test_imagick_exec())
+{
+  include_once(IMAGICK_EXEC_PATH.'imagick.class.php');
+}
+
 ?>
