Mercurial > defr > drupal > core
comparison 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 |
comparison
equal
deleted
inserted
replaced
4:d94886ac61a0 | 5:2427550111ae |
---|---|
1 <?php | 1 <?php |
2 // $Id: system.module,v 1.585.2.8 2008/02/27 19:44:44 goba Exp $ | 2 // $Id: system.module,v 1.585.2.11 2008/04/09 21:11:49 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @file | 5 * @file |
6 * Configuration system that lets administrators modify the workings of the site. | 6 * Configuration system that lets administrators modify the workings of the site. |
7 */ | 7 */ |
8 | 8 |
9 /** | 9 /** |
10 * The current system version. | 10 * The current system version. |
11 */ | 11 */ |
12 define('VERSION', '6.1'); | 12 define('VERSION', '6.2'); |
13 | 13 |
14 /** | 14 /** |
15 * Core API compatibility. | 15 * Core API compatibility. |
16 */ | 16 */ |
17 define('DRUPAL_CORE_COMPATIBILITY', '6.x'); | 17 define('DRUPAL_CORE_COMPATIBILITY', '6.x'); |
210 'file' => 'system.admin.inc', | 210 'file' => 'system.admin.inc', |
211 ); | 211 ); |
212 $items['admin/compact'] = array( | 212 $items['admin/compact'] = array( |
213 'title' => 'Compact mode', | 213 'title' => 'Compact mode', |
214 'page callback' => 'system_admin_compact_page', | 214 'page callback' => 'system_admin_compact_page', |
215 'access arguments' => array('access administration pages'), | |
215 'type' => MENU_CALLBACK, | 216 'type' => MENU_CALLBACK, |
216 'file' => 'system.admin.inc', | 217 'file' => 'system.admin.inc', |
217 ); | 218 ); |
218 $items['admin/by-task'] = array( | 219 $items['admin/by-task'] = array( |
219 'title' => 'By task', | 220 'title' => 'By task', |
220 'page callback' => 'system_main_admin_page', | 221 'page callback' => 'system_main_admin_page', |
222 'access arguments' => array('access administration pages'), | |
221 'file' => 'system.admin.inc', | 223 'file' => 'system.admin.inc', |
222 'type' => MENU_DEFAULT_LOCAL_TASK, | 224 'type' => MENU_DEFAULT_LOCAL_TASK, |
223 ); | 225 ); |
224 $items['admin/by-module'] = array( | 226 $items['admin/by-module'] = array( |
225 'title' => 'By module', | 227 'title' => 'By module', |
226 'page callback' => 'system_admin_by_module', | 228 'page callback' => 'system_admin_by_module', |
229 'access arguments' => array('access administration pages'), | |
227 'file' => 'system.admin.inc', | 230 'file' => 'system.admin.inc', |
228 'type' => MENU_LOCAL_TASK, | 231 'type' => MENU_LOCAL_TASK, |
229 'weight' => 2, | 232 'weight' => 2, |
230 ); | 233 ); |
231 $items['admin/content'] = array( | 234 $items['admin/content'] = array( |
232 'title' => 'Content management', | 235 'title' => 'Content management', |
233 'description' => "Manage your site's content.", | 236 'description' => "Manage your site's content.", |
234 'position' => 'left', | 237 'position' => 'left', |
235 'weight' => -10, | 238 'weight' => -10, |
236 'page callback' => 'system_admin_menu_block_page', | 239 'page callback' => 'system_admin_menu_block_page', |
240 'access arguments' => array('access administration pages'), | |
237 'file' => 'system.admin.inc', | 241 'file' => 'system.admin.inc', |
238 ); | 242 ); |
239 | 243 |
240 // menu items that are basically just menu blocks | 244 // menu items that are basically just menu blocks |
241 $items['admin/settings'] = array( | 245 $items['admin/settings'] = array( |
242 'title' => 'Site configuration', | 246 'title' => 'Site configuration', |
243 'description' => 'Adjust basic site configuration options.', | 247 'description' => 'Adjust basic site configuration options.', |
244 'position' => 'right', | 248 'position' => 'right', |
245 'weight' => -5, | 249 'weight' => -5, |
246 'page callback' => 'system_settings_overview', | 250 'page callback' => 'system_settings_overview', |
251 'access arguments' => array('access administration pages'), | |
247 'file' => 'system.admin.inc', | 252 'file' => 'system.admin.inc', |
248 ); | 253 ); |
249 $items['admin/build'] = array( | 254 $items['admin/build'] = array( |
250 'title' => 'Site building', | 255 'title' => 'Site building', |
251 'description' => 'Control how your site looks and feels.', | 256 'description' => 'Control how your site looks and feels.', |
252 'position' => 'right', | 257 'position' => 'right', |
253 'weight' => -10, | 258 'weight' => -10, |
254 'page callback' => 'system_admin_menu_block_page', | 259 'page callback' => 'system_admin_menu_block_page', |
260 'access arguments' => array('access administration pages'), | |
255 'file' => 'system.admin.inc', | 261 'file' => 'system.admin.inc', |
256 ); | 262 ); |
257 $items['admin/settings/admin'] = array( | 263 $items['admin/settings/admin'] = array( |
258 'title' => 'Administration theme', | 264 'title' => 'Administration theme', |
259 'description' => 'Settings for how your administrative pages should look.', | 265 'description' => 'Settings for how your administrative pages should look.', |
280 'weight' => -1, | 286 'weight' => -1, |
281 ); | 287 ); |
282 $items['admin/build/themes/settings'] = array( | 288 $items['admin/build/themes/settings'] = array( |
283 'title' => 'Configure', | 289 'title' => 'Configure', |
284 'page arguments' => array('system_theme_settings'), | 290 'page arguments' => array('system_theme_settings'), |
291 'access arguments' => array('administer site configuration'), | |
285 'type' => MENU_LOCAL_TASK, | 292 'type' => MENU_LOCAL_TASK, |
286 ); | 293 ); |
287 // Theme configuration subtabs | 294 // Theme configuration subtabs |
288 $items['admin/build/themes/settings/global'] = array( | 295 $items['admin/build/themes/settings/global'] = array( |
289 'title' => 'Global settings', | 296 'title' => 'Global settings', |
314 'title' => 'List', | 321 'title' => 'List', |
315 'type' => MENU_DEFAULT_LOCAL_TASK, | 322 'type' => MENU_DEFAULT_LOCAL_TASK, |
316 ); | 323 ); |
317 $items['admin/build/modules/list/confirm'] = array( | 324 $items['admin/build/modules/list/confirm'] = array( |
318 'title' => 'List', | 325 'title' => 'List', |
326 'access arguments' => array('administer site configuration'), | |
319 'type' => MENU_CALLBACK, | 327 'type' => MENU_CALLBACK, |
320 ); | 328 ); |
321 $items['admin/build/modules/uninstall'] = array( | 329 $items['admin/build/modules/uninstall'] = array( |
322 'title' => 'Uninstall', | 330 'title' => 'Uninstall', |
323 'page arguments' => array('system_modules_uninstall'), | 331 'page arguments' => array('system_modules_uninstall'), |
332 'access arguments' => array('administer site configuration'), | |
324 'type' => MENU_LOCAL_TASK, | 333 'type' => MENU_LOCAL_TASK, |
325 ); | 334 ); |
326 $items['admin/build/modules/uninstall/confirm'] = array( | 335 $items['admin/build/modules/uninstall/confirm'] = array( |
327 'title' => 'Uninstall', | 336 'title' => 'Uninstall', |
337 'access arguments' => array('administer site configuration'), | |
328 'type' => MENU_CALLBACK, | 338 'type' => MENU_CALLBACK, |
329 ); | 339 ); |
330 | 340 |
331 // Actions: | 341 // Actions: |
332 $items['admin/settings/actions'] = array( | 342 $items['admin/settings/actions'] = array( |
344 ); | 354 ); |
345 $items['admin/settings/actions/configure'] = array( | 355 $items['admin/settings/actions/configure'] = array( |
346 'title' => 'Configure an advanced action', | 356 'title' => 'Configure an advanced action', |
347 'page callback' => 'drupal_get_form', | 357 'page callback' => 'drupal_get_form', |
348 'page arguments' => array('system_actions_configure'), | 358 'page arguments' => array('system_actions_configure'), |
359 'access arguments' => array('administer actions'), | |
349 'type' => MENU_CALLBACK, | 360 'type' => MENU_CALLBACK, |
350 ); | 361 ); |
351 $items['admin/settings/actions/delete/%actions'] = array( | 362 $items['admin/settings/actions/delete/%actions'] = array( |
352 'title' => 'Delete action', | 363 'title' => 'Delete action', |
353 'description' => 'Delete an action.', | 364 'description' => 'Delete an action.', |
354 'page callback' => 'drupal_get_form', | 365 'page callback' => 'drupal_get_form', |
355 'page arguments' => array('system_actions_delete_form', 4), | 366 'page arguments' => array('system_actions_delete_form', 4), |
367 'access arguments' => array('administer actions'), | |
356 'type' => MENU_CALLBACK, | 368 'type' => MENU_CALLBACK, |
357 ); | 369 ); |
358 $items['admin/settings/actions/orphan'] = array( | 370 $items['admin/settings/actions/orphan'] = array( |
359 'title' => 'Remove orphans', | 371 'title' => 'Remove orphans', |
360 'page callback' => 'system_actions_remove_orphans', | 372 'page callback' => 'system_actions_remove_orphans', |
373 'access arguments' => array('administer actions'), | |
361 'type' => MENU_CALLBACK, | 374 'type' => MENU_CALLBACK, |
362 ); | 375 ); |
363 | 376 |
364 // Settings: | 377 // Settings: |
365 $items['admin/settings/site-information'] = array( | 378 $items['admin/settings/site-information'] = array( |
427 ); | 440 ); |
428 $items['admin/settings/date-time/lookup'] = array( | 441 $items['admin/settings/date-time/lookup'] = array( |
429 'title' => 'Date and time lookup', | 442 'title' => 'Date and time lookup', |
430 'type' => MENU_CALLBACK, | 443 'type' => MENU_CALLBACK, |
431 'page callback' => 'system_date_time_lookup', | 444 'page callback' => 'system_date_time_lookup', |
445 'access arguments' => array('administer site configuration'), | |
432 'file' => 'system.admin.inc', | 446 'file' => 'system.admin.inc', |
433 ); | 447 ); |
434 $items['admin/settings/site-maintenance'] = array( | 448 $items['admin/settings/site-maintenance'] = array( |
435 'title' => 'Site maintenance', | 449 'title' => 'Site maintenance', |
436 'description' => 'Take the site off-line for maintenance or bring it back online.', | 450 'description' => 'Take the site off-line for maintenance or bring it back online.', |
483 'file' => 'system.admin.inc', | 497 'file' => 'system.admin.inc', |
484 ); | 498 ); |
485 $items['admin/reports/status/run-cron'] = array( | 499 $items['admin/reports/status/run-cron'] = array( |
486 'title' => 'Run cron', | 500 'title' => 'Run cron', |
487 'page callback' => 'system_run_cron', | 501 'page callback' => 'system_run_cron', |
502 'access arguments' => array('administer site configuration'), | |
488 'type' => MENU_CALLBACK, | 503 'type' => MENU_CALLBACK, |
489 'file' => 'system.admin.inc', | 504 'file' => 'system.admin.inc', |
490 ); | 505 ); |
491 $items['admin/reports/status/php'] = array( | 506 $items['admin/reports/status/php'] = array( |
492 'title' => 'PHP', | 507 'title' => 'PHP', |
493 'page callback' => 'system_php', | 508 'page callback' => 'system_php', |
509 'access arguments' => array('administer site configuration'), | |
494 'type' => MENU_CALLBACK, | 510 'type' => MENU_CALLBACK, |
495 'file' => 'system.admin.inc', | 511 'file' => 'system.admin.inc', |
496 ); | 512 ); |
497 $items['admin/reports/status/sql'] = array( | 513 $items['admin/reports/status/sql'] = array( |
498 'title' => 'SQL', | 514 'title' => 'SQL', |
499 'page callback' => 'system_sql', | 515 'page callback' => 'system_sql', |
516 'access arguments' => array('administer site configuration'), | |
500 'type' => MENU_CALLBACK, | 517 'type' => MENU_CALLBACK, |
501 'file' => 'system.admin.inc', | 518 'file' => 'system.admin.inc', |
502 ); | 519 ); |
503 // Default page for batch operations | 520 // Default page for batch operations |
504 $items['batch'] = array( | 521 $items['batch'] = array( |
1225 continue; | 1242 continue; |
1226 } | 1243 } |
1227 } | 1244 } |
1228 db_query('DELETE FROM {files} WHERE fid = %d', $file->fid); | 1245 db_query('DELETE FROM {files} WHERE fid = %d', $file->fid); |
1229 } | 1246 } |
1247 $core = array('cache', 'cache_block', 'cache_filter', 'cache_page', 'cache_form', 'cache_menu'); | |
1248 $cache_tables = array_merge(module_invoke_all('flush_caches'), $core); | |
1249 foreach ($cache_tables as $table) { | |
1250 cache_clear_all(NULL, $table); | |
1251 } | |
1230 } | 1252 } |
1231 | 1253 |
1232 /** | 1254 /** |
1233 * Implementation of hook_hook_info(). | 1255 * Implementation of hook_hook_info(). |
1234 */ | 1256 */ |