Changeset 2967 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 10/28/2005 01:12:54 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r2958 r2967 1506 1506 1507 1507 $path = ABSPATH . $dir; 1508 1509 // Give the new dirs the same perms as wp-content. 1510 $stat = stat(ABSPATH . 'wp-content'); 1511 $dir_perms = $stat['mode'] & 0000777; // Get the permission bits. 1508 1512 1509 1513 // Make sure we have an uploads dir … … 1511 1515 if ( ! mkdir( $path ) ) 1512 1516 return array('error' => "Unable to create directory $path. Is its parent directory writable by the server?"); 1513 @ chmod( ABSPATH . $path, 0774);1517 @ chmod( $path, $dir_perms ); 1514 1518 } 1515 1519 … … 1525 1529 if ( ! mkdir( $pathy ) ) 1526 1530 return array('error' => "Unable to create directory $pathy. Is $path writable?"); 1527 @ chmod( $pathy, 0774);1531 @ chmod( $pathy, $dir_perms ); 1528 1532 } 1529 1533 … … 1532 1536 if ( ! mkdir( $pathym ) ) 1533 1537 return array('error' => "Unable to create directory $pathym. Is $pathy writable?"); 1534 @ chmod( $pathym, 0774);1538 @ chmod( $pathym, $dir_perms ); 1535 1539 } 1536 1540
Note: See TracChangeset
for help on using the changeset viewer.