Update of /cvsroot/phpwiki/phpwiki/lib/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20434
Modified Files:
RecentComments.php
Log Message:
fixed RecentComments
Index: RecentComments.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/RecentComments.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -2 -b -p -d -r1.1 -r1.2
--- RecentComments.php 14 May 2004 17:33:12 -0000 1.1
+++ RecentComments.php 14 May 2004 17:40:56 -0000 1.2
@@ -25,5 +25,4 @@ extends WikiPlugin_RecentChanges
$args = WikiPlugin_RecentChanges::getDefaultArguments();
//else $args = parent::getDefaultArguments();
- $args['type'] = 'RecentComments';
$args['show_minor'] = false;
$args['show_all'] = true;
@@ -78,6 +77,5 @@ class RecentCommentsRevisionIterator ext
if (!empty($this->comments) and $this->_current) {
if (isset($this->comments[$this->_current])) {
- $this->_current++;
- return $this->comments[$this->_current];
+ return $this->comments[$this->_current++];
} else {
$this->_current = 0;
@@ -87,9 +85,10 @@ class RecentCommentsRevisionIterator ext
$this->comments = $this->_blog->findBlogs($this->_wikidb,
$rev->getPageName(), 'comment');
if ($this->comments) {
+ if (count($this->comments) > 2)
usort($this->comments, array("WikiPlugin_WikiBlog",
"cmp"));
if (isset($this->comments[$this->_current])) {
$this->_current++;
- return $this->comments[$this->_current];
+ return $rev;
}
} else {
@@ -104,6 +103,6 @@ class RecentCommentsRevisionIterator ext
// $Log$
-// Revision 1.1 2004/05/14 17:33:12 rurban
-// new plugin RecentChanges
+// Revision 1.2 2004/05/14 17:40:56 rurban
+// fixed RecentComments
//
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
|
|