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

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

define('DRUPAL_CORE_COMPATIBILITY', '7.x');
/**
 * Minimum supported version of PHP.
 */
define('DRUPAL_MINIMUM_PHP',    '5.2.0');
/**
 * Minimum recommended value of PHP memory_limit.
 */
define('DRUPAL_MINIMUM_PHP_MEMORY_LIMIT',    '16M');

/**
 * Minimum supported version of MySQL, if it is used.
 */

/**
 * Minimum supported version of PostgreSQL, if it is used.
 */

/**
 * Maximum age of temporary files in seconds.
 */
define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 21600);
/**
 * Default interval for automatic cron executions in seconds.
 */
define('DRUPAL_CRON_DEFAULT_THRESHOLD', 10800);

/**
 * New users will be set to the default time zone at registration.
 */
define('DRUPAL_USER_TIMEZONE_DEFAULT', 0);

/**
 * New users will get an empty time zone at registration.
 */
define('DRUPAL_USER_TIMEZONE_EMPTY', 1);

/**
 * New users will select their own timezone at registration.
 */
define('DRUPAL_USER_TIMEZONE_SELECT', 2);

 /**
 * Disabled option on forms and settings
 */
define('DRUPAL_DISABLED', 0);

/**
 * Optional option on forms and settings
 */
define('DRUPAL_OPTIONAL', 1);

/**
 * Required option on forms and settings
 */
define('DRUPAL_REQUIRED', 2);

/**
 * Return only visible regions. @see system_region_list().
 */
define('REGIONS_VISIBLE', 'visible');

/**
 * Return all visible regions. @see system_region_list().
 */
define('REGIONS_ALL', 'all');


Dries Buytaert's avatar
 
