Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_recententries
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9112/plugins/serendipity_plugin_recententries
Modified Files:
serendipity_plugin_recententries.php
Log Message:
list="`find . -name \*.php`"
list="$list `find . -name \*.txt`"
perl -i -pe 's=^M==g' $list
cvs tag pre-control-m-removal
cvs commit
cvs tag post-control-m-removal
Index: serendipity_plugin_recententries.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- serendipity_plugin_recententries.php 27 Mar 2004 12:10:23 -0000 1.3
+++ serendipity_plugin_recententries.php 3 Apr 2004 17:36:19 -0000 1.4
@@ -21,14 +21,14 @@
break;
}
-class serendipity_plugin_recententries extends serendipity_plugin {
+class serendipity_plugin_recententries extends serendipity_plugin {
function introspect(&$propbag) {
- $propbag->add('name', PLUGIN_RECENTENTRIES_TITLE);
- $propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH);
+ $propbag->add('name', PLUGIN_RECENTENTRIES_TITLE);
+ $propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH);
$propbag->add('configuration', array('number', 'dateformat'));
- }
-
+ }
+
function introspect_config_item($name, &$propbag) {
switch($name) {
case 'number':
@@ -49,9 +49,9 @@
return true;
}
- function generate_content(&$title) {
- global $serendipity;
-
+ function generate_content(&$title) {
+ global $serendipity;
+
$number = $this->get_config('number');
$dateformat = $this->get_config('dateformat');
@@ -63,19 +63,19 @@
$dateformat = '%A, %B %e %Y';
}
- $title = PLUGIN_RECENTENTRIES_TITLE;
+ $title = PLUGIN_RECENTENTRIES_TITLE;
$entries = serendipity_db_query("SELECT id,
title,
- timestamp
+ timestamp
FROM {$serendipity['dbPrefix']}entries
WHERE isdraft = 'false'
ORDER BY timestamp DESC
- LIMIT $number");
-
- foreach ($entries as $k => $entry) {
+ LIMIT $number");
+
+ foreach ($entries as $k => $entry) {
$entryLink = serendipity_archiveURL(
- $entry['id'],
+ $entry['id'],
$entry['title'],
'serendipityHTTPPath'
);
@@ -83,9 +83,9 @@
echo '<a href="' . $entryLink . '" title="' . htmlentities($entry['title']) . '">' . $entry['title'] . '</a><br />'
. '<div class="serendipitySideBarDate">'
. htmlentities(strftime($dateformat, $entry['timestamp']))
- . '</div><br />';
- }
- }
+ . '</div><br />';
+ }
+ }
}
/* vim: set sts=4 ts=4 expandtab : */
|