Changeset 27887
- Timestamp:
- 04/01/2014 04:01:10 AM (11 years ago)
- Location:
- branches/3.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
-
branches/3.7/src
- Property svn:mergeinfo changed
/trunk/src merged: 26449
- Property svn:mergeinfo changed
-
branches/3.7/src/wp-includes/functions.php
r25827 r27887 1373 1373 1374 1374 // Get the permission bits. 1375 if ( $target_parent && '.' != $target_parent ) {1376 $stat = @stat( $target_parent );1375 $dir_perms = false; 1376 if ( $stat = @stat( $target_parent ) ) { 1377 1377 $dir_perms = $stat['mode'] & 0007777; 1378 1378 } else { … … 1381 1381 1382 1382 if ( @mkdir( $target, $dir_perms, true ) ) { 1383 1384 // If a umask is set that modifies $dir_perms, we'll have to re-set the $dir_perms correctly with chmod() 1385 if ( $dir_perms != ( $dir_perms & ~umask() ) ) { 1386 $folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) ); 1387 for ( $i = 1; $i <= count( $folder_parts ); $i++ ) { 1388 @chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms ); 1389 } 1390 } 1391 1383 1392 return true; 1384 1393 }
Note: See TracChangeset
for help on using the changeset viewer.