aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-02 22:05:50 -0500
committercash <cash.costello@gmail.com>2011-12-02 22:05:50 -0500
commitc4ed70ad4cf233f6091f6de22a5cfaf81ea88747 (patch)
tree0dcaaf83e169d6d7d906675c64464700545ea884 /start.php
parent98acc22fec2dc7942e5c6e5bcdd2e6a356c6e905 (diff)
downloadelgg-c4ed70ad4cf233f6091f6de22a5cfaf81ea88747.tar.gz
elgg-c4ed70ad4cf233f6091f6de22a5cfaf81ea88747.tar.bz2
Elgg 1.8 version
Diffstat (limited to 'start.php')
-rw-r--r--start.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/start.php b/start.php
index 7adc0f733..88329c8d1 100644
--- a/start.php
+++ b/start.php
@@ -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;
}