[Pkg-owncloud-commits] [php-sabre-vobject] 159/341: More abstract way to handle date and date-time.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:43 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 34fc363991bf242facff41da0b86c980ad00ac8b
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Tue Jan 20 11:00:51 2015 +0100

    More abstract way to handle date and date-time.
    
    Remove the special case for `dtstart`.
    
    The goal was to deal with date-time and date. We can deal with this case
    in the `default` case, only based on the property type, not based on the
    property name.
---
 lib/Parser/XML.php | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/lib/Parser/XML.php b/lib/Parser/XML.php
index 27bb32f..6e47fc7 100644
--- a/lib/Parser/XML.php
+++ b/lib/Parser/XML.php
@@ -136,15 +136,6 @@ class XML extends Parser {
 
                         switch ($propertyName) {
 
-                            case 'dtstart':
-                                $propertyType  = static::getTagName($xmlProperty['value'][0]['name']);
-                                $propertyValue = [$xmlProperty['value'][0]['value']];
-
-                                if('date' === $propertyType)
-                                    $propertyParameters['value'] = 'DATE';
-
-                                break;
-
                             case 'geo':
                                 $propertyType               = 'float';
                                 $propertyValue['latitude']  = 0;
@@ -200,6 +191,10 @@ class XML extends Parser {
                             default:
                                 $propertyType  = static::getTagName($xmlProperty['value'][0]['name']);
                                 $propertyValue = [$xmlProperty['value'][0]['value']];
+
+                                if('date' === $propertyType)
+                                    $propertyParameters['value'] = 'DATE';
+
                                 break;
                         }
 

-- 
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