[pLog-svn] r3495 - plog/trunk/class/data/pager

Oscar Renalias oscar at renalias.net
Wed May 31 16:58:56 GMT 2006


We should probably validate the value in the blog settings page.  
After all, we cannot really show 0 posts in the front page...

Oscar

On 31 May 2006, at 19:08, jondaley at devel.lifetype.net wrote:

> Author: jondaley
> Date: 2006-05-31 16:08:15 +0000 (Wed, 31 May 2006)
> New Revision: 3495
>
> Modified:
>    plog/trunk/class/data/pager/pager.class.php
> Log:
> fixes http://forums.lifetype.net/viewtopic.php?p=26180 where a user  
> (probably) set the pager value to 0, causing a divide by zero error
>
> Modified: plog/trunk/class/data/pager/pager.class.php
> ===================================================================
> --- plog/trunk/class/data/pager/pager.class.php	2006-05-29 19:07:47  
> UTC (rev 3494)
> +++ plog/trunk/class/data/pager/pager.class.php	2006-05-31 16:08:15  
> UTC (rev 3495)
> @@ -73,7 +73,7 @@
>              $this->_baseUrl     = $baseUrl;
>  			$this->_curPage     = $curPage;
>              $this->_totalRegs   = $totalRegs;
> -            $this->_regsForPage = $regsForPage;
> +            $this->_regsForPage = ($regsForPage < 1) ?  
> DEFAULT_PAGER_REGS_FOR_PAGE : $regsForPage;
>              $this->_maxPages    = DEFAULT_PAGER_MAX_PAGES;
>  			
>  			$this->_init();
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>



More information about the pLog-svn mailing list