"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/dav/fs/Directory.php" between
groupoffice-6.3.62-php-71.tar.gz and groupoffice-6.3.63-php-71.tar.gz

About: GroupOffice is a web-based office suit: Calendar, CRM, E-mail, File sharing, Projects, Synchronization (6.3 series for PHP 7.1; community version).

Directory.php  (groupoffice-6.3.62-php-71):Directory.php  (groupoffice-6.3.63-php-71)
skipping to change at line 28 skipping to change at line 28
class Directory extends \Sabre\DAV\FS\Directory{ class Directory extends \Sabre\DAV\FS\Directory{
protected $_folder; protected $_folder;
protected $relpath; protected $relpath;
public function __construct($path) { public function __construct($path) {
$path = rtrim($path, '/'); $path = rtrim($path, '/');
$this->relpath = \Normalizer::normalize($path, \Normalizer::FORM_ D); $this->relpath = \go\core\util\StringUtil::normalize($path);
$path = \GO::config()->file_storage_path . $this->relpath; $path = \GO::config()->file_storage_path . $this->relpath;
// if(!$this->_getFolder()->checkPermissionLevel(\GO \Base\Model\Acl::READ_PERMISSION)){ // if(!$this->_getFolder()->checkPermissionLevel(\GO \Base\Model\Acl::READ_PERMISSION)){
// \GO::debug("DAV: User ".\GO::user()->username." doesn't h ave write permission for ".$this->relpath); // \GO::debug("DAV: User ".\GO::user()->username." doesn't h ave write permission for ".$this->relpath);
// throw new Sabre\DAV\Exception\Forbidden ("DAV: User ".\GO ::user()->username." doesn't have write permission for folder '".$this->relpath. '"'); // throw new Sabre\DAV\Exception\Forbidden ("DAV: User ".\GO ::user()->username." doesn't have write permission for folder '".$this->relpath. '"');
// } // }
parent::__construct($path); parent::__construct($path);
} }
/** /**
skipping to change at line 177 skipping to change at line 177
/** /**
* Returns a specific child node, referenced by its name * Returns a specific child node, referenced by its name
* *
* @param StringHelper $name * @param StringHelper $name
* @throws Sabre\DAV\Exception\NotFound * @throws Sabre\DAV\Exception\NotFound
* @return Sabre\DAV\INode * @return Sabre\DAV\INode
*/ */
public function getChild($name) { public function getChild($name) {
$path = $this->path . '/' . \Normalizer::normalize($name, \Normal izer::FORM_D);; $path = $this->path . '/' . \go\core\util\StringUtil::normalize( $name);
\GO::debug("FSD:getChild($path)"); \GO::debug("FSD:getChild($path)");
if (is_dir($path)) { if (is_dir($path)) {
return new Directory($this->relpath . '/' . $name); return new Directory($this->relpath . '/' . $name);
} else if (file_exists($path)) { } else if (file_exists($path)) {
return new File($this->relpath . '/' . $name); return new File($this->relpath . '/' . $name);
} else { } else {
throw new Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located'); throw new Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)