Changeset 7058
- Timestamp:
- 02/27/2008 12:47:15 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r7055 r7058 41 41 42 42 return $real_file; 43 } 44 45 function get_temp_dir() { 46 if ( defined('WP_TEMP_DIR') ) 47 return trailingslashit(WP_TEMP_DIR); 48 49 $temp = ABSPATH . 'wp-content/'; 50 if ( is_dir($temp) && is_writable($temp) ) 51 return $temp; 52 53 if ( function_exists('sys_get_temp_dir') ) 54 return trailingslashit(sys_get_temp_dir()); 55 56 return '/tmp/'; 43 57 } 44 58 … … 183 197 return false; 184 198 185 $tmpfname = tempnam( '/tmp', 'wpupdate');199 $tmpfname = tempnam(get_temp_dir(), 'wpupdate'); 186 200 if( ! $tmpfname ) 187 201 return false; … … 289 303 290 304 function get_filesystem_method() { 291 $tempFile = tempnam( '/tmp', 'WPU');305 $tempFile = tempnam(get_temp_dir(), 'WPU'); 292 306 293 307 if ( getmyuid() == fileowner($tempFile) ) {
Note: See TracChangeset
for help on using the changeset viewer.