Skip to content

Commit

Permalink
[jan] Update to SabreDAV 1.8.7/VObject 2.1.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh authored and mrubinsk committed Nov 14, 2013
1 parent 5b4e7f3 commit 52a41c8
Show file tree
Hide file tree
Showing 20 changed files with 160 additions and 112 deletions.
26 changes: 13 additions & 13 deletions framework/Dav/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions framework/Dav/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</stability>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
*
* [jan] Update to SabreDAV 1.8.7/VObject 2.1.3.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -707,7 +707,7 @@
<date>2013-07-17</date>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
*
* [jan] Update to SabreDAV 1.8.7/VObject 2.1.3.
</notes>
</release>
</changelog>
Expand Down
2 changes: 1 addition & 1 deletion framework/Dav/vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

// autoload_classmap.php generated by Composer
// autoload_classmap.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
Expand Down
2 changes: 1 addition & 1 deletion framework/Dav/vendor/composer/autoload_namespaces.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

// autoload_namespaces.php generated by Composer
// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
Expand Down
8 changes: 4 additions & 4 deletions framework/Dav/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

// autoload_real.php generated by Composer
// autoload_real.php @generated by Composer

class ComposerAutoloaderInitd46d71ebdab2d826974b2125804241e5
class ComposerAutoloaderInit76d09d0419999b38f3d67ba445f0687c
{
private static $loader;

Expand All @@ -19,9 +19,9 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInitd46d71ebdab2d826974b2125804241e5', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit76d09d0419999b38f3d67ba445f0687c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitd46d71ebdab2d826974b2125804241e5', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit76d09d0419999b38f3d67ba445f0687c', 'loadClassLoader'));

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
Expand Down
30 changes: 15 additions & 15 deletions framework/Dav/vendor/composer/installed.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[
{
"name": "sabre/vobject",
"version": "2.1.0",
"version_normalized": "2.1.0.0",
"version": "2.1.3",
"version_normalized": "2.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-vobject.git",
"reference": "2.1.0"
"reference": "e46d6855cfef23318e7c422cd08d36e344624675"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/2.1.0",
"reference": "2.1.0",
"url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/e46d6855cfef23318e7c422cd08d36e344624675",
"reference": "e46d6855cfef23318e7c422cd08d36e344624675",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.3.1"
},
"time": "2013-06-17 22:25:42",
"time": "2013-10-02 15:57:01",
"bin": [
"bin/vobjectvalidate.php"
],
Expand All @@ -37,7 +37,7 @@
{
"name": "Evert Pot",
"email": "evert@rooftopsolutions.nl",
"homepage": "http://evertpot.com/",
"homepage": "http://www.rooftopsolutions.nl/",
"role": "Developer"
}
],
Expand All @@ -51,17 +51,17 @@
},
{
"name": "sabre/dav",
"version": "1.8.6",
"version_normalized": "1.8.6.0",
"version": "1.8.7",
"version_normalized": "1.8.7.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-dav.git",
"reference": "1.8.6"
"reference": "41c750da3c60a427cdd847df090ef0fc7e8f1076"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-dav/zipball/1.8.6",
"reference": "1.8.6",
"url": "https://api.github.com/repos/fruux/sabre-dav/zipball/41c750da3c60a427cdd847df090ef0fc7e8f1076",
"reference": "41c750da3c60a427cdd847df090ef0fc7e8f1076",
"shasum": ""
},
"require": {
Expand All @@ -75,13 +75,13 @@
"ext-simplexml": "*",
"ext-spl": "*",
"php": ">=5.3.1",
"sabre/vobject": ">=2.1,<2.2"
"sabre/vobject": "~2.1.0"
},
"provide": {
"evert/sabredav": "1.7.*"
},
"require-dev": {
"evert/phpdoc-md": ">=0.0.7,<0.1",
"evert/phpdoc-md": "~0.0.7",
"phing/phing": "2.4.14",
"phpunit/phpunit": "3.7.*"
},
Expand All @@ -90,7 +90,7 @@
"ext-curl": "*",
"ext-pdo": "*"
},
"time": "2013-06-17 23:12:05",
"time": "2013-10-02 18:38:26",
"bin": [
"bin/sabredav"
],
Expand Down
2 changes: 1 addition & 1 deletion framework/Dav/vendor/sabre/dav/lib/Sabre/CalDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function beforeGetProperties($path, DAV\INode $node, &$requestedPropertie
if (in_array($calProp,$requestedProperties)) {

$addresses = $node->getAlternateUriSet();
$addresses[] = $this->server->getBaseUri() . $node->getPrincipalUrl() . '/';
$addresses[] = $this->server->getBaseUri() . DAV\URLUtil::encodePath($node->getPrincipalUrl() . '/');
unset($requestedProperties[array_search($calProp, $requestedProperties)]);
$returnedProperties[200][$calProp] = new DAV\Property\HrefList($addresses, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Version {
/**
* Full version number
*/
const VERSION = '1.8.6';
const VERSION = '1.8.7';

/**
* Stability : alpha, beta, stable
Expand Down
4 changes: 3 additions & 1 deletion framework/Dav/vendor/sabre/dav/lib/Sabre/CardDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ protected function validateVCard(&$data) {
}

if (!isset($vobj->UID)) {
throw new DAV\Exception\BadRequest('Every vcard must have a UID.');
// No UID in vcards is invalid, but we'll just add it in anyway.
$vobj->add('UID', DAV\UUIDUtil::getUUID());
$data = $vobj->serialize();
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Version {
/**
* Full version number
*/
const VERSION = '1.8.6';
const VERSION = '1.8.7';

/**
* Stability : alpha, beta, stable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,13 @@ public function getHref() {
public function serialize(DAV\Server $server, \DOMElement $dom) {

$prefix = $server->xmlNamespaces['DAV:'];

$elem = $dom->ownerDocument->createElement($prefix . ':href');
$value = ($this->autoPrefix?$server->getBaseUri():'') . $this->href;

if ($this->autoPrefix) {
$value = $server->getBaseUri() . DAV\URLUtil::encodePath($this->href);
} else {
$value = $this->href;
}
$elem->appendChild($dom->ownerDocument->createTextNode($value));

$dom->appendChild($elem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ public function serialize(DAV\Server $server,\DOMElement $dom) {
foreach($this->hrefs as $href) {

$elem = $dom->ownerDocument->createElement($prefix . ':href');
$value = ($this->autoPrefix?$server->getBaseUri():'') . $href;
if ($this->autoPrefix) {
$value = $server->getBaseUri() . DAV\URLUtil::encodePath($href);
} else {
$value = $href;
}
$elem->appendChild($dom->ownerDocument->createTextNode($value));

$dom->appendChild($elem);
Expand Down
2 changes: 1 addition & 1 deletion framework/Dav/vendor/sabre/dav/lib/Sabre/DAV/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Version {
/**
* Full version number
*/
const VERSION = '1.8.6';
const VERSION = '1.8.7';

/**
* Stability : alpha, beta, stable
Expand Down
2 changes: 1 addition & 1 deletion framework/Dav/vendor/sabre/dav/lib/Sabre/DAVACL/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function getCurrentUserPrincipal() {
$userName = $authPlugin->getCurrentUser();
if (!$userName) return null;

return $this->defaultUsernamePath . '/' . $userName;
return $this->defaultUsernamePath . '/' . $userName;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function serialize(DAV\Server $server, \DOMElement $node) {
break;
case self::HREF :
$href = $node->ownerDocument->createElement($prefix . ':href');
$href->nodeValue = $server->getBaseUri() . $this->href;
$href->nodeValue = $server->getBaseUri() . DAV\URLUtil::encodePath($this->href);
$node->appendChild($href);
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Version {
/**
* Full version number
*/
const VERSION = '1.8.6';
const VERSION = '1.8.7';

/**
* Stability : alpha, beta, stable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ public function serialize() {
'\,',
);

return $this->name . '=' . str_replace($src, $out, $this->value);
$value = str_replace($src, $out, $this->value);
if (strpos($value,":")!==false) {
$value = '"' . $value . '"';
}
return $this->name . '=' . $value;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ public function serialize() {
$src = array(
'\\',
"\n",
"\r",
);
$out = array(
'\\\\',
'\n',
'',
);
$str.=':' . str_replace($src, $out, $this->value);

Expand Down

0 comments on commit 52a41c8

Please sign in to comment.