From: <var...@us...> - 2008-09-07 10:57:30
|
Revision: 6239 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6239&view=rev Author: vargenau Date: 2008-09-07 10:57:38 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Removed history Modified Paths: -------------- trunk/lib/plugin/MostPopular.php Modified: trunk/lib/plugin/MostPopular.php =================================================================== --- trunk/lib/plugin/MostPopular.php 2008-09-07 10:55:02 UTC (rev 6238) +++ trunk/lib/plugin/MostPopular.php 2008-09-07 10:57:38 UTC (rev 6239) @@ -107,52 +107,6 @@ } }; -// $Log: not supported by cvs2svn $ -// Revision 1.31 2004/11/23 15:17:19 rurban -// better support for case_exact search (not caseexact for consistency), -// plugin args simplification: -// handle and explode exclude and pages argument in WikiPlugin::getArgs -// and exclude in advance (at the sql level if possible) -// handle sortby and limit from request override in WikiPlugin::getArgs -// ListSubpages: renamed pages to maxpages -// -// Revision 1.30 2004/10/14 19:19:34 rurban -// loadsave: check if the dumped file will be accessible from outside. -// and some other minor fixes. (cvsclient native not yet ready) -// -// Revision 1.29 2004/09/25 16:33:52 rurban -// add support for all PageList options -// -// Revision 1.28 2004/04/20 18:10:55 rurban -// config refactoring: -// FileFinder is needed for WikiFarm scripts calling index.php -// config run-time calls moved to lib/IniConfig.php:fix_configs() -// added PHPWIKI_DIR smart-detection code (Theme finder) -// moved FileFind to lib/FileFinder.php -// cleaned lib/config.php -// -// Revision 1.27 2004/04/20 00:06:53 rurban -// paging support -// -// Revision 1.26 2004/04/18 01:34:21 rurban -// protect most_popular from sortby=mtime -// -// Revision 1.25 2004/03/30 02:38:06 rurban -// RateIt support (currently no recommendation engine yet) -// -// Revision 1.24 2004/03/01 13:48:46 rurban -// rename fix -// p[] consistency fix -// -// Revision 1.23 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.22 2003/01/18 21:48:56 carstenklapp -// Code cleanup: -// Reformatting & tabs to spaces; -// Added copyleft, getVersion, getDescription, rcs_id. -// - // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <var...@us...> - 2021-02-22 20:23:06
|
Revision: 10260 http://sourceforge.net/p/phpwiki/code/10260 Author: vargenau Date: 2021-02-22 20:23:02 +0000 (Mon, 22 Feb 2021) Log Message: ----------- plugin MostPopular: better test boolean argument "noheader" Modified Paths: -------------- trunk/lib/plugin/MostPopular.php Modified: trunk/lib/plugin/MostPopular.php =================================================================== --- trunk/lib/plugin/MostPopular.php 2021-02-22 20:19:10 UTC (rev 10259) +++ trunk/lib/plugin/MostPopular.php 2021-02-22 20:23:02 UTC (rev 10260) @@ -41,7 +41,7 @@ array('pagename' => '[pagename]', // hackish //'exclude' => '', 'limit' => 20, // limit <0 returns least popular pages - 'noheader' => 0, + 'noheader' => false, 'sortby' => '-hits', 'info' => false, //'paging' => 'auto' @@ -66,6 +66,14 @@ extract($args); + if (($noheader == '0') || ($noheader == 'false')) { + $noheader = false; + } elseif (($noheader == '1') || ($noheader == 'true')) { + $noheader = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "noheader")); + } + if (isset($limit) && !is_limit($limit)) { return HTML::p(array('class' => "error"), _("Illegal “limit” argument: must be an integer or two integers separated by comma")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2022-02-02 18:07:28
|
Revision: 10972 http://sourceforge.net/p/phpwiki/code/10972 Author: vargenau Date: 2022-02-02 18:07:25 +0000 (Wed, 02 Feb 2022) Log Message: ----------- lib/plugin/MostPopular.php: cleanup Modified Paths: -------------- trunk/lib/plugin/MostPopular.php Modified: trunk/lib/plugin/MostPopular.php =================================================================== --- trunk/lib/plugin/MostPopular.php 2022-02-02 11:48:24 UTC (rev 10971) +++ trunk/lib/plugin/MostPopular.php 2022-02-02 18:07:25 UTC (rev 10972) @@ -39,20 +39,14 @@ ( PageList::supportedArgs(), array('pagename' => '[pagename]', // hackish - //'exclude' => '', 'limit' => 20, // limit <0 returns least popular pages 'noheader' => false, - 'sortby' => '-hits', - 'info' => false, - //'paging' => 'auto' + 'sortby' => '-hits', // only pagename or hits. mtime not! + 'info' => false // allows multiple columns: + // info=mtime,hits,summary,version,author,locked,minor )); } - // info arg allows multiple columns - // info=mtime,hits,summary,version,author,locked,minor - // exclude arg allows multiple pagenames exclude=HomePage,RecentChanges - // sortby: only pagename or hits. mtime not! - /** * @param WikiDB $dbi * @param string $argstr @@ -89,7 +83,6 @@ array_unshift($columns, 'hits'); if (!$request->getArg('count')) { - //$args['count'] = $dbi->numPages(false,$exclude); $allpages = $dbi->mostPopular(0, $sortby); $args['count'] = $allpages->count(); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |