aboutsummaryrefslogtreecommitdiff
path: root/search/index.php
blob: bc13d488547c7e17cc87f127fcbcbee72f6a35a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);