From: <var...@us...> - 2009-04-03 11:03:35
|
Revision: 6768 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6768&view=rev Author: vargenau Date: 2009-04-03 11:03:30 +0000 (Fri, 03 Apr 2009) Log Message: ----------- Better provide an argument for %d Modified Paths: -------------- trunk/lib/plugin/MostPopular.php Modified: trunk/lib/plugin/MostPopular.php =================================================================== --- trunk/lib/plugin/MostPopular.php 2009-04-03 09:48:18 UTC (rev 6767) +++ trunk/lib/plugin/MostPopular.php 2009-04-03 11:03:30 UTC (rev 6768) @@ -2,6 +2,7 @@ rcs_id('$Id$'); /* Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam + Copyright 2009 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -20,9 +21,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/** - */ - require_once('lib/PageList.php'); class WikiPlugin_MostPopular @@ -83,8 +81,7 @@ $pagelist = new PageList($columns, $exclude, $args); while ($page = $pages->next()) { $hits = $page->get('hits'); - // don't show pages with no hits if most popular pages - // wanted + // don't show pages with no hits if most popular pages wanted if ($hits == 0 && $limit > 0) { break; } @@ -94,13 +91,12 @@ if (! $noheader) { if ($limit > 0) { - $pagelist->setCaption(_("The %d most popular pages of this wiki:")); + $pagelist->setCaption(fmt("The %d most popular pages of this wiki:", $limit)); + } else if ($limit < 0) { + $pagelist->setCaption(fmt("The %d least popular pages of this wiki:", -$limit)); } else { - if ($limit < 0) { - $pagelist->setCaption(_("The %d least popular pages of this wiki:")); - } else { - $pagelist->setCaption(_("Visited pages on this wiki, ordered by popularity:")); - }} + $pagelist->setCaption(_("Visited pages on this wiki, ordered by popularity:")); + } } return $pagelist; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |