aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/search.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-15 04:41:46 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-15 04:41:46 +0000
commit54a3c3e7e9e70c4770010e442e95f734200d03f9 (patch)
treef8e2e7e383523bbf28654ec171e57c841ed1910b /engine/lib/search.php
parentba331497c03a51ae4b46b387e5f6773620a98cff (diff)
downloadelgg-54a3c3e7e9e70c4770010e442e95f734200d03f9.tar.gz
elgg-54a3c3e7e9e70c4770010e442e95f734200d03f9.tar.bz2
Standardized gobs of files.
git-svn-id: http://code.elgg.org/elgg/trunk@3548 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/search.php')
-rw-r--r--engine/lib/search.php88
1 files changed, 45 insertions, 43 deletions
diff --git a/engine/lib/search.php b/engine/lib/search.php
index 222c0b6e9..0f6c0a12d 100644
--- a/engine/lib/search.php
+++ b/engine/lib/search.php
@@ -1,50 +1,52 @@
<?php
- /**
- * Elgg search helper functions.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd <info@elgg.com>
- * @link http://elgg.org/
- */
+/**
+ * Elgg search helper functions.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.org/
+ */
- /**
- * Initialise search helper functions.
- *
- */
- function search_init()
- {
- register_page_handler('search','search_page_handler');
+/**
+ * Initialise search helper functions.
+ *
+ */
+function search_init() {
+ register_page_handler('search','search_page_handler');
+}
+
+/**
+ * Page handler for search
+ *
+ * @param array $page Page elements from pain page handler
+ */
+function search_page_handler($page) {
+ global $CONFIG;
+
+ if(!get_input('tag')) {
+ set_input('tag', $page[0]);
}
-
- /**
- * Page handler for search
- *
- * @param array $page Page elements from pain page handler
- */
- function search_page_handler($page)
- {
- global $CONFIG;
-
- if(!get_input('tag')) {
- set_input('tag', $page[0]);
- }
- if (isset($page[0])) {
- switch ($page[0]) {
- case 'user' :
- case 'users' : include_once($CONFIG->path . "search/users.php"); break;
-
- case 'group' :
- case 'groups' : include_once($CONFIG->path . "search/groups.php"); break;
-
- default: include_once($CONFIG->path . "search/index.php");
- }
+ if (isset($page[0])) {
+ switch ($page[0]) {
+ case 'user' :
+ case 'users' :
+ include_once($CONFIG->path . "search/users.php");
+ break;
+
+ case 'group' :
+ case 'groups' :
+ include_once($CONFIG->path . "search/groups.php");
+ break;
+
+ default:
+ include_once($CONFIG->path . "search/index.php");
}
- else
- include_once($CONFIG->path . "search/index.php");
+ } else {
+ include_once($CONFIG->path . "search/index.php");
}
+}
- /** Register init system event **/
- register_elgg_event_handler('init','system','search_init');
-?>
+/** Register init system event **/
+register_elgg_event_handler('init','system','search_init'); \ No newline at end of file