Skip to content
system.module 136 KiB
Newer Older
Dries Buytaert's avatar
Dries Buytaert committed
<?php

Dries Buytaert's avatar
 
Dries Buytaert committed
/**
 * @file
 * Configuration system that lets administrators modify the workings of the site.
 */

use Drupal\Core\Utility\ModuleInfo;
use Drupal\Core\TypedData\Primitive;
use Drupal\system\Plugin\block\block\SystemMenuBlock;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;

/**
 * Maximum age of temporary files in seconds.
 */
const DRUPAL_MAXIMUM_TEMP_FILE_AGE = 21600;
/**
 * New users will be set to the default time zone at registration.
 */
const DRUPAL_USER_TIMEZONE_DEFAULT = 0;

/**
 * New users will get an empty time zone at registration.
 */
const DRUPAL_USER_TIMEZONE_EMPTY = 1;

/**
 * New users will select their own timezone at registration.
 */
const DRUPAL_USER_TIMEZONE_SELECT = 2;
 /**
 * Disabled option on forms and settings
 */
const REGIONS_VISIBLE = 'visible';
Dries Buytaert's avatar
 
Dries Buytaert committed
/**
Dries Buytaert's avatar
 
Dries Buytaert committed
 */
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The System module is integral to the site, and provides basic but extensible functionality for use by other modules and themes. Some integral elements of Drupal are contained in and managed by the System module, including caching, enabling and disabling modules and themes, preparing and displaying the administrative page, and configuring fundamental site settings. A number of key system maintenance operations are also part of the System module. For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/documentation/modules/system')) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Managing modules') . '</dt>';
      $output .= '<dd>' . t('The System module allows users with the appropriate permissions to enable and disable modules on the <a href="@modules">Modules administration page</a>. Drupal comes with a number of core modules, and each module provides a discrete set of features and may be enabled or disabled depending on the needs of the site. Many additional modules contributed by members of the Drupal community are available for download at the <a href="@drupal-modules">Drupal.org module page</a>.', array('@modules' => url('admin/modules'), '@drupal-modules' => 'http://drupal.org/project/modules')) . '</dd>';
      $output .= '<dt>' . t('Managing themes') . '</dt>';
      $output .= '<dd>' . t('The System module allows users with the appropriate permissions to enable and disable themes on the <a href="@themes">Appearance administration page</a>. Themes determine the design and presentation of your site. Drupal comes packaged with several core themes, and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/appearance'), '@drupal-themes' => 'http://drupal.org/project/themes')) . '</dd>';
      $output .= '<dt>' . t('Managing caching') . '</dt>';
      $output .= '<dd>' . t("The System module allows users with the appropriate permissions to manage caching on the <a href='@cache-settings'>Performance settings page</a>. Drupal has a robust caching system that allows the efficient re-use of previously-constructed web pages and web page components. Pages requested by anonymous users are stored in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, the caching system may significantly increase the speed of your site.", array('@cache-settings' => url('admin/config/development/performance'))) . '</dd>';
      $output .= '<dt>' . t('Performing system maintenance') . '</dt>';
      $output .= '<dd>' . t('In order for the site and its modules to continue to operate well, a set of routine administrative operations must run on a regular basis. The System module manages this task by making use of a system cron job. You can verify the status of cron tasks by visiting the <a href="@status">Status report page</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>. You can set up cron job by visiting <a href="@cron">Cron configuration</a> page', array('@status' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron', '@cron' => url('admin/config/system/cron'))) . '</dd>';
      $output .= '<dt>' . t('Configuring basic site settings') . '</dt>';
      $output .= '<dd>' . t('The System module also handles basic configuration options for your site, including <a href="@date-time-settings">Date and time settings</a>, <a href="@file-system">File system settings</a>, <a href="@site-info">Site name and other information</a>, and a <a href="@maintenance-mode">Maintenance mode</a> for taking your site temporarily offline.', array('@date-time-settings' => url('admin/config/regional/date-time'), '@file-system' => url('admin/config/media/file-system'), '@site-info' => url('admin/config/system/site-information'), '@maintenance-mode' => url('admin/config/development/maintenance'))) . '</dd>';
      return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>';
      $output = '<p>' . t('Set and configure the default theme for your website.  Alternative <a href="@themes">themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) . '</p>';
    case 'admin/appearance/settings/' . $arg[3]:
      $theme_list = list_themes();
      $theme = $theme_list[$arg[3]];
      return '<p>' . t('These options control the display settings for the %name theme. When your site is displayed using this theme, these settings will be used.', array('%name' => $theme->info['name'])) . '</p>';
      return '<p>' . t('These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.') . '</p>';
      $output = '<p>' . t('Download additional <a href="@modules">contributed modules</a> to extend Drupal\'s functionality.', array('@modules' => 'http://drupal.org/project/modules')) . '</p>';
      if (module_exists('update')) {
        if (update_manager_access()) {
          $output .= '<p>' . t('Regularly review and install <a href="@updates">available updates</a> to maintain a secure and current site. Always run the <a href="@update-php">update script</a> each time a module is updated.', array('@update-php' => $base_url . '/core/update.php', '@updates' => url('admin/reports/updates'))) . '</p>';
          $output .= '<p>' . t('Regularly review <a href="@updates">available updates</a> to maintain a secure and current site. Always run the <a href="@update-php">update script</a> each time a module is updated.', array('@update-php' => $base_url . '/core/update.php', '@updates' => url('admin/reports/updates'))) . '</p>';
        $output .= '<p>' . t('Regularly review available updates to maintain a secure and current site. Always run the <a href="@update-php">update script</a> each time a module is updated. Enable the Update Manager module to update and install modules and themes.', array('@update-php' => $base_url . '/core/update.php')) . '</p>';
      return '<p>' . t('The uninstall process removes all data related to a module. To uninstall a module, you must first disable it on the main <a href="@modules">Modules page</a>.', array('@modules' => url('admin/modules'))) . '</p>';
      if ($arg[4] == 'system' && $arg[5] == 'powered-by') {
        return '<p>' . t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') . '</p>';
    case 'admin/config/development/maintenance':
        return '<p>' . t('Use maintenance mode when making major updates, particularly if the updates could disrupt visitors or the update process. Examples include upgrading, importing or exporting content, modifying a theme, modifying content types, and making backups.') . '</p>';
    case 'admin/reports/status':
      return '<p>' . t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on drupal.org's support forums and project issue queues. Before filing a support request, ensure that your web server meets the <a href=\"@system-requirements\">system requirements.</a>", array('@system-requirements' => 'http://drupal.org/requirements')) . '</p>';
Dries Buytaert's avatar
 
Dries Buytaert committed
}

  return array_merge(drupal_common_theme(), array(
    'system_themes_page' => array(
      'variables' => array('theme_groups' => NULL),
    'system_modules_incompatible' => array(
      'variables' => array('message' => NULL),
      'variables' => array('blocks' => NULL),
      'variables' => array('block' => NULL),
      'variables' => array('content' => NULL),
      'variables' => array('menu_items' => NULL),
    'system_compact_link' => array(
      'variables' => array(),
    'system_date_format_localize_form' => array(
      'render element' => 'form',
    ),
    'system_plugin_ui_form' => array(
      'template' => 'system-plugin-ui-form',
      'render element' => 'form',
    ),
Dries Buytaert's avatar
 
Dries Buytaert committed
/**
Dries Buytaert's avatar
 
Dries Buytaert committed
 */
function system_permission() {
    'administer modules' => array(
      'title' => t('Administer modules'),
    ),
    'administer site configuration' => array(
      'title' => t('Administer site configuration'),
    'administer themes' => array(
      'title' => t('Administer themes'),
    ),
    'administer software updates' => array(
      'title' => t('Administer software updates'),
      'restrict access' => TRUE,
      'title' => t('Use the administration pages and help'),
    'access site in maintenance mode' => array(
      'title' => t('Use the site in maintenance mode'),
    'view the administration theme' => array(
      'title' => t('View the administration theme'),
      'description' => config('system.theme')->get('admin') ?: t('This is only used when the site is configured to use a separate administration theme on the <a href="@appearance-url">Appearance</a> page.', array('@appearance-url' => url('admin/appearance'))),
      'title' => t('View site reports'),
Dries Buytaert's avatar
 
Dries Buytaert committed
}

 */
function system_hook_info() {
  $hooks['token_info'] = array(
    'group' => 'tokens',
  );
  $hooks['token_info_alter'] = array(
    'group' => 'tokens',
  );
  $hooks['tokens'] = array(
    'group' => 'tokens',
  );
function system_element_info() {
  // Top level elements.
  $types['form'] = array(
    '#method' => 'post',
    '#action' => request_uri(),
    '#theme_wrappers' => array('form'),
    '#show_messages' => TRUE,
    '#theme' => 'page',
  // By default, we don't want Ajax commands being rendered in the context of an
  // HTML page, so we don't provide defaults for #theme or #theme_wrappers.
  // However, modules can set these properties (for example, to provide an HTML
  // debugging page that displays rather than executes Ajax commands).
  $types['ajax'] = array(
    '#header' => TRUE,
    '#commands' => array(),
    '#error' => NULL,
  $types['html_tag'] = array(
    '#theme' => 'html_tag',
    '#pre_render' => array('drupal_pre_render_conditional_comments'),
    '#attributes' => array(),
    '#value' => NULL,
  );
  $types['styles'] = array(
    '#items' => array(),
    '#pre_render' => array('drupal_pre_render_styles'),
    '#group_callback' => 'drupal_group_css',
    '#aggregate_callback' => 'drupal_aggregate_css',
  );
  $types['scripts'] = array(
    '#items' => array(),
    '#pre_render' => array('drupal_pre_render_scripts'),
    '#group_callback' => 'drupal_group_js',
    '#aggregate_callback' => 'drupal_aggregate_js',
  );
  // Input elements.
  $types['submit'] = array(
    '#limit_validation_errors' => FALSE,
    '#process' => array('form_process_button', 'ajax_process_form'),
    '#pre_render' => array('form_pre_render_button'),
    '#theme_wrappers' => array('input__submit'),
    '#limit_validation_errors' => FALSE,
    '#process' => array('form_process_button', 'ajax_process_form'),
    '#pre_render' => array('form_pre_render_button'),
    '#theme_wrappers' => array('input__button'),
    '#limit_validation_errors' => FALSE,
    '#process' => array('form_process_button', 'ajax_process_form'),
    '#return_value' => TRUE,
    '#has_garbage_value' => TRUE,
    '#src' => NULL,
    '#pre_render' => array('form_pre_render_image_button'),
    '#theme_wrappers' => array('input__image_button'),
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 128,
    '#autocomplete_path' => FALSE,
    '#process' => array('form_process_autocomplete', 'ajax_process_form', 'form_process_pattern'),
    '#pre_render' => array('form_pre_render_textfield'),
    '#theme' => 'input__textfield',
    '#theme_wrappers' => array('form_element'),
  $types['tel'] = array(
    '#input' => TRUE,
    '#size' => 30,
    '#maxlength' => 128,
    '#autocomplete_path' => FALSE,
    '#process' => array('form_process_autocomplete', 'ajax_process_form', 'form_process_pattern'),
    '#pre_render' => array('form_pre_render_tel'),
    '#theme' => 'input__tel',
    '#theme_wrappers' => array('form_element'),
  );
  $types['email'] = array(
    '#input' => TRUE,
    '#size' => 60,
    // user.module is not loaded in case of early bootstrap errors.
    '#maxlength' => defined('EMAIL_MAX_LENGTH') ? EMAIL_MAX_LENGTH : 255,
    '#process' => array('form_process_autocomplete', 'ajax_process_form', 'form_process_pattern'),
    '#element_validate' => array('form_validate_email'),
    '#pre_render' => array('form_pre_render_email'),
    '#theme' => 'input__email',
    '#theme_wrappers' => array('form_element'),
  );
  $types['url'] = array(
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 255,
    '#autocomplete_path' => FALSE,
    '#process' => array('form_process_autocomplete', 'ajax_process_form', 'form_process_pattern'),
    '#element_validate' => array('form_validate_url'),
    '#pre_render' => array('form_pre_render_url'),
    '#theme' => 'input__url',
  $types['search'] = array(
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 128,
    '#autocomplete_path' => FALSE,
    '#process' => array('form_process_autocomplete', 'ajax_process_form'),
    '#pre_render' => array('form_pre_render_search'),
    '#theme' => 'input__search',
  $types['number'] = array(
    '#input' => TRUE,
    '#step' => 1,
    '#process' => array('ajax_process_form'),
    '#element_validate' => array('form_validate_number'),
    '#pre_render' => array('form_pre_render_number'),
    '#theme' => 'input__number',
    '#theme_wrappers' => array('form_element'),
  );
  $types['range'] = array(
    '#input' => TRUE,
    '#step' => 1,
    '#min' => 0,
    '#max' => 100,
    '#process' => array('ajax_process_form'),
    '#element_validate' => array('form_validate_number'),
    '#pre_render' => array('form_pre_render_range'),
    '#theme' => 'input__range',
  $types['color'] = array(
    '#input' => TRUE,
    '#process' => array('ajax_process_form'),
    '#element_validate' => array('form_validate_color'),
    '#pre_render' => array('form_pre_render_color'),
    '#theme' => 'input__color',
  $types['machine_name'] = array(
    '#input' => TRUE,
    '#default_value' => NULL,
    '#required' => TRUE,
    '#maxlength' => 64,
    '#size' => 60,
    '#autocomplete_path' => FALSE,
    '#process' => array('form_process_machine_name', 'form_process_autocomplete', 'ajax_process_form'),
    '#element_validate' => array('form_validate_machine_name'),
    '#pre_render' => array('form_pre_render_textfield'),
    '#theme' => 'input__textfield',
    '#theme_wrappers' => array('form_element'),
  );
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 128,
    '#process' => array('ajax_process_form', 'form_process_pattern'),
    '#pre_render' => array('form_pre_render_password'),
    '#theme' => 'input__password',
    '#theme_wrappers' => array('form_element'),
    '#process' => array('form_process_password_confirm', 'user_form_process_password_confirm'),
    '#theme_wrappers' => array('form_element'),
    '#process' => array('ajax_process_form'),
    '#theme_wrappers' => array('form_element'),
    '#process' => array('form_process_radios'),
    '#theme_wrappers' => array('radios'),
    '#pre_render' => array('form_pre_render_conditional_form_element'),
    '#process' => array('ajax_process_form'),
    '#pre_render' => array('form_pre_render_radio'),
    '#theme' => 'input__radio',
    '#theme_wrappers' => array('form_element'),
    '#process' => array('form_process_checkboxes'),
    '#pre_render' => array('form_pre_render_conditional_form_element'),
    '#theme_wrappers' => array('checkboxes'),
    '#process' => array('form_process_checkbox', 'ajax_process_form'),
    '#pre_render' => array('form_pre_render_checkbox'),
    '#theme' => 'input__checkbox',
    '#theme_wrappers' => array('form_element'),
    '#process' => array('form_process_select', 'ajax_process_form'),
    '#theme_wrappers' => array('form_element'),
  $types['language_select'] = array(
    '#input' => TRUE,
    '#default_value' => LANGUAGE_NOT_SPECIFIED,
  );
    '#input' => TRUE,
    '#delta' => 10,
    '#default_value' => 0,
    '#process' => array('form_process_weight', 'ajax_process_form'),
    '#input' => TRUE,
    '#element_validate' => array('date_validate'),
    '#process' => array('form_process_date'),
    '#theme_wrappers' => array('form_element'),
    '#pre_render' => array('form_pre_render_file'),
    '#theme' => 'input__file',
    '#theme_wrappers' => array('form_element'),
    '#input' => TRUE,
    '#js_select' => TRUE,
    '#multiple' => TRUE,
    '#process' => array('form_process_tableselect'),
    '#options' => array(),
    '#empty' => '',
    // Forms that show author fields to both anonymous and authenticated users
    // need to dynamically switch between #type 'textfield' and #type 'item' to
    // automatically take over the authenticated user's information. Therefore,
    // we allow #type 'item' to receive input, which is internally assigned by
    // Form API based on the #default_value or #value properties.
    '#input' => TRUE,
    '#theme_wrappers' => array('form_element'),
    '#process' => array('ajax_process_form'),
    '#pre_render' => array('form_pre_render_hidden'),
    '#theme' => 'input__hidden',
  );
  $types['token'] = array(
    '#input' => TRUE,
    '#pre_render' => array('form_pre_render_hidden'),
    '#theme' => 'input__hidden',
    '#pre_render' => array('drupal_pre_render_link'),
    '#process' => array('form_process_group', 'ajax_process_form'),
    '#pre_render' => array('form_pre_render_group'),
    '#theme_wrappers' => array('fieldset'),
  );
  $types['details'] = array(
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
    '#value' => NULL,
    '#process' => array('form_process_group', 'ajax_process_form'),
    '#pre_render' => array('form_pre_render_details', 'form_pre_render_group'),
    '#theme_wrappers' => array('details'),
    '#default_tab' => '',
    '#process' => array('form_process_vertical_tabs'),
    '#pre_render' => array('form_pre_render_vertical_tabs'),
    '#theme_wrappers' => array('vertical_tabs', 'form_element'),
  $types['dropbutton'] = array(
    '#pre_render' => array('drupal_pre_render_dropbutton'),
  );
  $types['operations'] = array(
    '#pre_render' => array('drupal_pre_render_dropbutton'),
    '#theme' => 'links__dropbutton__operations',
    '#process' => array('form_process_group', 'form_process_container'),
    '#pre_render' => array('form_pre_render_group'),
    '#theme_wrappers' => array('container'),
  $types['actions'] = array(
    '#process' => array('form_process_actions', 'form_process_container'),
    '#weight' => 100,
    '#theme_wrappers' => array('container'),
  $types['table'] = array(
    '#header' => array(),
    '#rows' => array(),
    '#empty' => '',
    // Properties for tableselect support.
    '#input' => TRUE,
    '#tree' => TRUE,
    '#tableselect' => FALSE,
    '#multiple' => TRUE,
    '#js_select' => TRUE,
    '#value_callback' => 'form_type_table_value',
    '#process' => array('form_process_table'),
    '#element_validate' => array('form_validate_table'),
    // Properties for tabledrag support.
    // The value is a list of arrays that are passed to drupal_add_tabledrag().
    // drupal_pre_render_table() prepends the HTML ID of the table to each set
    // of arguments.
    // @see drupal_add_tabledrag()
    '#tabledrag' => array(),
    // Render properties.
    '#pre_render' => array('drupal_pre_render_table'),
    '#theme' => 'table',
  );

Dries Buytaert's avatar
 
Dries Buytaert committed
/**
Dries Buytaert's avatar
 
Dries Buytaert committed
 */
function system_menu() {
  $items['system/files'] = array(
    'page arguments' => array('private'),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['system/temporary'] = array(
    'title' => 'Temporary files',
    'page callback' => 'file_download',
    'page arguments' => array('temporary'),
    'page callback' => 'ajax_form_callback',
    'theme callback' => 'ajax_base_page_theme',
  $items['system/timezone'] = array(
    'title' => 'Time zone',
    'page callback' => 'system_timezone',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'access arguments' => array('access administration pages'),
    'page callback' => 'system_admin_menu_block_page',
    'page callback' => 'system_admin_compact_page',
    'access arguments' => array('access administration pages'),
  $items['admin/tasks'] = array(
    'title' => 'Tasks',
  $items['admin/index'] = array(
    'title' => 'Index',
    'page callback' => 'system_admin_index',
    'access arguments' => array('access administration pages'),
  // Menu items that are basically just menu blocks.
  $items['admin/structure'] = array(
    'title' => 'Structure',
    'description' => 'Administer blocks, content types, menus, etc.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
  // Appearance.
  $items['admin/appearance'] = array(
    'title' => 'Appearance',
    'description' => 'Select and configure your themes.',
    'description' => 'Select and configure your theme',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
  $items['admin/appearance/enable'] = array(
    'title' => 'Enable theme',
    'page callback' => 'system_theme_enable',
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['admin/appearance/disable'] = array(
    'title' => 'Disable theme',
    'page callback' => 'system_theme_disable',
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['admin/appearance/default'] = array(
    'title' => 'Set default theme',
    'page callback' => 'system_theme_default',
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['admin/appearance/settings'] = array(
    'description' => 'Configure default and theme specific settings.',
    'page arguments' => array('system_theme_settings'),
  // Theme configuration subtabs.
  $items['admin/appearance/settings/global'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
  );
Dries Buytaert's avatar
 
Dries Buytaert committed

  foreach (list_themes() as $key => $theme) {
    $items['admin/appearance/settings/' . $theme->name] = array(
      'title' => $theme->info['name'],
      'page arguments' => array('system_theme_settings', $theme->name),
      'type' => MENU_LOCAL_TASK,
      'access callback' => '_system_themes_access',
Dries Buytaert's avatar
 
Dries Buytaert committed
  }
    'title' => 'Extend',
    'description' => 'Add and enable modules to extend site functionality.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_modules'),
    'weight' => -2,
  $items['admin/modules/list'] = array(
  $items['admin/modules/list/confirm'] = array(
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  $items['admin/modules/uninstall'] = array(
    'page arguments' => array('system_modules_uninstall'),
  $items['admin/modules/uninstall/confirm'] = array(
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  $items['admin/config'] = array(
    'title' => 'Configuration',
    'description' => 'Administer settings.',
    'page callback' => 'system_admin_config_page',
    'access arguments' => array('access administration pages'),
  // Media settings.
    'title' => 'Media',
    'description' => 'Media tools.',
    'position' => 'left',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
  );
  $items['admin/config/media/file-system'] = array(
    'description' => 'Tell Drupal where to store uploaded files and how they are accessed.',
    'page arguments' => array('system_file_system_settings'),
    'access arguments' => array('administer site configuration'),
  $items['admin/config/media/image-toolkit'] = array(
    'title' => 'Image toolkit',
    'description' => 'Choose which image toolkit to use if you have installed optional toolkits.',
    'page arguments' => array('system_image_toolkit_settings'),
    'access arguments' => array('administer site configuration'),

  // Service settings.
  $items['admin/config/services'] = array(
    'title' => 'Web services',
    'description' => 'Tools related to web services.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
  $items['admin/config/services/rss-publishing'] = array(
    'title' => 'RSS publishing',
    'description' => 'Configure the site description, the number of items per feed and whether feeds should be titles/teasers/full-text.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_rss_feeds_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );

  // Development settings.
  $items['admin/config/development'] = array(
    'title' => 'Development',
    'description' => 'Development tools.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/development/maintenance'] = array(
    'title' => 'Maintenance mode',
    'description' => 'Take the site offline for maintenance or bring it back online.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_site_maintenance_mode'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/development/performance'] = array(
    'title' => 'Performance',
    'description' => 'Enable or disable page caching for anonymous users and set CSS and JS bandwidth optimization options.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_performance_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  $items['admin/config/development/logging'] = array(
    'title' => 'Logging and errors',
    'description' => "Settings for logging and alerts modules. Various modules can route Drupal's system events to different destinations, such as syslog, database, email, etc.",
    'page arguments' => array('system_logging_settings'),
    'access arguments' => array('administer site configuration'),
  $items['admin/config/regional'] = array(
    'title' => 'Regional and language',
    'description' => 'Regional settings, localization and translation.',
    'position' => 'left',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
  );
  $items['admin/config/regional/settings'] = array(
    'title' => 'Regional settings',
    'description' => "Settings for the site's default time zone and country.",
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_regional_settings'),
    'access arguments' => array('administer site configuration'),
  $items['admin/config/regional/date-time'] = array(
    'title' => 'Formats',
    'description' => 'Configure display format strings for date and time.',
    'page callback' => 'system_date_time_formats',
    'access arguments' => array('administer site configuration'),
    'weight' => -9,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/add'] = array(
    'title' => 'Add format',
    'description' => 'Allow users to add additional date formats.',
    'type' => MENU_LOCAL_ACTION,
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_configure_date_formats_form'),
    'access arguments' => array('administer site configuration'),
    'weight' => -10,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/%system_date_format/edit'] = array(
    'title' => 'Edit date format',
    'description' => 'Allow users to edit a configured date format.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_configure_date_formats_form', 5),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/%system_date_format/delete'] = array(
    'title' => 'Delete date format',
    'description' => 'Allow users to delete a configured date format.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_date_delete_format_form', 5),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/lookup'] = array(
    'title' => 'Date and time lookup',
    'page callback' => 'system_date_time_lookup',
    'access arguments' => array('administer site configuration'),

  // Search settings.
  $items['admin/config/search'] = array(
    'title' => 'Search and metadata',
    'description' => 'Local site search, metadata and SEO.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),

  // System settings.
  $items['admin/config/system'] = array(
    'title' => 'System',
    'description' => 'General system related configuration.',
    'position' => 'right',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/system/site-information'] = array(
    'description' => 'Change site name, e-mail address, slogan, default front page, and number of posts per page, error pages.',
    'page arguments' => array('system_site_information_settings'),
    'access arguments' => array('administer site configuration'),
  $items['admin/config/system/cron'] = array(
    'title' => 'Cron',
    'description' => 'Manage automatic site maintenance tasks.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_cron_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'weight' => 20,
  );
  $items['admin/config/user-interface'] = array(
    'title' => 'User interface',
    'description' => 'Tools that enhance the user interface.',
    'position' => 'right',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  $items['admin/config/workflow'] = array(
    'title' => 'Workflow',
    'description' => 'Content workflow, editorial workflow tools.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/content'] = array(
    'title' => 'Content authoring',
    'description' => 'Settings related to formatting and authoring content.',