From: psc Date: Fri, 20 Mar 2009 21:05:56 +0000 (+0000) Subject: Use msgPool::required function if no valid option name was given (fixes error 25) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c5a1f84a8ab2c3b78f08ac94ff17104a12936e9b;p=gosa.git Use msgPool::required function if no valid option name was given (fixes error 25) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13557 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/goto/admin/applications/class_applicationParameters.inc b/trunk/gosa-plugins/goto/admin/applications/class_applicationParameters.inc index bfc6a8555..faab7b67d 100644 --- a/trunk/gosa-plugins/goto/admin/applications/class_applicationParameters.inc +++ b/trunk/gosa-plugins/goto/admin/applications/class_applicationParameters.inc @@ -186,7 +186,12 @@ class applicationParameters extends plugin /* Check for valid option names */ for ($i= 0; $ioption_name); $i++){ - if (!preg_match ("/^[a-z0-9_]+$/i", $this->option_name[$i])){ + /* Check for empty option names */ + if (!$this->option_name[$i]) { + $message[]= msgPool::required(_("Name")); + } + /* Check for valid option names */ + elseif (!preg_match ("/^[a-z0-9_]+$/i", $this->option_name[$i])){ $message[]= msgPool::invalid(_("Name"), $this->option_name[$i],"/^[a-z0-9_]+$/i"); } }