diff --git a/.gitignore b/.gitignore
index 33f8e0c524..ea8e5bd42f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,8 @@ RCS/*
# eclipse
.project
.settings
+
+# netbeans
+nbproject
+
+.DS_Store
\ No newline at end of file
diff --git a/.htaccess b/.htaccess
index 1812482675..8763a8bcde 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,7 +1,8 @@
-ErrorDocument 404 //owncloud/core/templates/404.php
+ErrorDocument 404 /owncloud/core/templates/404.php
- php_value upload_max_filesize 512M
- php_value post_max_size 512M
- SetEnv htaccessWorking true
+php_value upload_max_filesize 512M
+php_value post_max_size 512M
+php_value memory_limit 128M
+SetEnv htaccessWorking true
Options -Indexes
diff --git a/.tx/config b/.tx/config
index 233dae8eb3..b51860f8b2 100644
--- a/.tx/config
+++ b/.tx/config
@@ -13,16 +13,21 @@ trans.da = l10n/da/core.po
trans.de = l10n/de/core.po
trans.el = l10n/el/core.po
trans.es = l10n/es/core.po
+trans.et_EE = l10n/et_EE/core.po
trans.fr = l10n/fr/core.po
trans.id = l10n/id/core.po
trans.it = l10n/it/core.po
trans.lb = l10n/lb/core.po
+trans.ms_MY = l10n/ms_MY/core.po
trans.nb_NO = l10n/nb_NO/core.po
trans.nl = l10n/nl/core.po
trans.pl = l10n/pl/core.po
trans.pt_BR = l10n/pt_BR/core.po
+trans.pt_PT = l10n/pt_PT/core.po
trans.ro = l10n/ro/core.po
trans.ru = l10n/ru/core.po
+trans.sr = l10n/sr/core.po
+trans.sr@latin = l10n/sr@latin/core.po
trans.sv = l10n/sv/core.po
trans.zh_CN = l10n/zh_CN/core.po
@@ -38,16 +43,21 @@ trans.da = l10n/da/settings.po
trans.de = l10n/de/settings.po
trans.el = l10n/el/settings.po
trans.es = l10n/es/settings.po
+trans.et_EE = l10n/et_EE/settings.po
trans.fr = l10n/fr/settings.po
trans.id = l10n/id/settings.po
trans.it = l10n/it/settings.po
trans.lb = l10n/lb/settings.po
+trans.ms_MY = l10n/ms_MY/settings.po
trans.nb_NO = l10n/nb_NO/settings.po
trans.nl = l10n/nl/settings.po
trans.pl = l10n/pl/settings.po
trans.pt_BR = l10n/pt_BR/settings.po
+trans.pt_PT = l10n/pt_PT/settings.po
trans.ro = l10n/ro/settings.po
trans.ru = l10n/ru/settings.po
+trans.sr = l10n/sr/settings.po
+trans.sr@latin = l10n/sr@latin/settings.po
trans.sv = l10n/sv/settings.po
trans.zh_CN = l10n/zh_CN/settings.po
@@ -63,16 +73,21 @@ trans.da = l10n/da/files.po
trans.de = l10n/de/files.po
trans.el = l10n/el/files.po
trans.es = l10n/es/files.po
+trans.et_EE = l10n/et_EE/files.po
trans.fr = l10n/fr/files.po
trans.id = l10n/id/files.po
trans.it = l10n/it/files.po
trans.lb = l10n/lb/files.po
+trans.ms_MY = l10n/ms_MY/files.po
trans.nb_NO = l10n/nb_NO/files.po
trans.nl = l10n/nl/files.po
trans.pl = l10n/pl/files.po
trans.pt_BR = l10n/pt_BR/files.po
+trans.pt_PT = l10n/pt_PT/files.po
trans.ro = l10n/ro/files.po
trans.ru = l10n/ru/files.po
+trans.sr = l10n/sr/files.po
+trans.sr@latin = l10n/sr@latin/files.po
trans.sv = l10n/sv/files.po
trans.zh_CN = l10n/zh_CN/files.po
@@ -88,16 +103,80 @@ trans.da = l10n/da/media.po
trans.de = l10n/de/media.po
trans.el = l10n/el/media.po
trans.es = l10n/es/media.po
+trans.et_EE = l10n/et_EE/media.po
trans.fr = l10n/fr/media.po
trans.id = l10n/id/media.po
trans.it = l10n/it/media.po
trans.lb = l10n/lb/media.po
+trans.ms_MY = l10n/ms_MY/media.po
trans.nb_NO = l10n/nb_NO/media.po
trans.nl = l10n/nl/media.po
trans.pl = l10n/pl/media.po
trans.pt_BR = l10n/pt_BR/media.po
+trans.pt_PT = l10n/pt_PT/media.po
trans.ro = l10n/ro/media.po
trans.ru = l10n/ru/media.po
+trans.sr = l10n/sr/media.po
+trans.sr@latin = l10n/sr@latin/media.po
trans.sv = l10n/sv/media.po
trans.zh_CN = l10n/zh_CN/media.po
+[owncloud.calendar]
+file_filter = l10n//calendar.po
+host = http://www.transifex.net
+source_file = l10n/templates/calendar.pot
+source_lang = en
+trans.bg_BG = l10n/bg_BG/calendar.po
+trans.ca = l10n/ca/calendar.po
+trans.cs_CZ = l10n/cs_CZ/calendar.po
+trans.da = l10n/da/calendar.po
+trans.de = l10n/de/calendar.po
+trans.el = l10n/el/calendar.po
+trans.es = l10n/es/calendar.po
+trans.et_EE = l10n/et_EE/calendar.po
+trans.fr = l10n/fr/calendar.po
+trans.id = l10n/id/calendar.po
+trans.it = l10n/it/calendar.po
+trans.lb = l10n/lb/calendar.po
+trans.ms_MY = l10n/ms_MY/calendar.po
+trans.nb_NO = l10n/nb_NO/calendar.po
+trans.nl = l10n/nl/calendar.po
+trans.pl = l10n/pl/calendar.po
+trans.pt_BR = l10n/pt_BR/calendar.po
+trans.pt_PT = l10n/pt_PT/calendar.po
+trans.ro = l10n/ro/calendar.po
+trans.ru = l10n/ru/calendar.po
+trans.sr = l10n/sr/calendar.po
+trans.sr@latin = l10n/sr@latin/calendar.po
+trans.sv = l10n/sv/calendar.po
+trans.zh_CN = l10n/zh_CN/calendar.po
+
+[owncloud.contacts]
+file_filter = translations/owncloud.contacts/.po
+host = http://www.transifex.net
+source_file = l10n/templates/contacts.pot
+source_lang = en
+trans.bg_BG = l10n/bg_BG/contacts.po
+trans.ca = l10n/ca/contacts.po
+trans.cs_CZ = l10n/cs_CZ/contacts.po
+trans.da = l10n/da/contacts.po
+trans.de = l10n/de/contacts.po
+trans.el = l10n/el/contacts.po
+trans.es = l10n/es/contacts.po
+trans.et_EE = l10n/et_EE/contacts.po
+trans.fr = l10n/fr/contacts.po
+trans.id = l10n/id/contacts.po
+trans.it = l10n/it/contacts.po
+trans.lb = l10n/lb/contacts.po
+trans.ms_MY = l10n/ms_MY/contacts.po
+trans.nb_NO = l10n/nb_NO/contacts.po
+trans.nl = l10n/nl/contacts.po
+trans.pl = l10n/pl/contacts.po
+trans.pt_BR = l10n/pt_BR/contacts.po
+trans.pt_PT = l10n/pt_PT/contacts.po
+trans.ro = l10n/ro/contacts.po
+trans.ru = l10n/ru/contacts.po
+trans.sr = l10n/sr/contacts.po
+trans.sr@latin = l10n/sr@latin/contacts.po
+trans.sv = l10n/sv/contacts.po
+trans.zh_CN = l10n/zh_CN/contacts.po
diff --git a/3rdparty/COPYING-PHP b/3rdparty/COPYING-PHP
deleted file mode 100644
index 3cc8b777b7..0000000000
--- a/3rdparty/COPYING-PHP
+++ /dev/null
@@ -1,68 +0,0 @@
---------------------------------------------------------------------
- The PHP License, version 3.01
-Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior written permission. For
- written permission, please contact group@php.net.
-
- 4. Products derived from this software may not be called "PHP", nor
- may "PHP" appear in their name, without prior written permission
- from group@php.net. You may indicate that your software works in
- conjunction with PHP by saying "Foo for PHP" instead of calling
- it "PHP Foo" or "phpfoo"
-
- 5. The PHP Group may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the terms
- of that version. You may also choose to use such covered code
- under the terms of any subsequent version of the license
- published by the PHP Group. No one other than the PHP Group has
- the right to modify the terms applicable to covered code created
- under this License.
-
- 6. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes PHP software, freely available from
- ".
-
-THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
-DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the PHP Group.
-
-The PHP Group can be contacted via Email at group@php.net.
-
-For more information on the PHP Group and the PHP project,
-please see .
-
-PHP includes the Zend Engine, freely available at
-.
diff --git a/3rdparty/COPYING-README b/3rdparty/COPYING-README
deleted file mode 100644
index 2450ef1581..0000000000
--- a/3rdparty/COPYING-README
+++ /dev/null
@@ -1,7 +0,0 @@
-HTTP is three clause BSD licence
-MDB2 uses a custom licence in the BSD style
-User is AGPL
-XML/RPC is both MIT and PHP License
-
-The rest all licenced under the PHP License see packages/ directory
-for details
diff --git a/3rdparty/MDB2.php b/3rdparty/MDB2.php
index fbc7107914..aa7ec6ba09 100644
--- a/3rdparty/MDB2.php
+++ b/3rdparty/MDB2.php
@@ -969,11 +969,10 @@ class MDB2
static function fileExists($file)
{
// safe_mode does notwork with is_readable()
- global $SERVERROOT;
if (!@ini_get('safe_mode')) {
$dirs = explode(PATH_SEPARATOR, ini_get('include_path'));
- array_unshift($dirs,$SERVERROOT);
- array_unshift($dirs,$SERVERROOT. DIRECTORY_SEPARATOR .'inc');
+ array_unshift($dirs,OC::$SERVERROOT);
+ array_unshift($dirs,OC::$SERVERROOT. DIRECTORY_SEPARATOR .'inc');
// print_r($dirs);die();
foreach ($dirs as $dir) {
if (is_readable($dir . DIRECTORY_SEPARATOR . $file)) {
diff --git a/3rdparty/MDB2/Driver/Manager/sqlite.php b/3rdparty/MDB2/Driver/Manager/sqlite.php
index 6401966964..650910174e 100644
--- a/3rdparty/MDB2/Driver/Manager/sqlite.php
+++ b/3rdparty/MDB2/Driver/Manager/sqlite.php
@@ -71,8 +71,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function createDatabase($name, $options = array())
{
- global $SERVERROOT;
- $datadir=OC_Config::getValue( "datadirectory", "$SERVERROOT/data" );
+ $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
@@ -1362,4 +1361,4 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
// }}}
}
-?>
\ No newline at end of file
+?>
diff --git a/3rdparty/MDB2/Driver/sqlite.php b/3rdparty/MDB2/Driver/sqlite.php
index 63db241b86..5d2ad27d01 100644
--- a/3rdparty/MDB2/Driver/sqlite.php
+++ b/3rdparty/MDB2/Driver/sqlite.php
@@ -347,8 +347,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
**/
function connect()
{
- global $SERVERROOT;
- $datadir=OC_Config::getValue( "datadirectory", "$SERVERROOT/data" );
+ $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
$database_file = $this->_getDatabaseFile($this->database_name);
if (is_resource($this->connection)) {
//if (count(array_diff($this->connected_dsn, $this->dsn)) == 0
@@ -1086,4 +1085,4 @@ class MDB2_Statement_sqlite extends MDB2_Statement_Common
}
-?>
\ No newline at end of file
+?>
diff --git a/3rdparty/Sabre/CalDAV/Backend/Abstract.php b/3rdparty/Sabre/CalDAV/Backend/Abstract.php
index 7ac282f44a..b694eef49e 100644
--- a/3rdparty/Sabre/CalDAV/Backend/Abstract.php
+++ b/3rdparty/Sabre/CalDAV/Backend/Abstract.php
@@ -36,20 +36,17 @@ abstract class Sabre_CalDAV_Backend_Abstract {
* If the creation was a success, an id must be returned that can be used to reference
* this calendar in other methods, such as updateCalendar.
*
- * This function must return a server-wide unique id that can be used
- * later to reference the calendar.
- *
* @param string $principalUri
* @param string $calendarUri
* @param array $properties
- * @return string|int
+ * @return void
*/
abstract function createCalendar($principalUri,$calendarUri,array $properties);
/**
- * Updates properties on this node,
+ * Updates properties for a calendar.
*
- * The properties array uses the propertyName in clark-notation as key,
+ * The mutations array uses the propertyName in clark-notation as key,
* and the array value for the property value. In the case a property
* should be deleted, the property value will be null.
*
@@ -79,10 +76,10 @@ abstract class Sabre_CalDAV_Backend_Abstract {
* (424 Failed Dependency) because the request needs to be atomic.
*
* @param string $calendarId
- * @param array $properties
+ * @param array $mutations
* @return bool|array
*/
- public function updateCalendar($calendarId, array $properties) {
+ public function updateCalendar($calendarId, array $mutations) {
return false;
@@ -97,7 +94,7 @@ abstract class Sabre_CalDAV_Backend_Abstract {
abstract function deleteCalendar($calendarId);
/**
- * Returns all calendar objects within a calendar object.
+ * Returns all calendar objects within a calendar.
*
* Every item contains an array with the following keys:
* * id - unique identifier which will be used for subsequent updates
diff --git a/3rdparty/Sabre/CalDAV/Backend/PDO.php b/3rdparty/Sabre/CalDAV/Backend/PDO.php
index d1785bb8f8..7b1b33b912 100644
--- a/3rdparty/Sabre/CalDAV/Backend/PDO.php
+++ b/3rdparty/Sabre/CalDAV/Backend/PDO.php
@@ -129,7 +129,6 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract {
* @param string $principalUri
* @param string $calendarUri
* @param array $properties
- * @return mixed
*/
public function createCalendar($principalUri,$calendarUri, array $properties) {
@@ -173,9 +172,9 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract {
}
/**
- * Updates a calendars properties
+ * Updates properties for a calendar.
*
- * The properties array uses the propertyName in clark-notation as key,
+ * The mutations array uses the propertyName in clark-notation as key,
* and the array value for the property value. In the case a property
* should be deleted, the property value will be null.
*
@@ -205,10 +204,10 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract {
* (424 Failed Dependency) because the request needs to be atomic.
*
* @param string $calendarId
- * @param array $properties
+ * @param array $mutations
* @return bool|array
*/
- public function updateCalendar($calendarId, array $properties) {
+ public function updateCalendar($calendarId, array $mutations) {
$newValues = array();
$result = array(
@@ -219,13 +218,13 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract {
$hasError = false;
- foreach($properties as $propertyName=>$propertyValue) {
+ foreach($mutations as $propertyName=>$propertyValue) {
// We don't know about this property.
if (!isset($this->propertyMap[$propertyName])) {
$hasError = true;
$result[403][$propertyName] = null;
- unset($properties[$propertyName]);
+ unset($mutations[$propertyName]);
continue;
}
@@ -237,7 +236,7 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract {
// If there were any errors we need to fail the request
if ($hasError) {
// Properties has the remaining properties
- foreach($properties as $propertyName=>$propertyValue) {
+ foreach($mutations as $propertyName=>$propertyValue) {
$result[424][$propertyName] = null;
}
@@ -284,7 +283,7 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract {
}
/**
- * Returns all calendar objects within a calendar object.
+ * Returns all calendar objects within a calendar.
*
* Every item contains an array with the following keys:
* * id - unique identifier which will be used for subsequent updates
diff --git a/3rdparty/Sabre/CalDAV/Calendar.php b/3rdparty/Sabre/CalDAV/Calendar.php
index a50aef12b4..0d2b387577 100644
--- a/3rdparty/Sabre/CalDAV/Calendar.php
+++ b/3rdparty/Sabre/CalDAV/Calendar.php
@@ -12,7 +12,7 @@
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-class Sabre_CalDAV_Calendar implements Sabre_DAV_ICollection, Sabre_DAV_IProperties, Sabre_DAVACL_IACL {
+class Sabre_CalDAV_Calendar implements Sabre_CalDAV_ICalendar, Sabre_DAV_IProperties, Sabre_DAVACL_IACL {
/**
* This is an array with calendar information
@@ -178,6 +178,8 @@ class Sabre_CalDAV_Calendar implements Sabre_DAV_ICollection, Sabre_DAV_IPropert
public function createFile($name,$calendarData = null) {
$calendarData = stream_get_contents($calendarData);
+ // Converting to UTF-8, if needed
+ $calendarData = Sabre_DAV_StringUtil::ensureUTF8($calendarData);
$supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set'];
if ($supportedComponents) {
diff --git a/3rdparty/Sabre/CalDAV/CalendarObject.php b/3rdparty/Sabre/CalDAV/CalendarObject.php
index b5c4e49b83..0c99f18deb 100644
--- a/3rdparty/Sabre/CalDAV/CalendarObject.php
+++ b/3rdparty/Sabre/CalDAV/CalendarObject.php
@@ -9,7 +9,7 @@
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-class Sabre_CalDAV_CalendarObject extends Sabre_DAV_File implements Sabre_DAVACL_IACL {
+class Sabre_CalDAV_CalendarObject extends Sabre_DAV_File implements Sabre_CalDAV_ICalendarObject, Sabre_DAVACL_IACL {
/**
* Sabre_CalDAV_Backend_Abstract
@@ -93,6 +93,9 @@ class Sabre_CalDAV_CalendarObject extends Sabre_DAV_File implements Sabre_DAVACL
if (is_resource($calendarData))
$calendarData = stream_get_contents($calendarData);
+ // Converting to UTF-8, if needed
+ $calendarData = Sabre_DAV_StringUtil::ensureUTF8($calendarData);
+
$supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set'];
if ($supportedComponents) {
$supportedComponents = $supportedComponents->getValue();
diff --git a/3rdparty/Sabre/CalDAV/ICalendar.php b/3rdparty/Sabre/CalDAV/ICalendar.php
new file mode 100644
index 0000000000..8193dff3a8
--- /dev/null
+++ b/3rdparty/Sabre/CalDAV/ICalendar.php
@@ -0,0 +1,18 @@
+server->tree->getNodeForPath($uri);
- if ($node instanceof Sabre_CalDAV_Calendar || $node instanceof Sabre_CalDAV_CalendarObject) {
+ if ($node instanceof Sabre_CalDAV_ICalendar || $node instanceof Sabre_CalDAV_ICalendarObject) {
return array(
'{' . self::NS_CALDAV . '}calendar-multiget',
'{' . self::NS_CALDAV . '}calendar-query',
@@ -143,7 +143,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
$server->propertyMap['{' . self::NS_CALDAV . '}supported-calendar-component-set'] = 'Sabre_CalDAV_Property_SupportedCalendarComponentSet';
- $server->resourceTypeMapping['Sabre_CalDAV_Calendar'] = '{urn:ietf:params:xml:ns:caldav}calendar';
+ $server->resourceTypeMapping['Sabre_CalDAV_ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar';
$server->resourceTypeMapping['Sabre_CalDAV_Principal_ProxyRead'] = '{http://calendarserver.org/ns/}calendar-proxy-read';
$server->resourceTypeMapping['Sabre_CalDAV_Principal_ProxyWrite'] = '{http://calendarserver.org/ns/}calendar-proxy-write';
@@ -326,7 +326,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
} // instanceof IPrincipal
- if ($node instanceof Sabre_CalDAV_CalendarObject) {
+ if ($node instanceof Sabre_CalDAV_ICalendarObject) {
// The calendar-data property is not supposed to be a 'real'
// property, but in large chunks of the spec it does act as such.
// Therefore we simply expose it as a property.
diff --git a/3rdparty/Sabre/CalDAV/Version.php b/3rdparty/Sabre/CalDAV/Version.php
index 5ecc0cebb3..df8fe1f6bd 100644
--- a/3rdparty/Sabre/CalDAV/Version.php
+++ b/3rdparty/Sabre/CalDAV/Version.php
@@ -14,7 +14,7 @@ class Sabre_CalDAV_Version {
/**
* Full version number
*/
- const VERSION = '1.5.0';
+ const VERSION = '1.5.3';
/**
* Stability : alpha, beta, stable
diff --git a/3rdparty/Sabre/CardDAV/AddressBook.php b/3rdparty/Sabre/CardDAV/AddressBook.php
index 04e4c227b8..3333480ea8 100644
--- a/3rdparty/Sabre/CardDAV/AddressBook.php
+++ b/3rdparty/Sabre/CardDAV/AddressBook.php
@@ -112,6 +112,8 @@ class Sabre_CardDAV_AddressBook extends Sabre_DAV_Collection implements Sabre_Ca
public function createFile($name,$vcardData = null) {
$vcardData = stream_get_contents($vcardData);
+ // Converting to UTF-8, if needed
+ $vcardData = Sabre_DAV_StringUtil::ensureUTF8($vcardData);
$this->carddavBackend->createCard($this->addressBookInfo['id'],$name,$vcardData);
diff --git a/3rdparty/Sabre/CardDAV/Backend/PDO.php b/3rdparty/Sabre/CardDAV/Backend/PDO.php
index 63a74745aa..5556d0a764 100644
--- a/3rdparty/Sabre/CardDAV/Backend/PDO.php
+++ b/3rdparty/Sabre/CardDAV/Backend/PDO.php
@@ -66,7 +66,9 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
'principaluri' => $row['principaluri'],
'{DAV:}displayname' => $row['displayname'],
'{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'],
- '{http://calendarserver.org/ns/}getctag' => $row['ctag'],
+ '{http://calendarserver.org/ns/}getctag' => $row['ctag'],
+ '{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}supported-address-data' =>
+ new Sabre_CardDAV_Property_SupportedAddressData(),
);
}
diff --git a/3rdparty/Sabre/CardDAV/Card.php b/3rdparty/Sabre/CardDAV/Card.php
index 52d8b79d7d..5298d31e24 100644
--- a/3rdparty/Sabre/CardDAV/Card.php
+++ b/3rdparty/Sabre/CardDAV/Card.php
@@ -88,6 +88,9 @@ class Sabre_CardDAV_Card extends Sabre_DAV_File implements Sabre_CardDAV_ICard,
if (is_resource($cardData))
$cardData = stream_get_contents($cardData);
+ // Converting to UTF-8, if needed
+ $cardData = Sabre_DAV_StringUtil::ensureUTF8($cardData);
+
$this->carddavBackend->updateCard($this->addressBookInfo['id'],$this->cardData['uri'],$cardData);
$this->cardData['carddata'] = $cardData;
diff --git a/3rdparty/Sabre/CardDAV/Plugin.php b/3rdparty/Sabre/CardDAV/Plugin.php
index a96f9aaebb..17766b7827 100644
--- a/3rdparty/Sabre/CardDAV/Plugin.php
+++ b/3rdparty/Sabre/CardDAV/Plugin.php
@@ -95,9 +95,10 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
public function getSupportedReportSet($uri) {
$node = $this->server->tree->getNodeForPath($uri);
- if ($node instanceof Sabre_CardDAV_AddressBook || $node instanceof Sabre_CardDAV_ICard) {
+ if ($node instanceof Sabre_CardDAV_IAddressBook || $node instanceof Sabre_CardDAV_ICard) {
return array(
'{' . self::NS_CARDDAV . '}addressbook-multiget',
+ '{' . self::NS_CARDDAV . '}addressbook-query',
);
}
return array();
diff --git a/3rdparty/Sabre/CardDAV/Property/SupportedAddressData.php b/3rdparty/Sabre/CardDAV/Property/SupportedAddressData.php
new file mode 100644
index 0000000000..d57d3a6e7b
--- /dev/null
+++ b/3rdparty/Sabre/CardDAV/Property/SupportedAddressData.php
@@ -0,0 +1,69 @@
+ 'text/vcard', 'version' => '3.0'),
+ array('contentType' => 'text/vcard', 'version' => '4.0'),
+ );
+ }
+
+ $this->supportedData = $supportedData;
+
+ }
+
+ /**
+ * Serializes the property in a DOMDocument
+ *
+ * @param Sabre_DAV_Server $server
+ * @param DOMElement $node
+ * @return void
+ */
+ public function serialize(Sabre_DAV_Server $server,DOMElement $node) {
+
+ $doc = $node->ownerDocument;
+
+ $prefix =
+ isset($server->xmlNamespaces[Sabre_CardDAV_Plugin::NS_CARDDAV]) ?
+ $server->xmlNamespaces[Sabre_CardDAV_Plugin::NS_CARDDAV] :
+ 'card';
+
+ foreach($this->supportedData as $supported) {
+
+ $caldata = $doc->createElementNS(Sabre_CardDAV_Plugin::NS_CARDDAV, $prefix . ':address-data-type');
+ $caldata->setAttribute('content-type',$supported['contentType']);
+ $caldata->setAttribute('version',$supported['version']);
+ $node->appendChild($caldata);
+
+ }
+
+ }
+
+}
diff --git a/3rdparty/Sabre/CardDAV/Version.php b/3rdparty/Sabre/CardDAV/Version.php
index 8961027fc8..c76ee36035 100644
--- a/3rdparty/Sabre/CardDAV/Version.php
+++ b/3rdparty/Sabre/CardDAV/Version.php
@@ -18,11 +18,11 @@ class Sabre_CardDAV_Version {
/**
* Full version number
*/
- const VERSION = '0.2';
+ const VERSION = '1.5.3';
/**
* Stability : alpha, beta, stable
*/
- const STABILITY = 'alpha';
+ const STABILITY = 'stable';
}
diff --git a/3rdparty/Sabre/DAV/Browser/Plugin.php b/3rdparty/Sabre/DAV/Browser/Plugin.php
index 8e0ca24cff..cd5617babb 100644
--- a/3rdparty/Sabre/DAV/Browser/Plugin.php
+++ b/3rdparty/Sabre/DAV/Browser/Plugin.php
@@ -68,9 +68,16 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
public function httpGetInterceptor($method, $uri) {
if ($method!='GET') return true;
-
- $node = $this->server->tree->getNodeForPath($uri);
- if ($node instanceof Sabre_DAV_IFile) return true;
+
+ try {
+ $node = $this->server->tree->getNodeForPath($uri);
+ } catch (Sabre_DAV_Exception_FileNotFound $e) {
+ // We're simply stopping when the file isn't found to not interfere
+ // with other plugins.
+ return;
+ }
+ if ($node instanceof Sabre_DAV_IFile)
+ return;
$this->server->httpResponse->sendStatus(200);
$this->server->httpResponse->setHeader('Content-Type','text/html; charset=utf-8');
@@ -165,6 +172,8 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
'{DAV:}getlastmodified',
),1);
+ $parent = $this->server->tree->getNodeForPath($path);
+
if ($path) {
@@ -189,6 +198,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
$type = null;
+
if (isset($file[200]['{DAV:}resourcetype'])) {
$type = $file[200]['{DAV:}resourcetype']->getValue();
@@ -246,7 +256,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
$html.= "
";
- if ($this->enablePost) {
+ if ($this->enablePost && $parent instanceof Sabre_DAV_ICollection) {
$html.= '