From 0759c227bf7b73254cf6eb5e8502463875f2469f Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 4 Nov 2011 23:29:54 -0400 Subject: Fixes #4059 returning true when handling a page --- engine/lib/pagehandler.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engine/lib/pagehandler.php') diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index 91e568c1d..f331e2aae 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -40,12 +40,13 @@ function page_handler($handler, $page) { $handler = $params['handler']; $page = $params['segments']; + $result = false; if (isset($CONFIG->pagehandler) && !empty($handler) && isset($CONFIG->pagehandler[$handler])) { $function = $CONFIG->pagehandler[$handler]; - call_user_func($function, $page, $handler); + $result = call_user_func($function, $page, $handler); } - return headers_sent(); + return $result || headers_sent(); } /** @@ -64,6 +65,7 @@ function page_handler($handler, $page) { * The context is set to the page handler identifier before the registered * page handler function is called. For the above example, the context is set to 'blog'. * + * Page handlers should return true to indicate that they handled the request. * Requests not handled are forwarded to the front page with a reason of 404. * Plugins can register for the 'forward', '404' plugin hook. @see forward() * -- cgit v1.2.3