diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
index 6635ee07189251e8d3a722e6fc15dc8335123013..048c12c4529557794dad437221205458eeec5e8f 100644 (file)
/* Remove lock file after successfull deletion */
$this->remove_lock();
- session::un_set('objectinfo');
+ set_object_info();
}
/* Delete group canceled? */
if (isset($_POST['delete_cancel'])){
$this->remove_lock();
- session::un_set('objectinfo');
+ set_object_info();
}
/* 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 grouptab to trigger edit dialog */
$this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $this->dn, "ogroups");
$this->ogroup->set_acl_base($this->dn);
- session::set('objectinfo',$this->dn);
+ set_object_info($this->dn);
}
unset ($this->ogroup);
$this->ogroup= NULL;
- session::un_set('objectinfo');
+ set_object_info();
}else{
/* Reinitialize tab */
if ((isset($_POST['edit_cancel'])) && (isset($this->ogroup->dn))){
$this->remove_lock();
$this->ogroup= NULL;
- session::un_set('objectinfo');
+ set_object_info();
}
$display= $this->ogroup->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->ogroup->by_object[$this->ogroup->current]->dialog){
+ if(($this->ogroup instanceOf tabs || $this->ogroup instanceOf plugin) && $this->ogroup->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->ogroup->by_object[$this->ogroup->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";
{
if (isset($this->apptabs->dn)){
del_lock ($this->apptabs->dn);
- }
- if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
+ }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
del_lock($this->dn);
}
if(isset($this->dns) && is_array($this->dns) && count($this->dns)){