show infinity symbol for too big values
This commit is contained in:
		
							parent
							
								
									0235a8f940
								
							
						
					
					
						commit
						37f76431ee
					
				|  | @ -920,8 +920,13 @@ class sambaSamAccount extends baseModule { | ||||||
| 	 | 	 | ||||||
| 				$dateValue = "     -      "; | 				$dateValue = "     -      "; | ||||||
| 				if (isset($this->attributes['sambaPwdCanChange'][0])) { | 				if (isset($this->attributes['sambaPwdCanChange'][0])) { | ||||||
| 					$date = getdate($this->attributes['sambaPwdCanChange'][0]); | 					if ($this->attributes['sambaPwdCanChange'][0] > 2147483648) { | ||||||
| 					$dateValue = $date['mday'] . "." . $date['mon'] . "." . $date['year']; | 						$dateValue = "     ∞      "; | ||||||
|  | 					} | ||||||
|  | 					else { | ||||||
|  | 						$date = getdate($this->attributes['sambaPwdCanChange'][0]); | ||||||
|  | 						$dateValue = $date['mday'] . "." . $date['mon'] . "." . $date['year']; | ||||||
|  | 					} | ||||||
| 				} | 				} | ||||||
| 				$return[] = array( | 				$return[] = array( | ||||||
| 					array('kind' => 'text', 'text' => _('User can change password')), | 					array('kind' => 'text', 'text' => _('User can change password')), | ||||||
|  | @ -932,8 +937,13 @@ class sambaSamAccount extends baseModule { | ||||||
| 					array('kind' => 'help', 'value' => 'pwdCanChange' )); | 					array('kind' => 'help', 'value' => 'pwdCanChange' )); | ||||||
| 				$dateValue = "     -      "; | 				$dateValue = "     -      "; | ||||||
| 				if (isset($this->attributes['sambaPwdMustChange'][0])) { | 				if (isset($this->attributes['sambaPwdMustChange'][0])) { | ||||||
| 					$date = getdate($this->attributes['sambaPwdMustChange'][0]); | 					if ($this->attributes['sambaPwdMustChange'][0] > 2147483648) { | ||||||
| 					$dateValue = $date['mday'] . "." . $date['mon'] . "." . $date['year']; | 						$dateValue = "     ∞      "; | ||||||
|  | 					} | ||||||
|  | 					else { | ||||||
|  | 						$date = getdate($this->attributes['sambaPwdMustChange'][0]); | ||||||
|  | 						$dateValue = $date['mday'] . "." . $date['mon'] . "." . $date['year']; | ||||||
|  | 					} | ||||||
| 				} | 				} | ||||||
| 				$return[] = array( | 				$return[] = array( | ||||||
| 					array('kind' => 'text', 'text' => _('User must change password')), | 					array('kind' => 'text', 'text' => _('User must change password')), | ||||||
|  | @ -944,8 +954,13 @@ class sambaSamAccount extends baseModule { | ||||||
| 					array('kind' => 'help', 'value' => 'pwdMustChange' )); | 					array('kind' => 'help', 'value' => 'pwdMustChange' )); | ||||||
| 				$dateValue = "     -      "; | 				$dateValue = "     -      "; | ||||||
| 				if (isset($this->attributes['sambaKickoffTime'][0])) { | 				if (isset($this->attributes['sambaKickoffTime'][0])) { | ||||||
| 					$date = getdate($this->attributes['sambaKickoffTime'][0]); | 					if ($this->attributes['sambaKickoffTime'][0] > 2147483648) { | ||||||
| 					$dateValue = $date['mday'] . "." . $date['mon'] . "." . $date['year']; | 						$dateValue = "     ∞      "; | ||||||
|  | 					} | ||||||
|  | 					else { | ||||||
|  | 						$date = getdate($this->attributes['sambaKickoffTime'][0]); | ||||||
|  | 						$dateValue = $date['mday'] . "." . $date['mon'] . "." . $date['year']; | ||||||
|  | 					} | ||||||
| 				} | 				} | ||||||
| 				$return[] = array( | 				$return[] = array( | ||||||
| 					array('kind' => 'text', 'text' => _('Account expiration date')), | 					array('kind' => 'text', 'text' => _('Account expiration date')), | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue