Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20349
Modified Files:
Tag: branch-smarty
NEWS serendipity_db_postgres.inc.php
serendipity_functions.inc.php
Log Message:
MFH
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.419.2.49
retrieving revision 1.419.2.50
diff -u -d -r1.419.2.49 -r1.419.2.50
--- serendipity_functions.inc.php 12 Oct 2004 21:00:11 -0000 1.419.2.49
+++ serendipity_functions.inc.php 13 Oct 2004 09:31:16 -0000 1.419.2.50
@@ -333,7 +333,7 @@
c.category_icon,
c.parentid
FROM {$serendipity['dbPrefix']}category AS c
- LEFT JOIN {$serendipity['dbPrefix']}entrycat AS ec
+ JOIN {$serendipity['dbPrefix']}entrycat AS ec
ON ec.categoryid = c.categoryid
WHERE ec.entryid = {$entryid}";
@@ -901,7 +901,7 @@
// The unique query condition was built previously in serendipity_fetchEntries()
if (strtolower($serendipity['dbType']) == 'sqlite') {
- $querystring = "SELECT count(e.id) {$serendipity['fullCountQuery']} GROUP BY count(e.id)";
+ $querystring = "SELECT count(e.id) {$serendipity['fullCountQuery']} GROUP BY e.id";
} else {
$querystring = "SELECT count(distinct e.id) {$serendipity['fullCountQuery']}";
}
@@ -909,7 +909,11 @@
$query = serendipity_db_query($querystring);
if (is_array($query) && isset($query[0])) {
- return $query[0][0];
+ if (strtolower($serendipity['dbType']) == 'sqlite') {
+ return count($query);
+ } else {
+ return $query[0][0];
+ }
}
return 0;
Index: serendipity_db_postgres.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_db_postgres.inc.php,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -u -d -r1.18 -r1.18.2.1
--- serendipity_db_postgres.inc.php 9 Sep 2004 10:52:02 -0000 1.18
+++ serendipity_db_postgres.inc.php 13 Oct 2004 09:31:15 -0000 1.18.2.1
@@ -65,7 +65,11 @@
'both' => PGSQL_BOTH
);
- $serendipity['dbLastResult'] = pg_query($serendipity['dbConn'], $sql);
+ if ($reportErr || !$serendipity['production']) {
+ $serendipity['dbLastResult'] = pg_query($serendipity['dbConn'], $sql);
+ } else {
+ $serendipity['dbLastResult'] = @pg_query($serendipity['dbConn'], $sql);
+ }
if (!$serendipity['dbLastResult']) {
if (!$serendipity['production']) {
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.214.2.31
retrieving revision 1.214.2.32
diff -u -d -r1.214.2.31 -r1.214.2.32
--- NEWS 11 Oct 2004 22:32:46 -0000 1.214.2.31
+++ NEWS 13 Oct 2004 09:31:15 -0000 1.214.2.32
@@ -35,6 +35,12 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Fixed entry count and category association bugs using SQLite
+ (garvinhicking)
+
+ * Fixed some error notices for installation with postgreSQL regarding
+ field index names (garvinhicking)
+
* Fixed wrong mod_rewrite rules to properly redirect to pages.
(garvinhicking)
|