Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15671
Modified Files:
serendipity_functions.inc.php NEWS
Log Message:
fix serendipity_track_url() to not use non-standard SQL
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -d -r1.224 -r1.225
--- NEWS 16 Sep 2004 13:53:04 -0000 1.224
+++ NEWS 17 Sep 2004 09:45:39 -0000 1.225
@@ -3,9 +3,12 @@
Version 0.7 ()
------------------------------------------------------------------------
-Version 0.7-beta3 (September 16h, 2004)
+Version 0.7-beta3 ()
------------------------------------------------------------------------
+ * Fixed invalid standard-SQL 'CURRENT_DATE' to use a real date
+ string. Fixes Exit-Tracking with SQLite. (garvinhicking)
+
* Fixed footer printing wrong amount of entries when entry was
assigned to more than one category. Thanks to Kris/weigon for
helping. (garvinhicking)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.427
retrieving revision 1.428
diff -u -d -r1.427 -r1.428
--- serendipity_functions.inc.php 16 Sep 2004 13:52:49 -0000 1.427
+++ serendipity_functions.inc.php 17 Sep 2004 09:45:39 -0000 1.428
@@ -3272,7 +3272,7 @@
AND port = '%s'
AND path = '%s'
AND query = '%s'
- AND day = CURRENT_DATE
+ AND day = '%s'
%s",
$serendipity['dbPrefix'],
@@ -3282,6 +3282,7 @@
serendipity_db_escape_string($url_parts['port']),
serendipity_db_escape_string($url_parts['path']),
serendipity_db_escape_string($url_parts['query']),
+ date('Y-m-d'),
($entry_id != 0) ? "AND entry_id = '". (int)$entry_id ."'" : ''
)
);
@@ -3291,11 +3292,12 @@
sprintf(
"INSERT INTO %s%s
(entry_id, day, count, scheme, host, port, path, query)
- VALUES (%d, CURRENT_DATE, 1, '%s', '%s', '%s', '%s', '%s')",
+ VALUES (%d, '%s', 1, '%s', '%s', '%s', '%s', '%s')",
$serendipity['dbPrefix'],
$list,
(int)$entry_id,
+ date('Y-m-d'),
serendipity_db_escape_string($url_parts['scheme']),
serendipity_db_escape_string($url_parts['host']),
serendipity_db_escape_string($url_parts['port']),
|