summaryrefslogtreecommitdiff
path: root/modules/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/legacy')
-rw-r--r--modules/legacy/legacy.module58
1 files changed, 30 insertions, 28 deletions
diff --git a/modules/legacy/legacy.module b/modules/legacy/legacy.module
index 662eaf81f..52348c61c 100644
--- a/modules/legacy/legacy.module
+++ b/modules/legacy/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;
}