From: <ru...@us...> - 2010-06-09 12:08:14
|
Revision: 7510 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7510&view=rev Author: rurban Date: 2010-06-09 12:08:08 +0000 (Wed, 09 Jun 2010) Log Message: ----------- fix cosmetic warnings Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/stdlib.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2010-06-09 11:35:44 UTC (rev 7509) +++ trunk/lib/PageList.php 2010-06-09 12:08:08 UTC (rev 7510) @@ -843,11 +843,11 @@ function addPages ($page_iter) { // TODO: if limit check max(strlen(pagename)) $limit = $page_iter->limit(); + $i = 0; if ($limit) { list($from, $limit) = $this->limit($limit); $this->_options['slice'] = 0; $limit += $from; - $i = 0; while ($page = $page_iter->next()) { $i++; if ($from and $i < $from) @@ -861,7 +861,7 @@ $this->addPage($page); } } - if (empty($this->_options['count'])) + if ($i and empty($this->_options['count'])) $this->_options['count'] = $i; } @@ -1480,7 +1480,7 @@ $tokens = $this->pagingTokens($count, count($this->_columns), $this->_options['limit']); - if ($tokens and $this->_options['slice']) + if ($tokens and !empty($this->_options['slice'])) $this->_pages = array_slice($this->_pages, $tokens['OFFSET'], $tokens['COUNT']); } foreach ($this->_pages as $pagenum => $page) { Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2010-06-09 11:35:44 UTC (rev 7509) +++ trunk/lib/stdlib.php 2010-06-09 12:08:08 UTC (rev 7510) @@ -1,4 +1,4 @@ -<?php //// rcs_id('$Id$'); +<?php // rcs_id('$Id$'); /* * Copyright 1999-2008 $ThePhpWikiProgrammingTeam * Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |