Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv2555
Modified Files:
NEWS serendipity_functions.inc.php
serendipity_db_mysql.inc.php
Log Message:
Wrong SQL statement prevented entries to be printed for a date range
(archives).
Altered db_mysql.inc so that mysql_error() is evaluated. This means that s9y
will die (mostly), if any error occurs. Should make bug tracking easier. ;)
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- NEWS 1 Sep 2003 11:10:15 -0000 1.21
+++ NEWS 1 Sep 2003 12:25:23 -0000 1.22
@@ -2,6 +2,7 @@
Version 0.3 ()
------------------------------------
+ * Fixed bug for fetching entries on a certain date. Now s9y dies with an error message if MySQL errors occur (garvinhicking)
* Display link to trackbacks on single-article view (garvinhicking)
* Enable preview to include extended body (garvinhicking)
* Display author in previewed entry (tomsommer)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- serendipity_functions.inc.php 1 Sep 2003 11:10:14 -0000 1.148
+++ serendipity_functions.inc.php 1 Sep 2003 12:25:23 -0000 1.149
@@ -431,10 +431,10 @@
$and = " WHERE timestamp >= $startts AND timestamp <= $endts";
if ($drafts) {
- $and .= "AND $drafts";
+ $and .= " AND $drafts";
}
} else {
- $and = "";
+ $and = '';
if ($drafts) {
$and .= "WHERE $drafts";
}
Index: serendipity_db_mysql.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_db_mysql.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- serendipity_db_mysql.inc.php 16 Aug 2003 21:26:42 -0000 1.12
+++ serendipity_db_mysql.inc.php 1 Sep 2003 12:25:23 -0000 1.13
@@ -19,7 +19,10 @@
// highlight_string(var_export($sql, 1));
$c = mysql_query($sql);
-
+ if (mysql_error() != '') {
+ return mysql_error();
+ }
+
if (!$c) {
if (!$serendipity['production']) {
print mysql_error();
|