summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 71dff8d)
raw | patch | inline | side by side (parent: 71dff8d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Aug 2005 13:07:58 +0000 (13:07 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Aug 2005 13:07:58 +0000 (13:07 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1272 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history | |
plugins/personal/environment/class_hotplugDialog.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 8dac38155451c77815df349b87826e2395a7863e..7c80034ecd1c0b78a4c4ae93375ef1de3559823c 100644 (file)
$tmp = split("\|",$device);
$tmp2['name'] = $tmp[0];
$tmp2['description'] = $tmp[1];
- $tmp2['id'] = $tmp[2];
+ $tmp2['id'] = base64_decode($tmp[2]);
$this->gotoHotplugDevices[$tmp[0]]=$tmp2;
}
}
/* Prepare HotPlug devices */
$this->attrs['gotoHotplugDevice'] = array();
foreach($this->gotoHotplugDevices as $name => $device){
- $this->attrs['gotoHotplugDevice'][] = $device['name']."|".$device['description']."|".$device['id'];
+ $this->attrs['gotoHotplugDevice'][] = $device['name']."|".$device['description']."|".base64_encode($device['id']);
}
/* Prepare LogonScripts */
diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc
index bf243fffd9f74cab7fd526c062b6d3ef988292c9..1bc4ed2642935d9cad16d7b1d943bc409c9213d8 100644 (file)
{
$message= array();
if(!$this->use_existing){
- if((empty($this->HOT_name))||(preg_match("/[^a-z0-9]/i",$this->HOT_name))){
- $message[]=_("Please specify a valid name.");
+ if((empty($this->HOT_name))||(preg_match("/[^a-z0-9 ]/i",$this->HOT_name))){
+ $message[]=_("Please specify a valid name. Only 0-9 a-Z is allowed.");
}
if((empty($this->HOT_description))||(preg_match("/[^a-z0-9!\"?.,;:-_\(\) ]/i",$this->HOT_description))){
- $message[]=_("Please specify a valid description.");
+ $message[]=_("Invalid character in description. Please specify a valid description.");
}
if((empty($this->HOT_id))||(preg_match("/[\|]/i",$this->HOT_id))){
$message[]=_("Please specify a valid id.");
$tmp = split("\|",$device);
if(preg_match("/^".str_replace("*","",$this->regex).".*/i",$tmp[0])){
- $a_return[$tmp[0]]= $tmp[0]." [".$tmp[1]."] ".$tmp[2];
+ $a_return[$tmp[0]]= $tmp[0]." [".$tmp[1]."] ".base64_decode($tmp[2]);
$tmp2['name'] = $tmp[0];
$tmp2['description'] = $tmp[1];
- $tmp2['id'] = $tmp[2];
+ $tmp2['id'] = base64_decode($tmp[2]);
$this->hotplugDeviceList[$tmp[0]]=$tmp2;
}