diff options
author | hubzilla <git@macgirvin.com> | 2016-06-30 09:34:22 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-30 09:34:22 +1000 |
commit | 05aba0b4dd9ce5798e2c8bb57900b03ae96a233e (patch) | |
tree | 0910b2128981452a1c61ba6b6b4683dc51568027 /vendor/sabre/dav/lib/DAVACL/Xml/Property | |
parent | f098600c41553bc47267a61fb47a4957046e696e (diff) | |
parent | 3102440d407fe195878b9535aae4fd0da750f437 (diff) | |
download | volse-hubzilla-05aba0b4dd9ce5798e2c8bb57900b03ae96a233e.tar.gz volse-hubzilla-05aba0b4dd9ce5798e2c8bb57900b03ae96a233e.tar.bz2 volse-hubzilla-05aba0b4dd9ce5798e2c8bb57900b03ae96a233e.zip |
Merge pull request #444 from git-marijus/dev
Merge branch sabre32 into dev
Diffstat (limited to 'vendor/sabre/dav/lib/DAVACL/Xml/Property')
-rw-r--r-- | vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php b/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php index 572bed4dd..55e7783ae 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php @@ -73,7 +73,7 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { */ function xmlSerialize(Writer $writer) { - $this->serializePriv($writer, $this->privileges); + $this->serializePriv($writer, '{DAV:}all', [ 'aggregates' => $this->privileges]); } @@ -93,9 +93,9 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { */ function toHtml(HtmlOutputHelper $html) { - $traverse = function($priv) use (&$traverse, $html) { + $traverse = function($privName, $priv) use (&$traverse, $html) { echo "<li>"; - echo $html->xmlName($priv['privilege']); + echo $html->xmlName($privName); if (isset($priv['abstract']) && $priv['abstract']) { echo " <i>(abstract)</i>"; } @@ -104,8 +104,8 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { } if (isset($priv['aggregates'])) { echo "\n<ul>\n"; - foreach ($priv['aggregates'] as $subPriv) { - $traverse($subPriv); + foreach ($priv['aggregates'] as $subPrivName => $subPriv) { + $traverse($subPrivName, $subPriv); } echo "</ul>"; } @@ -114,7 +114,7 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { ob_start(); echo "<ul class=\"tree\">"; - $traverse($this->getValue()); + $traverse('{DAV:}all', [ 'aggregates' => $this->getValue() ]); echo "</ul>\n"; return ob_get_clean(); @@ -132,12 +132,12 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { * @param array $privilege * @return void */ - private function serializePriv(Writer $writer, $privilege) { + private function serializePriv(Writer $writer, $privName, $privilege) { $writer->startElement('{DAV:}supported-privilege'); $writer->startElement('{DAV:}privilege'); - $writer->writeElement($privilege['privilege']); + $writer->writeElement($privName); $writer->endElement(); // privilege if (!empty($privilege['abstract'])) { @@ -147,8 +147,8 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { $writer->writeElement('{DAV:}description', $privilege['description']); } if (isset($privilege['aggregates'])) { - foreach ($privilege['aggregates'] as $subPrivilege) { - $this->serializePriv($writer, $subPrivilege); + foreach ($privilege['aggregates'] as $subPrivName => $subPrivilege) { + $this->serializePriv($writer, $subPrivName, $subPrivilege); } } |