"lint-ready" => "rpmlint: ready",
);
-echo "Select report:";
-echo "<select id=q name=q>\n";
-foreach ($reports as $q => $title) {
- printf("<option value=%s %s>%s</option>\n", $q, $q == $report ? 'selected' :'', $title);
+function reports_selection($reports) {
+ echo "Select report:";
+ echo "<select id=q name=q>\n";
+ foreach ($reports as $q => $title) {
+ printf("<option value=%s %s>%s</option>\n", $q, $q == $report ? 'selected' :'', $title);
+ }
+ echo "</select>\n";
}
-echo "</select>\n";
-if (isset($reports[$report])) {
+function format_report($report) {
echo "<a href=$report.txt>raw</a><br/>\n";
$file = "$report.txt";
$giturl = 'http://git.pld-linux.org/gitweb.cgi?p=packages/%1$s.git;f=%1$s.spec;h=HEAD;a=shortlog';
echo '</ol>';
}
+reports_selection($reports);
+if (isset($reports[$report])) {
+ format_report($report);
+}
+
?>
</body>
</html>