[Pkg-owncloud-commits] [php-sabre-vobject] 222/341: Avoid conflicts between <geo> from xCard and xCal…

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit c802ff5a80397fc5905b4f62499b7bc298824c2b
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Tue Jan 27 12:05:09 2015 +0100

    Avoid conflicts between <geo> from xCard and xCal…
    
    … because, yes, they are not consistent!
---
 lib/Parser/XML.php | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/lib/Parser/XML.php b/lib/Parser/XML.php
index e2f95ce..df11a34 100644
--- a/lib/Parser/XML.php
+++ b/lib/Parser/XML.php
@@ -241,10 +241,15 @@ class XML extends Parser {
 
             }
 
-            switch ($propertyName) {
+            $propertyNameExtended = ($this->root instanceof VCalendar
+                                      ? 'xcal'
+                                      : 'xcard') . ':' . $propertyName;
 
-                case 'geo':
+            switch ($propertyNameExtended) {
+
+                case 'xcal:geo':
                     $propertyType               = 'float';
+
                     $propertyValue['latitude']  = 0;
                     $propertyValue['longitude'] = 0;
 
@@ -254,7 +259,7 @@ class XML extends Parser {
                     }
                     break;
 
-                case 'request-status':
+                case 'xcal:request-status':
                     $propertyType = 'text';
 
                     foreach ($xmlProperty['value'] as $xmlRequestChild) {
@@ -263,21 +268,21 @@ class XML extends Parser {
                     }
                     break;
 
-                case 'freebusy':
+                case 'xcal:freebusy':
                     $propertyType = 'freebusy';
                     // We don't break because we only want to set
                     // another property type.
 
-                case 'categories':
-                case 'resources':
-                case 'exdate':
+                case 'xcal:categories':
+                case 'xcal:resources':
+                case 'xcal:exdate':
                     foreach ($xmlProperty['value'] as $specialChild) {
                         $propertyValue[static::getTagName($specialChild['name'])]
                             = $specialChild['value'];
                     }
                     break;
 
-                case 'rdate':
+                case 'xcal:rdate':
                     $propertyType = 'date-time';
 
                     foreach ($xmlProperty['value'] as $specialChild) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list