Index: branches/version-2_13_0/data/module/Calendar/Validator.php
===================================================================
--- branches/version-2_13_0/data/module/Calendar/Validator.php	(revision 23126)
+++ branches/version-2_13_0/data/module/Calendar/Validator.php	(revision 23143)
@@ -1,38 +1,26 @@
 <?php
 /* vim: set expandtab tabstop=4 shiftwidth=4: */
-
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2002 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license,      |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available at through the world-wide-web at                           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: Harry Fuecks <hfuecks@phppatterns.com>                      |
+// +----------------------------------------------------------------------+
+//
+// $Id: Validator.php,v 1.1 2004/05/24 22:25:42 quipo Exp $
+//
 /**
- * Contains the Calendar_Validator class
- *
- * PHP versions 4 and 5
- *
- * LICENSE: Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category  Date and Time
- * @package   Calendar
- * @author    Harry Fuecks <hfuecks@phppatterns.com>
- * @copyright 2003-2007 Harry Fuecks
- * @license   http://www.debian.org/misc/bsd.license  BSD License (3 Clause)
- * @version   CVS: $Id: Validator.php 247251 2007-11-28 19:42:33Z quipo $
- * @link      http://pear.php.net/package/Calendar
+ * @package Calendar
+ * @version $Id: Validator.php,v 1.1 2004/05/24 22:25:42 quipo Exp $
  */
 
@@ -50,13 +38,7 @@
  * Used to validate any given Calendar date object. Instances of this class
  * can be obtained from any data object using the getValidator method
- *
- * @category  Date and Time
- * @package   Calendar
- * @author    Harry Fuecks <hfuecks@phppatterns.com>
- * @copyright 2003-2007 Harry Fuecks
- * @license   http://www.debian.org/misc/bsd.license  BSD License (3 Clause)
- * @link      http://pear.php.net/package/Calendar
- * @see       Calendar::getValidator()
- * @access    public
+ * @see Calendar::getValidator()
+ * @package Calendar
+ * @access public
  */
 class Calendar_Validator
@@ -85,18 +67,15 @@
     /**
      * Constructs Calendar_Validator
-     *
-     * @param object &$calendar subclass of Calendar
-     *
-     * @access public
-     */
-    function Calendar_Validator(&$calendar)
+     * @param object subclass of Calendar
+     * @access public
+     */
+    function Calendar_Validator(& $calendar)
     {
         $this->calendar = & $calendar;
-        $this->cE       = & $calendar->getEngine();
+        $this->cE = & $calendar->getEngine();
     }
 
     /**
      * Calls all the other isValidXXX() methods in the validator
-     *
      * @return boolean
      * @access public
@@ -106,5 +85,5 @@
         $checks = array('isValidYear', 'isValidMonth', 'isValidDay',
             'isValidHour', 'isValidMinute', 'isValidSecond');
-        $valid  = true;
+        $valid = true;
         foreach ($checks as $check) {
             if (!$this->{$check}()) {
@@ -117,5 +96,4 @@
     /**
      * Check whether this is a valid year
-     *
      * @return boolean
      * @access public
@@ -123,8 +101,8 @@
     function isValidYear()
     {
-        $y   = $this->calendar->thisYear();
+        $y = $this->calendar->thisYear();
         $min = $this->cE->getMinYears();
         if ($min > $y) {
-            $this->errors[] = new Calendar_Validation_Error(
+           $this->errors[] = new Calendar_Validation_Error(
                 'Year', $y, CALENDAR_VALUE_TOOSMALL.$min);
             return false;
@@ -141,5 +119,4 @@
     /**
      * Check whether this is a valid month
-     *
      * @return boolean
      * @access public
@@ -147,5 +124,5 @@
     function isValidMonth()
     {
-        $m   = $this->calendar->thisMonth();
+        $m = $this->calendar->thisMonth();
         $min = 1;
         if ($min > $m) {
@@ -165,5 +142,4 @@
     /**
      * Check whether this is a valid day
-     *
      * @return boolean
      * @access public
@@ -171,5 +147,5 @@
     function isValidDay()
     {
-        $d   = $this->calendar->thisDay();
+        $d = $this->calendar->thisDay();
         $min = 1;
         if ($min > $d) {
@@ -179,7 +155,5 @@
         }
         $max = $this->cE->getDaysInMonth(
-            $this->calendar->thisYear(), 
-            $this->calendar->thisMonth()
-        );
+            $this->calendar->thisYear(), $this->calendar->thisMonth());
         if ($d > $max) {
             $this->errors[] = new Calendar_Validation_Error(
@@ -192,5 +166,4 @@
     /**
      * Check whether this is a valid hour
-     *
      * @return boolean
      * @access public
@@ -198,5 +171,5 @@
     function isValidHour()
     {
-        $h   = $this->calendar->thisHour();
+        $h = $this->calendar->thisHour();
         $min = 0;
         if ($min > $h) {
@@ -216,5 +189,4 @@
     /**
      * Check whether this is a valid minute
-     *
      * @return boolean
      * @access public
@@ -222,5 +194,5 @@
     function isValidMinute()
     {
-        $i   = $this->calendar->thisMinute();
+        $i = $this->calendar->thisMinute();
         $min = 0;
         if ($min > $i) {
@@ -240,5 +212,4 @@
     /**
      * Check whether this is a valid second
-     *
      * @return boolean
      * @access public
@@ -246,5 +217,5 @@
     function isValidSecond()
     {
-        $s   = $this->calendar->thisSecond();
+        $s = $this->calendar->thisSecond();
         $min = 0;
         if ($min > $s) {
@@ -264,5 +235,4 @@
     /**
      * Iterates over any validation errors
-     *
      * @return mixed either Calendar_Validation_Error or false
      * @access public
@@ -270,5 +240,5 @@
     function fetch()
     {
-        $error = each($this->errors);
+        $error = each ($this->errors);
         if ($error) {
             return $error['value'];
@@ -282,13 +252,7 @@
 /**
  * For Validation Error messages
- *
- * @category  Date and Time
- * @package   Calendar
- * @author    Harry Fuecks <hfuecks@phppatterns.com>
- * @copyright 2003-2007 Harry Fuecks
- * @license   http://www.debian.org/misc/bsd.license  BSD License (3 Clause)
- * @link      http://pear.php.net/package/Calendar
- * @see       Calendar::fetch()
- * @access    public
+ * @see Calendar::fetch()
+ * @package Calendar
+ * @access public
  */
 class Calendar_Validation_Error
@@ -317,12 +281,10 @@
     /**
      * Constructs Calendar_Validation_Error
-     *
-     * @param string $unit    Date unit (e.g. month,hour,second)
-     * @param int    $value   Value of unit which failed test
-     * @param string $message Validation error message
-     *
+     * @param string Date unit (e.g. month,hour,second)
+     * @param int Value of unit which failed test
+     * @param string Validation error message
      * @access protected
      */
-    function Calendar_Validation_Error($unit, $value, $message)
+    function Calendar_Validation_Error($unit,$value,$message)
     {
         $this->unit    = $unit;
@@ -333,5 +295,4 @@
     /**
      * Returns the Date unit
-     *
      * @return string
      * @access public
@@ -344,5 +305,4 @@
     /**
      * Returns the value of the unit
-     *
      * @return int
      * @access public
@@ -355,5 +315,4 @@
     /**
      * Returns the validation error message
-     *
      * @return string
      * @access public
@@ -366,5 +325,4 @@
     /**
      * Returns a string containing the unit, value and error message
-     *
      * @return string
      * @access public