Dries Buytaert committed
/**
Dries Buytaert's avatar
 
Dries Buytaert committed
 */
      $output = '<p>' . t('The system module is at the foundation of your Drupal website, 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 or disabling of 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.') . '</p>';
      $output .= '<p>' . t('The system module provides:') . '</p>';
      $output .= '<ul><li>' . t('support for enabling and disabling <a href="@modules">modules</a>. Drupal comes packaged with a number of core modules; each module provides a discrete set of features and may be enabled depending on the needs of your site. A wide array of 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/config/modules'), '@drupal-modules' => 'http://drupal.org/project/modules')) . '</li>';
      $output .= '<li>' . t('support for enabling and disabling <a href="@themes">themes</a>, which 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')) . '</li>';
      $output .= '<li>' . t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/config/development/performance'))) . '</li>';
      $output .= '<li>' . t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) . '</li>';
      $output .= '<li>' . t('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="@clean-url">clean URL support</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'), '@clean-url' => url('admin/config/search/clean-urls'), '@site-info' => url('admin/config/system/site-information'), '@maintenance-mode' => url('admin/config/development/maintenance'))) . '</li></ul>';
      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) . '</p>';
      return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>';
      $output = '<p>' . t('Select the default theme for Drupal. To configure site-wide display settings, click the "configure" task above. Alternatively, to override these settings in a specific theme, click the "configure" link for that theme. Note that different themes may have different regions available for displaying content.') . '</p>';
      $output .= '<p>' . t('To change the appearance of your site, a number of <a href="@themes">contributed themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) . '</p>';
    case 'admin/appearance/settings/' . $arg[3]:
      $reference = explode('.', $arg[3], 2);
      $theme = array_pop($reference);
      return '<p>' . t('These options control the display settings for the <code>%template</code> theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the <a href="@global">global settings</a> for this theme.', array('%template' => $theme, '@global' => url('admin/appearance/settings'))) . '</p>';
    case 'admin/appearance/settings':
      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('Modules are plugins that extend Drupal\'s core functionality. To further extend your site\'s functionality, a number of <a href="@modules">contributed modules</a> are available for download.', array('@permissions' => url('admin/config/people/permissions'), '@modules' => 'http://drupal.org/project/modules')) . '</p>';
      $output .= '<p>' . t('Module-related tasks can be located on the <a href="@by-module">administration by module page</a>. New <a href="@permissions">module-related permissions</a> may also become available as new modules are enabled.', array('@by-module' => url('admin/by-module'), '@permissions' => url('admin/config/people/permissions'))) . '</p>';
      $output .= '<p>' . t('Each time a module is updated, it is important that <a href="@update-php">update.php</a> is run. To help manage the update process, the <em>Update status</em> module, if enabled, provides <a href="@updates">information on new versions of modules (and themes)</a> as they are released. Regular review of the <a href="@updates">available updates page</a> is essential to maintaining a secure and current site.', array('@update-php' => $base_url . '/update.php', '@updates' => url('admin/reports/updates'))) . '</p>';
    case 'admin/config/modules/uninstall':
      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>. Not all modules support this feature.', array('@modules' => url('admin/config/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':
      global $user;
      if ($user->uid == 1) {
        return '<p>' . t('If you are upgrading to a newer version of Drupal or upgrading contributed modules or themes you may need to run !update-php.', array('!update-php' => l('update.php', 'update.php'))) . '</p>';
      }
    case 'admin/config/system/actions':
    case 'admin/config/system/actions/manage':
      $output = '<p>' . t('Actions are individual tasks that the system can do, such as unpublishing a piece of content or banning a user. Modules, such as the trigger module, can fire these actions when certain system events happen; for example, when a new post is added or when a user logs in. Modules may also provide additional actions.') . '</p>';
      $output .= '<p>' . t('There are two types of actions: simple and advanced. Simple actions do not require any additional configuration, and are listed here automatically. Advanced actions can do more than simple actions; for example, send an e-mail to a specified address, or check for certain words within a piece of content. These actions need to be created and configured first before they may be used. To create an advanced action, select the action from the drop-down below and click the <em>Create</em> button.') . '</p>';
        $output .= '<p>' . t('You may proceed to the <a href="@url">Triggers</a> page to assign these actions to system events.', array('@url' => url('admin/structure/trigger'))) . '</p>';
    case 'admin/config/system/actions/configure':
      return t('An advanced action offers additional configuration options which may be filled out below. Changing the <em>Description</em> field is recommended, in order to better identify the precise action taking place. This description will be displayed in modules such as the trigger module when assigning actions to system events, so it is best if it is as descriptive as possible (for example, "Send e-mail to Moderation Team" rather than simply "Send e-mail").');
    case 'admin/config/people/ip-blocking':
      return '<p>' . t('IP addresses listed here are blocked from your site before any modules are loaded. You may add IP addresses to the list, or delete existing entries.') . '</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.") . '</p>';
Dries Buytaert's avatar
 
Dries Buytaert committed
}

  return array_merge(drupal_common_theme(), array(
    'system_themes_form' => array(
      'arguments' => array('form' => NULL),
    'system_modules_fieldset' => array(
    'system_modules_incompatible' => array(
      'arguments' => array('message' => NULL),
    'system_modules_uninstall' => array(
      'arguments' => array('form' => NULL),
    ),
    'status_report' => array(
      'arguments' => array('requirements' => NULL),
    ),
    'admin_page' => array(
      'arguments' => array('blocks' => NULL),
    ),
    'admin_block' => array(
      'arguments' => array('block' => NULL),
    ),
    'admin_block_content' => array(
      'arguments' => array('content' => NULL),
    ),
    'system_admin_by_module' => array(
      'arguments' => array('menu_items' => NULL),
    'system_powered_by' => array(
      'arguments' => array('image_path' => NULL),
    ),
    'meta_generator_html' => array(
      'arguments' => array('version' => NULL),
    ),
    'meta_generator_header' => array(
      'arguments' => array('version' => NULL),
    ),
    'system_run_cron_image' => array(
      'arguments' => array('image_path' => NULL),
    ),
    'system_date_time_settings' => array(
      'arguments' => array('form' => NULL),
      'file' => 'system.admin.inc',
    ),
Dries Buytaert's avatar
 
Dries Buytaert committed
/**
 * Implement hook_permission().
Dries Buytaert's avatar
 
Dries Buytaert committed
 */
function system_permission() {
    'administer site configuration' => array(
      'title' => t('Administer site configuration'),
      'description' => t('Configure site-wide settings such as module or theme administration settings.'),
    ),
    'administer software updates' => array(
      'title' => t('Administer software updates'),
      'description' => t('Run the update.php script.'),
    ),
    'administer actions' => array(
      'title' => t('Administer actions'),
      'description' => t('Manage the actions defined for your site.'),
    ),
    'administer files' => array(
      'title' => t('Administer files'),
      'description' => t('Manage user-uploaded files.'),
    ),
    'access administration pages' => array(
      'title' => t('Access administration pages'),
      'description' => t('View the administration panel and browse the help system.'),
    ),
    'access site in maintenance mode' => array(
      'title' => t('Access site in maintenance mode'),
      'description' => t('Log in when the site is in maintenance mode.'),
    ),
    'access site reports' => array(
      'title' => t('Access site reports'),
      'description' => t('View reports from system logs and other status information.'),
    ),
    'block IP addresses' => array(
      'title' => t('Block IP addresses'),
      'description' => t('Block IP addresses from accessing your site.'),
    ),
Dries Buytaert's avatar
 
Dries Buytaert committed
}

 */
function system_rdf_namespaces() {
  return array(
    'admin'    => 'http://webns.net/mvcb/',
    'content'  => 'http://purl.org/rss/1.0/modules/content/',
    'dc'       => 'http://purl.org/dc/elements/1.1/',
    'dcterms'  => 'http://purl.org/dc/terms/',
    'foaf'     => 'http://xmlns.com/foaf/0.1/',
    'owl'      => 'http://www.w3.org/2002/07/owl#',
    'rdf'      => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
    'rdfs'     => 'http://www.w3.org/2000/01/rdf-schema#',
    'rss'      => 'http://purl.org/rss/1.0/',
    'sioc'     => 'http://rdfs.org/sioc/ns#',
    'xsd'      => 'http://www.w3.org/2001/XMLSchema',
/**
 * Implement hook_entity_info().
 */
function system_entity_info() {
  return array(
    'file' => array(
      'label' => t('File'),
      'base table' => 'file',
      'object keys' => array(
        'id' => 'fid',
      ),
      'static cache' => FALSE,
    ),
  );
}

function system_element_info() {
  // Top level elements.
  $types['form'] = array(
    '#method' => 'post',
    '#action' => request_uri(),
    '#theme_wrappers' => array('form'),
    '#show_messages' => TRUE,
    '#theme' => 'page',
    '#title' => '',
    '#list_type' => 'ul',
    '#attributes' => array(),
    '#items' => array(),
  );

  // Input elements.
  $types['submit'] = array(
    '#input' => TRUE,
    '#name' => 'op',
    '#button_type' => 'submit',
    '#executes_submit_callback' => TRUE,
    '#process' => array('ajax_process_form'),
    '#theme_wrappers' => array('button'),
    '#input' => TRUE,
    '#name' => 'op',
    '#button_type' => 'submit',
    '#executes_submit_callback' => FALSE,
    '#process' => array('ajax_process_form'),
    '#theme_wrappers' => array('button'),
    '#input' => TRUE,
    '#button_type' => 'submit',
    '#executes_submit_callback' => TRUE,
    '#process' => array('ajax_process_form'),
    '#return_value' => TRUE,
    '#has_garbage_value' => TRUE,
    '#src' => NULL,
    '#theme_wrappers' => array('image_button'),
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 128,
    '#autocomplete_path' => FALSE,
    '#process' => array('form_process_text_format', 'ajax_process_form'),
    '#theme_wrappers' => array('form_element'),
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 128,
    '#process' => array('ajax_process_form'),
    '#theme_wrappers' => array('form_element'),
    '#process' => array('form_process_password_confirm'),
    '#theme_wrappers' => array('form_element'),
    '#input' => TRUE,
    '#cols' => 60,
    '#rows' => 5,
    '#resizable' => TRUE,
    '#process' => array('form_process_text_format', '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'),
    '#theme_wrappers' => array('form_element'),
    '#form_element_skip_title' => TRUE,
    '#process' => array('form_process_checkboxes'),
    '#theme_wrappers' => array('checkboxes'),
    '#pre_render' => array('form_pre_render_conditional_form_element'),
    '#process' => array('ajax_process_form'),
    '#theme_wrappers' => array('form_element'),
    '#form_element_skip_title' => TRUE,
    '#input' => TRUE,
    '#size' => 0,
    '#multiple' => FALSE,
    '#process' => array('ajax_process_form'),
    '#theme_wrappers' => array('form_element'),
    '#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'),
    '#theme_wrappers' => array('form_element'),
    '#input' => TRUE,
    '#js_select' => TRUE,
    '#multiple' => TRUE,
    '#process' => array('form_process_tableselect'),
    '#options' => array(),
    '#empty' => '',
    '#theme_wrappers' => array('form_element'),
    '#process' => array('ajax_process_form'),
    '#markup' => '',
    '#theme' => 'markup',
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
    '#value' => NULL,
    '#process' => array('form_process_fieldset', 'ajax_process_form'),
    '#pre_render' => array('form_pre_render_fieldset'),
    '#theme_wrappers' => array('fieldset'),
    '#theme_wrappers' => array('vertical_tabs'),
    '#default_tab' => '',
    '#process' => array('form_process_vertical_tabs'),
  );
    '#theme' => array('hidden'),
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',
    'file path' => 'includes',
    'file' => 'form.inc',
  $items['system/timezone'] = array(
    'title' => 'Time zone',
    'page callback' => 'system_timezone',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  $items['system/run-cron-image'] = array(
    'title' => 'Execute cron',
    'page callback' => 'system_run_cron_image',
    'access callback' => 'system_run_cron_image_access',
    'type' => MENU_CALLBACK,
    'access arguments' => array('access administration pages'),
    'page callback' => 'system_main_admin_page',
    'weight' => 9,
    'theme callback' => 'variable_get',
    'theme arguments' => array('admin_theme'),
    'page callback' => 'system_admin_compact_page',
    'access arguments' => array('access administration pages'),
    'page callback' => 'system_main_admin_page',
    'access arguments' => array('access administration pages'),
    'page callback' => 'system_admin_by_module',
    'access arguments' => array('access administration pages'),
  // Menu items that are basically just menu blocks.
  $items['admin/structure'] = array(
    'title' => 'Structure',
    'description' => 'Control how your site looks and feels.',
    '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 site theme.',
    'page arguments' => array('system_themes_form'),
    'access arguments' => array('administer site configuration'),
  $items['admin/appearance/select'] = array(
    'description' => 'Select the default theme for your site.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
  $items['admin/appearance/settings'] = array(
    'description' => 'Configure default and theme specific settings.',
    'page arguments' => array('system_theme_settings'),
    'access arguments' => array('administer site configuration'),
  // Theme configuration subtabs.
  $items['admin/appearance/settings/global'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
  );
Dries Buytaert's avatar
 
Dries Buytaert committed

    $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',
      'access arguments' => array($theme),
Dries Buytaert's avatar
 
Dries Buytaert committed
  }
  // Configuration and modules.
  $items['admin/config'] = array(
    'title' => 'Configuration and modules',
    'page callback' => 'system_admin_config_page',
    'access arguments' => array('access administration pages'),
  );
  $items['admin/config/config'] = array(
    'title' => 'Configuration',
    'access arguments' => array('administer site configuration'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/modules'] = array(
    'title' => 'Modules',
    'description' => 'Enable or disable add-on modules for your site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_modules'),
    'access arguments' => array('administer site configuration'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  $items['admin/config/modules/list'] = array(
  $items['admin/config/modules/list/confirm'] = array(
    'access arguments' => array('administer site configuration'),
  $items['admin/config/modules/uninstall'] = array(
    'page arguments' => array('system_modules_uninstall'),
    'access arguments' => array('administer site configuration'),
  $items['admin/config/modules/uninstall/confirm'] = array(
    'access arguments' => array('administer site configuration'),
  $items['admin/config/system/actions'] = array(
    'title' => 'Actions',
    'description' => 'Manage the actions defined for your site.',
    'access arguments' => array('administer actions'),
    'page callback' => 'system_actions_manage',
    'file' => 'system.admin.inc',
  $items['admin/config/system/actions/manage'] = array(
    'title' => 'Manage actions',
    'description' => 'Manage the actions defined for your site.',
    'page callback' => 'system_actions_manage',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -2,
  $items['admin/config/system/actions/configure'] = array(
    'title' => 'Configure an advanced action',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_actions_configure'),
    'access arguments' => array('administer actions'),
  $items['admin/config/system/actions/delete/%actions'] = array(
    'title' => 'Delete action',
    'description' => 'Delete an action.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_actions_delete_form', 5),
    'access arguments' => array('administer actions'),
  $items['admin/config/system/actions/orphan'] = array(
    'title' => 'Remove orphans',
    'page callback' => 'system_actions_remove_orphans',
    'access arguments' => array('administer actions'),
  $items['admin/config/people/ip-blocking'] = array(
    'title' => 'IP address blocking',
    'description' => 'Manage blocked IP addresses.',
    'page callback' => 'system_ip_blocking',
    'access arguments' => array('block IP addresses'),
  $items['admin/config/people/ip-blocking/%'] = array(
    'title' => 'IP address blocking',
    'description' => 'Manage blocked IP addresses.',
    'page callback' => 'system_ip_blocking',
    'access arguments' => array('block IP addresses'),
    'type' => MENU_CALLBACK,
  $items['admin/config/people/ip-blocking/delete/%blocked_ip'] = array(
    'title' => 'Delete IP address',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_ip_blocking_delete', 5),
    'access arguments' => array('block IP addresses'),
    'type' => MENU_CALLBACK,
  // Configuration.
  $items['admin/config/development'] = array(
    'title' => 'Development',
    'description' => 'Development tools.',
    'position' => 'left',
    'weight' => 10,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
  );
  $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'),
  $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'),
    'title' => 'Media',
    'description' => 'Media tools.',
    'position' => 'left',
    'weight' => 10,
    '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'),
  $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',
  );
  $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',
    'weight' => -7,
    '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'),
    'weight' => -10,
  $items['admin/config/regional/date-time'] = array(
    'title' => 'Date and time',
    'description' => 'Configure display formats for date and time.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_date_time_settings'),
    'access arguments' => array('administer site configuration'),
    'weight' => -9,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/types'] = array(
    'title' => 'Types',
    'description' => 'Configure display formats for date and time.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_date_time_settings'),
    'access arguments' => array('administer site configuration'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/types/add'] = array(
    'title' => 'Add date type',
    'description' => 'Add new date type.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_add_date_format_type_form'),
    'access arguments' => array('administer site configuration'),
    'type' => MENU_LOCAL_ACTION,
    'weight' => -10,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/types/%/delete'] = array(
    'title' => 'Delete date type',
    'description' => 'Allow users to delete a configured date type.',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_delete_date_format_type_form', 5),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats'] = array(
    'title' => 'Formats',
    'description' => 'Configure display format strings for date and time.',
    'page callback' => 'system_date_time_formats',
    'access arguments' => array('administer site configuration'),
    'type' => MENU_LOCAL_TASK,
    '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/%/edit'] = array(
    'title' => 'Edit date format',
    'description' => 'Allow users to edit a configured date format.',
    'type' => MENU_CALLBACK,
    '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/%/delete'] = array(
    'title' => 'Delete date format',
    'description' => 'Allow users to delete a configured date format.',
    'type' => MENU_CALLBACK,
    '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',
    'type' => MENU_CALLBACK,
    'page callback' => 'system_date_time_lookup',
    'access arguments' => array('administer site configuration'),
  $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'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/search/clean-urls'] = array(
    'title' => 'Clean URLs',
    'description' => 'Enable or disable clean URLs for your site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('system_clean_url_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/search/clean-urls/check'] = array(
    'title' => 'Clean URL check',
    'page callback' => 'drupal_json_output',
    'page arguments' => array(array('status' => TRUE)),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/content'] = array(
    'title' => 'Content authoring',
    'description' => 'Settings related to formatting and authoring content.',
    'position' => 'right',
    'weight' => 5,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/system'] = array(
    'title' => 'System',
    'description' => 'General system related configuration.',
    'position' => 'right',
    'weight' => -5,
    '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 basic site name, e-mail address, slogan, default front page, number of posts per page, error pages and cron.',
    'page arguments' => array('system_site_information_settings'),
    'access arguments' => array('administer site configuration'),
  $items['admin/reports'] = array(
    'title' => 'Reports',
    'description' => 'View reports from system logs and other status information.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access site reports'),
  $items['admin/reports/status'] = array(
    'title' => 'Status report',
    'description' => "Get a status report about your site's operation and any detected problems.",
    'page callback' => 'system_status',
    'weight' => 10,
    'access arguments' => array('administer site configuration'),
  $items['admin/reports/status/run-cron'] = array(
    'access arguments' => array('administer site configuration'),
  $items['admin/reports/status/php'] = array(
    'access arguments' => array('administer site configuration'),
  // Default page for batch operations.
  $items['batch'] = array(
    'page callback' => 'system_batch_page',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
Dries Buytaert's avatar
 
Dries Buytaert committed
  return $items;
Dries Buytaert's avatar
Dries Buytaert committed
}

/**
 * Implementation of hook_library().
 */
function system_library() {
  // jQuery.
  $libraries['jquery'] = array(
    'title' => 'jQuery',
    'website' => 'http://jquery.com',
    'version' => '1.3.2',
    'js' => array(
      'misc/jquery.js' => array('weight' => JS_LIBRARY - 20),
    ),
  );

  // jQuery Once.
  $libraries['once'] = array(
    'title' => 'jQuery Once',