cvs: php-bugs-web / bug.php vote.php

From: Date: Thu, 03 Jan 2002 00:36:13 +0000
Subject: cvs: php-bugs-web / bug.php vote.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-8033@lists.php.net to get a copy of this message
jimw Wed Jan 2 19:36:13 2002 EDT Modified files: /php-bugs-web vote.php bug.php Log: store scores as -2 to 2 so bugs with votes can be more easily compared with bugs with no votes Index: php-bugs-web/vote.php diff -u php-bugs-web/vote.php:1.1 php-bugs-web/vote.php:1.2 --- php-bugs-web/vote.php:1.1 Wed Jan 2 19:22:31 2002 +++ php-bugs-web/vote.php Wed Jan 2 19:36:13 2002 @@ -7,7 +7,7 @@ } $score = (int)$score; -if ($score < 1 || $score > 5) { +if ($score < -2 || $score > 2) { die("invalid score: $score"); } Index: php-bugs-web/bug.php diff -u php-bugs-web/bug.php:1.8 php-bugs-web/bug.php:1.9 --- php-bugs-web/bug.php:1.8 Wed Jan 2 19:30:33 2002 +++ php-bugs-web/bug.php Wed Jan 2 19:36:13 2002 @@ -138,7 +138,7 @@ $query = "SELECT COUNT(*) AS votes," . "SUM(reproduced) AS reproduced,SUM(tried) AS tried," . "SUM(sameos) AS sameos, SUM(samever) AS samever," - . "AVG(score) AS average,STD(score) AS deviation" + . "AVG(score)+3 AS average,STD(score) AS deviation" . " FROM bugdb_votes WHERE bug=$id"; $res = @mysql_query($query); if ($res && ($row = mysql_fetch_array($res,MYSQL_ASSOC)) && $row[votes]) { @@ -178,11 +178,11 @@ <div id="score"> Rate the importance of this bug to you:<br /> &nbsp; <span class="score">high</span> - <input type="radio" id="score-5" name="score" value="5" /> - <input type="radio" id="score-4" name="score" value="4" /> - <input type="radio" id="score-3" name="score" value="3" checked="checked" /> - <input type="radio" id="score-2" name="score" value="2" /> - <input type="radio" id="score-1" name="score" value="1" /> + <input type="radio" id="score-5" name="score" value="2" /> + <input type="radio" id="score-4" name="score" value="1" /> + <input type="radio" id="score-3" name="score" value="0" checked="checked" /> + <input type="radio" id="score-2" name="score" value="-1" /> + <input type="radio" id="score-1" name="score" value="-2" /> <span class="score">low</span> </div> <div id="submit">

« previous php.mirrors (#8033) next »