diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
index dbef1efb1e4549259a5e4a8ff7e5bfa9524f45de..5a4de8ad20d434fc8f7629f29a4971147092fe4e 100644 (file)
public $orig_dn = "";
public $description = "";
public $vendor = "";
- public $dev_id = "";
+ public $devID = "";
public $serial = "";
public $base = "";
public $types;
public $type;
- public $posts = array("description","dev_id","serial","vendor", "type");
- public $attributes = array("cn");
+ public $attributes = array("cn","description","devID","serial","vendor", "type");
public $objectclasses = array("top","gotoDevice");
- public $CopyPasteVars = array("orig_cn","description","vendor","dev_id","serial","base");
+ public $CopyPasteVars = array("orig_cn","description","vendor","devID","serial","base");
public function deviceGeneric(&$config,$dn = NULL)
{
$tmp = preg_split("/\|/",$this->attrs['gotoHotplugDevice'][0]);
$this->cn = $this->attrs['cn'][0];
$this->description= $tmp[0];
- $this->dev_id = $tmp[1];
+ $this->devID = $tmp[1];
$this->serial = $tmp[2];
$this->vendor = $tmp[3];
if (isset($tmp[4])){
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
}
- foreach($this->posts as $attr){
- $smarty->assign($attr,$this->$attr);
+
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $attr => $desc){
+ $smarty->assign($attr."ACL", $this->getacl($attr));
}
$smarty->assign("type",$this->type);
$smarty->assign ("types", $this->types);
-
return($smarty->fetch(get_template_path("deviceGeneric.tpl",TRUE,dirname(__FILE__))));
}
}
/* Skip serial check if vendor and product id are given */
- if(preg_match("/^\s+$/i",$this->dev_id)){
+ if(preg_match("/^\s+$/i",$this->devID)){
$message[]= msgPool::invalid(_("iSerial"),"","01234");
}
if(empty($this->serial) || !$this->is_2byteHex($this->serial)){
*/
if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
$message[] = msgPool::permCreate();
- }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
+ }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
$message[] = msgPool::permMove();
}
$this->base = get_post("base");
}
}
-
- foreach($this->posts as $post){
- if(isset($_POST[$post])){
- $this->$post = get_post($post);
- }
- }
}
}
{
plugin::save();
+ $this->attrs = array();
+ $this->attrs['cn'] = $this->cn;
$this->attrs['gotoHotplugDevice'] = "";
- foreach($this->posts as $post){
+ foreach(array("description","devID","serial","vendor", "type") as $post){
$this->attrs['gotoHotplugDevice'] .= $this->$post."|";
}
$this->attrs['gotoHotplugDevice'] = preg_replace("/\|$/","",$this->attrs['gotoHotplugDevice']);
{
return (array(
"plShortName" => _("Generic"),
- "plDescription" => _("Device generic"),
+ "plDescription" => _("Device generic")." ("._("Hotplug").")",
"plSelfModify" => FALSE,
"plDepends" => array(),
"plPriority" => 0,
"plCategory" => array("devices" => array("description" => _("Devices"),
"objectClass" => "gotoHotplugDevice")),
"plProvidedAcls"=> array(
- "cn" => _("Name"))
+ "cn" => _("Name"),
+ "base" => _("Base"),
+ "description" => _("Description"),
+ "type" => _("Tpye"),
+ "serial" => _("Serial"),
+ "vendor" => _("Vendor"),
+ "devID" => _("Devive ID"))
));
}