Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30578/include
Modified Files:
functions.inc.php
Log Message:
make pgsql work again, thanks to mauri sahlberg!
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- functions.inc.php 6 Jan 2005 18:21:57 -0000 1.18
+++ functions.inc.php 7 Jan 2005 10:45:14 -0000 1.19
@@ -423,12 +423,12 @@
if (preg_match('/^(mysqli?|sqlite)/', $serendipity['dbType'])) {
$interval = 900;
+ $ts = time();
} else {
$interval = "interval '900'";
+ $ts = 'NOW()';
}
- $ts = time();
-
$suppressq = "SELECT count(1)
FROM $serendipity[dbPrefix]suppress
WHERE ip = '" . serendipity_db_escape_string($_SERVER['REMOTE_ADDR']) . "'
@@ -477,12 +477,12 @@
if (preg_match('/^(mysqli?|sqlite)/', $serendipity['dbType'])) {
$interval = 900;
+ $ts = time();
} else {
$interval = "interval '900'";
+ $ts = 'NOW()';
}
- $ts = time();
-
$gc = "DELETE FROM $serendipity[dbPrefix]suppress where last < $ts - $interval";
serendipity_db_query($gc);
}
|