clearstatcache() after writing files. Props momo360modena. fixes #13683
git-svn-id: https://develop.svn.wordpress.org/trunk@15106 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
88f326d1c8
commit
a5dbd0e164
@ -1285,6 +1285,7 @@ function wp_get_http( $url, $file_path = false, $red = 1 ) {
|
|||||||
|
|
||||||
fwrite( $out_fp, $response['body']);
|
fwrite( $out_fp, $response['body']);
|
||||||
fclose($out_fp);
|
fclose($out_fp);
|
||||||
|
clearstatcache();
|
||||||
|
|
||||||
return $headers;
|
return $headers;
|
||||||
}
|
}
|
||||||
@ -2304,11 +2305,14 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
|
|||||||
|
|
||||||
@fwrite( $ifp, $bits );
|
@fwrite( $ifp, $bits );
|
||||||
fclose( $ifp );
|
fclose( $ifp );
|
||||||
|
clearstatcache();
|
||||||
|
|
||||||
// Set correct file permissions
|
// Set correct file permissions
|
||||||
$stat = @ stat( dirname( $new_file ) );
|
$stat = @ stat( dirname( $new_file ) );
|
||||||
$perms = $stat['mode'] & 0007777;
|
$perms = $stat['mode'] & 0007777;
|
||||||
$perms = $perms & 0000666;
|
$perms = $perms & 0000666;
|
||||||
@ chmod( $new_file, $perms );
|
@ chmod( $new_file, $perms );
|
||||||
|
clearstatcache();
|
||||||
|
|
||||||
// Compute the URL
|
// Compute the URL
|
||||||
$url = $upload['url'] . "/$filename";
|
$url = $upload['url'] . "/$filename";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user