index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | buildmaster/build-list-links.php | 28 | ||||
-rw-r--r-- | buildmaster/build-list.php | 10 | ||||
-rw-r--r-- | buildmaster/build-slaves.php | 2 | ||||
-rw-r--r-- | buildmaster/deletion-links.php | 4 | ||||
-rw-r--r-- | buildmaster/dependencies.php | 12 | ||||
-rw-r--r-- | buildmaster/log.php | 8 | ||||
-rw-r--r-- | buildmaster/mysql-issues.php | 4 | ||||
-rw-r--r-- | buildmaster/statistics.php | 12 | ||||
-rw-r--r-- | buildmaster/todos.php | 4 | ||||
-rw-r--r-- | lib/format.php | 6 | ||||
-rw-r--r-- | mirrors/index.php | 2 | ||||
-rw-r--r-- | packages/index.php | 18 |
diff --git a/buildmaster/build-list-links.php b/buildmaster/build-list-links.php index e3d2779..1c64489 100644 --- a/buildmaster/build-list-links.php +++ b/buildmaster/build-list-links.php @@ -5,7 +5,7 @@ require_once BASE . "/lib/mysql.php"; $edges = ""; $knots = ""; -if (!isset($_GET["raw"])) +if (!array_key_exists("raw", $_GET)) $limit = " LIMIT 150"; $query = @@ -16,7 +16,7 @@ $query = "UNIQUE KEY `id` (`id`), " . "KEY `group` (`group`)" . ")"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -31,7 +31,7 @@ $query = mysql_join_binary_packages_build_assignments() . " WHERE `repositories`.`name`=\"build-list\"" . $limit; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -42,7 +42,7 @@ $query = "`color` VARCHAR(7), " . "UNIQUE KEY `id` (`id`)" . ")"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -50,7 +50,7 @@ $query = "INSERT IGNORE INTO `ba_copy` (`id`,`color`)" . " SELECT `ba`.`id`,`ba`.`color`" . " FROM `ba`"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -61,7 +61,7 @@ $query = "`type` MEDIUMINT, " . "UNIQUE KEY `content` (`from`,`to`,`type`)" . ")"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -77,7 +77,7 @@ $query = mysql_join_install_target_providers_binary_packages('','i_bp') . " JOIN `ba_copy` ON `i_bp`.`build_assignment`=`ba_copy`.`id`" . " WHERE `d_bp`.`build_assignment`!=`i_bp`.`build_assignment`"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -88,14 +88,14 @@ $query = "`type` MEDIUMINT, " . "UNIQUE KEY `content` (`from`,`to`,`type`)" . ")"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); $query = "INSERT IGNORE INTO `ba_links_copy` (`from`,`to`,`type`)" . " SELECT `ba_links`.`from`,`ba_links`.`to`,`ba_links`.`type` FROM `ba_links`"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -119,7 +119,7 @@ $query = " GROUP BY `ba_copy`.`id`" . ") AS `grouped_ba` ON `grouped_ba`.`id`=`ba`.`id`" . " SET `ba`.`group`=`grouped_ba`.`hash`"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -127,7 +127,7 @@ $query = "UPDATE `ba_copy`" . " JOIN `ba` ON `ba`.`id`=`ba_copy`.`id`" . " SET `ba_copy`.`group`=`ba`.`group`"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; mysql_run_query($query); @@ -143,7 +143,7 @@ $query = mysql_join_build_assignments_package_sources() . mysql_join_build_assignments_architectures() . " GROUP BY `ba`.`group`"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; $result = mysql_run_query($query); @@ -167,7 +167,7 @@ $query = " JOIN `ba` ON `ba_links`.`from`=`ba`.`id`" . " JOIN `ba_copy` ON `ba_links`.`to`=`ba_copy`.`id`" . " GROUP BY CONCAT(`ba`.`group`,\"-\",`ba_copy`.`group`)"; -if (isset($_GET["raw"])) +if (array_key_exists("raw", $_GET)) print $query . ";\n"; $result = mysql_run_query($query); @@ -200,7 +200,7 @@ while ($row = $result->fetch_assoc()) { "\"];\n"; } -if (isset($_GET["raw"])) { +if (array_key_exists("raw", $_GET)) { print "digraph dependencies {\n" . "rankdir=LR;\n" . diff --git a/buildmaster/build-list.php b/buildmaster/build-list.php index 79313e4..3184c20 100644 --- a/buildmaster/build-list.php +++ b/buildmaster/build-list.php @@ -7,10 +7,10 @@ require_once BASE . "/lib/style.php"; $filter = " WHERE "; -if (isset($_GET["invq"])) +if (array_key_exists("invq", $_GET)) $filter .= "NOT "; -if (isset($_GET["q"])) +if (array_key_exists("q", $_GET)) $filter .= "`ba_q`.`pkgbase` LIKE from_base64(\"".base64_encode("%".$_GET["q"]."%")."\")"; else $filter .= "1"; @@ -235,7 +235,7 @@ $columns = array( ) ); -if (!isset($_GET["sort"])) +if (!array_key_exists("sort", $_GET)) $_GET["sort"]="trials"; if (substr($_GET["sort"],0,1) == "-") { @@ -468,11 +468,11 @@ foreach ($multi_select_search_criteria as $criterium) { <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"]."\""; ?>/><br> <input id="id_invq" name="invq" type="checkbox" value="invq" title="list all non-matching package builds"<?php -if (isset($_GET["invq"])) +if (array_key_exists("invq", $_GET)) print " checked"; ?>> invert match diff --git a/buildmaster/build-slaves.php b/buildmaster/build-slaves.php index 36a1522..c0293df 100644 --- a/buildmaster/build-slaves.php +++ b/buildmaster/build-slaves.php @@ -68,7 +68,7 @@ $columns = array( ) ); -if (!isset($_GET["sort"])) +if (!array_key_exists("sort", $_GET)) $_GET["sort"]="-last_connection"; if (substr($_GET["sort"],0,1) == "-") { diff --git a/buildmaster/deletion-links.php b/buildmaster/deletion-links.php index 6d21bda..f26208a 100644 --- a/buildmaster/deletion-links.php +++ b/buildmaster/deletion-links.php @@ -5,12 +5,12 @@ require_once BASE . "/lib/mysql.php"; $edges = ""; $knots = ""; -if (isset($_GET["show_all"])) +if (array_key_exists("show_all", $_GET)) $available_filter = " LEFT"; else $available_filter = ""; -if (isset($_GET["pkgname"])) +if (array_key_exists("pkgname", $_GET)) $filter = " AND `binary_packages`.`pkgname` REGEXP from_base64(\"" . base64_encode($_GET["pkgname"]) . "\")"; else $filter = ""; diff --git a/buildmaster/dependencies.php b/buildmaster/dependencies.php index a8beb5d..c513f2d 100644 --- a/buildmaster/dependencies.php +++ b/buildmaster/dependencies.php @@ -5,7 +5,7 @@ require_once BASE . "/lib/mysql.php"; $match = ""; function dependency_arch_join($name) { - if (isset($_GET["ba_a"])) { + if (array_key_exists("ba_a", $_GET)) { return " JOIN `architecture_compatibilities`" . " ON `architecture_compatibilities`.`fully_compatible`" . @@ -13,7 +13,7 @@ function dependency_arch_join($name) { " JOIN `architectures` AS `ba_a`" . " ON `architecture_compatibilities`.`runs_on`=`ba_a`.`id`" . " AND `ba_a`.`name`=from_base64(\"" . base64_encode($_GET["ba_a"]) . "\")"; - } elseif (isset($_GET["a"])) { + } elseif (array_key_exists("a", $_GET)) { return " JOIN `architecture_compatibilities` AS `ac_1`" . " ON `ac_1`.`fully_compatible`" . @@ -26,13 +26,13 @@ function dependency_arch_join($name) { return ""; } -if (isset($_GET["a"])) +if (array_key_exists("a", $_GET)) $match .= " AND `architectures`.`name`=from_base64(\"" . base64_encode($_GET["a"]) . "\")"; -if (isset($_GET["b"])) +if (array_key_exists("b", $_GET)) $match .= " AND `package_sources`.`pkgbase`=from_base64(\"" . base64_encode($_GET["b"]) . "\")"; -if (isset($_GET["p"])) +if (array_key_exists("p", $_GET)) $match .= " AND `binary_packages`.`pkgname`=from_base64(\"" . base64_encode($_GET["p"]) . "\")"; -if (isset($_GET["r"])) +if (array_key_exists("r", $_GET)) $match .= " AND `repositories`.`name`=from_base64(\"" . base64_encode($_GET["r"]) . "\")"; $ignore_install_targets = " AND NOT `install_targets`.`name` IN (\"base\",\"base-devel\")"; diff --git a/buildmaster/log.php b/buildmaster/log.php index f6de94b..371bb86 100644 --- a/buildmaster/log.php +++ b/buildmaster/log.php @@ -4,7 +4,7 @@ require_once BASE . "/lib/mysql.php"; $filter = ""; - if (isset($_GET["show"]) && + if (array_key_exists("show", $_GET) && ($_GET["show"] == "ssh")) { $to_show = "ssh"; $columns = array( @@ -14,9 +14,9 @@ require_once BASE . "/lib/mysql.php"; "parameters" => "`ssh_log`.`parameters`" ); $join = " LEFT" . mysql_join_ssh_log_build_slaves(); - if (isset($_GET["action"])) + if (array_key_exists("action", $_GET)) $filter .= " AND `ssh_log`.`action` LIKE from_base64(\"" . base64_encode($_GET["action"]) . "\")"; - if (isset($_GET["slave"])) + if (array_key_exists("slave", $_GET)) $filter .= " AND `build_slaves`.`name` LIKE from_base64(\"" . base64_encode($_GET["slave"]) . "\")"; } else { $to_show = "email"; @@ -36,7 +36,7 @@ require_once BASE . "/lib/mysql.php"; ") ON `email_log`.`gpg_key`=`gpg_keys`.`id`"; } - if (isset($_GET["from"])) + if (array_key_exists("from", $_GET)) $min_time = $_GET["from"]; elseif ($to_show == "email") $min_time = "1 00:00:00"; diff --git a/buildmaster/mysql-issues.php b/buildmaster/mysql-issues.php index 1397141..7fa7514 100644 --- a/buildmaster/mysql-issues.php +++ b/buildmaster/mysql-issues.php @@ -4,10 +4,10 @@ require_once BASE . "/lib/mysql.php"; $ignore = ""; - if (isset($_GET["ignore-haskell"])) + if (array_key_exists("ignore-haskell", $_GET)) $ignore .= " AND `install_targets`.`name` NOT LIKE \"libHS%\""; - if (isset($_GET["ignore-i486"])) + if (array_key_exists("ignore-i486", $_GET)) $ignore .= " AND `r_a`.`name` != \"i486\""; ob_start(); diff --git a/buildmaster/statistics.php b/buildmaster/statistics.php index 4f2398b..05d06c6 100644 --- a/buildmaster/statistics.php +++ b/buildmaster/statistics.php @@ -133,9 +133,9 @@ function print_graph($data, $color) { ImageLine( $im, scale($last_t,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, - scale($last_val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($last_val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, scale($t,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, - scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, $color ); $last_t = $t; @@ -145,7 +145,7 @@ function print_graph($data, $color) { $im, 5, $width+$legend_line_length, - scale($last_val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border - ImageFontHeight(5)/2, + scale($last_val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border - ImageFontHeight(5)/2, " ".$data[$t_max], $color ); @@ -178,12 +178,12 @@ for ($val=0; $val<=$val_max;) { ImageLine( $im, 0, - scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, $legend_line_length, - scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, $foreground_color ); - if (! isset($_GET["log"])) + if (! array_key_exists("log", $_GET)) $val+=pow(10,round(log($val_max)/log(10))-1); elseif ($val==0) $val++; diff --git a/buildmaster/todos.php b/buildmaster/todos.php index bf77f08..3528def 100644 --- a/buildmaster/todos.php +++ b/buildmaster/todos.php @@ -13,7 +13,7 @@ $result = mysql_run_query( "FROM `todos`;" ); -if (isset($_GET["graph"])) { +if (array_key_exists("graph", $_GET)) { if ($result -> num_rows > 0) { @@ -64,7 +64,7 @@ if (isset($_GET["graph"])) { "timeout 30 dot -Tpng -o/dev/stdout /dev/stdin" ); -} else { // isset($_GET["graph"]) +} else { // array_key_exists("graph", $_GET) if ($result -> num_rows > 0) { diff --git a/lib/format.php b/lib/format.php index 72cf531..25748f0 100644 --- a/lib/format.php +++ b/lib/format.php @@ -12,15 +12,15 @@ function export_as_requested($content) { $content["tsv"]=$content["All"]; unset($content["All"]); } - if (isset($content["json"]) && isset($_GET["json"])) { + if (isset($content["json"]) && array_key_exists("json", $_GET)) { header ("Content-type: application/json"); print json_encode( $content["json"], JSON_UNESCAPED_SLASHES ); - } elseif (isset($content["tsv"]) && isset($_GET["tsv"])) { + } elseif (isset($content["tsv"]) && array_key_exists("tsv", $_GET)) { header ("Content-type: text/tab-separated-values"); - if (! isset($_GET["no-headers"])) + if (! array_key_exists("no-headers", $_GET)) print implode("\t",array_keys($content["tsv"][0])) . "\n"; print implode( "", diff --git a/mirrors/index.php b/mirrors/index.php index f0b7393..62e1668 100644 --- a/mirrors/index.php +++ b/mirrors/index.php @@ -52,7 +52,7 @@ $query = " GROUP BY `url`" . " 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"])) 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> |