diff --git a/.gitignore b/.gitignore
index cc4d3bf03b..a84615cf13 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,3 +40,6 @@ nbproject
# Mac OS
.DS_Store
+
+# WebFinger
+.well-known
diff --git a/.htaccess b/.htaccess
index 34d4c719c8..0d334503d0 100644
--- a/.htaccess
+++ b/.htaccess
@@ -4,8 +4,6 @@ php_value upload_max_filesize 512M
php_value post_max_size 512M
SetEnv htaccessWorking true
-
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
-
Options -Indexes
diff --git a/3rdparty/Sabre.includes.php b/3rdparty/Sabre.includes.php
index 9d389288c7..d41b287b77 100644
--- a/3rdparty/Sabre.includes.php
+++ b/3rdparty/Sabre.includes.php
@@ -71,6 +71,7 @@ include 'Sabre/DAV/IExtendedCollection.php';
/* Node abstract implementations */
include 'Sabre/DAV/Node.php';
include 'Sabre/DAV/File.php';
+include 'Sabre/DAV/Collection.php';
include 'Sabre/DAV/Directory.php';
/* Utilities */
@@ -124,4 +125,3 @@ include 'Sabre/DAV/Auth/Backend/PDO.php';
/* DavMount plugin */
include 'Sabre/DAV/Mount/Plugin.php';
-
diff --git a/3rdparty/Sabre/CardDAV/AddressBook.php b/3rdparty/Sabre/CardDAV/AddressBook.php
index 3333480ea8..471ca7b338 100644
--- a/3rdparty/Sabre/CardDAV/AddressBook.php
+++ b/3rdparty/Sabre/CardDAV/AddressBook.php
@@ -1,7 +1,9 @@
extensionMap[$extension]))
return $this->extensionMap[$extension];
diff --git a/3rdparty/Sabre/DAV/Server.php b/3rdparty/Sabre/DAV/Server.php
index b99866dad5..3d76d4f191 100644
--- a/3rdparty/Sabre/DAV/Server.php
+++ b/3rdparty/Sabre/DAV/Server.php
@@ -821,7 +821,7 @@ class Sabre_DAV_Server {
$node->put($body);
$this->httpResponse->setHeader('Content-Length','0');
- $this->httpResponse->sendStatus(200);
+ $this->httpResponse->sendStatus(204);
} else {
diff --git a/3rdparty/Sabre/DAV/Version.php b/3rdparty/Sabre/DAV/Version.php
index e7f7f83e6f..6bece1985e 100644
--- a/3rdparty/Sabre/DAV/Version.php
+++ b/3rdparty/Sabre/DAV/Version.php
@@ -14,7 +14,7 @@ class Sabre_DAV_Version {
/**
* Full version number
*/
- const VERSION = '1.5.3';
+ const VERSION = '1.5.4';
/**
* Stability : alpha, beta, stable
diff --git a/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php b/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php
index 640ab8efff..024ab6641f 100644
--- a/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php
+++ b/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php
@@ -2,6 +2,9 @@
/**
* NeedPrivileges
+ *
+ * The 403-need privileges is thrown when a user didn't have the appropriate
+ * permissions to perform an operation
*
* @package Sabre
* @subpackage DAVACL
@@ -10,13 +13,6 @@
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-
-/**
- * NeedPrivileges
- *
- * The 403-need privileges is thrown when a user didn't have the appropriate
- * permissions to perform an operation
- */
class Sabre_DAVACL_Exception_NeedPrivileges extends Sabre_DAV_Exception_Forbidden {
/**
diff --git a/3rdparty/Sabre/DAVACL/PrincipalCollection.php b/3rdparty/Sabre/DAVACL/PrincipalCollection.php
index 3cc0ae8462..4d22bf8aa7 100644
--- a/3rdparty/Sabre/DAVACL/PrincipalCollection.php
+++ b/3rdparty/Sabre/DAVACL/PrincipalCollection.php
@@ -9,7 +9,7 @@
* The users are instances of Sabre_DAV_Auth_Principal
*
* @package Sabre
- * @subpackage DAV
+ * @subpackage DAVACL
* @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
diff --git a/3rdparty/Sabre/VObject/Component.php b/3rdparty/Sabre/VObject/Component.php
index 3d5a3d7563..47cf9f3d81 100644
--- a/3rdparty/Sabre/VObject/Component.php
+++ b/3rdparty/Sabre/VObject/Component.php
@@ -83,13 +83,16 @@ class Sabre_VObject_Component extends Sabre_VObject_Element {
if (!is_null($itemValue)) {
throw new InvalidArgumentException('The second argument must not be specified, when passing a VObject');
}
+ $item->parent = $this;
$this->children[] = $item;
} elseif(is_string($item)) {
if (!is_scalar($itemValue)) {
throw new InvalidArgumentException('The second argument must be scalar');
}
- $this->children[] = new Sabre_VObject_Property($item,$itemValue);
+ $item = new Sabre_VObject_Property($item,$itemValue);
+ $item->parent = $this;
+ $this->children[] = $item;
} else {
@@ -208,16 +211,19 @@ class Sabre_VObject_Component extends Sabre_VObject_Element {
$overWrite = count($matches)?key($matches):null;
if ($value instanceof Sabre_VObject_Component || $value instanceof Sabre_VObject_Property) {
+ $value->parent = $this;
if (!is_null($overWrite)) {
$this->children[$overWrite] = $value;
} else {
$this->children[] = $value;
}
} elseif (is_scalar($value)) {
+ $property = new Sabre_VObject_Property($name,$value);
+ $property->parent = $this;
if (!is_null($overWrite)) {
- $this->children[$overWrite] = new Sabre_VObject_Property($name,$value);
+ $this->children[$overWrite] = $property;
} else {
- $this->children[] = new Sabre_VObject_Property($name,$value);
+ $this->children[] = $property;
}
} else {
throw new InvalidArgumentException('You must pass a Sabre_VObject_Component, Sabre_VObject_Property or scalar type');
@@ -237,6 +243,7 @@ class Sabre_VObject_Component extends Sabre_VObject_Element {
foreach($matches as $k=>$child) {
unset($this->children[$k]);
+ $child->parent = null;
}
diff --git a/3rdparty/Sabre/VObject/Element/DateTime.php b/3rdparty/Sabre/VObject/Element/DateTime.php
index 30e5c6ca86..3350ec02c8 100644
--- a/3rdparty/Sabre/VObject/Element/DateTime.php
+++ b/3rdparty/Sabre/VObject/Element/DateTime.php
@@ -70,7 +70,7 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
$this->setValue($dt->format('Ymd\\THis'));
$this->offsetUnset('VALUE');
$this->offsetUnset('TZID');
- $this->offsetSet('VALUE','DATE-TIME');
+ $this->offsetSet('VALUE','DATE-TIME');
break;
case self::UTC :
$dt->setTimeZone(new DateTimeZone('UTC'));
@@ -116,7 +116,7 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
list(
$this->dateType,
$this->dateTime
- ) = self::parseData($this->value, $this->offsetGet('TZID'));
+ ) = self::parseData($this->value, $this);
return $this->dateTime;
}
@@ -137,7 +137,7 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
list(
$this->dateType,
$this->dateTime,
- ) = self::parseData($this->value, $this->offsetGet('TZID'));
+ ) = self::parseData($this->value, $this);
return $this->dateType;
}
@@ -151,12 +151,12 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
* 2. A DateTime object (or null)
*
* @param string|null $propertyValue The string to parse (yymmdd or
- * ymmddThhmmss, etc..)
- * @param string|null $tzid The value of the 'TZID' property.
+ * ymmddThhmmss, etc..)
+ * @param Sabre_VObject_Property|null $property The instance of the
+ * property we're parsing.
* @return array
*/
- static public function parseData($propertyValue, $tzid) {
-
+ static public function parseData($propertyValue, Sabre_VObject_Property $property = null) {
if (is_null($propertyValue)) {
return array(null, null);
@@ -195,6 +195,8 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
);
}
+ // Finding the timezone.
+ $tzid = $property['TZID'];
if (!$tzid) {
return array(
self::LOCAL,
@@ -202,7 +204,32 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
);
}
- $tz = new DateTimeZone($tzid->value);
+ try {
+ $tz = new DateTimeZone($tzid->value);
+ } catch (Exception $e) {
+
+ // The id was invalid, we're going to try to find the information
+ // through the VTIMEZONE object.
+
+ // First we find the root object
+ $root = $property;
+ while($root->parent) {
+ $root = $root->parent;
+ }
+
+ if (isset($root->VTIMEZONE)) {
+ foreach($root->VTIMEZONE as $vtimezone) {
+ if (((string)$vtimezone->TZID) == $tzid) {
+ if (isset($vtimezone->{'X-LIC-LOCATION'})) {
+ $tzid = (string)$vtimezone->{'X-LIC-LOCATION'};
+ }
+ }
+ }
+ }
+
+ $tz = new DateTimeZone($tzid);
+
+ }
$dt = new DateTime($dateStr, $tz);
$dt->setTimeZone($tz);
diff --git a/3rdparty/Sabre/VObject/Element/MultiDateTime.php b/3rdparty/Sabre/VObject/Element/MultiDateTime.php
index 5e677f5e5b..dc6ca5abb8 100644
--- a/3rdparty/Sabre/VObject/Element/MultiDateTime.php
+++ b/3rdparty/Sabre/VObject/Element/MultiDateTime.php
@@ -60,7 +60,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
$val[] = $i->format('Ymd\\THis');
}
$this->setValue(implode(',',$val));
- $this->offsetSet('VALUE','DATE-TIME');
+ $this->offsetSet('VALUE','DATE-TIME');
break;
case Sabre_VObject_Element_DateTime::UTC :
$val = array();
@@ -121,7 +121,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
list(
$type,
$dt
- ) = Sabre_VObject_Element_DateTime::parseData($val, $this->offsetGet('TZID'));
+ ) = Sabre_VObject_Element_DateTime::parseData($val, $this);
$dts[] = $dt;
$this->dateType = $type;
}
@@ -154,7 +154,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
list(
$type,
$dt
- ) = Sabre_VObject_Element_DateTime::parseData($val, $this->offsetGet('TZID'));
+ ) = Sabre_VObject_Element_DateTime::parseData($val, $this);
$dts[] = $dt;
$this->dateType = $type;
}
diff --git a/3rdparty/Sabre/VObject/Node.php b/3rdparty/Sabre/VObject/Node.php
index efc7f76da7..7100b62f1c 100644
--- a/3rdparty/Sabre/VObject/Node.php
+++ b/3rdparty/Sabre/VObject/Node.php
@@ -25,6 +25,13 @@ abstract class Sabre_VObject_Node implements IteratorAggregate, ArrayAccess, Cou
*/
protected $iterator = null;
+ /**
+ * A link to the parent node
+ *
+ * @var Sabre_VObject_Node
+ */
+ protected $parent = null;
+
/* {{{ IteratorAggregator interface */
/**
diff --git a/3rdparty/Sabre/VObject/Property.php b/3rdparty/Sabre/VObject/Property.php
index 624dd4b8a5..0605822904 100644
--- a/3rdparty/Sabre/VObject/Property.php
+++ b/3rdparty/Sabre/VObject/Property.php
@@ -149,13 +149,16 @@ class Sabre_VObject_Property extends Sabre_VObject_Element {
if (!is_null($itemValue)) {
throw new InvalidArgumentException('The second argument must not be specified, when passing a VObject');
}
+ $item->parent = $this;
$this->parameters[] = $item;
} elseif(is_string($item)) {
if (!is_scalar($itemValue)) {
throw new InvalidArgumentException('The second argument must be scalar');
}
- $this->parameters[] = new Sabre_VObject_Parameter($item,$itemValue);
+ $parameter = new Sabre_VObject_Parameter($item,$itemValue);
+ $parameter->parent = $this;
+ $this->parameters[] = $parameter;
} else {
@@ -231,12 +234,15 @@ class Sabre_VObject_Property extends Sabre_VObject_Element {
throw new InvalidArgumentException('A parameter name must be specified. This means you cannot use the $array[]="string" to add parameters.');
$this->offsetUnset($name);
- $this->parameters[] = new Sabre_VObject_Parameter($name, $value);
+ $parameter = new Sabre_VObject_Parameter($name, $value);
+ $parameter->parent = $this;
+ $this->parameters[] = $parameter;
} elseif ($value instanceof Sabre_VObject_Parameter) {
if (!is_null($name))
throw new InvalidArgumentException('Don\'t specify a parameter name if you\'re passing a Sabre_VObject_Parameter. Add using $array[]=$parameterObject.');
-
+
+ $value->parent = $this;
$this->parameters[] = $value;
} else {
throw new InvalidArgumentException('You can only add parameters to the property object');
@@ -258,6 +264,7 @@ class Sabre_VObject_Property extends Sabre_VObject_Element {
$result = array();
foreach($this->parameters as $key=>$parameter) {
if ($parameter->name == $name) {
+ $parameter->parent = null;
unset($this->parameters[$key]);
}
diff --git a/3rdparty/Sabre/VObject/Reader.php b/3rdparty/Sabre/VObject/Reader.php
index c38afbfb63..5ed7882ac9 100644
--- a/3rdparty/Sabre/VObject/Reader.php
+++ b/3rdparty/Sabre/VObject/Reader.php
@@ -95,7 +95,7 @@ class Sabre_VObject_Reader {
while(stripos($nextLine,"END:")!==0) {
- $obj->children[] = self::readLine($lines);
+ $obj->add(self::readLine($lines));
$nextLine = current($lines);
if ($nextLine===false)
@@ -140,7 +140,9 @@ class Sabre_VObject_Reader {
if ($matches['parameters']) {
- $obj->parameters = self::readParameters($matches['parameters']);
+ foreach(self::readParameters($matches['parameters']) as $param) {
+ $obj->add($param);
+ }
}
return $obj;
diff --git a/3rdparty/Sabre/VObject/Version.php b/3rdparty/Sabre/VObject/Version.php
index 950c1c5110..937c367e22 100644
--- a/3rdparty/Sabre/VObject/Version.php
+++ b/3rdparty/Sabre/VObject/Version.php
@@ -14,7 +14,7 @@ class Sabre_VObject_Version {
/**
* Full version number
*/
- const VERSION = '1.2.2';
+ const VERSION = '1.2.4';
/**
* Stability : alpha, beta, stable
diff --git a/apps/admin_dependencies_chk/appinfo/app.php b/apps/admin_dependencies_chk/appinfo/app.php
new file mode 100644
index 0000000000..e2169b5dd7
--- /dev/null
+++ b/apps/admin_dependencies_chk/appinfo/app.php
@@ -0,0 +1,9 @@
+ 14,
+ 'id' => 'admin_dependencies_chk',
+ 'name' => 'Owncloud Install Info' ));
+
+OC_APP::registerAdmin('admin_dependencies_chk','settings');
diff --git a/apps/admin_dependencies_chk/appinfo/info.xml b/apps/admin_dependencies_chk/appinfo/info.xml
new file mode 100644
index 0000000000..10721ece15
--- /dev/null
+++ b/apps/admin_dependencies_chk/appinfo/info.xml
@@ -0,0 +1,11 @@
+
+
+ admin_dependencies_chk
+ Owncloud dependencies info
+ 0.01
+ AGPL
+ Brice Maron (eMerzh)
+ 2
+ Display OwnCloud's dependencies informations (missings modules, ...)
+
+
diff --git a/apps/admin_dependencies_chk/css/style.css b/apps/admin_dependencies_chk/css/style.css
new file mode 100644
index 0000000000..30f204be7b
--- /dev/null
+++ b/apps/admin_dependencies_chk/css/style.css
@@ -0,0 +1,9 @@
+#status_list legend { font-weight: bold; color: #888888; }
+.state > li { margin-bottom: 3px; padding-left: 0.5em; list-style-type: circle; }
+.state .state_module { font-weight:bold; text-shadow: 0 1px 0 #DDD; cursor:help;}
+
+.state_used ul, .state_used li { display:inline; }
+
+.state_ok .state_module { color: #009700; }
+.state_warning .state_module { color: #FF9B29; }
+.state_error .state_module { color: #FF3B3B; }
diff --git a/apps/admin_dependencies_chk/settings.php b/apps/admin_dependencies_chk/settings.php
new file mode 100644
index 0000000000..de2f97aa79
--- /dev/null
+++ b/apps/admin_dependencies_chk/settings.php
@@ -0,0 +1,96 @@
+.
+ *
+ */
+$l=new OC_L10N('admin_dependencies_chk');
+$tmpl = new OC_Template( 'admin_dependencies_chk', 'settings');
+
+$modules = array();
+
+//Possible status are : ok, error, warning
+$modules[] =array(
+ 'status' => function_exists('json_encode') ? 'ok' : 'error',
+ 'part'=> 'php-json',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The php-json module is needed by the many applications for inter communications'));
+
+$modules[] =array(
+ 'status' => function_exists('curl_init') ? 'ok' : 'error',
+ 'part'=> 'php-curl',
+ 'modules'=> array('bookmarks'),
+ 'message'=> $l->t('The php-curl modude is needed to fetch the page title when adding a bookmarks'));
+
+$modules[] =array(
+ 'status' => function_exists('imagepng') ? 'ok' : 'error',
+ 'part'=> 'php-gd',
+ 'modules'=> array('gallery'),
+ 'message'=> $l->t('The php-gd module is needed to create thumbnails of your images'));
+
+$modules[] =array(
+ 'status' => OC_Helper::canExecute("mp3info") ? 'ok' : 'warning',
+ 'part'=> 'mp3info',
+ 'modules'=> array('media'),
+ 'message'=> $l->t('The program mp3info is useful to discover ID3 tags of your music files'));
+
+$modules[] =array(
+ 'status' => OC_Helper::canExecute("ldap_bind") ? 'ok' : 'error',
+ 'part'=> 'php-ldap',
+ 'modules'=> array('user_ldap'),
+ 'message'=> $l->t('The php-ldap module is needed connect to your ldap server'));
+
+$modules[] =array(
+ 'status' => class_exists('ZipArchive') ? 'ok' : 'warning',
+ 'part'=> 'php-zip',
+ 'modules'=> array('admin_export','core'),
+ 'message'=> $l->t('The php-zip module is needed download multiple files at once'));
+
+$modules[] =array(
+ 'status' => function_exists('mb_detect_encoding') ? 'ok' : 'error',
+ 'part'=> 'php-mb_multibyte ',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The php-mb_multibyte module is needed to manage correctly the encoding.'));
+
+$modules[] =array(
+ 'status' => function_exists('ctype_digit') ? 'ok' : 'error',
+ 'part'=> 'php-ctype',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The php-ctype module is needed validate data.'));
+
+$modules[] =array(
+ 'status' => ini_get('allow_url_fopen') == '1' ? 'ok' : 'error',
+ 'part'=> 'allow_url_fopen',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers'));
+
+foreach($modules as $key => $module) {
+ $enabled = false ;
+ foreach($module['modules'] as $app) {
+ if(OC_App::isEnabled($app) || $app=='core'){
+ $enabled = true;
+ }
+ }
+ if($enabled == false) unset($modules[$key]);
+}
+
+OC_UTIL::addStyle('admin_dependencies_chk', 'style');
+$tmpl->assign( 'items', $modules );
+
+return $tmpl->fetchPage();
diff --git a/apps/admin_dependencies_chk/templates/settings.php b/apps/admin_dependencies_chk/templates/settings.php
new file mode 100644
index 0000000000..8ff27ebb18
--- /dev/null
+++ b/apps/admin_dependencies_chk/templates/settings.php
@@ -0,0 +1,16 @@
+