mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	add method addDirSep()
This commit is contained in:
		
							parent
							
								
									9a228017c1
								
							
						
					
					
						commit
						b520bfece0
					
				|  | @ -40,7 +40,7 @@ function getLongReadableDate($timestamp) { | |||
|  * @param $date string date in form Y-m-d H:i:s | ||||
|  * @return integer/boolean unix timestamp or false in case of an error | ||||
|  */ | ||||
| function makeTsFromLongDate($date) { /* }}} */ | ||||
| function makeTsFromLongDate($date) { /* {{{ */ | ||||
| 	$tmp = explode(' ', $date); | ||||
| 	if(count($tmp) != 2) | ||||
| 		return false; | ||||
|  | @ -544,4 +544,17 @@ function get_extension($mimetype) { /* {{{ */ | |||
| 		default: return false; | ||||
| 	} | ||||
| } /* }}} */ | ||||
| 
 | ||||
| /** | ||||
|  * Adds a missing front slash to a string | ||||
|  * | ||||
|  * This function is used for making sure a directory name has a | ||||
|  * trailing directory separator | ||||
|  */ | ||||
| function addDirSep($str) { /* {{{ */ | ||||
| 	if(substr($str, -1, 1) != DIRECTORY_SEPARATOR) | ||||
| 		return $str.DIRECTORY_SEPARATOR; | ||||
| 	else | ||||
| 		return $str; | ||||
| } /* }}} */ | ||||
| ?>
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann