From 16d718554868fb5536acc0615cb07d2902ce366c Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 20 Dec 2011 15:48:36 +0000 Subject: [PATCH] fix bug with undefined ino value for link_stream_wrapper::url_stat in case of accessing virtual VCard entry --- phpgwapi/inc/class.links_stream_wrapper.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.links_stream_wrapper.inc.php b/phpgwapi/inc/class.links_stream_wrapper.inc.php index d5c805efd6..ae6e8cd3a8 100644 --- a/phpgwapi/inc/class.links_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.links_stream_wrapper.inc.php @@ -130,11 +130,11 @@ class links_stream_wrapper extends links_stream_wrapper_parent static function url_stat ( $url, $flags ) { $eacl_check=self::check_extended_acl($url,egw_vfs::READABLE); - if ($eacl_check && substr($url,-7) == '/.entry' && + if ( $eacl_check && substr($url,-7) == '/.entry' && (list($app) = array_slice(explode('/',$url),-3,1)) && $app === 'addressbook') { $ret = array( - 'ino' => $info['fs_id'], + 'ino' => md5($url), 'name' => '.entry', 'mode' => self::MODE_FILE|egw_vfs::READABLE, // required by the stream wrapper 'size' => 1024, // fmail does NOT attach files with size 0! @@ -244,7 +244,6 @@ class links_stream_wrapper extends links_stream_wrapper_parent // the following call is necessary to fill sqlfs_stream_wrapper::$stat_cache, WITH the extendes ACL! $stat = self::url_stat($url,0); //error_log(__METHOD__."('$url', '$mode', $options) stat=".array2string($stat)); - if ($stat && $mode[0] == 'r' && substr($url,-7) === '/.entry') { list($id) = array_slice(explode('/',$url),-2,1);