Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
435e4e03
Commit
435e4e03
authored
Jul 01, 2010
by
Dries Buytaert
Browse files
- Patch #effulgentsia: remove left-overs.
parent
6f49c598
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
435e4e03
...
...
@@ -2275,10 +2275,9 @@ function l($text, $path, array $options = array()) {
* sends the content to the browser in the needed format. The default delivery
* 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().
* Additionally, modules may use hook_page_delivery_callback_alter() to specify
* a different delivery callback to use for the page request.
* overridden on a per menu router item basis by setting 'delivery callback' in
* hook_menu() or hook_menu_alter(), and can also be overridden on a per request
* basis in hook_page_delivery_callback_alter().
*
* For example, the same page callback function can be used for an HTML
* version of the page and an AJAX version of the page. The page callback
...
...
@@ -2300,8 +2299,7 @@ function l($text, $path, array $options = array()) {
* (Optional) If given, it is the name of a delivery function most likely
* to be appropriate for the page request as determined by the calling
* function (e.g., menu_execute_active_handler()). If not given, it is
* determined from the menu router information of the current page. In either
* case, modules have a final chance to alter which function is called.
* determined from the menu router information of the current page.
*
* @see menu_execute_active_handler()
* @see hook_menu()
...
...
@@ -2310,14 +2308,11 @@ function l($text, $path, array $options = array()) {
*/
function
drupal_deliver_page
(
$page_callback_result
,
$default_delivery_callback
=
NULL
)
{
if
(
!
isset
(
$default_delivery_callback
)
&&
(
$router_item
=
menu_get_item
()))
{
drupal_alter
(
'menu_active_handler'
,
$router_item
);
$default_delivery_callback
=
$router_item
[
'delivery_callback'
];
}
$delivery_callback
=
!
empty
(
$default_delivery_callback
)
?
$default_delivery_callback
:
'drupal_deliver_html_page'
;
// Give modules a final chance to alter the delivery callback used. This is
// for modules that need to decide which delivery callback to use based on
// information made available during page callback execution and for pages
// without router items.
// Give modules a chance to alter the delivery callback used, based on
// request-time context (e.g., HTTP request headers).
drupal_alter
(
'page_delivery_callback'
,
$delivery_callback
);
if
(
function_exists
(
$delivery_callback
))
{
$delivery_callback
(
$page_callback_result
);
...
...
includes/menu.inc
View file @
435e4e03
...
...
@@ -457,8 +457,6 @@ function menu_execute_active_handler($path = NULL, $deliver = TRUE) {
menu_rebuild
();
}
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.
if
(
$router_item
[
'access'
])
{
if
(
$router_item
[
'include_file'
])
{
require_once
DRUPAL_ROOT
.
'/'
.
$router_item
[
'include_file'
];
...
...
modules/system/system.api.php
View file @
435e4e03
...
...
@@ -3524,8 +3524,7 @@ function hook_date_formats_alter(&$formats) {
* information unrelated to the path of the page accessed. For example,
* 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_page_delivery_callback_alter().
* based on path information, use hook_menu() or hook_menu_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
Supports
Markdown
0%
Try again
or
attach a new 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