tbrehm
2011-09-26 b31bb1f27f066a2d49f5ab9ee0ca15e985efc788
interface/lib/classes/validate_cron.inc.php
@@ -52,9 +52,17 @@
            
            if($parsed["scheme"] != "http" && $parsed["scheme"] != "https") return $this->get_error($validator['errmsg']);
            
            if(preg_match("'^([a-z0-9][a-z0-9-]{0,62}\.)+([a-z]{2,4})$'i", $parsed["host"]) == false) return $this->get_error($validator['errmsg']);
            if(preg_match("'^([a-z0-9][a-z0-9-]{0,62}\.)+([a-z]{2,30})$'i", $parsed["host"]) == false) return $this->get_error($validator['errmsg']);
        }
    }
   function run_month_format($field_name, $field_value, $validator) {
      global $app;
      //* allow value @reboot in month field
      if($field_value != '@reboot') {
         return $this->run_time_format($field_name, $field_value, $validator);
      }
   }
    
   /*
      Validator function to check if a given cron time is in correct form.