index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-18 20:12:17 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-18 20:12:17 +0100 |
commit | 4c6b074e85d7d8e97b9f125f5fbc2949bc8839dd (patch) | |
tree | b1049ef75f830be56aa5dbba951872d794b11b2a /packages/index.php | |
parent | 4376c50ded25fff8ab6c59c045522091b3eb038b (diff) |
-rw-r--r-- | packages/index.php | 18 |
diff --git a/packages/index.php b/packages/index.php index d20d2e7..e062cce 100644 --- a/packages/index.php +++ b/packages/index.php @@ -7,7 +7,7 @@ require_once BASE . "/lib/format.php"; foreach (array("bugs","sort","del","uses_upstream","uses_modification") as $expected_param) - if (! isset($_GET[$expected_param])) + if (! array_key_exists($expected_param, $_GET)) $_GET[$expected_param] = ""; $multi_select_search_criteria = array( @@ -102,11 +102,11 @@ require_once BASE . "/lib/format.php"; isset($criterium["options"][$_GET[$criterium["name"]]])) $filter .= " AND " . $criterium["options"][$_GET[$criterium["name"]]]; - if (isset($_GET["q"])) { + if (array_key_exists("q", $_GET)) { $extra_joins = ""; $exact_filter = " AND `binary_packages`.`pkgname` = from_base64(\"".base64_encode($_GET["q"])."\")"; $fuzzy_filter = " AND `binary_packages`.`pkgname` LIKE from_base64(\"".base64_encode("%".$_GET["q"]."%")."\")"; - } elseif (isset($_GET["g"]) && isset($_GET["ra"])) { + } elseif (array_key_exists("g", $_GET) && array_key_exists("ra", $_GET)) { $extra_joins = mysql_join_binary_packages_install_target_providers() . mysql_join_install_target_providers_install_targets(); @@ -174,7 +174,7 @@ require_once BASE . "/lib/format.php"; $q_f = $extra_joins . $filter . $fuzzy_filter . " ORDER BY "; - if (isset($_GET["sort"])) { + if (array_key_exists("sort", $_GET)) { if (isset($sorts[$_GET["sort"]]["mysql"])) $q_f .= $sorts[$_GET["sort"]]["mysql"] . ","; elseif (isset($sorts[substr($_GET["sort"],1)]["mysql"])) @@ -201,7 +201,7 @@ require_once BASE . "/lib/format.php"; $filter . $fuzzy_filter . " ORDER BY "; - if (isset($_GET["sort"])) { + if (array_key_exists("sort", $_GET)) { if (isset($sorts[$_GET["sort"]]["mysql"])) $query .= $sorts[$_GET["sort"]]["mysql"] . ","; elseif (isset($sorts[substr($_GET["sort"],1)]["mysql"])) @@ -212,7 +212,7 @@ require_once BASE . "/lib/format.php"; $pages = max(ceil($num_results / 100), 1); - if (isset($_GET["page"])) + if (array_key_exists("page", $_GET)) $page = max(min($_GET["page"]+0, $pages),1); else $page = 1; @@ -281,7 +281,7 @@ require_once BASE . "/lib/format.php"; }; - if (isset($_GET["exact"])) { + if (array_key_exists("exact", $_GET)) { export_as_requested( array( "All" => $exact_matches @@ -290,7 +290,7 @@ require_once BASE . "/lib/format.php"; die(); }; - if (isset($_GET["fuzzy"])) { + if (array_key_exists("fuzzy", $_GET)) { export_as_requested( array( "All" => $fuzzy_matches @@ -328,7 +328,7 @@ require_once BASE . "/lib/format.php"; <div> <label for="id_q" title="Enter keywords as desired">Keywords</label> <input id="id_q" name="q" size="30" type="text" <?php -if (isset($_GET["q"])) +if (array_key_exists("q", $_GET)) print "value=\"".$_GET["q"]."\""; ?>/> </div> |