| @@ 41-46 (lines=6) @@ | ||
| 38 | $sortby = isset($_POST["sortby"]) ? $_POST["sortby"] : (isset($_GET["sortby"]) ? $_GET["sortby"] : null); |
|
| 39 | $term = isset($_POST["term"]) ? $_POST["term"] : (isset($_GET["term"]) ? $_GET["term"] : ""); |
|
| 40 | ||
| 41 | if (empty($category) || (is_array($category) && in_array("all", $category))) { |
|
| 42 | $category = array(); |
|
| 43 | } else { |
|
| 44 | $category = (!is_array($category)) ? explode(",", $category) : $category; |
|
| 45 | $category = array_map("intval", $category); |
|
| 46 | } |
|
| 47 | ||
| 48 | $andor = (in_array(strtoupper($andor), array("OR", "AND", "EXACT"))) ? strtoupper($andor) : "OR"; |
|
| 49 | $sortby = (in_array(strtolower($sortby), array("itemid", "datesub", "title", "categoryid"))) ? strtolower($sortby) : "itemid"; |
|
| @@ 67-72 (lines=6) @@ | ||
| 64 | $sortby = Request::getString('sortby'); |
|
| 65 | $term = Request::getString('term'); |
|
| 66 | ||
| 67 | if (empty($category) || (is_array($category) && in_array("all", $category))) { |
|
| 68 | $category = array(); |
|
| 69 | } else { |
|
| 70 | $category = !is_array($category) ? explode(",", $category) : $category; |
|
| 71 | $category = array_map("intval", $category); |
|
| 72 | } |
|
| 73 | ||
| 74 | $andor = (in_array(strtoupper($andor), array("OR", "AND", "EXACT"))) ? strtoupper($andor) : "OR"; |
|
| 75 | $sortby = (in_array(strtolower($sortby), array("itemid", "datesub", "title", "categoryid"))) |
|