Code

Fixed empty restore
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Jun 2006 07:26:23 +0000 (07:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Jun 2006 07:26:23 +0000 (07:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3792 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_divListSystem.inc
plugins/admin/systems/snapshotdialog.tpl

index d926756144f1d6637dd1f6b027070efa8e0d4971..fd43f1cb3b1d6fef00148c0c8d67208c468c99ec 100644 (file)
@@ -279,9 +279,12 @@ class divListSystem extends MultiSelectWindow
 
     /* Restore is requested, restore the object with the posted dn .*/ 
     if((isset($_POST['RestoreSnapshot'])) && (isset($_POST['SnapShot']))){
-      $entry = base64_decode($_POST['SnapShot']);
-      $this->parent->restore_snapshot($entry);
-      $this->parent->systab = NULL;
+      $entry =trim($_POST['SnapShot']);
+      if(!empty($entry)){    
+        $entry = base64_decode($entry);
+        $this->parent->restore_snapshot($entry);
+        $this->parent->systab = NULL;
+      }
     }
   }
 }
index d81c535187cfdb42b929d23cf6108f14f5100510..3495d77cb99d0f3a54cbb71e4a5ad22b5abd7660 100755 (executable)
@@ -21,7 +21,7 @@
        <tr>
                <td>
                        <select name="SnapShot">
-                               <option value="&nbsp;">&nbsp;</option>
+                               <option value="">&nbsp;</option>
                                {html_options options=$SnapShots}
                        </select>
                </td>