cvs: phd /themes/pear pearweb.php /themes/php phpweb.php

From: Date: Tue, 04 Nov 2008 23:04:04 +0000
Subject: cvs: phd /themes/pear pearweb.php /themes/php phpweb.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2385@lists.php.net to get a copy of this message
cweiske Tue Nov 4 23:04:04 2008 UTC Modified files: /phd/themes/pear pearweb.php /phd/themes/php phpweb.php Log: Make "Prev" links work correctly on last pages (e.g. last in chapter) http://cvs.php.net/viewvc.cgi/phd/themes/pear/pearweb.php?r1=1.5&r2=1.6&diff_format=u Index: phd/themes/pear/pearweb.php diff -u phd/themes/pear/pearweb.php:1.5 phd/themes/pear/pearweb.php:1.6 --- phd/themes/pear/pearweb.php:1.5 Tue Nov 4 19:48:39 2008 +++ phd/themes/pear/pearweb.php Tue Nov 4 23:04:03 2008 @@ -124,7 +124,9 @@ while (list($tmp,) = each($siblings)) { if ($tmp == $id) { // Set the internal pointer back to $id - prev($siblings); + if (prev($siblings) === false) { + end($siblings); + } break; } } http://cvs.php.net/viewvc.cgi/phd/themes/php/phpweb.php?r1=1.28&r2=1.29&diff_format=u Index: phd/themes/php/phpweb.php diff -u phd/themes/php/phpweb.php:1.28 phd/themes/php/phpweb.php:1.29 --- phd/themes/php/phpweb.php:1.28 Sat May 24 15:04:50 2008 +++ phd/themes/php/phpweb.php Tue Nov 4 23:04:04 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: phpweb.php,v 1.28 2008/05/24 15:04:50 gwynne Exp $ */ +/* $Id: phpweb.php,v 1.29 2008/11/04 23:04:04 cweiske Exp $ */ require_once $ROOT . '/themes/php/phpdotnet.php'; class phpweb extends phpdotnet { @@ -80,8 +80,8 @@ if ($parent && $parent != "ROOT") { $siblings = PhDHelper::getChildren($parent); /* TODO: - * Maybe this isn't worth it.. but this, in theory, allows you - * to easily add new pages without needing to rebuild the entire + * Maybe this isn't worth it.. but this, in theory, allows you + * to easily add new pages without needing to rebuild the entire * section. */ if (!file_exists($this->outputdir . $filename)) { @@ -151,7 +151,9 @@ while(list($tmp,) = each($siblings)) { if ($tmp == $id) { // Set the internal pointer back to $id - prev($siblings); + if (prev($siblings) === false) { + end($siblings); + } break; } }

« previous php.doc.cvs (#2385) next »