| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: imageapi.install,v 1.7 2008/12/21 23:08:39 drewish Exp $ 3 4 5 /** 6 * Implementation of hook_requirements(). 7 */ 8 function imageapi_requirements($phase) { 9 $requirements = array(); 10 // Ensure translations don't break at install time. 11 $t = get_t(); 12 13 // Check this at runtime rather than install time because the order of 14 // installation doesn't take dependencies into account. ImageAPI may have 15 // been installed by not loaded and if we report a requirement error 16 // because we can't find its function or no toolkit is enabled modules that 17 // depend on us will still be enabled but will have a missing dependency. 18 // Seems like a better idea to let everything get enabled and then inform 19 // them of the problem. 20 if ($phase == 'runtime') { 21 if (count(imageapi_get_available_toolkits()) == 0) { 22 $requirements['imageapi_toolkits'] = array( 23 'title' => $t('ImageAPI Toolkit'), 24 'value' => $t('No ImageAPI toolkits available'), 25 'severity' => REQUIREMENT_ERROR, 26 'description' => $t('ImageAPI requires a Toolkit such as ImageAPI GD or ImageAPI ImageMagick to function. Go to !modules and enable one of them.', array('!modules' => l('admin/build/modules', 'admin/build/modules'))), 27 ); 28 } 29 } 30 31 return $requirements; 32 } 33 function imageapi_install() { 34 } 35 36 /** 37 * Implementation of hook_uninstall(). 38 * 39 */ 40 function imageapi_uninstall() { 41 variable_del('imageapi_image_toolkit'); 42 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |