cvs: php-bugs-web / bug.php bugstats.php fix.php lbugs.php report.php /rss bug.php /scripts email-bug-summaries no-feedback
| From: | Mehdi Achour | Date: | Mon, 09 Feb 2004 13:23:49 +0000 |
| Subject: | cvs: php-bugs-web / bug.php bugstats.php fix.php lbugs.php report.php /rss bug.php /scripts email-bug-summaries no-feedback | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-23387@lists.php.net to get a copy of this message | ||
didou Mon Feb 9 08:23:49 2004 EDT
Modified files:
/php-bugs-web bug.php bugstats.php fix.php lbugs.php report.php
/php-bugs-web/rss bug.php
/php-bugs-web/scripts email-bug-summaries no-feedback
Log:
get rid of mysql_fetch_array
http://cvs.php.net/diff.php/php-bugs-web/bug.php?r1=1.61&r2=1.62&ty=u
Index: php-bugs-web/bug.php
diff -u php-bugs-web/bug.php:1.61 php-bugs-web/bug.php:1.62
--- php-bugs-web/bug.php:1.61 Thu Jan 22 22:05:28 2004
+++ php-bugs-web/bug.php Mon Feb 9 08:23:47 2004
@@ -39,7 +39,7 @@
$res = mysql_query($query);
-if ($res) $bug = mysql_fetch_array($res,MYSQL_ASSOC);
+if ($res) $bug = mysql_fetch_assoc($res);
if (!$res || !$bug) {
commonHeader("No such bug.");
echo "<h1 class=\"error\">No such bug #$id!</h1>";
@@ -476,7 +476,7 @@
. " FROM bugdb_comments WHERE bug=$id ORDER BY ts";
$res = @mysql_query($query);
if ($res) {
- while ($row = mysql_fetch_array($res,MYSQL_ASSOC)) {
+ while ($row = mysql_fetch_assoc($res)) {
output_note($row['id'], $row['added'], $row['email'],
$row['comment']);
}
}
http://cvs.php.net/diff.php/php-bugs-web/bugstats.php?r1=1.21&r2=1.22&ty=u
Index: php-bugs-web/bugstats.php
diff -u php-bugs-web/bugstats.php:1.21 php-bugs-web/bugstats.php:1.22
--- php-bugs-web/bugstats.php:1.21 Thu Jan 22 22:05:28 2004
+++ php-bugs-web/bugstats.php Mon Feb 9 08:23:47 2004
@@ -158,7 +158,7 @@
$query .= " AND SUBSTRING(php_version,1,1) = '$phpver'";
}
$res = mysql_query($query);
-$row = mysql_fetch_array($res);
+$row = mysql_fetch_assoc($res);
$half = $row['count']/2;
$query = "SELECT UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1) AS half FROM bugdb WHERE ts2 >
ts1";
http://cvs.php.net/diff.php/php-bugs-web/fix.php?r1=1.16&r2=1.17&ty=u
Index: php-bugs-web/fix.php
diff -u php-bugs-web/fix.php:1.16 php-bugs-web/fix.php:1.17
--- php-bugs-web/fix.php:1.16 Thu Jan 22 22:05:28 2004
+++ php-bugs-web/fix.php Mon Feb 9 08:23:47 2004
@@ -82,7 +82,7 @@
$res = mysql_query($query);
-if ($res) $bug = mysql_fetch_array($res,MYSQL_ASSOC);
+if ($res) $bug = mysql_fetch_assoc($res);
if (!$res || !$bug) {
commonHeader("No such bug.");
echo "<h1 class=\"error\">No such bug #$id!</h1>";
http://cvs.php.net/diff.php/php-bugs-web/lbugs.php?r1=1.11&r2=1.12&ty=u
Index: php-bugs-web/lbugs.php
diff -u php-bugs-web/lbugs.php:1.11 php-bugs-web/lbugs.php:1.12
--- php-bugs-web/lbugs.php:1.11 Thu Jan 22 22:05:28 2004
+++ php-bugs-web/lbugs.php Mon Feb 9 08:23:47 2004
@@ -8,7 +8,7 @@
$result = mysql_query("SELECT
id,bug_type,email,sdesc,ldesc,php_version,php_os,status,ts1,assign FROM bugdb WHERE id=$id");
if(!$result) { echo mysql_error(); exit; }
if ($num = mysql_num_rows($result)) {
- $row = mysql_fetch_array($result);
+ $row = mysql_fetch_assoc($result);
echo "<pre><h1>Bug $id</h1>\n";
echo "<b>From : " . htmlspecialchars($row['email']) .
"\n";
echo "Date : " . $row['ts1'] . "\n";
@@ -20,7 +20,7 @@
echo "\n" . htmlspecialchars($row['ldesc']) . "\n\n";
$query = "SELECT * FROM bugdb_comments WHERE bug=$id ORDER BY ts";
if ($comresult = mysql_query($query)) {
- while ($com = mysql_fetch_array($comresult)) {
+ while ($com = mysql_fetch_assoc($comresult)) {
echo "<b><i>[",$com['ts'],"]
",$com['email'],"</i></b><br>\n";
$text = addlinks($com['comment']);
echo "<blockquote>",$text,"</blockquote>\n";
@@ -37,7 +37,7 @@
echo "<h1>PHP 4.x Bug Database Summary</h1>";
echo "<pre> Num Status Summary ($num total including feature requests)\n";
$last_group = "";
- while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
+ while ($row = mysql_fetch_assoc($result)) {
if ($last_group != $row[bug_type]) {
$last_group = $row[bug_type];
echo
"===============================================[<b>".$row[bug_type]."]";
http://cvs.php.net/diff.php/php-bugs-web/report.php?r1=1.50&r2=1.51&ty=u
Index: php-bugs-web/report.php
diff -u php-bugs-web/report.php:1.50 php-bugs-web/report.php:1.51
--- php-bugs-web/report.php:1.50 Fri Jan 23 13:46:40 2004
+++ php-bugs-web/report.php Mon Feb 9 08:23:47 2004
@@ -72,7 +72,7 @@
</tr>
<?php
- while ($row = mysql_fetch_array($res)) {
+ while ($row = mysql_fetch_assoc($res)) {
$resolution = mysql_get_one("SELECT comment from bugdb_comments where bug = " .
$row['id'] . " order by id desc limit 1");
http://cvs.php.net/diff.php/php-bugs-web/rss/bug.php?r1=1.5&r2=1.6&ty=u
Index: php-bugs-web/rss/bug.php
diff -u php-bugs-web/rss/bug.php:1.5 php-bugs-web/rss/bug.php:1.6
--- php-bugs-web/rss/bug.php:1.5 Thu Jan 22 22:05:30 2004
+++ php-bugs-web/rss/bug.php Mon Feb 9 08:23:48 2004
@@ -26,7 +26,7 @@
$res = @mysql_query($query);
-if ($res) $bug = mysql_fetch_array($res,MYSQL_ASSOC);
+if ($res) $bug = mysql_fetch_assoc($res);
if (!$res || !$bug) {
outputHeader(array(),$format);
outputFooter($format);
@@ -74,7 +74,7 @@
}
function outputbug($bug, $res, $format) {
- while ($row = mysql_fetch_array($res,MYSQL_ASSOC)) {
+ while ($row = mysql_fetch_assoc($res)) {
switch ($format) {
case 'xml':
echo " <comment>\n";
http://cvs.php.net/diff.php/php-bugs-web/scripts/email-bug-summaries?r1=1.7&r2=1.8&ty=u
Index: php-bugs-web/scripts/email-bug-summaries
diff -u php-bugs-web/scripts/email-bug-summaries:1.7 php-bugs-web/scripts/email-bug-summaries:1.8
--- php-bugs-web/scripts/email-bug-summaries:1.7 Thu Jan 22 22:05:30 2004
+++ php-bugs-web/scripts/email-bug-summaries Mon Feb 9 08:23:49 2004
@@ -7,7 +7,7 @@
$body = " PHP 4 Bug Database summary - http://bugs.php.net\n\n";
$body .= " Num Status Summary ($num total including feature requests)\n";
$last_group = "";
- while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
+ while($row = mysql_fetch_assoc($result)) {
if($row['status']=='Assigned') {
$ass[$row['assign']][$row['id']] = $row['sdesc'];
}
http://cvs.php.net/diff.php/php-bugs-web/scripts/no-feedback?r1=1.7&r2=1.8&ty=u
Index: php-bugs-web/scripts/no-feedback
diff -u php-bugs-web/scripts/no-feedback:1.7 php-bugs-web/scripts/no-feedback:1.8
--- php-bugs-web/scripts/no-feedback:1.7 Thu Jan 22 22:05:30 2004
+++ php-bugs-web/scripts/no-feedback Mon Feb 9 08:23:49 2004
@@ -38,7 +38,7 @@
$in = array('status' => 'No Feedback');
-while ($bug = mysql_fetch_array($result,MYSQL_ASSOC)) {
+while ($bug = mysql_fetch_assoc($result)) {
list($mailto,$mailfrom) = get_bugtype_mail($bug['bug_type']);
mysql_query("INSERT bugdb_comments SET
bug=$bug[id],email='$mailfrom',ts=NOW(),comment='".addslashes($message)."'");