diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc
index bad85579630b913a56f01cc123720df89aed3c73..1acd7d6fa5e0b22a47124e9b4789c925a6411969 100644 (file)
$this->ui = get_userinfo();
/* Check if copy & paste is activated */
- if($this->config->get_cfg_value("enablecopypaste") == "true"){
+ if($this->config->get_cfg_value("copyPaste") == "true"){
$this->CopyPasteHandler = new CopyPasteHandler($this->config);
}
if (isset($_POST['edit_cancel']) && is_object($this->devicetabs)){
$this->remove_lock();
$this->devicetabs= NULL;
- session::un_set('objectinfo');
+ set_object_info();
}
}
unset ($this->devicetabs);
$this->devicetabs= NULL;
- session::un_set('objectinfo');
+ set_object_info();
}else{
/* Reinitialize tab */
/* Check locking, save current plugin in 'back_plugin', so
the dialog knows where to return. */
if (($user= get_lock($this->dn)) != ""){
- return(gen_locked_message ($user, $this->dn));
+ return(gen_locked_message ($user, $this->dn,TRUE));
}
/* Lock the current entry, so everyone will get the
/* Register devicetabs to trigger edit dialog */
$this->devicetabs= new devicetabs($this->config,$this->config->data['TABS']['DEVICETABS'], $this->dn,"devices");
$this->devicetabs->set_acl_base($this->dn);
- session::set('objectinfo',$this->dn);
+ set_object_info($this->dn);
}
$dns_names = array();
foreach($this->dns as $dn){
- $dns_names[] =@LDAP::fix($dn);
+ $dns_names[] =LDAP::fix($dn);
}
add_lock ($this->dns, $this->ui->dn);
/* Lock the current entry, so nobody will edit it during deletion */
add_lock ($this->dn, $this->ui->dn);
$smarty= get_smarty();
- $smarty->assign("intro", msgPool::deleteInfo(@LDAP::fix($this->dn),_("device")));
+ $smarty->assign("intro", msgPool::deleteInfo(LDAP::fix($this->dn),_("device")));
$smarty->assign("multiple", false);
return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
} else {
/* Delete device canceled? */
if (isset($_POST['delete_cancel'])){
$this->remove_lock();
- session::un_set('objectinfo');
+ set_object_info();
}
/* Show tab dialog if object is present */
$display= $this->devicetabs->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->devicetabs->by_object[$this->devicetabs->current]->dialog){
+
+ if(($this->devicetabs instanceOf tabs || $this->devicetabs instanceOf plugin) && $this->devicetabs->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->devicetabs->by_object[$this->devicetabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
$display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
$display.= " \n";
/* Return departments, that will be included within snapshot detection */
function get_used_snapshot_bases()
{
- return(array(get_ou('deviceou').$this->DivListDevices->selectedBase));
+ return(array(get_ou('deviceRDN').$this->DivListDevices->selectedBase));
}
function copyPasteHandling_from_queue($s_action,$s_entry)
if($SubSearch){
$Flags |= GL_SUBSEARCH;
}else{
- $base = get_ou('deviceou').$base;
+ $base = get_ou('deviceRDN').$base;
}
/* Get results and create index */
- $res= get_sub_list($Filter,"devices",get_ou('deviceou'), $base, array("cn","gotoHotplugDevice","description","dn","objectClass"), $Flags);
+ $res= get_sub_list($Filter,"devices",get_ou('deviceRDN'), $base, array("cn","gotoHotplugDevice","description","dn","objectClass"), $Flags);
$tmp2 = array();
foreach ($res as $val){
if (!isset($val['description']) && isset($val['gotoHotplugDevice'][0])) {