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

Jon Daley plogworld at jon.limedaley.com
Wed May 31 17:50:32 GMT 2006


 	Yes, that too.  It is good to have it on this level in order to 
avoid the divide by zero crash, but yes, the gui should display a "you 
don't really want to do that" message.

On Wed, 31 May 2006, Oscar Renalias wrote:

> 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
>> 
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn

**************************************
Jon Daley
http://jon.limedaley.com/

Kind words can be short and easy to speak,
   but their echoes are truly endless.
-- Mother Theresa


More information about the pLog-svn mailing list