Code

Closes #251
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 12 Nov 2007 07:39:31 +0000 (07:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 12 Nov 2007 07:39:31 +0000 (07:39 +0000)
Used php5 function in stable

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7763 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDNSeditZone.inc

index c06b42ce8f767393fd8770f4430ca1350d727afd..0b9850e0bd423e70d58527e06c7c8faa9f989e81 100644 (file)
@@ -223,7 +223,7 @@ class servdnseditZone extends plugin
 
     /* Save Zone Entry Edit Dialog
      */
-    if(isset($_POST['SaveZoneEntryChanges'])){
+    if(isset($_POST['SaveZoneEntryChanges']) && is_object($this->dialog)){
       $this->dialog->save_object();
       if(count($this->dialog->check())){
         $msgs = $this->dialog->check();
@@ -231,7 +231,11 @@ class servdnseditZone extends plugin
           print_red($msg);
         }
       }else{
-        $this->zoneEditor = clone $this->dialog;
+        if (version_compare(phpversion(), '5.0') < 0) {
+          $this->zoneEditor = $this->dialog;
+        }else{
+          $this->zoneEditor = clone($this->dialog);
+        }
         $this->dialog = FALSE;
 #       $rev = FlipIp(getNameFromMix($this->InitialReverseZone)).".in-addr.arpa";
 #       $for = getNameFromMix($this->InitialzoneName);