Changeset 3388
- Timestamp:
- 01/02/06 02:50:59 (3 years ago)
- Files:
-
- trunk/wp-includes/cache.php (modified) (4 diffs)
- trunk/wp-includes/functions-post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/cache.php
r3386 r3388 206 206 207 207 if (!file_exists($this->cache_dir.$make_dir."index.php")) { 208 $file_perms = $perms & 0000666; 208 209 @ touch($this->cache_dir.$make_dir."index.php"); 210 @ chmod($this->cache_dir.$make_dir."index.php", $file_perms); 209 211 } 210 212 } … … 269 271 // Give the new dirs the same perms as wp-content. 270 272 $stat = stat(ABSPATH.'wp-content'); 271 $dir_perms = $stat['mode'] & 0000777; // Get the permission bits. 273 $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. 274 $file_perms = $dir_perms & 0000666; // Remove execute bits for files. 272 275 273 276 // Make the base cache dir. … … 280 283 if (!file_exists($this->cache_dir."index.php")) { 281 284 @ touch($this->cache_dir."index.php"); 285 @ chmod($this->cache_dir."index.php", $file_perms); 282 286 } 283 287 … … 315 319 } 316 320 } 321 @ chmod($cache_file, $file_perms); 317 322 } 318 323 } trunk/wp-includes/functions-post.php
r3386 r3388 863 863 // Give the new dirs the same perms as wp-content. 864 864 $stat = stat(ABSPATH . 'wp-content'); 865 $dir_perms = $stat['mode'] & 000 0777; // Get the permission bits.865 $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. 866 866 867 867 // Make sure we have an uploads dir … … 930 930 // Set correct file permissions 931 931 $stat = @ stat(dirname($new_file)); 932 $perms = $stat['mode'] & 0000777; 932 $perms = $stat['mode'] & 0007777; 933 $perms = $perms & 0000666; 933 934 @ chmod($new_file, $perms); 934 935
