[Pkg-owncloud-commits] [php-sabre-vobject] 94/106: Normalizing is now something CalAddress does.
David Prévot
taffit at moszumanska.debian.org
Fri Aug 22 15:11:09 UTC 2014
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 ba8ff86cf4de0bfaf63276aa7233cf6c760f9719
Author: Evert Pot <me at evertpot.com>
Date: Wed Aug 13 17:34:51 2014 -0400
Normalizing is now something CalAddress does.
---
lib/ITip/Broker.php | 24 ++----------------------
lib/Property/ICalendar/CalAddress.php | 17 +++++++++++++++++
2 files changed, 19 insertions(+), 22 deletions(-)
diff --git a/lib/ITip/Broker.php b/lib/ITip/Broker.php
index e29b327..71d429a 100644
--- a/lib/ITip/Broker.php
+++ b/lib/ITip/Broker.php
@@ -680,9 +680,7 @@ class Broker {
if (isset($vevent->ORGANIZER)) {
if (is_null($organizer)) {
- $organizer = $this->normalizeUri(
- $vevent->ORGANIZER->getValue()
- );
+ $organizer = $vevent->ORGANIZER->getNormalizedValue();
$organizerName = isset($vevent->ORGANIZER['CN'])?$vevent->ORGANIZER['CN']:null;
} else {
if ($organizer !== $vevent->ORGANIZER->getValue()) {
@@ -722,7 +720,7 @@ class Broker {
);
} else {
$attendees[$attendee->getValue()] = array(
- 'href' => $this->normalizeUri($attendee->getValue()),
+ 'href' => $attendee->getNormalizedValue(),
'instances' => array(
$recurId => array(
'id' => $recurId,
@@ -753,22 +751,4 @@ class Broker {
}
- /**
- * This method normalizes uris.
- *
- * This is primarily used right now to turn mixed-cased schemes in user
- * uris to lower-case.
- *
- * Evolution in particular tends to encode mailto: as MAILTO:.
- *
- * @param string $input
- * @return string
- */
- protected function normalizeUri($input) {
-
- list($schema, $everythingElse) = explode(':', $input, 2);
- return strtolower($schema) . ':' . $everythingElse;
-
- }
-
}
diff --git a/lib/Property/ICalendar/CalAddress.php b/lib/Property/ICalendar/CalAddress.php
index 33c5b24..a0c8348 100644
--- a/lib/Property/ICalendar/CalAddress.php
+++ b/lib/Property/ICalendar/CalAddress.php
@@ -38,4 +38,21 @@ class CalAddress extends Text {
}
+ /**
+ * This returns a normalized form of the value.
+ *
+ * This is primarily used right now to turn mixed-cased schemes in user
+ * uris to lower-case.
+ *
+ * Evolution in particular tends to encode mailto: as MAILTO:.
+ *
+ * @return string
+ */
+ public function getNormalizedValue() {
+
+ $input = $this->getValue();
+ list($schema, $everythingElse) = explode(':', $input, 2);
+ return strtolower($schema) . ':' . $everythingElse;
+
+ }
}
--
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