aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-13 19:14:13 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-13 19:14:13 +0000
commitd141c366dbe8de39aa0477591d0e53cbda957894 (patch)
tree5a9c05ca201d9871aef70d1025a525ebc39c1925
parent1467fa38070caf608fc0efd44a3a5b7bfa49f812 (diff)
downloadelgg-d141c366dbe8de39aa0477591d0e53cbda957894.tar.gz
elgg-d141c366dbe8de39aa0477591d0e53cbda957894.tar.bz2
Creating a redirect page for legacy themes using search.
git-svn-id: http://code.elgg.org/elgg/trunk@3678 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--search/index.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/search/index.php b/search/index.php
new file mode 100644
index 000000000..bc13d4885
--- /dev/null
+++ b/search/index.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Redirect to the new search page
+ *
+ * Needed for legacy themes.
+ */
+
+require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
+
+$params = array(
+ 'search_type',
+ 'q',
+ 'tag',
+ 'limit',
+ 'offset',
+ 'entity_type',
+ 'entity_subtype',
+ 'owner_guid',
+ 'friends'
+);
+
+// determine all passed parameters
+$vars = array();
+foreach ($params as $var) {
+ if ($value = get_input($var, FALSE)) {
+ $vars[$var] = $value;
+ }
+}
+
+// generate a new GET query URI
+$query = http_build_query($vars);
+$url = "{$CONFIG->wwwroot}pg/search/?$query";
+
+// send to proper search page
+forward($url);