Commit 435e4e03 authored by Dries's avatar Dries
Browse files

- Patch #effulgentsia: remove left-overs.

parent 6f49c598
...@@ -2275,10 +2275,9 @@ function l($text, $path, array $options = array()) { ...@@ -2275,10 +2275,9 @@ function l($text, $path, array $options = array()) {
* sends the content to the browser in the needed format. The default delivery * 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 * 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 * 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 * overridden on a per menu router item basis by setting 'delivery callback' in
* hook_menu(), hook_menu_alter(). * hook_menu() or hook_menu_alter(), and can also be overridden on a per request
* Additionally, modules may use hook_page_delivery_callback_alter() to specify * basis in hook_page_delivery_callback_alter().
* a different delivery callback to use for the page request.
* *
* For example, the same page callback function can be used for an HTML * 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 * 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()) { ...@@ -2300,8 +2299,7 @@ function l($text, $path, array $options = array()) {
* (Optional) If given, it is the name of a delivery function most likely * (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 * to be appropriate for the page request as determined by the calling
* function (e.g., menu_execute_active_handler()). If not given, it is * function (e.g., menu_execute_active_handler()). If not given, it is
* determined from the menu router information of the current page. In either * determined from the menu router information of the current page.
* case, modules have a final chance to alter which function is called.
* *
* @see menu_execute_active_handler() * @see menu_execute_active_handler()
* @see hook_menu() * @see hook_menu()
...@@ -2310,14 +2308,11 @@ function l($text, $path, array $options = array()) { ...@@ -2310,14 +2308,11 @@ function l($text, $path, array $options = array()) {
*/ */
function drupal_deliver_page($page_callback_result, $default_delivery_callback = NULL) { function drupal_deliver_page($page_callback_result, $default_delivery_callback = NULL) {
if (!isset($default_delivery_callback) && ($router_item = menu_get_item())) { if (!isset($default_delivery_callback) && ($router_item = menu_get_item())) {
drupal_alter('menu_active_handler', $router_item);
$default_delivery_callback = $router_item['delivery_callback']; $default_delivery_callback = $router_item['delivery_callback'];
} }
$delivery_callback = !empty($default_delivery_callback) ? $default_delivery_callback : 'drupal_deliver_html_page'; $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 // Give modules a chance to alter the delivery callback used, based on
// for modules that need to decide which delivery callback to use based on // request-time context (e.g., HTTP request headers).
// information made available during page callback execution and for pages
// without router items.
drupal_alter('page_delivery_callback', $delivery_callback); drupal_alter('page_delivery_callback', $delivery_callback);
if (function_exists($delivery_callback)) { if (function_exists($delivery_callback)) {
$delivery_callback($page_callback_result); $delivery_callback($page_callback_result);
......
...@@ -457,8 +457,6 @@ function menu_execute_active_handler($path = NULL, $deliver = TRUE) { ...@@ -457,8 +457,6 @@ function menu_execute_active_handler($path = NULL, $deliver = TRUE) {
menu_rebuild(); menu_rebuild();
} }
if ($router_item = menu_get_item($path)) { 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['access']) {
if ($router_item['include_file']) { if ($router_item['include_file']) {
require_once DRUPAL_ROOT . '/' . $router_item['include_file']; require_once DRUPAL_ROOT . '/' . $router_item['include_file'];
......
...@@ -3524,8 +3524,7 @@ function hook_date_formats_alter(&$formats) { ...@@ -3524,8 +3524,7 @@ function hook_date_formats_alter(&$formats) {
* information unrelated to the path of the page accessed. For example, * 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 * 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 * header (as shown in the code sample). To specify a delivery callback
* based on path information, use hook_menu(), hook_menu_alter() or * based on path information, use hook_menu() or hook_menu_alter().
* hook_page_delivery_callback_alter().
* *
* This hook can also be used as an API function that can be used to explicitly * 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 * set the delivery callback from some other function. For example, for a module
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment