Code

Fixed daemon data indexing
[gosa.git] / gosa-core / include / class_plugin.inc
index 1c7b2d87c7bd560171623c0e13a58d592e008047..f983a9d240397e2824cf60b5d2defcbb8b2d8738 100644 (file)
@@ -1979,18 +1979,23 @@ class plugin
   {
     $str= ""; 
     $ui = get_userinfo();
-    if($this->snapshotEnabled() && $ui->allow_snapshot_create($base,$category)){
+    if($this->snapshotEnabled()){
+      if ($ui->allow_snapshot_restore($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")."'>&nbsp;";
-      } else {
-        $str = "<img class='center' src='images/lists/restore_grey.png' alt=''>&nbsp;";
+        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")."'>&nbsp;";
+        } else {
+          $str = "<img class='center' src='images/lists/restore_grey.png' alt=''>&nbsp;";
+        }
+      }
+      if($ui->allow_snapshot_create($base,$category)){
+        $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")."'>&nbsp;";
+      }else{
+        $str = "<img class='center' src='images/empty.png' alt=' '>&nbsp;";
       }
-
-      $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")."'>&nbsp;";
     }
 
     return($str);