summaryrefslogtreecommitdiff
path: root/modules/legacy.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-09-16 07:17:56 +0000
committerDries Buytaert <dries@buytaert.net>2004-09-16 07:17:56 +0000
commit5c7983c4deae55ad41b85ca99db54d3fce283fd9 (patch)
tree59801cd96a36c390586752c58d6cf5ba50c230ce /modules/legacy.module
parent6f0fd3aa55659f8bd6b023e8e82e990326c1b788 (diff)
downloadbrdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.gz
brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.bz2
- Patch #8179 by JonBob: reintroduced menu caching.
Diffstat (limited to 'modules/legacy.module')
-rw-r--r--modules/legacy.module58
1 files changed, 30 insertions, 28 deletions
diff --git a/modules/legacy.module b/modules/legacy.module
index 662eaf81f..52348c61c 100644
--- a/modules/legacy.module
+++ b/modules/legacy.module
@@ -21,36 +21,38 @@ function legacy_help($section) {
*
* Registers menu paths used in earlier Drupal versions.
*/
-function legacy_menu() {
+function legacy_menu($may_cache) {
$items = array();
- // Map "node/view/52" to "node/52".
- $items[] = array('path' => 'node/view', 'title' => t('view'),
- 'callback' => 'drupal_goto',
- 'callback arguments' => array('node/'. arg(2), NULL, NULL),
- 'access' => TRUE, 'type' => MENU_CALLBACK);
-
- // Map "book/view/52" to "node/52".
- $items[] = array('path' => 'book/view', 'title' => t('view'),
- 'callback' => 'drupal_goto',
- 'callback arguments' => array('node/'. arg(2), NULL, NULL),
- 'access' => TRUE, 'type' => MENU_CALLBACK);
-
- // Map "user/view/52" to "user/52".
- $items[] = array('path' => 'user/view', 'title' => t('view'),
- 'callback' => 'drupal_goto',
- 'callback arguments' => array('user/'. arg(2), NULL, NULL),
- 'access' => TRUE, 'type' => MENU_CALLBACK);
-
- // Map "taxonomy/page/or/52,97" to "taxonomy/term/52+97".
- $items[] = array('path' => 'taxonomy/page', 'title' => t('taxonomy'),
- 'callback' => 'legacy_taxonomy_page',
- 'access' => TRUE, 'type' => MENU_CALLBACK);
-
- // Map "taxonomy/feed/or/52,97" to "taxonomy/term/52+97/0/feed".
- $items[] = array('path' => 'taxonomy/feed', 'title' => t('taxonomy'),
- 'callback' => 'legacy_taxonomy_feed',
- 'access' => TRUE, 'type' => MENU_CALLBACK);
+ if ($may_cache) {
+ // Map "node/view/52" to "node/52".
+ $items[] = array('path' => 'node/view', 'title' => t('view'),
+ 'callback' => 'drupal_goto',
+ 'callback arguments' => array('node/'. arg(2), NULL, NULL),
+ 'access' => TRUE, 'type' => MENU_CALLBACK);
+
+ // Map "book/view/52" to "node/52".
+ $items[] = array('path' => 'book/view', 'title' => t('view'),
+ 'callback' => 'drupal_goto',
+ 'callback arguments' => array('node/'. arg(2), NULL, NULL),
+ 'access' => TRUE, 'type' => MENU_CALLBACK);
+
+ // Map "user/view/52" to "user/52".
+ $items[] = array('path' => 'user/view', 'title' => t('view'),
+ 'callback' => 'drupal_goto',
+ 'callback arguments' => array('user/'. arg(2), NULL, NULL),
+ 'access' => TRUE, 'type' => MENU_CALLBACK);
+
+ // Map "taxonomy/page/or/52,97" to "taxonomy/term/52+97".
+ $items[] = array('path' => 'taxonomy/page', 'title' => t('taxonomy'),
+ 'callback' => 'legacy_taxonomy_page',
+ 'access' => TRUE, 'type' => MENU_CALLBACK);
+
+ // Map "taxonomy/feed/or/52,97" to "taxonomy/term/52+97/0/feed".
+ $items[] = array('path' => 'taxonomy/feed', 'title' => t('taxonomy'),
+ 'callback' => 'legacy_taxonomy_feed',
+ 'access' => TRUE, 'type' => MENU_CALLBACK);
+ }
return $items;
}