You are here

function apachesolr_confgen_message_new_config_no_delete in Apache Solr Config Generator 6

Same name and namespace in other branches
  1. 7 apachesolr_confgen.module \apachesolr_confgen_message_new_config_no_delete()
1 call to apachesolr_confgen_message_new_config_no_delete()
apachesolr_confgen_advanced_settings_variable_update in apachesolr_confgen_advanced_settings/apachesolr_confgen_advanced_settings.module
Implements hook_variable_update().

File

./apachesolr_confgen.module, line 140
Generator for Apache Solr Configuration Files.

Code

function apachesolr_confgen_message_new_config_no_delete($name, $value, $old_value, $options) {
  static $msg_sent = FALSE;
  if (!$msg_sent) {
    if ($value != $old_value) {
      $info = variable_info($name);
      if (is_null($info)) {

        // ignore for now
        // drupal_set_message(t('Error: Unknown variable @varname.', array('@varname' => $name)), 'error');
      }
      else {
        drupal_set_message(t('Changing "%title" will require you to !link_download a new set of configuration files, update your Solr configuration and restart your Solr server.', array(
          '%title' => $info['title'] . (array_key_exists('key', $options) ? ' (' . $options['key'] . ')' : ''),
          '!link_download' => l(t('download'), 'admin/settings/apachesolr/confgen'),
        )), 'warning');
        $msg_sent = TRUE;
      }
    }
  }
}