Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
304
Merge Requests
304
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
a6012a20
Commit
a6012a20
authored
Jun 26, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#838408
by chx: remove hook_menu_active_handler_alter().
parent
e27e1a0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
34 deletions
+2
-34
includes/common.inc
includes/common.inc
+1
-2
includes/menu.inc
includes/menu.inc
+0
-3
modules/system/system.api.php
modules/system/system.api.php
+1
-29
No files found.
includes/common.inc
View file @
a6012a20
...
...
@@ -2273,7 +2273,7 @@ function l($text, $path, array $options = array()) {
* callback is drupal_deliver_html_page() which delivers the content as an HTML
* page, complete with blocks in addition to the content. This default can be
* overridden on a per menu item basis by setting 'delivery callback' in
* hook_menu(), hook_menu_alter()
, or hook_menu_active_handler_alter()
.
* hook_menu(), hook_menu_alter().
* Additionally, modules may use hook_page_delivery_callback_alter() to specify
* a different delivery callback to use for the page request.
*
...
...
@@ -2303,7 +2303,6 @@ function l($text, $path, array $options = array()) {
* @see menu_execute_active_handler()
* @see hook_menu()
* @see hook_menu_alter()
* @see hook_menu_active_handler_alter()
* @see hook_page_delivery_callback_alter()
*/
function
drupal_deliver_page
(
$page_callback_result
,
$default_delivery_callback
=
NULL
)
{
...
...
includes/menu.inc
View file @
a6012a20
...
...
@@ -459,9 +459,6 @@ function menu_execute_active_handler($path = NULL, $deliver = TRUE) {
if
(
$router_item
=
menu_get_item
(
$path
))
{
// hook_menu_alter() lets modules control menu router information that
// doesn't depend on the details of a particular page request.
// Here, we want to give modules a chance to use request-time information
// to make alterations just for this request.
drupal_alter
(
'menu_active_handler'
,
$router_item
,
$path
);
if
(
$router_item
[
'access'
])
{
if
(
$router_item
[
'include_file'
])
{
require_once
DRUPAL_ROOT
.
'/'
.
$router_item
[
'include_file'
];
...
...
modules/system/system.api.php
View file @
a6012a20
...
...
@@ -3511,34 +3511,6 @@ function hook_date_formats_alter(&$formats) {
}
}
/**
* Alters the router item for the active menu handler.
*
* Called by menu_execute_active_handler() to allow modules to alter the
* information that will be used to handle the page request. Only use this
* hook if an alteration specific to the page request is needed. Otherwise
* use hook_menu_alter().
*
* @param $router_item
* An array with the following keys:
* - access: Boolean. Whether the user is allowed to see this page.
* - file: A path to a file to include prior to invoking the page callback.
* - page_callback: The function to call to build the page content.
* - page_arguments: Arguments to pass to the page callback.
* - delivery_callback: The function to call to deliver the result of the
* page callback to the browser.
* @param $path
* The drupal path that was used for retrieving the router item.
*
* @see menu_execute_active_handler()
* @see hook_menu()
* @see hook_menu_alter()
*/
function
hook_menu_active_handler_alter
(
&
$router_item
,
$path
=
NULL
)
{
// Turn off access for all pages for all users.
$router_item
[
'access'
]
=
FALSE
;
}
/**
* Alters the delivery callback used to send the result of the page callback to the browser.
*
...
...
@@ -3550,7 +3522,7 @@ function hook_menu_active_handler_alter(&$router_item, $path = NULL) {
* it can be used to set the delivery callback based on a HTTP request
* header (as shown in the code sample). To specify a delivery callback
* based on path information, use hook_menu(), hook_menu_alter() or
* hook_
menu_active_handler
_alter().
* hook_
page_delivery_callback
_alter().
*
* This hook can also be used as an API function that can be used to explicitly
* set the delivery callback from some other function. For example, for a module
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment