Newer
Older
// $Id$
/**
* @file
* Configuration system that lets administrators modify the workings of the site.
*/
/**
* Maximum age of temporary files in seconds.
*/
define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 21600);
Dries Buytaert
committed
/**
* Default interval for automatic cron executions in seconds.
*/
define('DRUPAL_CRON_DEFAULT_THRESHOLD', 10800);
Angie Byron
committed
/**
* 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);
Dries Buytaert
committed
/**
* 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);
Dries Buytaert
committed
/**
* 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
committed
* Implement hook_help().
Gábor Hojtsy
committed
function system_help($path, $arg) {
Gábor Hojtsy
committed
switch ($path) {
Dries Buytaert
committed
case 'admin/help#system':
Dries Buytaert
committed
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
Angie Byron
committed
$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/handbook/modules/system')) . '</p>';
Dries Buytaert
committed
$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/config/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>';
Angie Byron
committed
$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>.', array('@status' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) . '</dd>';
Dries Buytaert
committed
$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="@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'))) . '</dd>';
Angie Byron
committed
$output .= '<dt>' . t('Configuring actions') . '</dt>';
$output .= '<dd>' . 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 <a href="@trigger-help">Trigger module</a>, 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. Visit the <a href="@actions">Actions page</a> to configure actions.', array('@trigger-help' => url('admin/help/trigger'), '@actions' => url('admin/config/system/actions'))) . '</dd>';
Dries Buytaert
committed
$output .= '</dl>';
Dries Buytaert
committed
return $output;
Steven Wittens
committed
case 'admin/by-module':
return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>';
Dries Buytaert
committed
case 'admin/appearance':
Angie Byron
committed
$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>';
return $output;
case 'admin/appearance/settings/' . $arg[3]:
$reference = explode('.', $arg[3], 2);
$theme = array_pop($reference);
Dries Buytaert
committed
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>';
case 'admin/config/modules':
$output = '<p>' . t('Download additional <a href="@modules">contributed modules</a> to extend Drupal\'s functionality.', array('@modules' => 'http://drupal.org/project/modules')) . '</p>';
Dries Buytaert
committed
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 . '/update.php', '@updates' => url('admin/reports/updates'))) . '</p>';
Dries Buytaert
committed
}
else {
$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 . '/update.php', '@updates' => url('admin/reports/updates'))) . '</p>';
Dries Buytaert
committed
}
}
else {
$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 . '/update.php')) . '</p>';
Dries Buytaert
committed
}
Dries Buytaert
committed
return $output;
case 'admin/config/modules/uninstall':
Angie Byron
committed
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>';
Angie Byron
committed
case 'admin/structure/block/manage':
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>';
Gábor Hojtsy
committed
}
Gábor Hojtsy
committed
break;
case 'admin/config/development/maintenance':
Dries Buytaert
committed
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>';
}
Angie Byron
committed
case 'admin/config/system/actions':
case 'admin/config/system/actions/manage':
Angie Byron
committed
$output = '';
$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 list in the advanced action section below and click the <em>Create</em> button.') . '</p>';
Gábor Hojtsy
committed
if (module_exists('trigger')) {
Dries Buytaert
committed
$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>';
Gábor Hojtsy
committed
}
Gábor Hojtsy
committed
return $output;
Angie Byron
committed
case 'admin/config/system/actions/configure':
Angie Byron
committed
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
committed
}
/**
Dries Buytaert
committed
* Implement hook_theme().
*/
Dries Buytaert
committed
function system_theme() {
return array_merge(drupal_common_theme(), array(
Dries Buytaert
committed
'system_themes_page' => array(
'variables' => array('theme_groups' => NULL),
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
Dries Buytaert
committed
'system_settings_form' => array(
'render element' => 'form',
Dries Buytaert
committed
),
'confirm_form' => array(
'render element' => 'form',
Dries Buytaert
committed
),
'system_modules_fieldset' => array(
'render element' => 'form',
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
'system_modules_incompatible' => array(
'variables' => array('message' => NULL),
'file' => 'system.admin.inc',
Dries Buytaert
committed
'system_modules_uninstall' => array(
'render element' => 'form',
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
'status_report' => array(
'render element' => 'requirements',
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
'admin_page' => array(
'variables' => array('blocks' => NULL),
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
'admin_block' => array(
'variables' => array('block' => NULL),
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
'admin_block_content' => array(
'variables' => array('content' => NULL),
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
'system_admin_by_module' => array(
'variables' => array('menu_items' => NULL),
'file' => 'system.admin.inc',
Dries Buytaert
committed
),
Gábor Hojtsy
committed
'system_powered_by' => array(
'variables' => array(),
Gábor Hojtsy
committed
),
'system_compact_link' => array(
'variables' => array(),
Dries Buytaert
committed
),
Dries Buytaert
committed
'system_run_cron_image' => array(
'variables' => array('image_path' => NULL),
Dries Buytaert
committed
),
Dries Buytaert
committed
'system_date_time_settings' => array(
'render element' => 'form',
Dries Buytaert
committed
'file' => 'system.admin.inc',
),
Dries Buytaert
committed
));
}
* Implement hook_permission().
function system_permission() {
return array(
Dries Buytaert
committed
'administer modules' => array(
'title' => t('Administer modules'),
),
Angie Byron
committed
'administer site configuration' => array(
'title' => t('Administer site configuration'),
),
Dries Buytaert
committed
'administer themes' => array(
'title' => t('Administer themes'),
),
'administer software updates' => array(
'title' => t('Run software updates'),
),
Angie Byron
committed
'administer actions' => array(
'title' => t('Administer actions'),
),
'administer files' => array(
'title' => t('Administer user-uploaded files'),
Angie Byron
committed
),
'access administration pages' => array(
'title' => t('Use the administration pages and help'),
Angie Byron
committed
),
Dries Buytaert
committed
'access contextual links' => array(
'title' => t('Use contextual links'),
Dries Buytaert
committed
'description' => t('Use contextual links to perform actions related to elements on a page.'),
),
'access site in maintenance mode' => array(
'title' => t('Use the site in maintenance mode'),
Angie Byron
committed
'access site reports' => array(
'title' => t('View site reports'),
Angie Byron
committed
),
'block IP addresses' => array(
'title' => t('Block IP addresses'),
),
);
/**
Dries Buytaert
committed
* Implement hook_rdf_namespaces().
*/
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/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/',
'tags' => 'http://www.holygoat.co.uk/owl/redwood/0.1/tags/',
'sioc' => 'http://rdfs.org/sioc/ns#',
'sioct' => 'http://rdfs.org/sioc/types#',
'ctag' => 'http://commontag.org/ns#',
'skos' => 'http://www.w3.org/2004/02/skos/core#',
'xsd' => 'http://www.w3.org/2001/XMLSchema#',
);
}
/**
* Implement hook_hook_info().
*/
function system_hook_info() {
$hooks['token_info'] = array(
'group' => 'tokens',
);
$hooks['tokens'] = array(
'group' => 'tokens',
);
return $hooks;
}
Dries Buytaert
committed
/**
* 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,
),
);
}
Dries Buytaert
committed
* Implement hook_element_info().
Dries Buytaert
committed
function system_element_info() {
// Top level elements.
$types['form'] = array(
Dries Buytaert
committed
'#method' => 'post',
'#action' => request_uri(),
'#theme_wrappers' => array('form'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['page'] = array(
'#show_messages' => TRUE,
'#theme' => 'page',
Angie Byron
committed
'#theme_wrappers' => array('html'),
);
Dries Buytaert
committed
$types['list'] = array(
'#title' => '',
'#list_type' => 'ul',
'#attributes' => array(),
'#items' => array(),
);
Dries Buytaert
committed
// 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_commands'] = array(
'#ajax_commands' => array(),
);
$types['html_tag'] = array(
'#theme' => 'html_tag',
'#attributes' => array(),
'#value' => NULL,
);
Dries Buytaert
committed
// Input elements.
$types['submit'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#name' => 'op',
'#button_type' => 'submit',
'#executes_submit_callback' => TRUE,
Angie Byron
committed
'#process' => array('ajax_process_form'),
'#theme_wrappers' => array('button'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['button'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#name' => 'op',
'#button_type' => 'submit',
'#executes_submit_callback' => FALSE,
Angie Byron
committed
'#process' => array('ajax_process_form'),
'#theme_wrappers' => array('button'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['image_button'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#button_type' => 'submit',
'#executes_submit_callback' => TRUE,
Angie Byron
committed
'#process' => array('ajax_process_form'),
Dries Buytaert
committed
'#return_value' => TRUE,
'#has_garbage_value' => TRUE,
'#src' => NULL,
'#theme_wrappers' => array('image_button'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['textfield'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#size' => 60,
'#maxlength' => 128,
'#autocomplete_path' => FALSE,
Angie Byron
committed
'#process' => array('form_process_text_format', 'ajax_process_form'),
'#theme' => 'textfield',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['password'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#size' => 60,
'#maxlength' => 128,
Angie Byron
committed
'#process' => array('ajax_process_form'),
'#theme' => 'password',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['password_confirm'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#process' => array('form_process_password_confirm', 'user_form_process_password_confirm'),
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['textarea'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#cols' => 60,
'#rows' => 5,
'#resizable' => TRUE,
Angie Byron
committed
'#process' => array('form_process_text_format', 'ajax_process_form'),
'#theme' => 'textarea',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['radios'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#process' => array('form_process_radios'),
'#theme_wrappers' => array('radios'),
'#pre_render' => array('form_pre_render_conditional_form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['radio'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#default_value' => NULL,
Angie Byron
committed
'#process' => array('ajax_process_form'),
'#theme' => 'radio',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
'#title_display' => 'after',
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['checkboxes'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#tree' => TRUE,
'#process' => array('form_process_checkboxes'),
'#theme_wrappers' => array('checkboxes'),
'#pre_render' => array('form_pre_render_conditional_form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['checkbox'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#return_value' => 1,
Angie Byron
committed
'#process' => array('ajax_process_form'),
'#theme' => 'checkbox',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
'#title_display' => 'after',
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['select'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#size' => 0,
'#multiple' => FALSE,
Angie Byron
committed
'#process' => array('ajax_process_form'),
'#theme' => 'select',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['weight'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#delta' => 10,
'#default_value' => 0,
Angie Byron
committed
'#process' => array('form_process_weight', 'ajax_process_form'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['date'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#element_validate' => array('date_validate'),
'#process' => array('form_process_date'),
'#theme' => 'date',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['file'] = array(
Dries Buytaert
committed
'#input' => TRUE,
'#size' => 60,
'#theme' => 'file',
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['tableselect'] = array(
Angie Byron
committed
'#input' => TRUE,
'#js_select' => TRUE,
'#multiple' => TRUE,
'#process' => array('form_process_tableselect'),
'#options' => array(),
'#empty' => '',
Dries Buytaert
committed
'#theme' => 'tableselect',
Angie Byron
committed
);
Dries Buytaert
committed
Dries Buytaert
committed
// Form structure.
$types['item'] = array(
'#markup' => '',
'#pre_render' => array('drupal_pre_render_markup'),
'#theme_wrappers' => array('form_element'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['hidden'] = array(
Dries Buytaert
committed
'#input' => TRUE,
Angie Byron
committed
'#process' => array('ajax_process_form'),
'#theme' => 'hidden',
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['value'] = array(
Dries Buytaert
committed
'#input' => TRUE,
);
Dries Buytaert
committed
$types['markup'] = array(
'#markup' => '',
'#pre_render' => array('drupal_pre_render_markup'),
);
$types['link'] = array(
'#pre_render' => array('drupal_pre_render_link', 'drupal_pre_render_markup'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['fieldset'] = array(
Dries Buytaert
committed
'#collapsible' => FALSE,
'#collapsed' => FALSE,
'#value' => NULL,
Angie Byron
committed
'#process' => array('form_process_fieldset', 'ajax_process_form'),
'#pre_render' => array('form_pre_render_fieldset'),
'#theme_wrappers' => array('fieldset'),
Dries Buytaert
committed
);
Dries Buytaert
committed
$types['vertical_tabs'] = array(
'#theme_wrappers' => array('vertical_tabs'),
'#default_tab' => '',
'#process' => array('form_process_vertical_tabs'),
);
Dries Buytaert
committed
$types['container'] = array(
'#theme_wrappers' => array('container'),
'#process' => array('form_process_container'),
);
Dries Buytaert
committed
$types['token'] = array(
Dries Buytaert
committed
'#input' => TRUE,
Angie Byron
committed
'#theme' => 'hidden',
Dries Buytaert
committed
);
Dries Buytaert
committed
return $types;
Dries Buytaert
committed
* Implement hook_menu().
Dries Buytaert
committed
function system_menu() {
$items['system/files'] = array(
'title' => 'File download',
Dries Buytaert
committed
'page callback' => 'file_download',
'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'),
Dries Buytaert
committed
'access callback' => TRUE,
Angie Byron
committed
'type' => MENU_CALLBACK,
);
Angie Byron
committed
$items['system/ajax'] = array(
Angie Byron
committed
'title' => 'AHAH callback',
Angie Byron
committed
'page callback' => 'ajax_form_callback',
Dries Buytaert
committed
'delivery callback' => 'ajax_deliver',
Angie Byron
committed
'access callback' => TRUE,
Dries Buytaert
committed
'type' => MENU_CALLBACK,
'file path' => 'includes',
'file' => 'form.inc',
Dries Buytaert
committed
);
Angie Byron
committed
$items['system/timezone'] = array(
'title' => 'Time zone',
'page callback' => 'system_timezone',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
Angie Byron
committed
);
Dries Buytaert
committed
$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,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
$items['admin'] = array(
'title' => 'Administer',
Dries Buytaert
committed
'access arguments' => array('access administration pages'),
'page callback' => 'system_main_admin_page',
'weight' => 9,
Dries Buytaert
committed
'menu_name' => 'management',
Dries Buytaert
committed
'theme callback' => 'variable_get',
'theme arguments' => array('admin_theme'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/compact'] = array(
'title' => 'Compact mode',
Dries Buytaert
committed
'page callback' => 'system_admin_compact_page',
Dries Buytaert
committed
'access arguments' => array('access administration pages'),
Dries Buytaert
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/by-task'] = array(
'title' => 'By task',
Dries Buytaert
committed
'page callback' => 'system_main_admin_page',
Dries Buytaert
committed
'access arguments' => array('access administration pages'),
Dries Buytaert
committed
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/by-module'] = array(
'title' => 'By module',
Dries Buytaert
committed
'page callback' => 'system_admin_by_module',
Dries Buytaert
committed
'access arguments' => array('access administration pages'),
Dries Buytaert
committed
'type' => MENU_LOCAL_TASK,
'weight' => 2,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Gábor Hojtsy
committed
// Menu items that are basically just menu blocks.
Dries Buytaert
committed
$items['admin/structure'] = array(
'title' => 'Structure',
'description' => 'Control how your site looks and feels.',
Dries Buytaert
committed
'position' => 'right',
'weight' => -8,
Dries Buytaert
committed
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array('access administration pages'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
// Appearance.
$items['admin/appearance'] = array(
'title' => 'Appearance',
Angie Byron
committed
'description' => 'Select and configure your site theme.',
Dries Buytaert
committed
'page callback' => 'system_themes_page',
Dries Buytaert
committed
'access arguments' => array('administer themes'),
Angie Byron
committed
'position' => 'left',
'weight' => -6,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
$items['admin/appearance/list'] = array(
'title' => 'List',
Dries Buytaert
committed
'description' => 'Select and configure your site theme.',
Dries Buytaert
committed
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
$items['admin/appearance/enable'] = array(
'title' => 'Enable theme',
'page callback' => 'system_theme_enable',
Dries Buytaert
committed
'access arguments' => array('administer themes'),
Dries Buytaert
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
);
$items['admin/appearance/disable'] = array(
'title' => 'Disable theme',
'page callback' => 'system_theme_disable',
Dries Buytaert
committed
'access arguments' => array('administer themes'),
Dries Buytaert
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
);
$items['admin/appearance/default'] = array(
'title' => 'Set default theme',
'page callback' => 'system_theme_default',
Dries Buytaert
committed
'access arguments' => array('administer themes'),
Dries Buytaert
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
);
Dries Buytaert
committed
$items['admin/appearance/settings'] = array(
Dries Buytaert
committed
'title' => 'Settings',
Dries Buytaert
committed
'description' => 'Configure default and theme specific settings.',
Dries Buytaert
committed
'page callback' => 'drupal_get_form',
Gábor Hojtsy
committed
'page arguments' => array('system_theme_settings'),
Dries Buytaert
committed
'access arguments' => array('administer themes'),
Dries Buytaert
committed
'type' => MENU_LOCAL_TASK,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
// Theme configuration subtabs.
Dries Buytaert
committed
$items['admin/appearance/settings/global'] = array(
'title' => 'Global settings',
Dries Buytaert
committed
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
Dries Buytaert
committed
foreach (list_themes() as $theme) {
Dries Buytaert
committed
$items['admin/appearance/settings/' . $theme->name] = array(
Gábor Hojtsy
committed
'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),
'file' => 'system.admin.inc',
Gábor Hojtsy
committed
);
// Configuration and modules.
$items['admin/config'] = array(
'title' => 'Configuration and modules',
'page callback' => 'system_admin_config_page',
'access arguments' => array('access administration pages'),
'file' => 'system.admin.inc',
);
$items['admin/config/config'] = array(
'title' => 'Configuration',
'access arguments' => array('administer site configuration'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
'file' => 'system.admin.inc',
);
$items['admin/config/modules'] = array(
'title' => 'Modules',
'description' => 'Enable or disable add-on modules for your site.',
Dries Buytaert
committed
'page callback' => 'drupal_get_form',
'page arguments' => array('system_modules'),
Dries Buytaert
committed
'access arguments' => array('administer modules'),
'file' => 'system.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 10,
Dries Buytaert
committed
);
$items['admin/config/modules/list'] = array(
'title' => 'List',
Dries Buytaert
committed
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/config/modules/list/confirm'] = array(
'title' => 'List',
Dries Buytaert
committed
'access arguments' => array('administer modules'),
Dries Buytaert
committed
'type' => MENU_CALLBACK,
);
$items['admin/config/modules/uninstall'] = array(
'title' => 'Uninstall',
Dries Buytaert
committed
'page arguments' => array('system_modules_uninstall'),
Dries Buytaert
committed
'access arguments' => array('administer modules'),
Dries Buytaert
committed
'type' => MENU_LOCAL_TASK,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/config/modules/uninstall/confirm'] = array(
'title' => 'Uninstall',
Dries Buytaert
committed
'access arguments' => array('administer modules'),
Dries Buytaert
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
);
// Actions.
Angie Byron
committed
$items['admin/config/system/actions'] = array(
Gábor Hojtsy
committed
'title' => 'Actions',
'description' => 'Manage the actions defined for your site.',
'access arguments' => array('administer actions'),
'page callback' => 'system_actions_manage',
'file' => 'system.admin.inc',
Gábor Hojtsy
committed
);
Angie Byron
committed
$items['admin/config/system/actions/manage'] = array(
Gábor Hojtsy
committed
'title' => 'Manage actions',
'description' => 'Manage the actions defined for your site.',
'page callback' => 'system_actions_manage',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -2,
'file' => 'system.admin.inc',
Gábor Hojtsy
committed
);
Angie Byron
committed
$items['admin/config/system/actions/configure'] = array(
Gábor Hojtsy
committed
'title' => 'Configure an advanced action',
Gábor Hojtsy
committed
'page callback' => 'drupal_get_form',
'page arguments' => array('system_actions_configure'),
Dries Buytaert
committed
'access arguments' => array('administer actions'),
Gábor Hojtsy
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
Gábor Hojtsy
committed
);
Angie Byron
committed
$items['admin/config/system/actions/delete/%actions'] = array(
Gábor Hojtsy
committed
'title' => 'Delete action',
'description' => 'Delete an action.',
'page callback' => 'drupal_get_form',
Angie Byron
committed
'page arguments' => array('system_actions_delete_form', 5),
Dries Buytaert
committed
'access arguments' => array('administer actions'),
Gábor Hojtsy
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
Gábor Hojtsy
committed
);
Angie Byron
committed
$items['admin/config/system/actions/orphan'] = array(
Gábor Hojtsy
committed
'title' => 'Remove orphans',
'page callback' => 'system_actions_remove_orphans',
Dries Buytaert
committed
'access arguments' => array('administer actions'),
Gábor Hojtsy
committed
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
Gábor Hojtsy
committed
);
Dries Buytaert
committed
// IP address blocking.
$items['admin/config/people/ip-blocking'] = array(
Dries Buytaert
committed
'title' => 'IP address blocking',
'description' => 'Manage blocked IP addresses.',
'page callback' => 'system_ip_blocking',
'access arguments' => array('block IP addresses'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/config/people/ip-blocking/%'] = array(
Dries Buytaert
committed
'title' => 'IP address blocking',
'description' => 'Manage blocked IP addresses.',
'page callback' => 'system_ip_blocking',
'access arguments' => array('block IP addresses'),
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/config/people/ip-blocking/delete/%blocked_ip'] = array(
Dries Buytaert
committed
'title' => 'Delete IP address',
'page callback' => 'drupal_get_form',
'page arguments' => array('system_ip_blocking_delete', 5),
Dries Buytaert
committed
'access arguments' => array('block IP addresses'),
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
// 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'),
'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',
Dries Buytaert
committed
$items['admin/config/media'] = array(
'title' => 'Media',
'description' => 'Media tools.',
'position' => 'left',
'weight' => 10,
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array('access administration pages'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/config/media/file-system'] = array(
Dries Buytaert
committed
'title' => 'File system',
Dries Buytaert
committed
'description' => 'Tell Drupal where to store uploaded files and how they are accessed.',
Dries Buytaert
committed
'page callback' => 'drupal_get_form',
'page arguments' => array('system_file_system_settings'),
Dries Buytaert
committed
'access arguments' => array('administer site configuration'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
$items['admin/config/media/image-toolkit'] = array(
'title' => 'Image toolkit',
'description' => 'Choose which image toolkit to use if you have installed optional toolkits.',
Dries Buytaert
committed
'page callback' => 'drupal_get_form',
Dries Buytaert
committed
'page arguments' => array('system_image_toolkit_settings'),
Dries Buytaert
committed
'access arguments' => array('administer site configuration'),
'file' => 'system.admin.inc',
);
Angie Byron
committed
$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'),
Angie Byron
committed
'file' => 'system.admin.inc',
);
$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',
);
Angie Byron
committed
$items['admin/config/development/logging'] = array(
Dries Buytaert
committed
'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.",
Dries Buytaert
committed
'page callback' => 'drupal_get_form',
Dries Buytaert
committed
'page arguments' => array('system_logging_settings'),
Dries Buytaert
committed
'access arguments' => array('administer site configuration'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
// Regional and date settings.
Dries Buytaert
committed
$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'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
$items['admin/config/regional/settings'] = array(
'title' => 'Regional settings',
Dries Buytaert
committed
'description' => "Settings for the site's default time zone and country.",
Dries Buytaert
committed
'page callback' => 'drupal_get_form',
'page arguments' => array('system_regional_settings'),
'access arguments' => array('administer site configuration'),
'weight' => -10,
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
$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(
Dries Buytaert
committed
'title' => 'Date and time lookup',
'type' => MENU_CALLBACK,
'page callback' => 'system_date_time_lookup',
'access arguments' => array('administer site configuration'),
'file' => 'system.admin.inc',
Dries Buytaert
committed
);
Dries Buytaert
committed
Angie Byron
committed
$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'),
Angie Byron
committed
'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',
Dries Buytaert
committed
'page callback' => 'drupal_json_output',
Angie Byron
committed
'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',
);
Angie Byron
committed
$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(
Dries Buytaert
committed
'title' => 'Site information',
Dries Buytaert
committed
'description' => 'Change basic site name, e-mail address, slogan, default front page, number of posts per page, error pages and cron.',
Dries Buytaert
committed
'page callback' => 'drupal_get_form',
Dries Buytaert
committed
'page arguments' => array('system_site_information_settings'),
Dries Buytaert
committed
'access arguments' => array('administer site configuration'),
'file' => 'system.admin.inc',
Angie Byron
committed
'weight' => -10,
Dries Buytaert
committed
);
$items['admin/config/user-interface'] = array(
'title' => 'User interface',
'description' => 'Tools that enhance the user interface.',
'position' => 'right',
'page callback' => 'drupal_get_form',
'access arguments' => array('access administration pages'),
'file' => 'system.admin.inc',
'weight' => -5,
);