Changeset 31090 for trunk/src/wp-includes/functions.php
- Timestamp:
- 01/08/2015 07:04:40 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r31086 r31090 1438 1438 if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) 1439 1439 $ref = wp_unslash( $_REQUEST['_wp_http_referer'] ); 1440 else if ( ! empty( $_SERVER['HTTP_REFERER'] ) )1440 elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) ) 1441 1441 $ref = wp_unslash( $_SERVER['HTTP_REFERER'] ); 1442 1442 … … 1671 1671 function win_is_writable( $path ) { 1672 1672 1673 if ( $path[strlen( $path ) - 1] == '/' ) // if it looks like a directory, check a random file within the directory1673 if ( $path[strlen( $path ) - 1] == '/' ) { // if it looks like a directory, check a random file within the directory 1674 1674 return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp'); 1675 else if ( is_dir( $path ) )// If it's a directory (and not a file) check a random file within the directory1675 } elseif ( is_dir( $path ) ) { // If it's a directory (and not a file) check a random file within the directory 1676 1676 return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' ); 1677 1677 } 1678 1678 // check tmp file for read/write capabilities 1679 1679 $should_delete_tmp_file = !file_exists( $path );
Note: See TracChangeset
for help on using the changeset viewer.