From: hickert Date: Thu, 15 Sep 2005 06:31:41 +0000 (+0000) Subject: Added default index to edoit_finish X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=99dd9b32f5d3d2eaebf909053834eae7c1a56cc8;p=gosa.git Added default index to edoit_finish Fixed date of birth to allow a value below 1971 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1363 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 254b50601..9f216a957 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -185,7 +185,8 @@ class user extends plugin if (isset ($this->attrs['dateOfBirth'])){ /* This entry is ISO 8601 conform */ list($year, $month, $day)= split("-", $this->attrs['dateOfBirth'][0], 3); - $this->dob= mktime ( 0, 0, 0, $month, $day, $year); + + $this->dob=array( 'mon'=> $month,"mday"=> $day,"year"=> $year); $this->use_dob= "1"; } else { $this->use_dob= "0"; @@ -207,7 +208,11 @@ class user extends plugin if ($this->dob == "0"){ $date= getdate(); } else { - $date= getdate($this->dob); + if(is_array($this->dob)){ + $date = $this->dob; + }else{ + $date = getdate($this->dob); + } } $days= array(); @@ -215,7 +220,16 @@ class user extends plugin $days[$d]= $d; } $years= array(); - for($y= $date['year']-100; $y<=$date['year']+100; $y++){ + + if(($date['year']-100)<1901){ + $start = 1901; + }else{ + $start = $date['year']-100; + } + + $end = $start +100; + + for($y= $start; $y<=$end; $y++){ $years[]= $y; } $years['-']= "- "; diff --git a/plugins/personal/generic/main.inc b/plugins/personal/generic/main.inc index f3826f4d3..037274a9c 100644 --- a/plugins/personal/generic/main.inc +++ b/plugins/personal/generic/main.inc @@ -158,6 +158,13 @@ if (!$remove_lock){ $display.= "\n"; $display.= " "; $display.= "\n"; + $display.=""; + $info= "\"\" ".$ui->dn." "; } else {