From: hickert
{$info}
+
{t}This includes 'all' accounts, systems, etc. in this subtree. Please double check if your really want to do this since there is no way for GOsa to get your data back.{/t}
";
+ foreach($this->dns as $dn){
+ add_lock ($dn, $this->ui->dn);
+ $dns_names .= $dn."\n";
+ }
+ $dns_names .="
";
+
+ /* Lock the current entry, so nobody will edit it during deletion */
+ $smarty->assign("info", sprintf(_("You're about to delete the following user(s) %s"), @LDAP::fix($dns_names)));
+ $smarty->assign("multiple", true);
+ return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
+ }
+ }
+
+
+ /********************
+ Delete MULTIPLE entries confirmed
+ ********************/
+
+ /* Confirmation for deletion has been passed. Users should be deleted. */
+ if (isset($_POST['delete_multiple_conference_confirm'])){
+
+ /* Remove user by user and check acls before removeing them */
+ foreach($this->dns as $key => $dn){
+ $this->dn = $dn;
+ $acl = $this->ui->get_permissions($this->dn,"gofonconference/conference");
+ if(preg_match("/d/",$acl)){
+ $this->remove_from_parent();
+ gosa_log ("Department object'".$this->dn."' has been removed");
+ } else {
+ print_red (_("You have no permission to remove this department."));
+ }
+ /* Remove lock file after successfull deletion */
+ del_lock ($dn);
+ unset($this->dns[$key]);
+ }
+ }
+
+
+ /********************
+ Delete MULTIPLE entries Canceled
+ ********************/
+
+ /* Remove lock */
+ if(isset($_POST['delete_multiple_conference_cancel'])){
+ foreach($this->dns as $key => $dn){
+ del_lock ($dn);
+ unset($this->dns[$key]);
+ }
+ }
+
+
/***************
Delete
***************/
@@ -132,6 +204,7 @@ class phoneConferenceManagment extends plugin
} else {
add_lock ($this->dn, $this->ui->dn);
$smarty->assign("info", sprintf(_("You're about to delete the whole LDAP subtree placed under '%s'."), $this->dn));
+ $smarty->assign("multiple", false);
$display.= $smarty->fetch (get_template_path('remove.tpl', TRUE));
return ($display);
}
@@ -277,7 +350,7 @@ class phoneConferenceManagment extends plugin
/* Add departments if subsearch is disabled */
if(!$this->DivListConference->SubSearch){
- $this->DivListConference->AddDepartments($this->DivListConference->selectedBase,5);
+ $this->DivListConference->AddDepartments($this->DivListConference->selectedBase,5,1);
}
$this->reload();
$this->DivListConference->setEntries($this->conferences);
@@ -350,6 +423,20 @@ class phoneConferenceManagment extends plugin
}
}
+
+ function list_get_selected_items()
+ {
+ $ids = array();
+ foreach($_POST as $name => $value){
+ if(preg_match("/^item_selected_[0-9]*$/",$name)){
+ $id = preg_replace("/^item_selected_/","",$name);
+ $ids[$id] = $id;
+ }
+ }
+ return($ids);
+ }
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/gofon/conference/remove.tpl b/plugins/gofon/conference/remove.tpl
index 33fdbbc2f..970abd4be 100644
--- a/plugins/gofon/conference/remove.tpl
+++ b/plugins/gofon/conference/remove.tpl
@@ -1,8 +1,8 @@
- - - +{if $multiple} + + + +{else} + + + +{/if}
diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index 8f670bb89..8069d41cd 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -285,6 +285,7 @@ class gofonMacro extends plugin add_lock ($this->dn, $this->ui->dn); $smarty= get_smarty(); $smarty->assign("intro", sprintf(_("You're about to delete the macro '%s'."), $this->dn)); + $smarty->assign("multiple", false); return($smarty->fetch (get_template_path('remove.tpl', TRUE))); } else {