SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Reini U. <ru...@us...> - 2004年12月26日 17:14:13
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),
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /