You are here

function _globalredirect_get_settings in Global Redirect 7

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

Return the settings with any defaults mapped over the top

6 calls to _globalredirect_get_settings()
GlobalRedirectTestCase::_globalredirect_test_paths in ./globalredirect.test
GlobalRedirectTestCaseConfigLanguages::_globalredirect_test_paths 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.

... See full list

File

./globalredirect.module, line 409
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,
    'comment_to_node' => 0,
  );
  if ($default_only) {
    return $defaults;
  }
  return variable_get('globalredirect_settings', array()) + $defaults;
}