You are here

function _globalredirect_get_settings in Global Redirect 6

Same name and namespace in other branches
  1. 7 globalredirect.module \_globalredirect_get_settings()

Return the settings with any defaults mapped over the top

5 calls to _globalredirect_get_settings()
GlobalRedirectTestCase::_globalredirect_batch_test in ./globalredirect.test
globalredirect_init in ./globalredirect.module
Implements hook_init().
globalredirect_settings in ./globalredirect.admin.inc
Function to generate the form setting array
globalredirect_settings_submit_save in ./globalredirect.admin.inc
Save submit handler for the globalredirect_settings form. Compares the submitted settings to the defaults and unsets any that are equal. This was we only store overrides.
globalredirect_update_6101 in ./globalredirect.install

File

./globalredirect.module, line 350
The Global Redirect module redirects for all paths which have aliases but are not using the aliases which reduces the risk of duplicate content.

Code

function _globalredirect_get_settings($default_only = FALSE) {
  $defaults = array(
    'deslash' => 1,
    'nonclean_to_clean' => 1,
    'trailing_zero' => 0,
    'menu_check' => 0,
    'case_sensitive_urls' => 1,
    'language_redirect' => 0,
    'canonical' => 0,
    'content_location_header' => 0,
    'term_path_handler' => 1,
    'frontpage_redirect' => 1,
    'ignore_admin_path' => 1,
  );
  if ($default_only) {
    return $defaults;
  }
  return variable_get('globalredirect_settings', array()) + $defaults;
}