Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26358
Modified Files:
serendipity_functions.inc.php
Log Message:
* let's get this darn postgresql issue fixed finally ;)
* clean variable init for date replacement. Honor E_NOTICE :)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.262
retrieving revision 1.263
diff -u -d -r1.262 -r1.263
--- serendipity_functions.inc.php 5 May 2004 16:45:33 -0000 1.262
+++ serendipity_functions.inc.php 6 May 2004 10:40:57 -0000 1.263
@@ -13,9 +13,13 @@
function serendipity_formatTime($format, $time) {
static $cache;
- if ( !isset($cache[$format]) ) {
+ if (!isset($cache)) {
+ $cache = array();
+ }
+
+ if (!isset($cache[$format])) {
$cache[$format] = $format;
- if ( strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ) {
+ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$cache[$format] = str_replace('%e', '%d', $cache[$format]);
}
}
@@ -597,7 +601,7 @@
if (!empty($limit)) {
if (isset($serendipity['GET']['page']) && $serendipity['GET']['page'] > 1 && !strstr($limit, ',')) {
- $limit = (($serendipity['GET']['page']-1)*$limit) . ',' . $limit;
+ $limit = serendipity_db_limit(($serendipity['GET']['page']-1) * $limit, $limit);
}
$limit = serendipity_db_limit_sql($limit);
|