'light', 'white' => 'light', 'blackglass' => 'dark', 'clean' => 'light', 'custom' => 'light', ); // Upgrade from 6.x-2.x to 7.x-2.x $recaptcha_themes += array( 'light' => 'light', 'dark' => 'dark', ); $recaptcha_theme = variable_get('recaptcha_theme', 'light'); variable_set('recaptcha_theme', $recaptcha_themes[$recaptcha_theme]); // Delete obsolete variables. variable_del('recaptcha_ajax_api'); variable_del('recaptcha_nocookies'); variable_del('recaptcha_server_status_check_interval'); // Remove stale variables not cleaned up properly in previous releases. variable_del('recaptcha_api_server'); variable_del('recaptcha_api_secure_server'); variable_del('recaptcha_secure_connection'); variable_del('recaptcha_verify_server'); // Mailhide module is not available, delete obsolete variables: // - recaptcha_mailhide_public_key // - recaptcha_mailhide_public_key_* // - recaptcha_mailhide_private_key // - recaptcha_mailhide_private_key_* db_delete('variable') ->condition('name', 'recaptcha_mailhide_%', 'LIKE') ->execute(); cache_clear_all('variables', 'cache_bootstrap'); return t('Migrated settings. You may need to create a new site key and secret key if it does not work.'); } /** * Default empty tabindex to 0. */ function recaptcha_update_7201() { // Change an empty tabindex to value 0 for consistency with D8. $recaptcha_tabindex = variable_get('recaptcha_tabindex', ''); if ($recaptcha_tabindex == '') { variable_set('recaptcha_tabindex', 0); } return t('Empty tabindex has been upgraded to 0.'); } /** * Remove recaptcha_mailhide 7.x-1.x from system table. */ function recaptcha_update_7202() { // #2487215: Drupal 7.50+ requires system table cleanup. db_delete('system') ->condition('name', 'recaptcha_mailhide') ->execute(); return t('Removed recaptcha_mailhide module from database.'); }