mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-30 20:51:22 +00:00 
			
		
		
		
	add docs for hasExpired(), doc expires with the first second of the next
This commit is contained in:
		
							parent
							
								
									f737b20830
								
							
						
					
					
						commit
						a4b84f5558
					
				|  | @ -790,11 +790,16 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ | |||
| 	/** | ||||
| 	 * Check if the document has expired | ||||
| 	 * | ||||
| 	 * The method expects to database field 'expired' to hold the timestamp | ||||
| 	 * of the start of day at which end the document expires. The document will | ||||
| 	 * expire if that day is over. Hence, a document will *not*  | ||||
| 	 * be expired during the day of expiration but at the end of that day | ||||
| 	 * | ||||
| 	 * @return boolean true if document has expired otherwise false | ||||
| 	 */ | ||||
| 	function hasExpired() { /* {{{ */ | ||||
| 		if (intval($this->_expires) == 0) return false; | ||||
| 		if (time()>$this->_expires+24*60*60) return true; | ||||
| 		if (time()>=$this->_expires+24*60*60) return true; | ||||
| 		return false; | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann