svn: /web/qa/trunk/reports/ index.php

From: Date: Thu, 30 Jun 2011 18:03:43 +0000
Subject: svn: /web/qa/trunk/reports/ index.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-65857@lists.php.net to get a copy of this message
philip Thu, 30 Jun 2011 18:03:43 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=312713 Log: Added a simple 'view all failed tests' option, as requested by chris jones Changed paths: U web/qa/trunk/reports/index.php Modified: web/qa/trunk/reports/index.php =================================================================== --- web/qa/trunk/reports/index.php 2011-06-30 17:01:32 UTC (rev 312712) +++ web/qa/trunk/reports/index.php 2011-06-30 18:03:43 UTC (rev 312713) @@ -30,6 +30,13 @@ } $getVersion = $_GET['version']; $TITLE .= ' - PHP Version '.$_GET['version']; + + $limit = 50; + if (!empty($_GET['limit'])) { + if (is_numeric($_GET['limit'])) { + $limit = (int) $_GET['limit']; + } + } } require 'reportsfunctions.php'; @@ -49,7 +56,7 @@ $failedTestsArray = array(); $query = 'SELECT test_name,COUNT(failed.id) as cpt,COUNT(DISTINCT diff) as variations, date(date) as date FROM failed,reports WHERE failed.id_report = reports.id - GROUP BY test_name ORDER BY cpt DESC LIMIT 50'; + GROUP BY test_name ORDER BY cpt DESC LIMIT ' . $limit; $q = @$database->query($query); if (!$q) die("Error querying DB: ".$database->lastErrorMsg()); while ($tab = $q->fetchArray(SQLITE3_ASSOC)) { @@ -156,8 +163,12 @@ ?> </tbody></table> <?php -if (count($failedTestsArray) == 50) { - echo '<i>There are more failing tests not printed here (with less occurences)</i>'; +if (count($failedTestsArray) >= $limit) { + echo '<i>There are more failing tests '; + echo '(<a href="?version=' . $getVersion . '&limit=1000">view all)</i>'; +} else { + echo '<i>View only the most common failed tests '; + echo '(<a href="?version=' . $getVersion . '&limit=50">view 50)</i>'; } endif; ?>

« previous php.qa (#65857) next »