cvs: php-bugs-web / bugstats.php

From: Date: Sat, 07 Dec 2002 13:05:07 +0000
Subject: cvs: php-bugs-web / bugstats.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14048@lists.php.net to get a copy of this message
goba Sat Dec 7 08:05:07 2002 EDT Modified files: /php-bugs-web bugstats.php Log: Adding code to exit if there are no bugs for a version in the database Index: php-bugs-web/bugstats.php diff -u php-bugs-web/bugstats.php:1.13 php-bugs-web/bugstats.php:1.14 --- php-bugs-web/bugstats.php:1.13 Tue Jul 2 14:06:21 2002 +++ php-bugs-web/bugstats.php Sat Dec 7 08:05:07 2002 @@ -3,15 +3,6 @@ commonHeader("Statistics"); -if ($phpver > 0) { - $other = ($phpver == 4 ? 3 : 4); - echo '<p>Currently displaying PHP'. $phpver . ' bugs only. Display <a href="bugstats.php">all bugs</a> or <a href="bugstats.php?phpver=' . $other . '">only PHP' . $other . ' bugs</a>.</p>' . "\n"; -} -else { - echo '<p>Currently displaying all bugs. Display <a href="bugstats.php?phpver=3">only PHP3 bugs</a> or <a href="bugstats.php?phpver=4">only PHP4 bugs</a>.</p>' . "\n"; - -} - @mysql_pconnect("localhost","nobody","") or die("unable to connect to database"); @mysql_select_db("php3") @@ -37,6 +28,21 @@ $php_os[$row[php_os]]++; $status[$row['status']]++; $total++; +} + +// Exit if there are no bugs for this version +if ($total == 0) { + echo '<p>No bugs found for this PHP version</p>'; + commonFooter(); + exit; +} + +if ($phpver > 0) { + $other = ($phpver == 4 ? 3 : 4); + echo '<p>Currently displaying PHP '. $phpver . ' bugs only. Display <a href="bugstats.php">all bugs</a> or <a href="bugstats.php?phpver=' . $other . '">only PHP ' . $other . ' bugs</a>.</p>' . "\n"; +} +else { + echo '<p>Currently displaying all bugs. Display <a href="bugstats.php?phpver=3">PHP 3 bugs only</a> or <a href="bugstats.php?phpver=4">PHP 4 bugs only</a>.</p>' . "\n"; } function bugstats($status, $type) {

« previous php.mirrors (#14048) next »