aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/DAV/Xml/Property/Href.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-05-28 17:46:24 +0200
committerMario Vavti <mario@mariovavti.com>2016-05-28 17:46:24 +0200
commit66effbfe0827fc61fff6d248797a894213ad20d6 (patch)
tree0fbb5ca644e1140e5b3b44b1adc874043790c388 /vendor/sabre/dav/lib/DAV/Xml/Property/Href.php
parentac4688eac087854bf8cb0c893d7a79052ad63a20 (diff)
downloadvolse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.gz
volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.bz2
volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.zip
upgrade to sabre32
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Xml/Property/Href.php')
-rw-r--r--vendor/sabre/dav/lib/DAV/Xml/Property/Href.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/vendor/sabre/dav/lib/DAV/Xml/Property/Href.php b/vendor/sabre/dav/lib/DAV/Xml/Property/Href.php
index 538e98d0f..0027f72e1 100644
--- a/vendor/sabre/dav/lib/DAV/Xml/Property/Href.php
+++ b/vendor/sabre/dav/lib/DAV/Xml/Property/Href.php
@@ -7,6 +7,7 @@ use Sabre\DAV\Browser\HtmlOutputHelper;
use Sabre\Xml\Element;
use Sabre\Xml\Reader;
use Sabre\Xml\Writer;
+use Sabre\Uri;
/**
* Href property
@@ -32,13 +33,6 @@ class Href implements Element, HtmlOutput {
protected $hrefs;
/**
- * Automatically prefix the url with the server base directory
- *
- * @var bool
- */
- protected $autoPrefix = true;
-
- /**
* Constructor
*
* You must either pass a string for a single href, or an array of hrefs.
@@ -47,16 +41,13 @@ class Href implements Element, HtmlOutput {
* and not relative to the servers base uri.
*
* @param string|string[] $href
- * @param bool $autoPrefix
*/
- function __construct($hrefs, $autoPrefix = true) {
+ function __construct($hrefs) {
if (is_string($hrefs)) {
$hrefs = [$hrefs];
}
$this->hrefs = $hrefs;
- $this->autoPrefix = $autoPrefix;
-
}
@@ -104,9 +95,7 @@ class Href implements Element, HtmlOutput {
function xmlSerialize(Writer $writer) {
foreach ($this->getHrefs() as $href) {
- if ($this->autoPrefix) {
- $href = $writer->contextUri . \Sabre\HTTP\encodePath($href);
- }
+ $href = Uri\resolve($writer->contextUri, $href);
$writer->writeElement('{DAV:}href', $href);
}