Code

Added serial number mangement
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Feb 2006 12:13:52 +0000 (12:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Feb 2006 12:13:52 +0000 (12:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2626 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDNSeditZone.inc
plugins/admin/systems/servdnseditzone.tpl

index 766344ea88f5feebc94c7d13638d6e257c2cfe52..1216c1c41a91a00954d411360ad88e5e70c721d9 100644 (file)
@@ -47,6 +47,7 @@ class servdnseditZone extends plugin
       $this->InitiallyZoneName      = "";
       $this->InitiallyReverseZone   = "";
       $this->isNew                  = true;
+      $this->sOAserial = date("Ymd")."1";
     }else{
       $this->InitiallyZoneName      = $attrs['zoneName'];
       $this->InitiallyReverseZone   = $attrs['ReverseZone'];
@@ -60,6 +61,12 @@ class servdnseditZone extends plugin
       }else{
         $this->Records = array();
       }
+      $str = date("Ymd");
+      if(preg_match("/^".$str."/",$this->sOAserial)){
+        $this->sOAserial = $this->sOAserial + 1;
+      }else{
+        $this->sOAserial = date("Ymd")."01";
+      }
     }
   }
 
index 9f7d5f120d33243c7c7125acd7e8aae86379624d..1157fbfbbc90c0664d0662fc18f3e2b4fdc84464 100644 (file)
@@ -42,7 +42,7 @@
                                        </td>
                                </tr>
                                <tr>
-                                       <td>{t}Serialnumber (automatically generated){/t}
+                                       <td>{t}Serial number (automatically incremented){/t}
                                        </td>
                                        <td><input type="text" name="sOAserial" value="{$sOAserial}">
                                        </td>