logo       


CVS: phpwiki/lib/plugin MostPopular.php,1.31,1.32: msg#00163

Subject: CVS: phpwiki/lib/plugin MostPopular.php,1.31,1.32
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),



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe