mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
"allow egw_vfs::mount() to work in setup:
- need to read fs-tab - need to load wrapper (otherwise file_exists($url) fails)"
This commit is contained in:
parent
f124b889d8
commit
88c9aca3f3
@ -280,6 +280,15 @@ class egw_vfs extends vfs_stream_wrapper
|
||||
*/
|
||||
static function mount($url=null,$path=null)
|
||||
{
|
||||
if (!isset($GLOBALS['egw_info']['server']['vfs_fstab'])) // happens eg. in setup
|
||||
{
|
||||
$api_config = config::read('phpgwapi');
|
||||
if (isset($api_config['vfs_fstab']) && is_array($api_config['vfs_fstab']))
|
||||
{
|
||||
self::$fstab = $api_config['vfs_fstab'];
|
||||
}
|
||||
unset($api_config);
|
||||
}
|
||||
if (is_null($url) || is_null($path))
|
||||
{
|
||||
if (self::LOG_LEVEL > 1) error_log(__METHOD__.'('.array2string($url).','.array2string($path).') returns '.array2string(self::$fstab));
|
||||
@ -295,6 +304,8 @@ class egw_vfs extends vfs_stream_wrapper
|
||||
if (self::LOG_LEVEL > 0) error_log(__METHOD__.'('.array2string($url).','.array2string($path).') already mounted.');
|
||||
return true; // already mounted
|
||||
}
|
||||
self::load_wrapper(parse_url($url,PHP_URL_SCHEME));
|
||||
|
||||
if (!file_exists($url) || opendir($url) === false)
|
||||
{
|
||||
if (self::LOG_LEVEL > 0) error_log(__METHOD__.'('.array2string($url).','.array2string($path).') url does NOT exist!');
|
||||
|
Loading…
Reference in New Issue
Block a user