Commit d14bc428 authored by Dries's avatar Dries

- Patch #15570 by Drumm: integrated the admin and system module. Renamed the...

- Patch #15570 by Drumm: integrated the admin and system module.  Renamed the callback as per Goba's suggestion.
parent a6e7e9c1
<?php
// $Id$
/**
* @file
* Handles the administration pages.
*/
/**
* Implementation of hook_help().
*/
function admin_help($section) {
switch ($section) {
case 'admin/modules#description':
return t('Handles the administration pages.');
case 'admin':
return t('<p>Welcome to the administration section. Below are the most recent system events.</p>');
}
}
/**
* Implementation of hook_menu().
*/
function admin_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'admin', 'title' => t('administer'),
'access' => user_access('access administration pages'),
'callback' => 'admin_main_page',
'weight' => 9);
}
return $items;
}
/**
* Menu callback; provides the main page of the administration section.
*/
function admin_main_page() {
watchdog_overview('actions');
}
?>
......@@ -13,6 +13,8 @@ function system_help($section) {
global $base_url;
switch ($section) {
case 'admin':
return t('<p>Welcome to the administration section. Below are the most recent system events.</p>');
case 'admin/settings':
return t('General configuration options for your site. Set up the name of the site, e-mail address used in mail-outs, clean URL options, caching, etc.');
case 'admin/themes':
......@@ -69,6 +71,11 @@ function system_menu($may_cache) {
$access = user_access('administer site configuration');
$items[] = array('path' => 'admin', 'title' => t('administer'),
'access' => user_access('access administration pages'),
'callback' => 'system_admin_page',
'weight' => 9);
// Themes:
$items[] = array('path' => 'admin/themes', 'title' => t('themes'),
'callback' => 'system_themes', 'access' => $access);
......@@ -114,6 +121,13 @@ function system_menu($may_cache) {
function system_test() {
}
/**
* Menu callback; provides the main page of the administration section.
*/
function system_admin_page() {
watchdog_overview('actions');
}
/**
* Implementation of hook_user().
*
......@@ -439,7 +453,7 @@ function system_module_listing() {
ksort($files);
$required = array('admin', 'block', 'filter', 'system', 'user', 'watchdog');
$required = array('block', 'filter', 'system', 'user', 'watchdog');
$throttle_required = array_merge($required, array('throttle'));
$header = array(t('Name'), t('Description'), t('Enabled'));
......
......@@ -13,6 +13,8 @@ function system_help($section) {
global $base_url;
switch ($section) {
case 'admin':
return t('<p>Welcome to the administration section. Below are the most recent system events.</p>');
case 'admin/settings':
return t('General configuration options for your site. Set up the name of the site, e-mail address used in mail-outs, clean URL options, caching, etc.');
case 'admin/themes':
......@@ -69,6 +71,11 @@ function system_menu($may_cache) {
$access = user_access('administer site configuration');
$items[] = array('path' => 'admin', 'title' => t('administer'),
'access' => user_access('access administration pages'),
'callback' => 'system_admin_page',
'weight' => 9);
// Themes:
$items[] = array('path' => 'admin/themes', 'title' => t('themes'),
'callback' => 'system_themes', 'access' => $access);
......@@ -114,6 +121,13 @@ function system_menu($may_cache) {
function system_test() {
}
/**
* Menu callback; provides the main page of the administration section.
*/
function system_admin_page() {
watchdog_overview('actions');
}
/**
* Implementation of hook_user().
*
......@@ -439,7 +453,7 @@ function system_module_listing() {
ksort($files);
$required = array('admin', 'block', 'filter', 'system', 'user', 'watchdog');
$required = array('block', 'filter', 'system', 'user', 'watchdog');
$throttle_required = array_merge($required, array('throttle'));
$header = array(t('Name'), t('Description'), t('Enabled'));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment