mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
"added stream_stat required to use file_get_contents"
This commit is contained in:
parent
b3f5fc282b
commit
af19f3663e
@ -25,10 +25,11 @@ class global_stream_wrapper
|
||||
{
|
||||
private $pos;
|
||||
private $stream;
|
||||
private $name;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
$this->stream = &$GLOBALS[parse_url($path,PHP_URL_HOST)];
|
||||
$this->stream = &$GLOBALS[$this->name=parse_url($path,PHP_URL_HOST)];
|
||||
$this->pos = 0;
|
||||
if (!is_string($this->stream)) return false;
|
||||
return true;
|
||||
@ -77,6 +78,25 @@ class global_stream_wrapper
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
if (!isset($this->stream))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return array(
|
||||
'ino' => md5($this->name),
|
||||
'name' => $this->name,
|
||||
'mode' => 0100000,
|
||||
'size' => bytes($this->stream),
|
||||
'uid' => 0,
|
||||
'gid' => 0,
|
||||
'mtime' => 0,
|
||||
'ctime' => 0,
|
||||
'nlink' => 1,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* are the string functions overloaded by their mbstring variants
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user