From: hickert Date: Mon, 6 Feb 2006 12:13:52 +0000 (+0000) Subject: Added serial number mangement X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8652ae1c5e1199f9b845d1a851add51d108ca875;p=gosa.git Added serial number mangement git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2626 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc index 766344ea8..1216c1c41 100644 --- a/plugins/admin/systems/class_servDNSeditZone.inc +++ b/plugins/admin/systems/class_servDNSeditZone.inc @@ -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"; + } } } diff --git a/plugins/admin/systems/servdnseditzone.tpl b/plugins/admin/systems/servdnseditzone.tpl index 9f7d5f120..1157fbfbb 100644 --- a/plugins/admin/systems/servdnseditzone.tpl +++ b/plugins/admin/systems/servdnseditzone.tpl @@ -42,7 +42,7 @@ - {t}Serialnumber (automatically generated){/t} + {t}Serial number (automatically incremented){/t}