Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv892/plugin Modified Files: MostPopular.php Log Message: fix ADODB MostPopular, avoid limit -1, pass hits on empty data Index: MostPopular.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/MostPopular.php,v retrieving revision 1.31 retrieving revision 1.32 diff -u -2 -b -p -d -r1.31 -r1.32 --- MostPopular.php 23 Nov 2004 15:17:19 -0000 1.31 +++ MostPopular.php 26 Dec 2004 17:14:03 -0000 1.32 @@ -50,5 +50,5 @@ extends WikiPlugin 'limit' => 20, // limit <0 returns least popular pages 'noheader' => 0, - 'sortby' => 'hits', + 'sortby' => '-hits', 'info' => false, //'paging' => 'auto' @@ -74,10 +74,10 @@ extends WikiPlugin if (! $request->getArg('count')) { //$args['count'] = $dbi->numPages(false,$exclude); - $allpages = $dbi->mostPopular(0); + $allpages = $dbi->mostPopular(0, $sortby); $args['count'] = $allpages->count(); } else { $args['count'] = $request->getArg('count'); } - $dbi->touch(); + //$dbi->touch(); $pages = $dbi->mostPopular($limit, $sortby); $pagelist = new PageList($columns, $exclude, $args); @@ -86,6 +86,7 @@ extends WikiPlugin // don't show pages with no hits if most popular pages // wanted - if ($hits == 0 && $limit > 0) + if ($hits == 0 && $limit > 0) { break; + } $pagelist->addPage($page); } @@ -108,4 +109,7 @@ extends WikiPlugin // $Log$ +// Revision 1.32 2004年12月26日 17:14:03 rurban +// fix ADODB MostPopular, avoid limit -1, pass hits on empty data +// // Revision 1.31 2004年11月23日 15:17:19 rurban // better support for case_exact search (not caseexact for consistency),