Marius Cramer
2013-11-14 7fe908c50c8dbc5cc05f571dbe11d66141caacd4
interface/lib/classes/validate_datetime.inc.php
@@ -36,16 +36,22 @@
    * @param array $field_value
    * @return bool
    */
   function _datetime_selected($field_value)
   {
      if (is_array($field_value) && count($field_value) >= 5) 
      {
         $result = array_filter($field_value, create_function('$dt_unit', 'return ($dt_unit > 0);'));
         return (count($result) !== 0);
         return count($result) !== 0;
      }
      
      return false;
   }
   
   /**
    * Check wordbook for the existence of an
@@ -65,6 +71,10 @@
      return $errmsg;
   }
   
   /**
    * Helper function - filter the contents of the 
    * selectors and return the resulting unix timestamp.
@@ -81,6 +91,10 @@
      
      return mktime($hour, $minute, $second, $month, $day, $year);
   }
   
   /**
    * The minimum requirement to submit a datetime field
@@ -101,6 +115,10 @@
      }
   }
   
   /**
    * Check that the selected datetime is in the future.
    * 
@@ -115,6 +133,10 @@
      return $this->is_greater($field_name, $field_value, $validator);
   }
   
   /**
    * Compare the selected datetime to a timestamp
    * parsed via the validator array (key: compare).