Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7954
Modified Files:
serendipity_event_entrypaging.php
Log Message:
server timezone offset support (coming soon to a smarty-branch near you...)
Index: serendipity_event_entrypaging.php
===================================================================
RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging/serendipity_event_entrypaging.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- serendipity_event_entrypaging.php 11 Nov 2004 12:40:53 -0000 1.1
+++ serendipity_event_entrypaging.php 11 Nov 2004 15:57:12 -0000 1.2
@@ -52,6 +52,14 @@
$title = PLUGIN_ENTRYPAGING_NAME;
}
+ function timeOffset($timestamp) {
+ if (function_exists('serendipity_serverOffsetHour')) {
+ return serendipity_serverOffsetHour($timestamp);
+ }
+
+ return $timestamp;
+ }
+
function makeLink($resultset) {
if (is_array($resultset) && is_numeric($resultset[0]['id'])) {
$link = '<a href="' . serendipity_archiveURL($resultset[0]['id'], $resultset[0]['title']) . '">' . htmlspecialchars($resultset[0]['title']) . '</a>';
@@ -70,7 +78,7 @@
$links = array();
$cond = array();
- $cond['and'] = " AND e.isdraft = 'false' AND e.timestamp <= " . time();
+ $cond['and'] = " AND e.isdraft = 'false' AND e.timestamp <= " . $this->timeOffset(time());
serendipity_plugin_api::hook_event('frontend_fetchentry', $cond);
$querystring = "SELECT
|