num_rows > 0) { $count = 0; while($row = $result->fetch_assoc()) { if (($to_show == "next") && ($row["loops"]==0) && ($row["dependencies_pending"]==1)) continue; $fail_result = mysql_run_query( "SELECT " . "`fail_reasons`.`name`, " . "`failed_builds`.`log_file` " . "FROM `failed_builds` " . "JOIN `fail_reasons` ON `failed_builds`.`reason`=`fail_reasons`.`id` " . "WHERE `failed_builds`.`build_assignment`=".$row["id"]." " . "ORDER BY `failed_builds`.`date`" ); unset($reasons); $rows[$count]["trials"] = $fail_result -> num_rows; if ($rows[$count]["trials"] > 0) { while($fail_row = $fail_result->fetch_assoc()) { $reasons[$fail_row["name"]] = $fail_row["log_file"]; } } if (isset($reasons)) { $to_print=""; foreach ($reasons as $reason => $last_log) { $to_print= $to_print . ", " . $reason . ""; } $rows[$count]["fail_reasons"]=substr($to_print,2); } else { $rows[$count]["fail_reasons"]=" "; } $rows[$count]["loops"] = $row["loops"]; $rows[$count]["pkgbase"] = $row["pkgbase"]; if ($row["dependencies_pending"]=="0") $rows[$count]["pkgbase_print"] = $rows[$count]["pkgbase"]; else $rows[$count]["pkgbase_print"] = "(" . $rows[$count]["pkgbase"] . ")"; if ($row["uses_upstream"]) { $rows[$count]["git_revision"] = "" . $row["git_revision"] . ""; } else $rows[$count]["git_revision"] = $row["git_revision"]; if ($row["uses_modification"]) $rows[$count]["mod_git_revision"] = "" . $row["mod_git_revision"] . ""; else $rows[$count]["mod_git_revision"] = $row["mod_git_revision"]; $rows[$count]["package_repository"] = $row["package_repository"]; if ($row["is_blocked"]=="") { $rows[$count]["is_blocked"]=" "; } else { $rows[$count]["is_blocked"] = preg_replace( array ( "/FS32#(\\d+)/", "/FS#(\\d+)/" ), array ( "$0", "$0" ), $row["is_blocked"] ); } if (isset($row["build_slave"])) $rows[$count]["build_slave"] = $row["build_slave"]; else $rows[$count]["build_slave"] = " "; $count++; } } ?> List of " . $to_show . " package builds\n"; print "\n"; print "\n"; print "\n"; print "Start page\n"; print "build logs
\n"; if ($count > 0) { usort( $rows, function (array $a, array $b) { if ($a["trials"] < $b["trials"]) return -1; if ($a["trials"] > $b["trials"]) return 1; return strcmp($a["pkgbase"],$b["pkgbase"]); } ); print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; foreach($rows as $row) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; } print "
packagegit revisionmodification git revisionpackage repositorycompilationsloopsbuild errorblockedhanded out to
".$row["pkgbase_print"]."

".$row["git_revision"]."

".$row["mod_git_revision"]."

".$row["package_repository"]."".$row["trials"]."".$row["loops"]."".$row["fail_reasons"]."".$row["is_blocked"]."".$row["build_slave"]."
\n"; } ?>