cvs: pear /Calendar/Table Helper.php

From: Date: Sat, 22 Oct 2005 09:51:57 +0000
Subject: cvs: pear /Calendar/Table Helper.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35774@lists.php.net to get a copy of this message
quipo Sat Oct 22 05:51:57 2005 EDT Modified files: /pear/Calendar/Table Helper.php Log: set the default $firstDay value to NULL for consistency http://cvs.php.net/diff.php/pear/Calendar/Table/Helper.php?r1=1.4&r2=1.5&ty=u Index: pear/Calendar/Table/Helper.php diff -u pear/Calendar/Table/Helper.php:1.4 pear/Calendar/Table/Helper.php:1.5 --- pear/Calendar/Table/Helper.php:1.4 Mon Aug 16 08:29:49 2004 +++ pear/Calendar/Table/Helper.php Sat Oct 22 05:51:53 2005 @@ -17,11 +17,11 @@ // | Authors: Harry Fuecks <hfuecks@phppatterns.com> | // +----------------------------------------------------------------------+ // -// $Id: Helper.php,v 1.4 2004/08/16 12:29:49 hfuecks Exp $ +// $Id: Helper.php,v 1.5 2005/10/22 09:51:53 quipo Exp $ // /** * @package Calendar - * @version $Id: Helper.php,v 1.4 2004/08/16 12:29:49 hfuecks Exp $ + * @version $Id: Helper.php,v 1.5 2005/10/22 09:51:53 quipo Exp $ */ /** @@ -94,11 +94,11 @@ * @param int (optional) first day of the week e.g. 1 for Monday * @access protected */ - function Calendar_Table_Helper(& $calendar, $firstDay=false) + function Calendar_Table_Helper(& $calendar, $firstDay=null) { $this->calendar = & $calendar; $this->cE = & $calendar->getEngine(); - if ($firstDay === false) { + if (is_null($firstDay)) { $firstDay = $this->cE->getFirstDayOfWeek( $this->calendar->thisYear(), $this->calendar->thisMonth(), @@ -121,12 +121,12 @@ $this->calendar->thisYear(), $this->calendar->thisMonth(), $this->calendar->thisDay() - ); + ); $endDays = array(); $tmpDays = array(); $begin = false; foreach ($weekDays as $day) { - if ($begin == true) { + if ($begin) { $endDays[] = $day; } else if ($day === $this->firstDay) { $begin = true;

« previous php.pear.cvs (#35774) next »