$t('Image CAPTCHA requires GD library'), 'description' => $t('The Image CAPTCHA module can not be installed because your PHP setup does not provide the GD library, which is required to generate images.', array('!gddoc' => 'http://www.php.net/manual/en/book.image.php',) ), 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; } /** * On uninstall: remove module variables and clear variable cache */ function image_captcha_uninstall() { db_query("DELETE FROM {variable} WHERE name LIKE 'image_captcha_%'"); cache_clear_all('variables', 'cache'); } /** * Implementation of hook_update_N() */ function image_captcha_update_6201() { // Fixing a typo in a variable. $old = 'image_captcha_bilinair_interpolation'; $new = 'image_captcha_bilinear_interpolation'; variable_set($new, variable_get($old, FALSE)); variable_del($old); $items = array(); return $items; } /** * Implementation of hook_update_N(). * * Translate single font variable to multiple font variable. */ function image_captcha_update_6203() { // Old single font variable. $font = variable_get('image_captcha_font', NULL); // If there was a valid value, // save it as an array to the new multiple fonts variable. if ($font != NULL) { variable_set('image_captcha_fonts', array($font)); } return array(); }