diff modules/system/system.module @ 5:2427550111ae 6.2

Drupal 6.2
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:30:08 +0100
parents 165d43f946a8
children fff6d4c8c043
line wrap: on
line diff
--- a/modules/system/system.module	Tue Dec 23 14:29:21 2008 +0100
+++ b/modules/system/system.module	Tue Dec 23 14:30:08 2008 +0100
@@ -1,5 +1,5 @@
 <?php
-// $Id: system.module,v 1.585.2.8 2008/02/27 19:44:44 goba Exp $
+// $Id: system.module,v 1.585.2.11 2008/04/09 21:11:49 goba Exp $
 
 /**
  * @file
@@ -9,7 +9,7 @@
 /**
  * The current system version.
  */
-define('VERSION', '6.1');
+define('VERSION', '6.2');
 
 /**
  * Core API compatibility.
@@ -212,18 +212,21 @@
   $items['admin/compact'] = array(
     'title' => 'Compact mode',
     'page callback' => 'system_admin_compact_page',
+    'access arguments' => array('access administration pages'),
     'type' => MENU_CALLBACK,
     'file' => 'system.admin.inc',
   );
   $items['admin/by-task'] = array(
     'title' => 'By task',
     'page callback' => 'system_main_admin_page',
+    'access arguments' => array('access administration pages'),
     'file' => 'system.admin.inc',
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
   $items['admin/by-module'] = array(
     'title' => 'By module',
     'page callback' => 'system_admin_by_module',
+    'access arguments' => array('access administration pages'),
     'file' => 'system.admin.inc',
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
@@ -234,6 +237,7 @@
     'position' => 'left',
     'weight' => -10,
     'page callback' => 'system_admin_menu_block_page',
+    'access arguments' => array('access administration pages'),
     'file' => 'system.admin.inc',
   );
 
@@ -244,6 +248,7 @@
     'position' => 'right',
     'weight' => -5,
     'page callback' => 'system_settings_overview',
+    'access arguments' => array('access administration pages'),
     'file' => 'system.admin.inc',
   );
   $items['admin/build'] = array(
@@ -252,6 +257,7 @@
     'position' => 'right',
     'weight' => -10,
     'page callback' => 'system_admin_menu_block_page',
+    'access arguments' => array('access administration pages'),
     'file' => 'system.admin.inc',
   );
   $items['admin/settings/admin'] = array(
@@ -282,6 +288,7 @@
   $items['admin/build/themes/settings'] = array(
     'title' => 'Configure',
     'page arguments' => array('system_theme_settings'),
+    'access arguments' => array('administer site configuration'),
     'type' => MENU_LOCAL_TASK,
   );
   // Theme configuration subtabs
@@ -316,15 +323,18 @@
   );
   $items['admin/build/modules/list/confirm'] = array(
     'title' => 'List',
+    'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/build/modules/uninstall'] = array(
     'title' => 'Uninstall',
     'page arguments' => array('system_modules_uninstall'),
+    'access arguments' => array('administer site configuration'),
     'type' => MENU_LOCAL_TASK,
   );
   $items['admin/build/modules/uninstall/confirm'] = array(
     'title' => 'Uninstall',
+    'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
   );
 
@@ -346,6 +356,7 @@
     'title' => 'Configure an advanced action',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_actions_configure'),
+    'access arguments' => array('administer actions'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/settings/actions/delete/%actions'] = array(
@@ -353,11 +364,13 @@
     'description' => 'Delete an action.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_actions_delete_form', 4),
+    'access arguments' => array('administer actions'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/settings/actions/orphan'] = array(
     'title' => 'Remove orphans',
     'page callback' => 'system_actions_remove_orphans',
+    'access arguments' => array('administer actions'),
     'type' => MENU_CALLBACK,
   );
 
@@ -429,6 +442,7 @@
     'title' => 'Date and time lookup',
     'type' => MENU_CALLBACK,
     'page callback' => 'system_date_time_lookup',
+    'access arguments' => array('administer site configuration'),
     'file' => 'system.admin.inc',
   );
   $items['admin/settings/site-maintenance'] = array(
@@ -485,18 +499,21 @@
   $items['admin/reports/status/run-cron'] = array(
     'title' => 'Run cron',
     'page callback' => 'system_run_cron',
+    'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
     'file' => 'system.admin.inc',
   );
   $items['admin/reports/status/php'] = array(
     'title' => 'PHP',
     'page callback' => 'system_php',
+    'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
     'file' => 'system.admin.inc',
   );
   $items['admin/reports/status/sql'] = array(
     'title' => 'SQL',
     'page callback' => 'system_sql',
+    'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
     'file' => 'system.admin.inc',
   );
@@ -1227,6 +1244,11 @@
     }
     db_query('DELETE FROM {files} WHERE fid = %d', $file->fid);
   }
+  $core = array('cache', 'cache_block', 'cache_filter', 'cache_page', 'cache_form', 'cache_menu');
+  $cache_tables = array_merge(module_invoke_all('flush_caches'), $core);
+  foreach ($cache_tables as $table) {
+    cache_clear_all(NULL, $table);
+  }
 }
 
 /**