[Solar-svn] Revision 3042

pmjones at solarphp.com pmjones at solarphp.com
Sun Mar 23 08:59:08 CDT 2008


Solar_View_Helper_Pager: [CHG] When there are zero or one pages, don't return a pager.


Modified: trunk/Solar/View/Helper/Pager.php
===================================================================
--- trunk/Solar/View/Helper/Pager.php	2008-03-23 13:58:35 UTC (rev 3041)
+++ trunk/Solar/View/Helper/Pager.php	2008-03-23 13:59:08 UTC (rev 3042)
@@ -88,6 +88,12 @@
         // output config
         $config = array_merge($this->_config, (array) $config);
         
+        // do we really need paging?
+        if ($pages <= 1) {
+            // zero or one pages, nothing to do here
+            return;
+        }
+        
         // make sure we have ol or ul
         $config['type'] = strtolower($config['type']);
         if ($config['type'] != 'ol') {




More information about the Solar-svn mailing list