You are here

function title_override_admin_settings in Title Override 7

Same name and namespace in other branches
  1. 6 title_override.module \title_override_admin_settings()
1 string reference to 'title_override_admin_settings'
title_override_admin in ./title_override.module
Provides the admin form page.

File

./title_override.module, line 59

Code

function title_override_admin_settings($form, &$form_state) {

  // Parses the overrides form variable into an array.
  $itemValues = array();
  if ($form_state['values']['title_override_form']) {
    $temp = explode("\n", $form_state['values']['title_override_form']);
    foreach ($temp as $item) {
      $values = explode("|", $item);
      array_push($itemValues, $values);
    }
  }
  variable_set('title_overrides', $itemValues);
  if ($form_state['values']['op'] != 'Save') {

    // Rebuilds the caches so our updates are shown.
    drupal_flush_all_caches();
    drupal_set_message(t('Caches cleared'));
  }
}