Changeset 26449 for trunk/src/wp-includes/functions.php
- Timestamp:
- 11/28/2013 02:19:24 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r26299 r26449 1384 1384 1385 1385 // Get the permission bits. 1386 if ( $target_parent && '.' != $target_parent ) {1387 $stat = @stat( $target_parent );1386 $dir_perms = false; 1387 if ( $stat = @stat( $target_parent ) ) { 1388 1388 $dir_perms = $stat['mode'] & 0007777; 1389 1389 } else { … … 1392 1392 1393 1393 if ( @mkdir( $target, $dir_perms, true ) ) { 1394 1395 // If a umask is set that modifies $dir_perms, we'll have to re-set the $dir_perms correctly with chmod() 1396 if ( $dir_perms != $dir_perms & ~umask() ) { 1397 $folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) ); 1398 for ( $i = 1; $i <= count( $folder_parts ); $i++ ) { 1399 @chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms ); 1400 } 1401 } 1402 1394 1403 return true; 1395 1404 }
Note: See TracChangeset
for help on using the changeset viewer.