From: cajus Date: Thu, 9 Aug 2007 12:31:00 +0000 (+0000) Subject: Check for invalid input in service X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=50b2a3cbdeb7614228503e21a0cd06ea28eb63db;p=gosa.git Check for invalid input in service git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7032 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_dhcpService.inc b/plugins/admin/systems/class_dhcpService.inc index 6faa7caa3..25c0b53cc 100644 --- a/plugins/admin/systems/class_dhcpService.inc +++ b/plugins/admin/systems/class_dhcpService.inc @@ -134,6 +134,17 @@ class dhcpService extends dhcpPlugin function check() { $message= array(); + + if (!is_id($this->statements['default-lease-time'])){ + $message[]= _('Default lease time needs to be numeric.'); + } + if (!is_id($this->statements['max-lease-time'])){ + $message[]= _('Maximum lease time needs to be numeric.'); + } + if ($this->statements['default-lease-time'] > $this->statements['max-lease-time']){ + $message[]= _('Default lease time needs to smaller than the maximum lease time.'); + } + return $message; }