diff options
-rw-r--r-- | modules/legacy.module | 21 | ||||
-rw-r--r-- | modules/legacy/legacy.module | 21 | ||||
-rw-r--r-- | modules/upload.module | 18 | ||||
-rw-r--r-- | modules/upload/upload.module | 18 |
4 files changed, 42 insertions, 36 deletions
diff --git a/modules/legacy.module b/modules/legacy.module index 52348c61c..39ffc8b8c 100644 --- a/modules/legacy.module +++ b/modules/legacy.module @@ -25,6 +25,17 @@ function legacy_menu($may_cache) { $items = array(); if ($may_cache) { + // 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); + } + else { // Map "node/view/52" to "node/52". $items[] = array('path' => 'node/view', 'title' => t('view'), 'callback' => 'drupal_goto', @@ -42,16 +53,6 @@ function legacy_menu($may_cache) { '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; diff --git a/modules/legacy/legacy.module b/modules/legacy/legacy.module index 52348c61c..39ffc8b8c 100644 --- a/modules/legacy/legacy.module +++ b/modules/legacy/legacy.module @@ -25,6 +25,17 @@ function legacy_menu($may_cache) { $items = array(); if ($may_cache) { + // 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); + } + else { // Map "node/view/52" to "node/52". $items[] = array('path' => 'node/view', 'title' => t('view'), 'callback' => 'drupal_goto', @@ -42,16 +53,6 @@ function legacy_menu($may_cache) { '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; diff --git a/modules/upload.module b/modules/upload.module index 0d1092ba6..6cc4585a5 100644 --- a/modules/upload.module +++ b/modules/upload.module @@ -25,6 +25,14 @@ function upload_menu($may_cache) { $items = array(); if ($may_cache) { + $items[] = array( + 'path' => 'admin/upload', 'title' => t('uploads'), + 'callback' => 'upload_admin', + 'access' => user_access('access administration pages'), + 'type' => MENU_NORMAL_ITEM + ); + } + else { // Add handlers for previewing new uploads. if ($_SESSION['file_uploads']) { foreach ($_SESSION['file_uploads'] as $key => $file) { @@ -32,18 +40,12 @@ function upload_menu($may_cache) { $items[] = array( 'path' => $filename, 'title' => t('file download'), 'callback' => 'upload_download', - 'access' => true, - 'type' => MENU_DYNAMIC_ITEM & MENU_HIDDEN + 'access' => TRUE, + 'type' => MENU_CALLBACK ); $_SESSION['file_uploads'][$key]->_filename = $filename; } } - $items[] = array( - 'path' => 'admin/upload', 'title' => t('uploads'), - 'callback' => 'upload_admin', - 'access' => user_access('access administration pages'), - 'type' => MENU_NORMAL_ITEM - ); } return $items; diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 0d1092ba6..6cc4585a5 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -25,6 +25,14 @@ function upload_menu($may_cache) { $items = array(); if ($may_cache) { + $items[] = array( + 'path' => 'admin/upload', 'title' => t('uploads'), + 'callback' => 'upload_admin', + 'access' => user_access('access administration pages'), + 'type' => MENU_NORMAL_ITEM + ); + } + else { // Add handlers for previewing new uploads. if ($_SESSION['file_uploads']) { foreach ($_SESSION['file_uploads'] as $key => $file) { @@ -32,18 +40,12 @@ function upload_menu($may_cache) { $items[] = array( 'path' => $filename, 'title' => t('file download'), 'callback' => 'upload_download', - 'access' => true, - 'type' => MENU_DYNAMIC_ITEM & MENU_HIDDEN + 'access' => TRUE, + 'type' => MENU_CALLBACK ); $_SESSION['file_uploads'][$key]->_filename = $filename; } } - $items[] = array( - 'path' => 'admin/upload', 'title' => t('uploads'), - 'callback' => 'upload_admin', - 'access' => user_access('access administration pages'), - 'type' => MENU_NORMAL_ITEM - ); } return $items; |