clearstatcache() after writing files. Props momo360modena. fixes #13683

git-svn-id: http://svn.automattic.com/wordpress/trunk@15106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-06-02 14:01:21 +00:00
parent 0dd1323350
commit 2c07470d40
1 changed files with 4 additions and 0 deletions

View File

@ -1285,6 +1285,7 @@ function wp_get_http( $url, $file_path = false, $red = 1 ) {
fwrite( $out_fp, $response['body']);
fclose($out_fp);
clearstatcache();
return $headers;
}
@ -2304,11 +2305,14 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
@fwrite( $ifp, $bits );
fclose( $ifp );
clearstatcache();
// Set correct file permissions
$stat = @ stat( dirname( $new_file ) );
$perms = $stat['mode'] & 0007777;
$perms = $perms & 0000666;
@ chmod( $new_file, $perms );
clearstatcache();
// Compute the URL
$url = $upload['url'] . "/$filename";