wpfs direct fixes from DD32. see #5586
git-svn-id: https://develop.svn.wordpress.org/trunk@7415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e6c6a44a6c
commit
ea391d08e9
|
@ -8,7 +8,7 @@ class WP_Filesystem_Direct{
|
||||||
$this->permission = umask();
|
$this->permission = umask();
|
||||||
}
|
}
|
||||||
function connect(){
|
function connect(){
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
function setDefaultPermissions($perm){
|
function setDefaultPermissions($perm){
|
||||||
$this->permission = $perm;
|
$this->permission = $perm;
|
||||||
|
@ -17,7 +17,7 @@ class WP_Filesystem_Direct{
|
||||||
return str_replace('\\','/',ABSPATH);
|
return str_replace('\\','/',ABSPATH);
|
||||||
}
|
}
|
||||||
function get_base_dir($base = '.', $echo = false){
|
function get_base_dir($base = '.', $echo = false){
|
||||||
return find_base_dir($base, $echo);
|
return $this->find_base_dir($base, $echo);
|
||||||
}
|
}
|
||||||
function get_contents($file){
|
function get_contents($file){
|
||||||
return @file_get_contents($file);
|
return @file_get_contents($file);
|
||||||
|
|
|
@ -10,7 +10,7 @@ function request_filesystem_credentials($form_post, $type = '', $error = false)
|
||||||
$type = get_filesystem_method();
|
$type = get_filesystem_method();
|
||||||
|
|
||||||
if ( 'direct' == $type )
|
if ( 'direct' == $type )
|
||||||
return array();
|
return true;
|
||||||
|
|
||||||
if( ! $credentials = get_option('ftp_credentials') )
|
if( ! $credentials = get_option('ftp_credentials') )
|
||||||
$credentials = array();
|
$credentials = array();
|
||||||
|
|
Loading…
Reference in New Issue