Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_recententries
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26565/plugins/serendipity_plugin_recententries
Modified Files:
serendipity_plugin_recententries.php
Log Message:
patches for windows compatibility, by Richard Thomas Harrison
Index: serendipity_plugin_recententries.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- serendipity_plugin_recententries.php 3 Apr 2004 17:36:19 -0000 1.4
+++ serendipity_plugin_recententries.php 5 Apr 2004 08:07:54 -0000 1.5
@@ -9,7 +9,7 @@
@define('PLUGIN_RECENTENTRIES_NUMBER', 'Anzahl der Einträge');
@define('PLUGIN_RECENTENTRIES_NUMBER_BLAHBLAH', 'Wieviele Einträge sollen angezeigt werden? (Standard: 10)');
break;
-
+
case 'en':
case 'es':
default:
@@ -73,17 +73,19 @@
ORDER BY timestamp DESC
LIMIT $number");
- foreach ($entries as $k => $entry) {
- $entryLink = serendipity_archiveURL(
- $entry['id'],
- $entry['title'],
- 'serendipityHTTPPath'
- );
+ if (isset($entries) && is_array($entries)) {
+ foreach ($entries as $k => $entry) {
+ $entryLink = serendipity_archiveURL(
+ $entry['id'],
+ $entry['title'],
+ 'serendipityHTTPPath'
+ );
- echo '<a href="' . $entryLink . '" title="' . htmlentities($entry['title']) . '">' . $entry['title'] . '</a><br />'
- . '<div class="serendipitySideBarDate">'
- . htmlentities(strftime($dateformat, $entry['timestamp']))
- . '</div><br />';
+ echo '<a href="' . $entryLink . '" title="' . htmlentities($entry['title']) . '">' . $entry['title'] . '</a><br />'
+ . '<div class="serendipitySideBarDate">'
+ . htmlentities(strftime($dateformat, $entry['timestamp']))
+ . '</div><br />';
+ }
}
}
}
|