mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1437,7 +1437,7 @@ function wp_get_referer() {
|
||||
$ref = false;
|
||||
if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
|
||||
$ref = wp_unslash( $_REQUEST['_wp_http_referer'] );
|
||||
else if ( ! empty( $_SERVER['HTTP_REFERER'] ) )
|
||||
elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) )
|
||||
$ref = wp_unslash( $_SERVER['HTTP_REFERER'] );
|
||||
|
||||
if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ) )
|
||||
@@ -1670,11 +1670,11 @@ function wp_is_writable( $path ) {
|
||||
*/
|
||||
function win_is_writable( $path ) {
|
||||
|
||||
if ( $path[strlen( $path ) - 1] == '/' ) // if it looks like a directory, check a random file within the directory
|
||||
if ( $path[strlen( $path ) - 1] == '/' ) { // if it looks like a directory, check a random file within the directory
|
||||
return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
|
||||
else if ( is_dir( $path ) ) // If it's a directory (and not a file) check a random file within the directory
|
||||
} elseif ( is_dir( $path ) ) { // If it's a directory (and not a file) check a random file within the directory
|
||||
return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
|
||||
|
||||
}
|
||||
// check tmp file for read/write capabilities
|
||||
$should_delete_tmp_file = !file_exists( $path );
|
||||
$f = @fopen( $path, 'a' );
|
||||
|
||||
Reference in New Issue
Block a user