diff --git a/plugins/personal/environment/class_logonManagementDialog.inc b/plugins/personal/environment/class_logonManagementDialog.inc
index c5ac543c8ae32493ecc89a678f3523654b476521..98ce41ff312a27e1e7454f321ab4c79e3ff2337b 100644 (file)
if(isset($_POST['dialogissubmitted'])){
foreach($this->attributes as $attr){
if(isset($_POST[$attr])){
- $this->$attr= $_POST[$attr];
+ $this->$attr = stripslashes($_POST[$attr]);
}else{
$this->$attr = false;
}
function check()
{
- $message = array();
+ /* Call common method to give check the hook */
+ $message= plugin::check();
- if(preg_match("/[^a-z]/",$this->LogonName)){
- $message[] = _("Specified name is invalid.");
- }
-
- if(preg_match("/[^a-z0-9,\.-;:_\(\)!\? ]/i",$this->LogonDescription)){
- $message[] = _("Specified description contains invalid characters.");
- }
-
- return $message;
+ if(preg_match("/[^a-z]/",$this->LogonName)){
+ $message[] = _("Specified name is invalid.");
+ }
+
+ if(empty($this->LogonName)){
+ $message[] = _("Please specify a valid script name.");
+ }
+
+ if(preg_match("/[^a-z0-9,\.-;:_\(\)!\? ]/i",$this->LogonDescription)){
+ $message[] = _("Specified description contains invalid characters.");
+ }
+
+ return $message;
}