Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_history
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23821
Modified Files:
serendipity_plugin_history.php
Log Message:
No parse errors or trailing whitespace please
Index: serendipity_plugin_history.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_history/serendipity_plugin_history.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- serendipity_plugin_history.php 20 Dec 2004 13:16:42 -0000 1.20
+++ serendipity_plugin_history.php 20 Dec 2004 18:46:55 -0000 1.21
@@ -189,9 +189,9 @@
$max_entries = 5;
}
- if (!is_numeric($maxlength) ||$maxlength <0)
+ if (!is_numeric($maxlength) ||$maxlength <0)
$maxlength = 30;
-
+
if (strlen($dateformat) < 1) {
$dateformat = '%a, %d.%m.%Y %H:%M';
}
@@ -206,19 +206,18 @@
if (!is_array($e)) {
return false;
}
-
- $e_c = @count($e);
- if ($e_ c== 0) {
+
+ if ( ($e_c = count($e)) == 0 ) {
return false;
}
-
+
for($x=0; $x < $e_c; $x++) {
$url = serendipity_archiveURL($e[$x]['id'],
$e[$x]['title'],
'serendipityHTTPPath'
);
$date = ($displaydate=='0') ? '' : strftime($dateformat,$e[$x]['timestamp']);
- $t = ($maxlength==0 || strlen($e[$x]['title'])<=$maxlength) ?
+ $t = ($maxlength==0 || strlen($e[$x]['title'])<=$maxlength) ?
$e[$x]['title'] :
(trim(serendipity_mb('substr', $e[$x]['title'], 0, $maxlength-3)).' [...]');
echo $date . "<a href='$url' title='".str_replace("'", '`', $e[$x][title])."'>".$t."</a> " .
@@ -229,4 +228,4 @@
}
/* vim: set sts=4 ts=4 expandtab : */
-?>
\ No newline at end of file
+?>
|