Ticket #9936: 9936.3.diff
| File 9936.3.diff, 875 bytes (added by , 16 years ago) |
|---|
-
wp-admin/includes/file.php
631 631 if( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){ 632 632 $temp_file_name = ABSPATH . '.' . time(); 633 633 $temp_handle = @fopen($temp_file_name, 'w'); 634 if ( $temp_handle && getmyuid() == fileowner($temp_file_name) ) 635 $method = 'direct'; 636 @fclose($temp_handle); 637 unlink($temp_file_name); 634 if ( $temp_handle ) 635 if ( getmyuid() == fileowner($temp_file_name) ) 636 $method = 'direct'; 637 @fclose($temp_handle); 638 unlink($temp_file_name); 639 } 638 640 } 639 641 640 642 if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && extension_loaded('sockets') ) $method = 'ssh2';