Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv23311
Modified Files:
serendipity_functions.inc.php
Log Message:
Sadly we have to use diffirent types of LIMIT syntax, depending on the type of database
This fix allows listing of entries in the administration
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- serendipity_functions.inc.php 4 Jul 2003 05:29:10 -0000 1.90
+++ serendipity_functions.inc.php 5 Jul 2003 19:42:11 -0000 1.91
@@ -274,7 +274,7 @@
if ($full === true)
$body = ',body, extended';
- if (is_numeric($range)) {
+ if ( is_numeric($range)) {
$year = (int)substr($range, 0, 4);
$month = (int)substr($range, 4, 2);
$day = (int)substr($range, 6, 2);
@@ -289,7 +289,11 @@
}
if (!empty($limit)) {
- $limit = "LIMIT " . join (" OFFSET ", split(',', $limit));
+ if ( strtolower($serendipity['dbType']) == 'postgres' ) {
+ $limit = "LIMIT " . join (" OFFSET ", split(',', $limit));
+ } else {
+ $limit = 'LIMIT '. $limit;
+ }
}
$query = "SELECT e.*, a.username, c.category_name FROM
|