From 677e155a31776c63fbd5701f76302e422a0dadb9 Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 18 Jun 2010 21:16:00 +0000 Subject: Merged friends pages fixes in r6501:6503 from 1.7 to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@6515 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/pagehandler.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'engine/lib') diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index a6143a4e6..5f60eefae 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -85,6 +85,24 @@ function register_page_handler($handler, $function) { return false; } +/** + * Unregister a page handler for an identifier + * + * Note: to replace a page handler, call register_page_handler() + * + * @param string $handler The page type identifier + * @since 1.7.2 + */ +function unregister_page_handler($handler) { + global $CONFIG; + + if (!isset($CONFIG->pagehandler)) { + return; + } + + unset($CONFIG->pagehandler[$handler]); +} + /** * A default page handler * Tries to locate a suitable file to include. Only works for core pages, not plugins. -- cgit v1.2.3