summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d283ea)
raw | patch | inline | side by side (parent: 8d283ea)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 May 2008 07:49:53 +0000 (07:49 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 May 2008 07:49:53 +0000 (07:49 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11092 594d385d-05f5-0310-b6e9-bd551577e9d8
17 files changed:
diff --git a/gosa-core/include/class_MultiSelectWindow.inc b/gosa-core/include/class_MultiSelectWindow.inc
index e76ee82ffe76c1f3b03b584ae666d11c30ea83f5..8946d061e58b6fce3a24bfe1972c114d11b37078 100644 (file)
}
- /* Create header snapshot value */
- function get_snapshot_header($layer_menu = FALSE)
- {
- $str = "";
- if($this->parent->snapshotEnabled()){
- $ok = false;
- foreach($this->parent->get_used_snapshot_bases() as $base){
- $ok |= count($this->parent->getAllDeletedSnapshots($base)) >= 1 ;
- }
- if($ok){
- if($layer_menu){
- $str = "..|<img class='center' src='images/lists/restore.png' alt='"._("Restore")."'> "._("Restore")."|RestoreDeletedSnapShot|\n";
- }else{
- $str = "<input class='center' type='image' align='middle' src='images/lists/restore.png'
- title='"._("Restore snapshopts of already deleted objects")."'
- alt='"._("Restore")."' name='RestoreDeletedSnapShot'> ";
- }
- }else{
- if($layer_menu){
- $str = "..|<img class='center' src='images/lists/restore_grey.png' alt=''> "._("Restore")."||\n";
- }else{
- $str = "<img class='center' src='images/lists/restore_grey.png' alt=''> ";
- }
- }
- }
- return($str);
- }
-
-
- function GetSnapShotActions($dn)
- {
- $str= "";
- if($this->parent->snapshotEnabled()){
-
- if(count($this->parent->Available_SnapsShots($dn))){
- $str.= "<input class='center' type='image' src='images/lists/restore.png'
- alt='"._("Restore snapshot")."' name='RestoreSnapShotDialog_".base64_encode($dn)."' title='"._("Restore snapshot")."'> ";
- } else {
- $str = "<img class='center' src='images/lists/restore_grey.png' alt=''> ";
- }
-
- $str.= "<input class='center' type='image' src='images/snapshot.png'
- alt='"._("Create snapshot")."' name='CreateSnapShotDialog_".base64_encode($dn)."' title='"._("Create a new snapshot from this object")."'> ";
- }
-
- return($str);
- }
-
-
/* this function adds the sub-departments of the current tree to the list */
function AddDepartments($base = false,$numtabs = 3,$empty_tabs_in_front = 0)
{
index 51d372862f43ae8cb657a5c5096c340b8583e9d7..6f6a6e52b52ae9fb3c370093d609479d63a9b370 100644 (file)
$message = plugin::check();
return($message);
}
+
+
+ /*! \brief Returns the snapshot header part for "Actions" menu in management dialogs
+ @param $layer_menu
+ */
+ function get_snapshot_header($base,$category)
+ {
+ $str = "";
+ $ui = get_userinfo();
+ if($this->snapshotEnabled() && $ui->allow_snapshot_restore($base,$category)){
+
+ $ok = false;
+ foreach($this->get_used_snapshot_bases() as $base){
+ $ok |= count($this->getAllDeletedSnapshots($base)) >= 1 ;
+ }
+
+ if($ok){
+ $str = "..|<img class='center' src='images/lists/restore.png' ".
+ "alt='"._("Restore")."'> "._("Restore"). "|RestoreDeletedSnapShot|\n";
+ }else{
+ $str = "..|<img class='center' src='images/lists/restore_grey.png' alt=''> "._("Restore")."||\n";
+ }
+ }
+ return($str);
+ }
+
+
+ function get_snapshot_action($base,$category)
+ {
+ $str= "";
+ $ui = get_userinfo();
+ if($this->snapshotEnabled() && $ui->allow_snapshot_create($base,$category)){
+
+ if(count($this->Available_SnapsShots($base))){
+ $str.= "<input class='center' type='image' src='images/lists/restore.png'
+ alt='"._("Restore snapshot")."' name='RestoreSnapShotDialog_".base64_encode($base)."' title='"._("Restore snapshot")."'> ";
+ } else {
+ $str = "<img class='center' src='images/lists/restore_grey.png' alt=''> ";
+ }
+
+ $str.= "<input class='center' type='image' src='images/snapshot.png'
+ alt='"._("Create snapshot")."' name='CreateSnapShotDialog_".base64_encode($base)."' title='"._("Create a new snapshot from this object")."'> ";
+ }
+
+ return($str);
+ }
+
+
+ function get_used_snapshot_bases()
+ {
+ return(array());
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 45f6a1324ad44fa32f80de5c5e0f26ace5dec402..86f1bbadafee11f2ebb5befbd1f289709da92f40 100644 (file)
return ($acl);
}
-
+
+ /*! \brief Check if the given object (dn) is copyable
+ @param String The object dn
+ @param String The acl category (e.g. users)
+ @param String The acl class (e.g. user)
+ @return Boolean TRUE if the given object is copyable else FALSE
+ */
function is_copyable($dn, $object, $class)
{
return(preg_match("/r/",$this->has_complete_category_acls($dn, $object)));
}
+
+ /*! \brief Check if the given object (dn) is cutable
+ @param String The object dn
+ @param String The acl category (e.g. users)
+ @param String The acl class (e.g. user)
+ @return Boolean TRUE if the given object is cutable else FALSE
+ */
function is_cutable($dn, $object, $class)
{
$remove = preg_match("/d/",$this->get_permissions($dn,$object."/".$class));
return($remove && $read);
}
+
+ /*! \brief Checks if we are allowed to paste an object to the given destination ($dn)
+ @param String The destination dn
+ @param String The acl category (e.g. users)
+ @param String The acl class (e.g. user)
+ @return Boolean TRUE if we are allowed to paste an object.
+ */
function is_pasteable($dn, $object, $class)
{
return(preg_match("/w/",$this->has_complete_category_acls($dn, $object)));
}
+
+ /*! \brief Checks if we are allowed to restore a snapshot for the given dn.
+ @param String The destination dn
+ @param String The acl category (e.g. users)
+ @return Boolean TRUE if we are allowed to restore a snapshot.
+ */
+ function allow_snapshot_restore($dn, $object)
+ {
+ if(!is_array($object)){
+ $object = array($object);
+ }
+ $r = $w = $c = TRUE;
+ foreach($object as $category){
+ $w |= preg_match("/w/",$this->has_complete_category_acls($dn, $category));
+ $c |= preg_match("/c/",$this->has_complete_category_acls($dn, $category));
+ $r |= preg_match("/r/",$this->has_complete_category_acls($dn, $category));
+# print_a(array($category => $w.$c.$r));
+ }
+ return($r);
+ }
+
+
+ /*! \brief Checks if we are allowed to create a snapshot of the given dn.
+ @param String The source dn
+ @param String The acl category (e.g. users)
+ @return Boolean TRUE if we are allowed to restore a snapshot.
+ */
+ function allow_snapshot_create($dn, $object)
+ {
+ $w = preg_match("/w/",$this->has_complete_category_acls($dn, $object));
+ $c = preg_match("/c/",$this->has_complete_category_acls($dn, $object));
+ $r = preg_match("/r/",$this->has_complete_category_acls($dn, $object));
+# print_a(array($object => $w.$c.$r));
+ return($r && $w && $c) ;
+ }
+
+
function get_permissions($dn, $object, $attribute= "", $skip_write= FALSE)
{
/* If we are forced to skip ACLs checks for the current user
diff --git a/gosa-core/plugins/admin/acl/class_divListACL.inc b/gosa-core/plugins/admin/acl/class_divListACL.inc
index 0da6caed1ea582981a2987224eac5f6c5983f867..5838c761501cceb5c328c3d0de0f13355a9242b5 100644 (file)
function divListACL (&$config, &$parent)
{
- MultiSelectWindow::MultiSelectWindow($config, "ACL", "acl");
+ MultiSelectWindow::MultiSelectWindow($config, "ACL", array("acl","aclroles"));
$this->parent = &$parent;
$this->ui = get_userinfo();
$s.="..|".$img." "._("Paste")."\n";
}
- /* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
}
/* Add copy & paste handler */
- if($ui->is_cutable($acl_entry['dn'],"acl","aclRole") && $this->parent->CopyPasteHandler){
+ if($ui->is_cutable($acl_entry['dn'],"aclroles","aclRole") && $this->parent->CopyPasteHandler){
$action .= "<input class='center' type='image'
src='images/lists/cut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
}else{
$action.="<img src='images/empty.png' alt=' ' class='center'> ";
}
- if($ui->is_copyable($acl_entry['dn'],"acl","aclRole") && $this->parent->CopyPasteHandler){
+ if($ui->is_copyable($acl_entry['dn'],"aclroles","aclRole") && $this->parent->CopyPasteHandler){
$action.= "<input class='center' type='image'
src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
}else{
}
/* Add snapshot functionality */
- if(preg_match("/(c.*w|w.*c)/", $acl_all)){
- $action.= $this->GetSnapShotActions($acl_entry['dn']);
- }
+ $action.= $this->parent->get_snapshot_action($acl_entry['dn'],"aclroles");
if(preg_match("/d/", $acl)){
$action.= "<input class='center' type='image' src='images/lists/trash.png' alt='"._("delete")."'
diff --git a/gosa-core/plugins/admin/groups/class_divListGroup.inc b/gosa-core/plugins/admin/groups/class_divListGroup.inc
index d58ace3ed028541301ef58c33ce34cc079cd23cd..c3e1fb78ce788ea01e08e35d2cf2b25c52eec423 100644 (file)
$s.="..|".$img." "._("Paste")."\n";
}
- /* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ /* Add snapshot functionality */
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
src='images/lists/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot functionality */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $actions.= $this->GetSnapShotActions($val['dn']);
- }else{
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
-
+ $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
+
if(preg_match("/d/",$acl)){
$actions.= "<input class='center' type='image'
src='images/lists/trash.png' alt='"._("delete")."' name='group_del_%KEY%' title='"._("Delete this entry")."'>";
diff --git a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc
index cd60dead1a6db71b9f05340781f2e7fa3301bc68..4894f9b13491a82501a174a3ef69730251709d55 100644 (file)
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
$actions.= "<input class='center' type='image'
src='images/lists/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $actions.= $this->GetSnapShotActions($val['dn']);
- }else{
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
+ $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
if(preg_match("/d/",$acl)){
$actions.= "<input class='center' type='image'
diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc
index 3aaf8bac251c363276585dbfe8d511d5465d7c1b..9e2d725e44ee90060fa42a8e2756ca2b7ae20e5a 100644 (file)
$s.="..|".$img." "._("Paste")."\n";
}
- /* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
title='"._("Not allowed")."'>";
}
- /* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $action.= $this->GetSnapShotActions($val['dn']);
- }else{
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
+ /* Add snapshot functionality */
+ $action.= $this->parent->get_snapshot_action($val['dn'],$this->module);
/* Add remove icon, if we are allowed to remove the current user */
if(preg_match("/d/",$acl)) {
diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc
index 9f0362e4ded39b8cd453a7aa77c7f056c9bc08fb..8820af5f85d12bacde28507ba93cad5584590d99 100644 (file)
}
# /* Add snapshot icons, if we are allowed to write and create the complete fai module ($ui->has_complete_category_acls) */
-# if(preg_match("/(c.*w|w.*c)/",$acl_all)){
-# if($this->parent->snapshotEnabled()){
-# $s .= "..|---|\n";
-# $s .= $this->get_snapshot_header(TRUE);
-# }
-# }
+# $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
}
}
+# $action.= $this->parent->get_snapshot_action($val['dn'],$this->module);
+
/* Cutted objects should be displayed in light grey */
$display = $value['cn'].$desc;
if($this->parent->CopyPasteHandler){
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_divListBlocklists.inc b/gosa-plugins/gofax/gofax/blocklists/class_divListBlocklists.inc
index 54dec38895aa01b048c5f0b8bc94a45940860279..234625466a775b81a774759f88c314e9bf41dd47 100644 (file)
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
-
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
$action.= "<input class='center' type='image' src='images/lists/edit.png' alt='"._("edit")."' name='goFaxBlocklist_edit_%KEY%' title='"._("Edit user")."'>";
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $action.= $this->GetSnapShotActions($val['dn']);
- }else{
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
+ $action.= $this->parent->get_snapshot_action($val['dn'],$this->module);
/* Delete entry ; requires remove access */
if(preg_match("/d/",$acl)){
diff --git a/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc b/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc
index c50340950f239430720a4dfa0b4ed20fc23f57d5..b116eacdff0287a211a6b3e62a8b287d8472015f 100644 (file)
$s.="..|".$img." "._("Paste")."\n";
}
- /* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
alt='"._("edit")."' name='conference_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $actions.= $this->GetSnapShotActions($conference['dn']);
- }else{
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
+ $actions.= $this->parent->get_snapshot_action($conference['dn'],$this->module);
/* Create delete link - Only if we are allowed to delete this entry */
if(preg_match("/d/",$acl)){
diff --git a/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc b/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc
index 22b1f499f90d6b4b4988c7775acd1610d9f01b9b..8420ead27c6e31ac87e1e2904f99c84d7a0d4fef 100644 (file)
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
name='goFonMacro_edit_%KEY%' title='"._("Edit macro")."'>";
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $action.= $this->GetSnapShotActions($val['dn']);
- }else{
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
-
+ $action.= $this->parent->get_snapshot_action($val['dn'],$this->module);
if(preg_match("/d/",$acl)){
$action.= "<input class='center' type='image' src='images/lists/trash.png' alt='"._("delete")."'
diff --git a/gosa-plugins/goto/admin/applications/class_divListApplication.inc b/gosa-plugins/goto/admin/applications/class_divListApplication.inc
index 9a53e5f31aac5b7c4f92d3964550c431e0a7b202..de0e1263bec6d0975e88810914e30d31bb596761 100644 (file)
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
src='images/lists/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $actions.= $this->GetSnapShotActions($val['dn']);
- }else{
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
+ $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
/* If we are allowed to remove the application account, display remove icon */
if(preg_match("/d/",$acl)){
diff --git a/gosa-plugins/goto/admin/devices/class_divListDevices.inc b/gosa-plugins/goto/admin/devices/class_divListDevices.inc
index b43c492fc236f5fadb5ac88441a5b7107b2c0b8e..7c4b39e2f0767932b7937070b05114d6e5e43a78 100644 (file)
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$actions.= "<input class='center' type='image'
src='images/lists/edit.png' alt='"._("edit")."' name='device_edit_%KEY%' title='"._("Edit this entry")."'>";
-# /* Add snapshot icon */
-# if(preg_match("/(r.*w|w.*r)/",$acl_all)){
-# $actions.= $this->GetSnapShotActions($val['dn']);
-# }else{
-# $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
-# $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
-# }
+ $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
/* Add delete button */
if(preg_match("/d/",$acl)){
diff --git a/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc b/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc
index dbc60c50142c0501673e515cbe076724e23d5f80..53b9a1bd72c948c54a93af8654f6640c2075c7a3 100644 (file)
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
src='images/lists/edit.png' alt='"._("edit")."' name='mime_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $action.= $this->GetSnapShotActions($val['dn']);
- }else{
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
+ $action.= $this->parent->get_snapshot_action($val['dn'],$this->module);
/* Add delete button */
if(preg_match("/d/",$acl)){
diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc
index f16ddd90c01e71d67c0bc8308c3f29a28656b9fc..98259d9fd454a4afd0c2aa2715000ea823f2b4a9 100644 (file)
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
-
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
+
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
}
src='images/lists/edit.png' alt='".msgPool::editButton()."' name='sudo_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $actions.= $this->GetSnapShotActions($val['dn']);
- }else{
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
-
+ $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
if(preg_match("/d/",$acl)){
$actions.= "<input class='center' type='image'
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc
index e866e24eedb3997f2ea381e533f5323547c0d251..8ce2d16a508ad572febb853944bd98c46d06e4f0 100644 (file)
add_lock($this->dns,$this->ui->dn);
/* Lock the current entry, so nobody will edit it during deletion */
- $smarty->assign("info", msgPool::deleteInfo($dns_names,_("Sudo role")));
+ $smarty->assign("info", msgPool::deleteInfo($this->dns,_("Sudo role")));
return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
}
}
diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc
index b49d1bd9c29800438a10030d553cf41d7edadfa2..8f549172f8307a0d87a9d91e66053ab634b117f3 100644 (file)
$d = $ui->get_module_departments($module);
foreach($d as $department){
$departments[$department] = $department;
+
}
}
}
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$all_module_acls)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
$action.= "<input class='center' type='image' src='images/lists/edit.png'
alt='"._("edit")."' name='system_edit_%KEY%' title='"._("Edit system")."'>";
- /* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $action.= $this->GetSnapShotActions($val['dn']);
- }else{
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- $action.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
-
- if(preg_match("/d/",$acl)){
- $action.= "<input class='center' type='image' src='images/lists/trash.png'
- alt='"._("delete")."' name='system_del_%KEY%' title='"._("Delete system")."'>";
- }else{
- $action.= $empty;
- }
+ $action.= $this->parent->get_snapshot_action($val['dn'],$acl_type);
/* Generate picture list, which is currently disabled */
if(in_array("goCupsServer" ,$val['objectClass'])) $cups = $img1; else $cups =$empty;