diff options
author | cash <cash.costello@gmail.com> | 2011-12-02 22:05:50 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-12-02 22:05:50 -0500 |
commit | c4ed70ad4cf233f6091f6de22a5cfaf81ea88747 (patch) | |
tree | 0dcaaf83e169d6d7d906675c64464700545ea884 /start.php | |
parent | 98acc22fec2dc7942e5c6e5bcdd2e6a356c6e905 (diff) | |
download | elgg-c4ed70ad4cf233f6091f6de22a5cfaf81ea88747.tar.gz elgg-c4ed70ad4cf233f6091f6de22a5cfaf81ea88747.tar.bz2 |
Elgg 1.8 version
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 19 |
1 files changed, 7 insertions, 12 deletions
@@ -8,31 +8,26 @@ * @license http://opensource.org/licenses/gpl-2.0.php GPL 2 */ -register_elgg_event_handler('init', 'system', 'opensearch_init'); +elgg_register_event_handler('init', 'system', 'opensearch_init'); function opensearch_init() { - global $CONFIG; - - register_page_handler('opensearch', 'opensearch_handler'); - - elgg_extend_view('metatags', 'opensearch/includes'); + elgg_register_page_handler('opensearch', 'opensearch_handler'); + elgg_extend_view('page/elements/head', 'opensearch/includes'); } /** * Handles OpenSearch requests * * @param array $page An array of URL elements - * @return boolean + * @return bool */ function opensearch_handler($page) { - global $CONFIG; - switch ($page[0]) { case 'osd.xml': elgg_set_viewtype('xml'); - page_draw('', elgg_view('opensearch/description')); - return TRUE; + echo elgg_view_page('', elgg_view('opensearch/description')); + return true; break; } - + return false; } |