values for depth are 0, 1, "infinit" or not set which has to be interpreted as "infinit"

This commit is contained in:
Ralf Becker 2015-09-03 06:54:06 +00:00
parent 3c84c3684a
commit 8ae381e11e

View File

@ -416,9 +416,10 @@ class groupdav extends HTTP_WebDAV_Server
$files['files'][0] = $this->add_app($app,$app=='addressbook'&&$handler->get_agent()=='kde',$user, $files['files'][0] = $this->add_app($app,$app=='addressbook'&&$handler->get_agent()=='kde',$user,
$this->_slashify($options['path'])); $this->_slashify($options['path']));
// Hack for iOS 5.0.1 addressbook to stop asking directory gateway permissions with depth=1 // Hack for iOS 5.0.1 addressbook to stop asking directory gateway permissions with depth != 0
// values for depth are 0, 1, "infinit" or not set which has to be interpreted as "infinit"
if ($method == 'PROPFIND' && $options['path'] == '/addressbook/' && if ($method == 'PROPFIND' && $options['path'] == '/addressbook/' &&
$options['depth'] > 0 && $handler->get_agent() == 'dataaccess') (!isset($options['depth']) || $options['depth']) && $handler->get_agent() == 'dataaccess')
{ {
$this->log(__CLASS__."::$method(".array2string($options).') Enabling hack for iOS 5.0.1 addressbook: force Depth: 0 on PROPFIND for directory gateway!'); $this->log(__CLASS__."::$method(".array2string($options).') Enabling hack for iOS 5.0.1 addressbook: force Depth: 0 on PROPFIND for directory gateway!');
return true; return true;