[Pkg-owncloud-commits] [owncloud] 02/07: Imported Upstream version 5.0.13~rc1+dfsg

David Prévot taffit at alioth.debian.org
Fri Nov 1 15:30:44 UTC 2013


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

taffit pushed a commit to branch 5.0
in repository owncloud.

commit f63bc75c2ce4306f1039663545757b8b56acd03d
Author: David Prévot <taffit at debian.org>
Date:   Thu Oct 31 22:48:25 2013 -0400

    Imported Upstream version 5.0.13~rc1+dfsg
---
 3rdparty/Sabre/CalDAV/Plugin.php                   |   12 +-
 3rdparty/Sabre/CardDAV/Plugin.php                  |    2 +-
 3rdparty/Sabre/DAVACL/Plugin.php                   |    4 +-
 3rdparty/Sabre/VObject/Parameter.php               |    6 +-
 3rdparty/smb4php/smb.php                           |   10 +-
 apps/bookmarks/ajax/editBookmark.php               |    6 +
 apps/bookmarks/js/bookmarks.js                     |    3 +-
 apps/bookmarks/lib/bookmarks.php                   |   11 +-
 apps/bookmarks/templates/list.php                  |    4 +-
 apps/contacts/lib/app.php                          |   13 +-
 apps/contacts/lib/vcard.php                        |    4 +-
 apps/files/ajax/upload.php                         |    7 +-
 apps/files/js/file-upload.js                       |    2 +
 apps/files/js/fileactions.js                       |   12 +-
 apps/files/js/filelist.js                          |    4 +-
 apps/files/js/files.js                             |    2 +-
 apps/files_encryption/hooks/hooks.php              |   70 +-
 apps/files_encryption/lib/keymanager.php           |    7 +-
 apps/files_encryption/lib/proxy.php                |   56 +-
 apps/files_encryption/lib/stream.php               |    3 +-
 apps/files_encryption/lib/util.php                 |   11 +-
 apps/files_encryption/settings-admin.php           |    4 +-
 apps/files_encryption/tests/util.php               |   28 +
 apps/files_external/lib/streamwrapper.php          |   36 +-
 apps/files_pdfviewer/3rdparty/pdfjs/viewer.js      |    2 +-
 apps/files_sharing/appinfo/app.php                 |    1 +
 apps/files_sharing/appinfo/routes.php              |   27 +
 apps/files_sharing/appinfo/update.php              |   22 +-
 apps/files_sharing/appinfo/version                 |    2 +-
 apps/files_sharing/js/share.js                     |   18 +-
 apps/files_sharing/lib/api.php                     |  531 +++++++++++++
 apps/files_sharing/lib/cache.php                   |   97 ++-
 apps/files_sharing/lib/updater.php                 |   30 +-
 apps/files_sharing/templates/public.php            |    1 +
 apps/files_sharing/tests/api.php                   |  597 +++++++++++++++
 apps/files_texteditor/css/style.css                |    5 +
 apps/files_texteditor/js/editor.js                 |    4 +
 apps/files_versions/js/versions.js                 |    8 +
 apps/firstrunwizard/appinfo/app.php                |    2 +-
 apps/gallery/lib/thumbnail.php                     |    2 +-
 apps/search_lucene/appinfo/app.php                 |   18 +-
 apps/updater/ajax/update.php                       |    2 +-
 apps/updater/js/controllers.js                     |   14 +-
 apps/user_ldap/lib/access.php                      |   21 +-
 config/config.sample.php                           |    5 +-
 core/ajax/share.php                                |    2 +-
 .../configuration/configuration_automation.txt     |   48 +-
 .../configuration/configuration_database.txt       |    2 +-
 .../_sources/installation/installation_others.txt  |    4 +-
 core/doc/admin/_static/ajax-loader.gif             |  Bin 0 -> 673 bytes
 core/doc/admin/_static/basic.css                   |   18 +-
 core/doc/admin/_static/comment-bright.png          |  Bin 0 -> 3500 bytes
 core/doc/admin/_static/comment-close.png           |  Bin 0 -> 3578 bytes
 core/doc/admin/_static/comment.png                 |  Bin 0 -> 3445 bytes
 core/doc/admin/_static/doctools.js                 |   10 +-
 core/doc/admin/_static/down-pressed.png            |  Bin 0 -> 368 bytes
 core/doc/admin/_static/down.png                    |  Bin 0 -> 363 bytes
 core/doc/admin/_static/searchtools.js              |  140 ++--
 core/doc/admin/_static/up-pressed.png              |  Bin 0 -> 372 bytes
 core/doc/admin/_static/up.png                      |  Bin 0 -> 363 bytes
 core/doc/admin/_static/websupport.js               |  808 ++++++++++++++++++++
 core/doc/admin/configuration/auth_ldap.html        |    7 +-
 core/doc/admin/configuration/background_jobs.html  |    7 +-
 .../configuration/configuration_3rdparty.html      |    7 +-
 .../admin/configuration/configuration_apps.html    |   11 +-
 .../configuration/configuration_automation.html    |   53 +-
 .../configuration_custom_clients.html              |    7 +-
 .../configuration/configuration_database.html      |    9 +-
 .../configuration/configuration_encryption.html    |    7 +-
 .../configuration/configuration_knowledgebase.html |    7 +-
 .../configuration/configuration_language.html      |    7 +-
 .../admin/configuration/configuration_logging.html |    7 +-
 .../admin/configuration/configuration_mail.html    |   25 +-
 .../configuration/configuration_maintenance.html   |    7 +-
 .../configuration/configuration_reverseproxy.html  |    7 +-
 .../configuration/configuring_big_file_upload.html |    7 +-
 .../admin/configuration/custom_mount_config.html   |  156 ++--
 .../configuration/custom_mount_config_gui.html     |    7 +-
 .../admin/configuration/custom_user_backend.html   |   23 +-
 core/doc/admin/configuration/index.html            |    7 +-
 core/doc/admin/configuration/xsendfile.html        |    7 +-
 core/doc/admin/contents.html                       |    8 +-
 core/doc/admin/genindex.html                       |   17 +-
 core/doc/admin/index.html                          |    7 +-
 core/doc/admin/installation/index.html             |    7 +-
 .../admin/installation/installation_appliance.html |    9 +-
 .../doc/admin/installation/installation_linux.html |    7 +-
 .../doc/admin/installation/installation_macos.html |    7 +-
 .../admin/installation/installation_others.html    |   11 +-
 .../admin/installation/installation_source.html    |    9 +-
 core/doc/admin/installation/installation_ucs.html  |   61 +-
 .../admin/installation/installation_windows.html   |   11 +-
 core/doc/admin/issues/index.html                   |    7 +-
 core/doc/admin/maintenance/backup.html             |   13 +-
 core/doc/admin/maintenance/index.html              |    7 +-
 core/doc/admin/maintenance/migrating.html          |    7 +-
 core/doc/admin/maintenance/update.html             |    7 +-
 core/doc/admin/search.html                         |    7 +-
 core/doc/admin/searchindex.js                      |    2 +-
 core/doc/user/_sources/files/files.txt             |   32 +-
 core/doc/user/_static/ajax-loader.gif              |  Bin 0 -> 673 bytes
 core/doc/user/_static/basic.css                    |   18 +-
 core/doc/user/_static/comment-bright.png           |  Bin 0 -> 3500 bytes
 core/doc/user/_static/comment-close.png            |  Bin 0 -> 3578 bytes
 core/doc/user/_static/comment.png                  |  Bin 0 -> 3445 bytes
 core/doc/user/_static/doctools.js                  |   10 +-
 core/doc/user/_static/down-pressed.png             |  Bin 0 -> 368 bytes
 core/doc/user/_static/down.png                     |  Bin 0 -> 363 bytes
 core/doc/user/_static/searchtools.js               |  140 ++--
 core/doc/user/_static/up-pressed.png               |  Bin 0 -> 372 bytes
 core/doc/user/_static/up.png                       |  Bin 0 -> 363 bytes
 core/doc/user/_static/websupport.js                |  808 ++++++++++++++++++++
 core/doc/user/bookmarks.html                       |    7 +-
 core/doc/user/contents.html                        |    7 +-
 .../user/files/configuring_big_file_upload.html    |    7 +-
 core/doc/user/files/deletedfiles.html              |    7 +-
 core/doc/user/files/encryption.html                |    7 +-
 core/doc/user/files/files.html                     |   41 +-
 core/doc/user/files/index.html                     |    7 +-
 core/doc/user/files/sync.html                      |    7 +-
 core/doc/user/files/versioncontrol.html            |    7 +-
 core/doc/user/genindex.html                        |   17 +-
 core/doc/user/index.html                           |    7 +-
 core/doc/user/mediaplayer.html                     |    7 +-
 core/doc/user/migration.html                       |    7 +-
 core/doc/user/pim/calendar.html                    |    7 +-
 core/doc/user/pim/contacts.html                    |    7 +-
 core/doc/user/pim/index.html                       |    7 +-
 core/doc/user/pim/sync_ios.html                    |    7 +-
 core/doc/user/pim/sync_kde.html                    |    7 +-
 core/doc/user/pim/sync_osx.html                    |    7 +-
 core/doc/user/pim/sync_thunderbird.html            |    9 +-
 core/doc/user/pim/troubleshooting.html             |    7 +-
 core/doc/user/search.html                          |    7 +-
 core/doc/user/searchindex.js                       |    2 +-
 core/doc/user/webinterface.html                    |    7 +-
 core/js/multiselect.js                             |    6 +-
 core/js/share.js                                   |  107 ++-
 lib/base.php                                       |    1 +
 lib/cache/file.php                                 |   18 +
 lib/connector/sabre/directory.php                  |   61 +-
 lib/connector/sabre/file.php                       |   16 +-
 lib/connector/sabre/node.php                       |   11 +
 lib/db.php                                         |   93 ++-
 lib/filechunking.php                               |   33 +-
 lib/files/cache/cache.php                          |  232 ++++--
 lib/files/cache/updater.php                        |   50 +-
 lib/files/filesystem.php                           |    6 +-
 lib/files/storage/home.php                         |   31 +
 lib/files/view.php                                 |    9 +-
 lib/helper.php                                     |   24 +-
 lib/log.php                                        |    2 +
 lib/log/owncloud.php                               |   24 +-
 lib/public/share.php                               |   27 +-
 lib/setup.php                                      |    8 +-
 lib/updater.php                                    |    3 +-
 lib/user.php                                       |   10 +-
 lib/user/database.php                              |    2 +-
 lib/util.php                                       |    6 +-
 159 files changed, 4573 insertions(+), 761 deletions(-)

diff --git a/3rdparty/Sabre/CalDAV/Plugin.php b/3rdparty/Sabre/CalDAV/Plugin.php
index 775b253..bf53d75 100644
--- a/3rdparty/Sabre/CalDAV/Plugin.php
+++ b/3rdparty/Sabre/CalDAV/Plugin.php
@@ -335,7 +335,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
                 $principalId = $node->getName();
                 $calendarHomePath = self::CALENDAR_ROOT . '/' . $principalId . '/';
                 unset($requestedProperties[array_search($calHome, $requestedProperties)]);
-                $returnedProperties[200][$calHome] = new Sabre_DAV_Property_Href($calendarHomePath);
+                $returnedProperties[200][$calHome] = new Sabre_DAV_Property_Href(Sabre_DAV_URLUtil::encodePath($calendarHomePath));
             }
 
             // schedule-outbox-URL property
@@ -344,7 +344,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
                 $principalId = $node->getName();
                 $outboxPath = self::CALENDAR_ROOT . '/' . $principalId . '/outbox';
                 unset($requestedProperties[array_search($scheduleProp, $requestedProperties)]);
-                $returnedProperties[200][$scheduleProp] = new Sabre_DAV_Property_Href($outboxPath);
+                $returnedProperties[200][$scheduleProp] = new Sabre_DAV_Property_Href(Sabre_DAV_URLUtil::encodePath($outboxPath));
             }
 
             // calendar-user-address-set property
@@ -352,7 +352,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
             if (in_array($calProp,$requestedProperties)) {
 
                 $addresses = $node->getAlternateUriSet();
-                $addresses[] = $this->server->getBaseUri() . $node->getPrincipalUrl() . '/';
+                $addresses[] = Sabre_DAV_URLUtil::encodePath($this->server->getBaseUri() . $node->getPrincipalUrl() . '/');
                 unset($requestedProperties[array_search($calProp, $requestedProperties)]);
                 $returnedProperties[200][$calProp] = new Sabre_DAV_Property_HrefList($addresses, false);
 
@@ -377,10 +377,10 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
                     // group, we grab the parent principal and add it to the
                     // list.
                     if ($groupNode instanceof Sabre_CalDAV_Principal_ProxyRead) {
-                        list($readList[]) = Sabre_DAV_URLUtil::splitPath($group);
+                        list($readList[]) = Sabre_DAV_URLUtil::encodePath(Sabre_DAV_URLUtil::splitPath($group));
                     }
                     if ($groupNode instanceof Sabre_CalDAV_Principal_ProxyWrite) {
-                        list($writeList[]) = Sabre_DAV_URLUtil::splitPath($group);
+                        list($writeList[]) = Sabre_DAV_URLUtil::encodePath(Sabre_DAV_URLUtil::splitPath($group));
                     }
 
                 }
@@ -401,7 +401,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
                 $principalId = $node->getName();
                 $calendarHomePath = 'calendars/' . $principalId . '/notifications/';
                 unset($requestedProperties[$index]);
-                $returnedProperties[200][$notificationUrl] = new Sabre_DAV_Property_Href($calendarHomePath);
+                $returnedProperties[200][$notificationUrl] = new Sabre_DAV_Property_Href(Sabre_DAV_URLUtil::encodePath($calendarHomePath));
             }
 
         } // instanceof IPrincipal
diff --git a/3rdparty/Sabre/CardDAV/Plugin.php b/3rdparty/Sabre/CardDAV/Plugin.php
index 2c3b9e6..8994266 100644
--- a/3rdparty/Sabre/CardDAV/Plugin.php
+++ b/3rdparty/Sabre/CardDAV/Plugin.php
@@ -133,7 +133,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
                 $principalId = $node->getName();
                 $addressbookHomePath = self::ADDRESSBOOK_ROOT . '/' . $principalId . '/';
                 unset($requestedProperties[array_search($addHome, $requestedProperties)]);
-                $returnedProperties[200][$addHome] = new Sabre_DAV_Property_Href($addressbookHomePath);
+                $returnedProperties[200][$addHome] = new Sabre_DAV_Property_Href(Sabre_DAV_URLUtil::encodePath($addressbookHomePath));
             }
 
             $directories = '{' . self::NS_CARDDAV . '}directory-gateway';
diff --git a/3rdparty/Sabre/DAVACL/Plugin.php b/3rdparty/Sabre/DAVACL/Plugin.php
index 7642e40..90d42a9 100644
--- a/3rdparty/Sabre/DAVACL/Plugin.php
+++ b/3rdparty/Sabre/DAVACL/Plugin.php
@@ -838,7 +838,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
             if (false !== ($index = array_search('{DAV:}principal-URL', $requestedProperties))) {
 
                 unset($requestedProperties[$index]);
-                $returnedProperties[200]['{DAV:}principal-URL'] = new Sabre_DAV_Property_Href($node->getPrincipalUrl() . '/');
+                $returnedProperties[200]['{DAV:}principal-URL'] = new Sabre_DAV_Property_Href(Sabre_DAV_URLUtil::encodePath($node->getPrincipalUrl()) . '/');
 
             }
             if (false !== ($index = array_search('{DAV:}group-member-set', $requestedProperties))) {
@@ -874,7 +874,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
 
             unset($requestedProperties[$index]);
             if ($url = $this->getCurrentUserPrincipal()) {
-                $returnedProperties[200]['{DAV:}current-user-principal'] = new Sabre_DAVACL_Property_Principal(Sabre_DAVACL_Property_Principal::HREF, $url . '/');
+                $returnedProperties[200]['{DAV:}current-user-principal'] = new Sabre_DAVACL_Property_Principal(Sabre_DAVACL_Property_Principal::HREF, Sabre_DAV_URLUtil::encodePath($url) . '/');
             } else {
                 $returnedProperties[200]['{DAV:}current-user-principal'] = new Sabre_DAVACL_Property_Principal(Sabre_DAVACL_Property_Principal::UNAUTHENTICATED);
             }
diff --git a/3rdparty/Sabre/VObject/Parameter.php b/3rdparty/Sabre/VObject/Parameter.php
index d6d7c54..62125fa 100644
--- a/3rdparty/Sabre/VObject/Parameter.php
+++ b/3rdparty/Sabre/VObject/Parameter.php
@@ -70,7 +70,11 @@ class Parameter extends Node {
             '\,',
         );
 
-        return $this->name . '=' . str_replace($src, $out, $this->value);
+        $value = str_replace($src, $out, $this->value);
+        if (strpos($value,":")!==false) {
+            $value = '"' . $value . '"';
+        }
+        return $this->name . '=' . $value;
 
     }
 
diff --git a/3rdparty/smb4php/smb.php b/3rdparty/smb4php/smb.php
index 987903c..9279de2 100644
--- a/3rdparty/smb4php/smb.php
+++ b/3rdparty/smb4php/smb.php
@@ -181,6 +181,8 @@ class smb {
 						return false;
 					}elseif(substr($regs[0],0,31)=='NT_STATUS_OBJECT_PATH_NOT_FOUND'){
 						return false;
+					}elseif(substr($regs[0],0,31)=='NT_STATUS_OBJECT_NAME_NOT_FOUND'){
+						return false;
 					}elseif(substr($regs[0],0,29)=='NT_STATUS_FILE_IS_A_DIRECTORY'){
 						return false;
 					}
@@ -303,7 +305,8 @@ class smb {
 			trigger_error('rename(): error in URL', E_USER_ERROR);
 		}
 		smb::clearstatcache ($url_from);
-		return smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
+		$result = smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
+		return $result !== false;
 	}
 
 	function mkdir ($url, $mode, $options) {
@@ -428,7 +431,10 @@ class smb_stream_wrapper extends smb {
 			case 'rb':
 			case 'a':
 			case 'a+':  $this->tmpfile = tempnam('/tmp', 'smb.down.');
-				smb::execute ('get "'.$pu['path'].'" "'.$this->tmpfile.'"', $pu);
+				$result = smb::execute ('get "'.$pu['path'].'" "'.$this->tmpfile.'"', $pu);
+				if($result === false){
+					return $result;
+				}
 				break;
 			case 'w':
 			case 'w+':
diff --git a/apps/bookmarks/ajax/editBookmark.php b/apps/bookmarks/ajax/editBookmark.php
index 94cdd77..15d7b50 100644
--- a/apps/bookmarks/ajax/editBookmark.php
+++ b/apps/bookmarks/ajax/editBookmark.php
@@ -27,6 +27,12 @@ OCP\JSON::callCheck();
 
 OCP\JSON::checkAppEnabled('bookmarks');
 
+// Check if it is a valid URL
+if (filter_var($_POST['url'], FILTER_VALIDATE_URL) === FALSE) {
+	OC_JSON::error();
+	exit();
+}
+
 // If we go the dialog form submit
 if(isset($_POST['url'])) {
 	$title = isset($_POST['title']) ? $_POST['title'] : '';
diff --git a/apps/bookmarks/js/bookmarks.js b/apps/bookmarks/js/bookmarks.js
index f66994c..88cd8a6 100644
--- a/apps/bookmarks/js/bookmarks.js
+++ b/apps/bookmarks/js/bookmarks.js
@@ -279,7 +279,8 @@ function updateBookmarksList(bookmark, position) {
 	if(bookmark.added) {
 		bookmark.added_date.setTime(parseInt(bookmark.added)*1000);
 	}
-	
+	if(! bookmark.title)
+		bookmark.title ='';	
 	html = tmpl("item_tmpl", bookmark);
 	if(position == "prepend") {
 		$('.bookmarks_list').prepend(html);
diff --git a/apps/bookmarks/lib/bookmarks.php b/apps/bookmarks/lib/bookmarks.php
index a0be9d5..ddd1a4a 100644
--- a/apps/bookmarks/lib/bookmarks.php
+++ b/apps/bookmarks/lib/bookmarks.php
@@ -81,7 +81,7 @@ class OC_Bookmarks_Bookmarks{
 	public static function findBookmarks($offset, $sqlSortColumn, $filters, $filterTagOnly, $limit = 10) {
 		$CONFIG_DBTYPE = OCP\Config::getSystemValue( 'dbtype', 'sqlite' );
 		if(is_string($filters)) $filters = array($filters);
-		
+
 		if(! in_array($sqlSortColumn, array('id', 'url', 'title', 'user_id',
 		'description', 'public', 'added', 'lastmodified','clickcount',))) {
 			$sqlSortColumn = 'bookmarks_sorting_recent';
@@ -110,7 +110,10 @@ class OC_Bookmarks_Bookmarks{
 				$sql .= ' having true ';
 			}
 			foreach($filters as $filter) {
-				$sql .= ' AND lower(url || title || description || tags ) like ? ';
+				if($CONFIG_DBTYPE == 'mysql')
+					$sql .= ' AND lower( concat(url,title,description,tags )) like ? ';
+				else
+					$sql .= ' AND lower(url || title || description || tags ) like ? ';
 				$params[] = '%' . strtolower($filter) . '%';
 			}
 		}
@@ -296,7 +299,7 @@ class OC_Bookmarks_Bookmarks{
 
 		// Abort the operation if bookmark couldn't be set
 		// (probably because the user is not allowed to edit this bookmark)
-		if ($result->numRows() == 0) exit();
+		if ($result == 0) exit();
 
 
 		// Remove old tags
@@ -436,7 +439,7 @@ class OC_Bookmarks_Bookmarks{
 		if($page) {
 			if(preg_match( "/<title>(.*)<\/title>/sUi", $page, $match ) !== false)
 				if(isset($match[1])) {
-					$metadata['title'] =  html_entity_decode($match[1], ENT_NOQUOTES , 'UTF-8');
+					$metadata['title'] =  html_entity_decode($match[1], ENT_QUOTES , 'UTF-8');
 					//Not the best solution but....
 					$metadata['title'] = str_replace('™', chr(153), $metadata['title']);
 					$metadata['title'] = str_replace('‐', '‐', $metadata['title']);
diff --git a/apps/bookmarks/templates/list.php b/apps/bookmarks/templates/list.php
index c8f4e9f..0ccfb20 100644
--- a/apps/bookmarks/templates/list.php
+++ b/apps/bookmarks/templates/list.php
@@ -8,7 +8,7 @@
  */
 function bookmarklet(){
 	$l = new OC_l10n('bookmarks');
-	$blet = "javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=document.title,d=a.open('";
+	$blet = "javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('";
 	$blet .= OCP\Util::linkToAbsolute('bookmarks', 'addBm.php');
 	$blet .= "?output=popup&url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=400px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();";
 	$help_msg  = $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:');
@@ -63,4 +63,4 @@ function bookmarklet(){
 </div>
 <script type="text/javascript" src="<?php print_unescaped(OC_Helper::linkTo('bookmarks/js', 'full_tags.php'));?>"></script>
 
-<?php require 'js_tpl.php';?>
\ No newline at end of file
+<?php require 'js_tpl.php';?>
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index 1464c4b..715971c 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -323,7 +323,13 @@ class App {
 			return \OC_Cache::get($key);
 		}
 		if($remove) {
-			\OC_Cache::remove($key);
+			if(!\OC_Cache::remove($key)) {
+				\OCP\Util::writeLog('contacts',
+					__METHOD__. ', Error removing cached thumbnail' . $key,
+					\OCP\Util::ERROR
+				);
+				return false;
+			}
 			if(!$update) {
 				return false;
 			}
@@ -359,8 +365,9 @@ class App {
 			return false;
 		}
 		 // Cache for around a month
-		\OC_Cache::set($key, $image->data(), 3000000);
-		\OCP\Util::writeLog('contacts', 'Caching ' . $id, \OCP\Util::DEBUG);
+		if(!\OC_Cache::set($key, $image->data(), 3000000)) {
+			\OCP\Util::writeLog('contacts', __METHOD__. ', Error caching thumbnail' . $key, \OCP\Util::ERROR);
+		}
 		return \OC_Cache::get($key);
 	}
 
diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php
index 9994799..f255504 100644
--- a/apps/contacts/lib/vcard.php
+++ b/apps/contacts/lib/vcard.php
@@ -597,8 +597,6 @@ class VCard {
 	 */
 	public static function editFromDAVData($aid, $uri, $data) {
 		$oldcard = self::findWhereDAVDataIs($aid, $uri);
-		// Force update of thumbnail when from CardDAV
-		App::cacheThumbnail($oldcard['id'], null, false, true);
 		try {
 			$vcard = \Sabre\VObject\Reader::read($data);
 		} catch(\Exception $e) {
@@ -611,6 +609,8 @@ class VCard {
 
 		try {
 			self::edit($oldcard['id'], $vcard);
+			// Force update of thumbnail when from CardDAV
+			App::cacheThumbnail($oldcard['id'], null, false, true);
 			return true;
 		} catch(\Exception $e) {
 			\OCP\Util::writeLog('contacts', __METHOD__.', exception: '
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 6eaa84f..a81b8ed 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -7,6 +7,8 @@ OCP\JSON::setContentTypeHeader('text/plain');
 // If not, check the login.
 // If no token is sent along, rely on login only
 
+$allowedPermissions = OCP\PERMISSION_ALL;
+
 $l = OC_L10N::get('files');
 if (empty($_POST['dirToken'])) {
 	// The standard case, files are uploaded through logged in users :)
@@ -17,6 +19,9 @@ if (empty($_POST['dirToken'])) {
 		die();
 	}
 } else {
+	// return only read permissions for public upload
+	$allowedPermissions = OCP\PERMISSION_READ;
+
 	$linkItem = OCP\Share::getShareByToken($_POST['dirToken']);
 	if ($linkItem === false) {
 		OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('Invalid Token')))));
@@ -117,7 +122,7 @@ if (strpos($dir, '..') === false) {
 					'originalname' => $files['name'][$i],
 					'uploadMaxFilesize' => $maxUploadFileSize,
 					'maxHumanFilesize' => $maxHumanFileSize,
-					'permissions' => $meta['permissions'],
+					'permissions' => $meta['permissions'] & $allowedPermissions
 				);
 			}
 		}
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 402dd50..42f0811 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -260,6 +260,7 @@ $(document).ready(function() {
 			  getMimeIcon(result.data.mime,function(path){
 			tr.find('td.filename').attr('style','background-image:url('+path+')');
 			  });
+			FileActions.display(tr.find('td.filename'), true);
 			} else {
 			  OC.dialogs.alert(result.data.message, t('core', 'Error'));
 			}
@@ -324,6 +325,7 @@ $(document).ready(function() {
 		  getMimeIcon(mime,function(path){
 			tr.find('td.filename').attr('style','background-image:url('+path+')');
 		  });
+		  FileActions.display(tr.find('td.filename'), true);
 		});
 		eventSource.listen('error',function(error){
 		  $('#uploadprogressbar').fadeOut();
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 5976bb4..dbbc57c 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -61,7 +61,13 @@ var FileActions = {
 		var actions = this.get(mime, type, permissions);
 		return actions[name];
 	},
-	display: function (parent) {
+	/**
+	 * Display file actions for the given element
+	 * @param parent "td" element of the file for which to display actions
+	 * @param triggerEvent if true, triggers the fileActionsReady on the file
+	 * list afterwards (false by default)
+	 */
+	display: function (parent, triggerEvent) {
 		FileActions.currentFile = parent;
 		var actions = FileActions.get(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions());
 		var file = FileActions.getCurrentFile();
@@ -140,6 +146,10 @@ var FileActions = {
 			element.on('click', {a: null, elem: parent, actionFunc: actions['Delete']}, actionHandler);
 			parent.parent().children().last().append(element);
 		}
+
+		if (triggerEvent){
+			$('#fileList').trigger(jQuery.Event("fileActionsReady"));
+		}
 	},
 	getCurrentFile: function () {
 		return FileActions.currentFile.parent().attr('data-file');
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 40a4ae9..5dd9d45 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -130,7 +130,7 @@ var FileList={
 		if (hidden) {
 			tr.hide();
 		}
-		FileActions.display(tr.find('td.filename'));
+		FileActions.display(tr.find('td.filename'), true);
 		return tr;
 	},
 	refresh:function(data) {
@@ -473,7 +473,7 @@ $(document).ready(function(){
 						data.context.attr('data-permissions', file.permissions);
 						data.context.data('permissions', file.permissions);
 					}
-					FileActions.display(data.context.find('td.filename'));
+					FileActions.display(data.context.find('td.filename'), true);
 					if (FileList.loadingDone) {
 						FileList.loadingDone(file.name, file.id);
 					}
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 7581ff3..4163ef8 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -666,7 +666,7 @@ var folderDropOptions={
 			return false;
 		}
 
-		var target=$.trim($(this).find('.nametext').text());
+		var target = $(this).closest('tr').data('file');
 
 		var files = ui.helper.find('tr');
 		$(files).each(function(i,row){
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 1103577..90a327f 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -38,6 +38,11 @@ class Hooks {
 	 * @note This method should never be called for users using client side encryption
 	 */
 	public static function login($params) {
+
+		if (\OCP\App::isEnabled('files_encryption') === false) {
+			return true;
+		}
+
 		$l = new \OC_L10N('files_encryption');
 
 		$view = new \OC_FilesystemView('/');
@@ -104,8 +109,6 @@ class Hooks {
 			}
 
 			// Encrypt existing user files:
-			// This serves to upgrade old versions of the encryption
-			// app (see appinfo/spec.txt)
 			if (
 				$util->encryptAll('/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password'])
 			) {
@@ -131,11 +134,12 @@ class Hooks {
 	 * @note This method should never be called for users using client side encryption
 	 */
 	public static function postCreateUser($params) {
-		$view = new \OC_FilesystemView('/');
 
-		$util = new Util($view, $params['uid']);
-
-		Helper::setupUser($util, $params['password']);
+		if (\OCP\App::isEnabled('files_encryption')) {
+			$view = new \OC_FilesystemView('/');
+			$util = new Util($view, $params['uid']);
+			Helper::setupUser($util, $params['password']);
+		}
 	}
 
 	/**
@@ -143,26 +147,31 @@ class Hooks {
 	 * @note This method should never be called for users using client side encryption
 	 */
 	public static function postDeleteUser($params) {
-		$view = new \OC_FilesystemView('/');
 
-		// cleanup public key
-		$publicKey = '/public-keys/' . $params['uid'] . '.public.key';
+		if (\OCP\App::isEnabled('files_encryption')) {
+			$view = new \OC_FilesystemView('/');
 
-		// Disable encryption proxy to prevent recursive calls
-		$proxyStatus = \OC_FileProxy::$enabled;
-		\OC_FileProxy::$enabled = false;
+			// cleanup public key
+			$publicKey = '/public-keys/' . $params['uid'] . '.public.key';
 
-		$view->unlink($publicKey);
+			// Disable encryption proxy to prevent recursive calls
+			$proxyStatus = \OC_FileProxy::$enabled;
+			\OC_FileProxy::$enabled = false;
 
-		\OC_FileProxy::$enabled = $proxyStatus;
+			$view->unlink($publicKey);
+
+			\OC_FileProxy::$enabled = $proxyStatus;
+		}
 	}
 
 	/**
 	 * @brief If the password can't be changed within ownCloud, than update the key password in advance.
 	 */
 	public static function preSetPassphrase($params) {
-		if ( ! \OC_User::canUserChangePassword($params['uid']) ) {
-			self::setPassphrase($params);
+		if (\OCP\App::isEnabled('files_encryption')) {
+			if ( ! \OC_User::canUserChangePassword($params['uid']) ) {
+				self::setPassphrase($params);
+			}
 		}
 	}
 
@@ -172,6 +181,10 @@ class Hooks {
 	 */
 	public static function setPassphrase($params) {
 
+		if (\OCP\App::isEnabled('files_encryption') === false) {
+			return true;
+		}
+
 		// Only attempt to change passphrase if server-side encryption
 		// is in use (client-side encryption does not have access to
 		// the necessary keys)
@@ -242,6 +255,10 @@ class Hooks {
 	 */
 	public static function preShared($params) {
 
+		if (\OCP\App::isEnabled('files_encryption') === false) {
+			return true;
+		}
+
 		$l = new \OC_L10N('files_encryption');
 		$users = array();
 		$view = new \OC\Files\View('/public-keys/');
@@ -274,6 +291,10 @@ class Hooks {
 	 */
 	public static function postShared($params) {
 
+		if (\OCP\App::isEnabled('files_encryption') === false) {
+			return true;
+		}
+
 		// NOTE: $params has keys:
 		// [itemType] => file
 		// itemSource -> int, filecache file ID
@@ -380,6 +401,10 @@ class Hooks {
 	 */
 	public static function postUnshare($params) {
 
+		if (\OCP\App::isEnabled('files_encryption') === false) {
+			return true;
+		}
+
 		// NOTE: $params has keys:
 		// [itemType] => file
 		// [itemSource] => 13
@@ -468,6 +493,11 @@ class Hooks {
 	 * of the stored versions along the actual file
 	 */
 	public static function postRename($params) {
+
+		if (\OCP\App::isEnabled('files_encryption') === false) {
+			return true;
+		}
+
 		// Disable encryption proxy to prevent recursive calls
 		$proxyStatus = \OC_FileProxy::$enabled;
 		\OC_FileProxy::$enabled = false;
@@ -560,9 +590,11 @@ class Hooks {
 	 * @param array $params contains the app ID
 	 */
 	public static function preDisable($params) {
-		if ($params['app'] === 'files_encryption') {
-			$query = \OC_DB::prepare('UPDATE `*PREFIX*encryption` SET `migration_status`=0');
-			$query->execute();
+		if (\OCP\App::isEnabled('files_encryption')) {
+			if ($params['app'] === 'files_encryption') {
+				$query = \OC_DB::prepare('UPDATE `*PREFIX*encryption` SET `migration_status`=0');
+				$query->execute();
+			}
 		}
 	}
 
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index 0304d11..7143fcf 100644
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -40,11 +40,14 @@ class Keymanager {
 	public static function getPrivateKey(\OC_FilesystemView $view, $user) {
 
 		$path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.private.key';
+		$key = false;
 
 		$proxyStatus = \OC_FileProxy::$enabled;
 		\OC_FileProxy::$enabled = false;
 
-		$key = $view->file_get_contents($path);
+		if ($view->file_exists($path)) {
+			$key = $view->file_get_contents($path);
+		}
 
 		\OC_FileProxy::$enabled = $proxyStatus;
 
@@ -569,4 +572,4 @@ class Keymanager {
 		return $targetPath;
 
 	}
-}
\ No newline at end of file
+}
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index ee6458b..25005e9 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -38,8 +38,6 @@ class Proxy extends \OC_FileProxy {
 
 	private static $blackList = null; //mimetypes blacklisted from encryption
 
-	private static $enableEncryption = null;
-
 	/**
 	 * Check if a file requires encryption
 	 * @param string $path
@@ -49,47 +47,22 @@ class Proxy extends \OC_FileProxy {
 	 */
 	private static function shouldEncrypt($path) {
 
-		if (is_null(self::$enableEncryption)) {
-
-			if (
-				\OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true') === 'true'
-				&& Crypt::mode() === 'server'
-			) {
-
-				self::$enableEncryption = true;
-
-			} else {
-
-				self::$enableEncryption = false;
-
-			}
-
-		}
-
-		if (!self::$enableEncryption) {
-
+		if (\OCP\App::isEnabled('files_encryption') === false || Crypt::mode() !== 'server') {
 			return false;
-
 		}
 
 		if (is_null(self::$blackList)) {
-
 			self::$blackList = explode(',', \OCP\Config::getAppValue('files_encryption', 'type_blacklist', ''));
-
 		}
 
 		if (Crypt::isCatfileContent($path)) {
-
 			return true;
-
 		}
 
 		$extension = substr($path, strrpos($path, '.') + 1);
 
 		if (array_search($extension, self::$blackList) === false) {
-
 			return true;
-
 		}
 
 		return false;
@@ -203,7 +176,7 @@ class Proxy extends \OC_FileProxy {
 	 */
 	public function preUnlink($path) {
 
-		// let the trashbin handle this  
+		// let the trashbin handle this
 		if (\OCP\App::isEnabled('files_trashbin')) {
 			return true;
 		}
@@ -294,7 +267,7 @@ class Proxy extends \OC_FileProxy {
 			// Close the original encrypted file
 			fclose($result);
 
-			// Open the file using the crypto stream wrapper 
+			// Open the file using the crypto stream wrapper
 			// protocol and let it do the decryption work instead
 			$result = fopen('crypt://' . $relativePath, $meta['mode']);
 
@@ -321,7 +294,7 @@ class Proxy extends \OC_FileProxy {
 	public function postGetFileInfo($path, $data) {
 
 		// if path is a folder do nothing
-		if (is_array($data) && array_key_exists('size', $data)) {
+		if (\OCP\App::isEnabled('files_encryption') && is_array($data) && array_key_exists('size', $data)) {
 
 			// Disable encryption proxy to prevent recursive calls
 			$proxyStatus = \OC_FileProxy::$enabled;
@@ -346,6 +319,16 @@ class Proxy extends \OC_FileProxy {
 
 		$view = new \OC_FilesystemView('/');
 
+		$userId = \OCP\User::getUser();
+		$util = new Util($view, $userId);
+
+		// if encryption is no longer enabled or if the files aren't migrated yet
+		// we return the default file size
+		if(!\OCP\App::isEnabled('files_encryption') ||
+				$util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) {
+			return $size;
+		}
+
 		// if path is a folder do nothing
 		if ($view->is_dir($path)) {
 			return $size;
@@ -367,6 +350,15 @@ class Proxy extends \OC_FileProxy {
 
 		// if file is encrypted return real file size
 		if (is_array($fileInfo) && $fileInfo['encrypted'] === true) {
+			// try to fix unencrypted file size if it doesn't look plausible
+			if ((int)$fileInfo['size'] > 0 && (int)$fileInfo['unencrypted_size'] === 0) {
+				$fixSize = $util->getFileSize($path);
+				$fileInfo['unencrypted_size'] = $fixSize;
+				// put file info if not .part file
+				if (!Keymanager::isPartialFilePath($relativePath)) {
+					$view->putFileInfo($path, $fileInfo);
+				}
+			}
 			$size = $fileInfo['unencrypted_size'];
 		} else {
 			// self healing if file was removed from file cache
@@ -374,8 +366,6 @@ class Proxy extends \OC_FileProxy {
 				$fileInfo = array();
 			}
 
-			$userId = \OCP\User::getUser();
-			$util = new Util($view, $userId);
 			$fixSize = $util->getFileSize($path);
 			if ($fixSize > 0) {
 				$size = $fixSize;
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index 08024b8..80ff873 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -490,9 +490,10 @@ class Stream {
 
 			// Get all users sharing the file includes current user
 			$uniqueUserIds = $util->getSharingUsersArray($sharingEnabled, $this->relPath, $this->userId);
+			$checkedUserIds = $util->filterShareReadyUsers($uniqueUserIds);
 
 			// Fetch public keys for all sharing users
-			$publicKeys = Keymanager::getPublicKeys($this->rootView, $uniqueUserIds);
+			$publicKeys = Keymanager::getPublicKeys($this->rootView, $checkedUserIds['ready']);
 
 			// Encrypt enc key for all sharing users
 			$this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys);
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index a2aa305..121b1c4 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -587,11 +587,18 @@ class Util {
 		) {
 
 			// get the size from filesystem
-			$fullPath = $this->view->getLocalFile($path);
 			$size = $this->view->filesize($path);
 
+			// fast path, else the calculation for $lastChunkNr is bogus
+			if ($size === 0) {
+				\OC_FileProxy::$enabled = $proxyStatus;
+				return 0;
+			}
+
 			// calculate last chunk nr
-			$lastChunkNr = floor($size / 8192);
+			// next highest is end of chunks, one subtracted is last one
+			// we have to read the last chunk, we can't just calculate it (because of padding etc)
+			$lastChunkNr = ceil($size/ 8192) - 1;
 			$lastChunkSize = $size - ($lastChunkNr * 8192);
 
 			// open stream
diff --git a/apps/files_encryption/settings-admin.php b/apps/files_encryption/settings-admin.php
index 5367605..9ad9bfb 100644
--- a/apps/files_encryption/settings-admin.php
+++ b/apps/files_encryption/settings-admin.php
@@ -11,9 +11,7 @@
 $tmpl = new OCP\Template('files_encryption', 'settings-admin');
 
 // Check if an adminRecovery account is enabled for recovering files after lost pwd
-$view = new OC_FilesystemView('');
-
-$recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
+$recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled', '0');
 
 $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
 
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php
index bf45b9c..acd3ff8 100644
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
@@ -231,6 +231,34 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
 		$this->view->unlink($this->userId . '/files/' . $filename);
 	}
 
+	/**
+	 * @brief Test that data that is read by the crypto stream wrapper
+	 */
+	function testGetFileSize() {
+		\Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
+
+		$filename = 'tmp-' . time();
+		$externalFilename = '/' . $this->userId . '/files/' . $filename;
+
+		// Test for 0 byte files
+		$problematicFileSizeData = "";
+		$cryptedFile = $this->view->file_put_contents($externalFilename, $problematicFileSizeData);
+		$this->assertTrue(is_int($cryptedFile));
+		$this->assertEquals($this->util->getFileSize($externalFilename), 0);
+		$decrypt = $this->view->file_get_contents($externalFilename);
+		$this->assertEquals($problematicFileSizeData, $decrypt);
+		$this->view->unlink($this->userId . '/files/' . $filename);
+
+		// Test a file with 18377 bytes as in https://github.com/owncloud/mirall/issues/1009
+		$problematicFileSizeData = str_pad("", 18377, "abc");
+		$cryptedFile = $this->view->file_put_contents($externalFilename, $problematicFileSizeData);
+		$this->assertTrue(is_int($cryptedFile));
+		$this->assertEquals($this->util->getFileSize($externalFilename), 18377);
+		$decrypt = $this->view->file_get_contents($externalFilename);
+		$this->assertEquals($problematicFileSizeData, $decrypt);
+		$this->view->unlink($this->userId . '/files/' . $filename);
+	}
+
 	function testIsSharedPath() {
 		$sharedPath = '/user1/files/Shared/test';
 		$path = '/user1/files/test';
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index beb4ec5..4a63dfb 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -8,7 +8,7 @@
 
 namespace OC\Files\Storage;
 
-abstract class StreamWrapper extends Common{
+abstract class StreamWrapper extends Common {
 	abstract public function constructUrl($path);
 
 	public function mkdir($path) {
@@ -16,7 +16,15 @@ abstract class StreamWrapper extends Common{
 	}
 
 	public function rmdir($path) {
-		if($this->file_exists($path)) {
+		if ($this->file_exists($path)) {
+			$dh = $this->opendir($path);
+			while (($file = readdir($dh)) !== false) {
+				if ($this->is_dir($path . '/' . $file)) {
+					$this->rmdir($path . '/' . $file);
+				} else {
+					$this->unlink($path . '/' . $file);
+				}
+			}
 			$success = rmdir($this->constructUrl($path));
 			clearstatcache();
 			return $success;
@@ -34,11 +42,11 @@ abstract class StreamWrapper extends Common{
 	}
 
 	public function isReadable($path) {
-		return true;//not properly supported
+		return true; //not properly supported
 	}
 
 	public function isUpdatable($path) {
-		return true;//not properly supported
+		return true; //not properly supported
 	}
 
 	public function file_exists($path) {
@@ -55,15 +63,19 @@ abstract class StreamWrapper extends Common{
 		return fopen($this->constructUrl($path), $mode);
 	}
 
-	public function touch($path, $mtime=null) {
-		if(is_null($mtime)) {
-			$fh = $this->fopen($path, 'a');
-			fwrite($fh, '');
-			fclose($fh);
-
-			return true;
+	public function touch($path, $mtime = null) {
+		if ($this->file_exists($path)) {
+			if (is_null($mtime)) {
+				$fh = $this->fopen($path, 'a');
+				fwrite($fh, '');
+				fclose($fh);
+
+				return true;
+			} else {
+				return false; //not supported
+			}
 		} else {
-			return false;//not supported
+			$this->file_put_contents($path, '');
 		}
 	}
 
diff --git a/apps/files_pdfviewer/3rdparty/pdfjs/viewer.js b/apps/files_pdfviewer/3rdparty/pdfjs/viewer.js
index 8ae11e0..e403e6c 100644
--- a/apps/files_pdfviewer/3rdparty/pdfjs/viewer.js
+++ b/apps/files_pdfviewer/3rdparty/pdfjs/viewer.js
@@ -2874,7 +2874,7 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
     });
 
 
-  PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+window.file+"&dir="+encodeURIComponent(window.dir), 1.0);
+  PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+encodeURIComponent(window.file)+"&dir="+encodeURIComponent(window.dir), 1.0);
 }, true);
 
 function updateViewarea() {
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 9363a54..5f73a07 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -7,6 +7,7 @@ OC::$CLASSPATH['OC\Files\Cache\Shared_Cache'] = 'files_sharing/lib/cache.php';
 OC::$CLASSPATH['OC\Files\Cache\Shared_Permissions'] = 'files_sharing/lib/permissions.php';
 OC::$CLASSPATH['OC\Files\Cache\Shared_Updater'] = 'files_sharing/lib/updater.php';
 OC::$CLASSPATH['OC\Files\Cache\Shared_Watcher'] = 'files_sharing/lib/watcher.php';
+OC::$CLASSPATH['OCA\Files\Share\Api'] = 'files_sharing/lib/api.php';
 OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
 OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
 OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php
new file mode 100644
index 0000000..1936687
--- /dev/null
+++ b/apps/files_sharing/appinfo/routes.php
@@ -0,0 +1,27 @@
+<?php
+// OCS API
+
+OC_API::register('get',
+		'/apps/files_sharing/api/v1/shares',
+		array('\OCA\Files\Share\Api', 'getAllShares'),
+		'files_sharing');
+
+OC_API::register('post',
+		'/apps/files_sharing/api/v1/shares',
+		array('\OCA\Files\Share\Api', 'createShare'),
+		'files_sharing');
+
+OC_API::register('get',
+		'/apps/files_sharing/api/v1/shares/{id}',
+		array('\OCA\Files\Share\Api', 'getShare'),
+		'files_sharing');
+
+OC_API::register('put',
+		'/apps/files_sharing/api/v1/shares/{id}',
+		array('\OCA\Files\Share\Api', 'updateShare'),
+		'files_sharing');
+
+OC_API::register('delete',
+		'/apps/files_sharing/api/v1/shares/{id}',
+		array('\OCA\Files\Share\Api', 'deleteShare'),
+		'files_sharing');
diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
index 48e41e9..0d827da 100644
--- a/apps/files_sharing/appinfo/update.php
+++ b/apps/files_sharing/appinfo/update.php
@@ -68,11 +68,21 @@ if (version_compare($installedVersion, '0.3', '<')) {
 // 	$query = OCP\DB::prepare('DROP TABLE `*PREFIX*sharing`');
 // 	$query->execute();
 }
-if (version_compare($installedVersion, '0.3.3', '<')) {
-	OC_User::useBackend(new OC_User_Database());
-	OC_App::loadApps(array('authentication'));
-	$users = OC_User::getUsers();
-	foreach ($users as $user) {
-//		OC_FileCache::delete('Shared', '/'.$user.'/files/');
+
+// clean up oc_share table from files which are no longer exists
+if (version_compare($installedVersion, '0.3.5', '<')) {
+
+	// get all shares where the original file no longer exists
+	$findShares = \OC_DB::prepare('SELECT `file_source` FROM `*PREFIX*share` LEFT JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `*PREFIX*filecache`.`fileid` IS NULL AND `*PREFIX*share`.`item_type` IN (\'file\', \'folder\')');
+	$sharesFound = $findShares->execute(array())->fetchAll();
+
+	// delete those shares from the oc_share table
+	if (is_array($sharesFound) && !empty($sharesFound)) {
+		$delArray = array();
+		foreach ($sharesFound as $share) {
+			$delArray[] = $share['file_source'];
+		}
+		$removeShares = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_source` IN (?)');
+		$result = $removeShares->execute(array(implode(',', $delArray)));
 	}
 }
diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version
index 87a0871..09e9157 100644
--- a/apps/files_sharing/appinfo/version
+++ b/apps/files_sharing/appinfo/version
@@ -1 +1 @@
-0.3.3
\ No newline at end of file
+0.3.5
\ No newline at end of file
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index b2efafd..68f6f3b 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -1,11 +1,19 @@
 $(document).ready(function() {
 
-	var disableSharing = $('#disableSharing').data('status');
+	var disableSharing = $('#disableSharing').data('status'),
+		sharesLoaded = false;
 
 	if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined'  && !disableSharing) {
-
-		$('#fileList').one('fileActionsReady',function(){
-			OC.Share.loadIcons('file');
+		$('#fileList').on('fileActionsReady',function(){
+			if (!sharesLoaded){
+				OC.Share.loadIcons('file');
+				// assume that we got all shares, so switching directories
+				// will not invalidate that list
+				sharesLoaded = true;
+			}
+			else{
+				OC.Share.updateIcons('file');
+			}
 		});
 
 		FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) {
@@ -38,4 +46,4 @@ $(document).ready(function() {
 			}
 		});
 	}
-});
\ No newline at end of file
+});
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
new file mode 100644
index 0000000..1bd0003
--- /dev/null
+++ b/apps/files_sharing/lib/api.php
@@ -0,0 +1,531 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Bjoern Schiessle
+ * @copyright 2013 Bjoern Schiessle schiessle at owncloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Files\Share;
+
+class Api {
+
+	/**
+	 * @brief get all shares
+	 *
+	 * @param array $params option 'file' to limit the result to a specific file/folder
+	 * @return \OC_OCS_Result share information
+	 */
+	public static function getAllShares($params) {
+		// if a file is specified, get the share for this file
+		if (isset($_GET['path'])) {
+			$params['itemSource'] = self::getFileId($_GET['path']);
+			$params['path'] = $_GET['path'];
+			$params['itemType'] = self::getItemType($_GET['path']);
+
+			if ( isset($_GET['reshares']) && $_GET['reshares'] !== 'false' ) {
+				$params['reshares'] = true;
+			} else {
+				$params['reshares'] = false;
+			}
+
+			if (isset($_GET['subfiles']) && $_GET['subfiles'] !== 'false') {
+				return self::getSharesFromFolder($params);
+			}
+			return self::collectShares($params);
+		}
+
+		$share = \OCP\Share::getItemShared('file', null);
+
+		if ($share === false) {
+			return new \OC_OCS_Result(null, 404, 'could not get shares');
+		} else {
+			return new \OC_OCS_Result($share);
+		}
+
+	}
+
+	/**
+	 * @brief get share information for a given share
+	 *
+	 * @param array $params which contains a 'id'
+	 * @return \OC_OCS_Result share information
+	 */
+	public static function getShare($params) {
+
+		$s = self::getShareFromId($params['id']);
+		$params['itemSource'] = $s['item_source'];
+		$params['itemType'] = $s['item_type'];
+		$params['specificShare'] = true;
+
+		return self::collectShares($params);
+	}
+
+	/**
+	 * @brief collect all share information, either of a specific share or all
+	 *        shares for a given path
+	 * @param array $params
+	 * @return \OC_OCS_Result
+	 */
+	private static function collectShares($params) {
+
+		$itemSource = $params['itemSource'];
+		$itemType = $params['itemType'];
+		$getSpecificShare = isset($params['specificShare']) ? $params['specificShare'] : false;
+
+		if ($itemSource !== null) {
+			$shares = \OCP\Share::getItemShared($itemType, $itemSource);
+			$receivedFrom = \OCP\Share::getItemSharedWithBySource($itemType, $itemSource);
+			// if a specific share was specified only return this one
+			if ($getSpecificShare === true) {
+				foreach ($shares as $share) {
+					if ($share['id'] === (int) $params['id']) {
+						$shares = array('element' => $share);
+						break;
+					}
+				}
+			}
+
+			// include also reshares in the lists. This means that the result
+			// will contain every user with access to the file.
+			if (isset($params['reshares']) && $params['reshares'] === true) {
+				$shares = self::addReshares($shares, $itemSource);
+			}
+
+			if ($receivedFrom) {
+				$shares['received_from'] = $receivedFrom['uid_owner'];
+				$shares['received_from_displayname'] = \OCP\User::getDisplayName($receivedFrom['uid_owner']);
+			}
+		} else {
+			$shares = null;
+		}
+
+		if ($shares === null || empty($shares)) {
+			return new \OC_OCS_Result(null, 404, 'share doesn\'t exist');
+		} else {
+			return new \OC_OCS_Result($shares);
+		}
+	}
+
+	/**
+	 * @brief add reshares to a array of shares
+	 * @param array $shares array of shares
+	 * @param int $itemSource item source ID
+	 * @return array new shares array which includes reshares
+	 */
+	private static function addReshares($shares, $itemSource) {
+
+		// if there are no shares than there are also no reshares
+		$firstShare = reset($shares);
+		if ($firstShare) {
+			$path = $firstShare['path'];
+		} else {
+			return $shares;
+		}
+
+		$select = '`*PREFIX*share`.`id`, `item_type`, `*PREFIX*share`.`parent`, `share_type`, `share_with`, `file_source`, `path` , `permissions`, `stime`, `expiration`, `token`, `storage`';
+		$getReshares = \OC_DB::prepare('SELECT ' . $select . ' FROM `*PREFIX*share` INNER JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `*PREFIX*share`.`file_source` = ? AND `*PREFIX*share`.`item_type` IN (\'file\', \'folder\') AND `uid_owner` != ?');
+		$reshares = $getReshares->execute(array($itemSource, \OCP\User::getUser()))->fetchAll();
+
+		foreach ($reshares as $key => $reshare) {
+			if (isset($reshare['share_with']) && $reshare['share_with'] !== '') {
+				$reshares[$key]['share_with_displayname'] = \OCP\User::getDisplayName($reshare['share_with']);
+			}
+			// add correct path to the result
+			$reshares[$key]['path'] = $path;
+		}
+
+		return array_merge($shares, $reshares);
+	}
+
+	/**
+	 * @brief get share from all files in a given folder (non-recursive)
+	 * @param array $params contains 'path' to the folder
+	 * @return \OC_OCS_Result
+	 */
+	private static function getSharesFromFolder($params) {
+		$path = $params['path'];
+		$view = new \OC\Files\View('/'.\OCP\User::getUser().'/files');
+
+		if(!$view->is_dir($path)) {
+			return new \OC_OCS_Result(null, 404, "not a directory");
+		}
+
+		$content = $view->getDirectoryContent($path);
+
+		$result = array();
+		foreach ($content as $file) {
+			// workaround because folders are named 'dir' in this context
+			$itemType = $file['type'] === 'file' ? 'file' : 'folder';
+			$share = \OCP\Share::getItemShared($itemType, $file['fileid']);
+			$receivedFrom =  \OCP\Share::getItemSharedWithBySource($itemType, $file['fileid']);
+			if ($receivedFrom) {
+				$share['received_from'] = $receivedFrom['uid_owner'];
+				$share['received_from_displayname'] = \OCP\User::getDisplayName($receivedFrom['uid_owner']);
+			}
+			if ($share) {
+				$share['filename'] = $file['name'];
+				$result[] = $share;
+			}
+		}
+
+		return new \OC_OCS_Result($result);
+	}
+
+	/**
+	 * @breif create a new share
+	 * @param array $params
+	 * @return \OC_OCS_Result
+	 */
+	public static function createShare($params) {
+
+		$path = isset($_POST['path']) ? $_POST['path'] : null;
+
+		if($path === null) {
+			return new \OC_OCS_Result(null, 400, "please specify a file or folder path");
+		}
+		$itemSource = self::getFileId($path);
+		$itemType = self::getItemType($path);
+
+		if($itemSource === null) {
+			return new \OC_OCS_Result(null, 404, "wrong path, file/folder doesn't exist.");
+		}
+
+		$shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null;
+		$shareType = isset($_POST['shareType']) ? (int)$_POST['shareType'] : null;
+
+		switch($shareType) {
+			case \OCP\Share::SHARE_TYPE_USER:
+				$permissions = isset($_POST['permissions']) ? (int)$_POST['permissions'] : 31;
+				break;
+			case \OCP\Share::SHARE_TYPE_GROUP:
+				$permissions = isset($_POST['permissions']) ? (int)$_POST['permissions'] : 31;
+				break;
+			case \OCP\Share::SHARE_TYPE_LINK:
+				//allow password protection
+				$shareWith = isset($_POST['password']) ? $_POST['password'] : null;
+				//check public link share
+				$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
+				$encryptionEnabled = \OC_App::isEnabled('files_encryption');
+				if(isset($_POST['publicUpload']) &&
+						($encryptionEnabled || $publicUploadEnabled !== 'yes')) {
+					return new \OC_OCS_Result(null, 404, "public upload disabled by the administrator");
+				}
+				$publicUpload = isset($_POST['publicUpload']) ? $_POST['publicUpload'] : 'false';
+				// read, create, update (7) if public upload is enabled or
+				// read (1) if public upload is disabled
+				$permissions = $publicUpload === 'true' ? 7 : 1;
+				break;
+			default:
+				return new \OC_OCS_Result(null, 404, "unknown share type");
+		}
+
+		try	{
+			$token = \OCP\Share::shareItem(
+					$itemType,
+					$itemSource,
+					$shareType,
+					$shareWith,
+					$permissions
+					);
+		} catch (\Exception $e) {
+			return new \OC_OCS_Result(null, 404, $e->getMessage());
+		}
+
+		if ($token) {
+			$data = array();
+			$data['id'] = 'unknown';
+			$shares = \OCP\Share::getItemShared($itemType, $itemSource);
+			if(is_string($token)) { //public link share
+				foreach ($shares as $share) {
+					if ($share['token'] === $token) {
+						$data['id'] = $share['id'];
+						break;
+					}
+				}
+				$url = \OCP\Util::linkToPublic('files&t='.$token);
+				$data['url'] = $url; // '&' gets encoded to $amp;
+				$data['token'] = $token;
+
+			} else {
+				foreach ($shares as $share) {
+					if ($share['share_with'] === $shareWith && $share['share_type'] === $shareType) {
+						$data['id'] = $share['id'];
+						break;
+					}
+				}
+			}
+			return new \OC_OCS_Result($data);
+		} else {
+			return new \OC_OCS_Result(null, 404, "couldn't share file");
+		}
+	}
+
+	/**
+	 * update shares, e.g. password, permissions, etc
+	 * @param array $params shareId 'id' and the parameter we want to update
+	 *                      currently supported: permissions, password, publicUpload
+	 * @return \OC_OCS_Result
+	 */
+	public static function updateShare($params) {
+
+		$share = self::getShareFromId($params['id']);
+		$itemSource = isset($share['item_source']) ? $share['item_source'] : null;
+
+		if($itemSource === null) {
+			return new \OC_OCS_Result(null, 404, "wrong share Id, share doesn't exist.");
+		}
+
+		try {
+			if(isset($params['_put']['permissions'])) {
+				return self::updatePermissions($share, $params);
+			} elseif (isset($params['_put']['password'])) {
+				return self::updatePassword($share, $params);
+			} elseif (isset($params['_put']['publicUpload'])) {
+				return self::updatePublicUpload($share, $params);
+			}
+		} catch (\Exception $e) {
+			return new \OC_OCS_Result(null, 400, $e->getMessage());
+		}
+
+		return new \OC_OCS_Result(null, 400, "Wrong or no update parameter given");
+
+	}
+
+	/**
+	 * @brief update permissions for a share
+	 * @param array $share information about the share
+	 * @param array $params contains 'permissions'
+	 * @return \OC_OCS_Result
+	 */
+	private static function updatePermissions($share, $params) {
+
+		$itemSource = $share['item_source'];
+		$itemType = $share['item_type'];
+		$shareWith = $share['share_with'];
+		$shareType = $share['share_type'];
+		$permissions = isset($params['_put']['permissions']) ? (int)$params['_put']['permissions'] : null;
+
+		$publicUploadStatus = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
+		$encryptionEnabled = \OC_App::isEnabled('files_encryption');
+		$publicUploadEnabled = false;
+		if(!$encryptionEnabled && $publicUploadStatus === 'yes') {
+			$publicUploadEnabled = true;
+		}
+
+		// only change permissions for public shares if public upload is enabled
+		// and we want to set permissions to 1 (read only) or 7 (allow upload)
+		if ( (int)$shareType === \OCP\Share::SHARE_TYPE_LINK ) {
+			if ($publicUploadEnabled === false || ($permissions !== 7 && $permissions !== 1)) {
+				return new \OC_OCS_Result(null, 400, "can't change permission for public link share");
+			}
+		}
+
+		try {
+			$return = \OCP\Share::setPermissions(
+					$itemType,
+					$itemSource,
+					$shareType,
+					$shareWith,
+					$permissions
+					);
+		} catch (\Exception $e) {
+			return new \OC_OCS_Result(null, 404, $e->getMessage());
+		}
+
+		if ($return) {
+			return new \OC_OCS_Result();
+		} else {
+			return new \OC_OCS_Result(null, 404, "couldn't set permissions");
+		}
+	}
+
+	/**
+	 * @brief enable/disable public upload
+	 * @param array $share information about the share
+	 * @param array $params contains 'publicUpload' which can be 'yes' or 'no'
+	 * @return \OC_OCS_Result
+	 */
+	private static function updatePublicUpload($share, $params) {
+
+		$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
+		$encryptionEnabled = \OC_App::isEnabled('files_encryption');
+		if($encryptionEnabled || $publicUploadEnabled !== 'yes') {
+			return new \OC_OCS_Result(null, 404, "public upload disabled by the administrator");
+		}
+
+		if ($share['item_type'] !== 'folder' ||
+				(int)$share['share_type'] !== \OCP\Share::SHARE_TYPE_LINK ) {
+			return new \OC_OCS_Result(null, 404, "public upload is only possible for public shared folders");
+		}
+
+		// read, create, update (7) if public upload is enabled or
+		// read (1) if public upload is disabled
+		$params['_put']['permissions'] = $params['_put']['publicUpload'] === 'true' ? 7 : 1;
+
+		return self::updatePermissions($share, $params);
+
+	}
+
+	/**
+	 * @brief update password for public link share
+	 * @param array $share information about the share
+	 * @param type $params 'password'
+	 * @return \OC_OCS_Result
+	 */
+	private static function updatePassword($share, $params) {
+
+		$itemSource = $share['item_source'];
+		$itemType = $share['item_type'];
+
+		if( (int)$share['share_type'] !== \OCP\Share::SHARE_TYPE_LINK) {
+			return  new \OC_OCS_Result(null, 400, "password protection is only supported for public shares");
+		}
+
+		$shareWith = isset($params['_put']['password']) ? $params['_put']['password'] : null;
+
+		if($shareWith === '') {
+			$shareWith = null;
+		}
+
+		$items = \OCP\Share::getItemShared($itemType, $itemSource);
+
+		$checkExists = false;
+		foreach ($items as $item) {
+			if($item['share_type'] === \OCP\Share::SHARE_TYPE_LINK) {
+				$checkExists = true;
+				$permissions = $item['permissions'];
+			}
+		}
+
+		if (!$checkExists) {
+			return  new \OC_OCS_Result(null, 404, "share doesn't exists, can't change password");
+		}
+
+		$result = \OCP\Share::shareItem(
+				$itemType,
+				$itemSource,
+				\OCP\Share::SHARE_TYPE_LINK,
+				$shareWith,
+				$permissions
+				);
+		if($result) {
+			return new \OC_OCS_Result();
+		}
+
+		return new \OC_OCS_Result(null, 404, "couldn't set password");
+	}
+
+	/**
+	 * @brief unshare a file/folder
+	 * @param array $params contains the shareID 'id' which should be unshared
+	 * @return \OC_OCS_Result
+	 */
+	public static function deleteShare($params) {
+
+		$share = self::getShareFromId($params['id']);
+		$itemSource = isset($share['item_source']) ? $share['item_source'] : null;
+		$itemType = isset($share['item_type']) ? $share['item_type'] : null;;
+
+		if($itemSource === null) {
+			return new \OC_OCS_Result(null, 404, "wrong share ID, share doesn't exist.");
+		}
+
+		$shareWith = isset($share['share_with']) ? $share['share_with'] : null;
+		$shareType = isset($share['share_type']) ? (int)$share['share_type'] : null;
+
+		if( $shareType === \OCP\Share::SHARE_TYPE_LINK) {
+			$shareWith = null;
+		}
+
+		try {
+			$return = \OCP\Share::unshare(
+					$itemType,
+					$itemSource,
+					$shareType,
+					$shareWith);
+		} catch (\Exception $e) {
+			return new \OC_OCS_Result(null, 404, $e->getMessage());
+		}
+
+		if ($return) {
+			return new \OC_OCS_Result();
+		} else {
+			$msg = "Unshare Failed";
+			return new \OC_OCS_Result(null, 404, $msg);
+		}
+	}
+
+	/**
+	 * @brief get file ID from a given path
+	 * @param string $path
+	 * @return string fileID or null
+	 */
+	private static function getFileId($path) {
+
+		$view = new \OC\Files\View('/'.\OCP\User::getUser().'/files');
+		$fileId = null;
+		$fileInfo = $view->getFileInfo($path);
+		if ($fileInfo) {
+			$fileId = $fileInfo['fileid'];
+		}
+
+		return $fileId;
+	}
+
+	/**
+	 * @brief get itemType
+	 * @param string $path
+	 * @return string type 'file', 'folder' or null of file/folder doesn't exists
+	 */
+	private static function getItemType($path) {
+		$view = new \OC\Files\View('/'.\OCP\User::getUser().'/files');
+		$itemType = null;
+
+		if ($view->is_dir($path)) {
+			$itemType = "folder";
+		} elseif ($view->is_file($path)) {
+			$itemType = "file";
+		}
+
+		return $itemType;
+	}
+
+	/**
+	 * @brief get some information from a given share
+	 * @param int $shareID
+	 * @return array with: item_source, share_type, share_with, item_type, permissions
+	 */
+	private static function getShareFromId($shareID) {
+		$sql = 'SELECT `item_source`, `share_type`, `share_with`, `item_type`, `permissions` FROM `*PREFIX*share` WHERE `id` = ?';
+		$args = array($shareID);
+		$query = \OCP\DB::prepare($sql);
+		$result = $query->execute($args);
+
+		if (\OCP\DB::isError($result)) {
+			\OCP\Util::writeLog('files_sharing', \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
+			return null;
+		}
+		if ($share = $result->fetchRow()) {
+			return $share;
+		}
+
+		return null;
+
+	}
+
+}
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index a2b7e22..baa632e 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -20,6 +20,7 @@
  */
 
 namespace OC\Files\Cache;
+use OCP\Share_Backend_Collection;
 
 /**
  * Metadata cache for shared files
@@ -218,31 +219,86 @@ class Shared_Cache extends Cache {
 	 * @return array of file data
 	 */
 	public function search($pattern) {
-		// TODO
+
+		$where = '`name` LIKE ? AND ';
+
+		// normalize pattern
+		$value = $this->normalize($pattern);
+
+		// we have one ? in our where clause
+		$chunksize = self::MAX_SQL_CHUNK_SIZE - 1; 
+
+		return $this->searchWithWhere($where, $value, $chunksize);
+
 	}
 
 	/**
 	 * search for files by mimetype
 	 *
-	 * @param string $part1
-	 * @param string $part2
+	 * @param string $mimetype
 	 * @return array
 	 */
 	public function searchByMime($mimetype) {
+
 		if (strpos($mimetype, '/')) {
-			$where = '`mimetype` = ?';
+			$where = '`mimetype` = ? AND ';
 		} else {
-			$where = '`mimepart` = ?';
+			$where = '`mimepart` = ? AND ';
 		}
-		$mimetype = $this->getMimetypeId($mimetype);
+
+		$value = $this->getMimetypeId($mimetype);
+		
+		// we have one ? in our where clause
+		$chunksize = self::MAX_SQL_CHUNK_SIZE - 1; 
+		
+		return $this->searchWithWhere($where, $value, $chunksize);
+
+	}
+	
+	/**
+	 * The maximum number of placeholders that can be used in an SQL query.
+	 * Value MUST be < 1000.
+	 * Also see ORA-01795 maximum number of expressions in a list is 1000
+	 */
+	const MAX_SQL_CHUNK_SIZE = 999;
+	
+	/**
+	 * search for files with a custom where clause and value
+	 * the $wherevalue will be array_merge()d with the file id chunks
+	 *
+	 * @param string $sqlwhere
+	 * @param string $wherevalue
+	 * @return array
+	 */
+	private function searchWithWhere($sqlwhere, $wherevalue, $chunksize = self::MAX_SQL_CHUNK_SIZE) {
+
 		$ids = $this->getAll();
-		$placeholders = join(',', array_fill(0, count($ids), '?'));
-		$query = \OC_DB::prepare('
-			SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`
-			FROM `*PREFIX*filecache` WHERE ' . $where . ' AND `fileid` IN (' . $placeholders . ')'
-		);
-		$result = $query->execute(array_merge(array($mimetype), $ids));
-		return $result->fetchAll();
+
+		$files = array();
+
+		// divide into 1k chunks
+		$chunks = array_chunk($ids, $chunksize);
+
+		foreach ($chunks as $chunk) {
+			$placeholders = join(',', array_fill(0, count($chunk), '?'));
+			$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,
+					`encrypted`, `unencrypted_size`, `etag`
+					FROM `*PREFIX*filecache` WHERE ' . $sqlwhere . ' `fileid` IN (' . $placeholders . ')';
+
+			$stmt = \OC_DB::prepare($sql);
+			
+			$result = $stmt->execute(array_merge(array($wherevalue), $chunk));
+
+			while ($row = $result->fetchRow()) {
+				if (substr($row['path'], 0, 6) === 'files/') {
+					$row['path'] = substr($row['path'], 6); // remove 'files/' from path as it's relative to '/Shared'
+				}
+				$row['mimetype'] = $this->getMimetype($row['mimetype']);
+				$row['mimepart'] = $this->getMimetype($row['mimepart']);
+				$files[] = $row;
+			}
+		}
+		return $files;
 	}
 
 	/**
@@ -264,7 +320,20 @@ class Shared_Cache extends Cache {
 	 * @return int[]
 	 */
 	public function getAll() {
-		return \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_GET_ALL);
+		$ids = \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_GET_ALL);
+		$folderBackend = \OCP\Share::getBackend('folder');
+		if ($folderBackend instanceof Share_Backend_Collection) {
+			foreach ($ids as $file) {
+				/** @var $folderBackend Share_Backend_Collection */
+				$children = $folderBackend->getChildren($file);
+				foreach ($children as $child) {
+					$ids[] = (int)$child['source'];
+				}
+
+			}
+		}
+
+		return $ids;
 	}
 
 }
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
index a43ab2e..9d08f27 100644
--- a/apps/files_sharing/lib/updater.php
+++ b/apps/files_sharing/lib/updater.php
@@ -32,28 +32,40 @@ class Shared_Updater {
 		$uid = \OCP\User::getUser();
 		$uidOwner = \OC\Files\Filesystem::getOwner($target);
 		$info = \OC\Files\Filesystem::getFileInfo($target);
+		$checkedUser = array($uidOwner);
 		// Correct Shared folders of other users shared with
 		$users = \OCP\Share::getUsersItemShared('file', $info['fileid'], $uidOwner, true);
 		if (!empty($users)) {
 			while (!empty($users)) {
 				$reshareUsers = array();
 				foreach ($users as $user) {
-					if ( $user !== $uidOwner ) {
+					if ( !in_array($user, $checkedUser) ) {
 						$etag = \OC\Files\Filesystem::getETag('');
 						\OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
 						// Look for reshares
 						$reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $info['fileid'], $user, true));
+						$checkedUser[] = $user;
 					}
 				}
 				$users = $reshareUsers;
 			}
-			// Correct folders of shared file owner
-			$target = substr($target, 8);
-			if ($uidOwner !== $uid && $source = \OC_Share_Backend_File::getSource($target)) {
-				\OC\Files\Filesystem::initMountPoints($uidOwner);
-				$source = '/'.$uidOwner.'/'.$source['path'];
-				\OC\Files\Cache\Updater::correctFolder($source, $info['mtime']);
-			}
+		}
+	}
+
+	/**
+	 * @brief remove all shares for a given file if the file was deleted
+	 *
+	 * @param string $path
+	 */
+	private static function removeShare($path) {
+		$fileInfo = \OC\Files\Filesystem::getFileInfo($path);
+		$fileSource = $fileInfo['fileid'];
+
+		$query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_source`=?');
+		try	{
+			$query->execute(array($fileSource));
+		} catch (\Exception $e) {
+			\OCP\Util::writeLog('files_sharing', "can't remove share: " . $e->getMessage(), \OCP\Util::WARN);
 		}
 	}
 
@@ -77,8 +89,10 @@ class Shared_Updater {
 	 */
 	static public function deleteHook($params) {
 		self::correctFolders($params['path']);
+		self::removeShare($params['path']);
 	}
 
+
 	/**
 	 * @param array $params
 	 */
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index ef5ad42..fd0a861 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -4,6 +4,7 @@
 
 <?php $defaults = new OCP\Defaults(); // initialize themable default strings and urls ?>
 
+<input type="hidden" id="isPublic" name="isPublic" value="1">
 <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
 <input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL">
 <input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename">
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
new file mode 100644
index 0000000..44fc4d8
--- /dev/null
+++ b/apps/files_sharing/tests/api.php
@@ -0,0 +1,597 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Bjoern Schiessle
+ * @copyright 2013 Bjoern Schiessle <schiessle at owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+require_once __DIR__ . '/../../../lib/base.php';
+
+use OCA\Files\Share;
+
+/**
+ * Class Test_Files_Sharing_Api
+ */
+class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
+
+	const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
+	const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
+	const TEST_FILES_SHARING_API_USER3 = "test-share-user3";
+
+	public $stateFilesEncryption;
+	public $filename;
+	public $data;
+	/**
+	 * @var OC_FilesystemView
+	 */
+	public $view;
+	public $folder;
+
+	public static function setUpBeforeClass() {
+		// reset backend
+		\OC_User::clearBackends();
+		\OC_User::useBackend('database');
+
+		// clear share hooks
+		\OC_Hook::clear('OCP\\Share');
+		\OC::registerShareHooks();
+		\OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
+
+		// create users
+		self::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1, true);
+		self::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, true);
+		self::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER3, true);
+
+	}
+
+	function setUp() {
+
+		//login as user1
+		\Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
+
+		$this->data = 'foobar';
+		$this->view = new \OC_FilesystemView('/' . \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1 . '/files');
+
+		$this->folder = '/folder_share_api_test';
+
+		$this->filename = 'share-api-test.txt';
+
+		// remember files_encryption state
+		$this->stateFilesEncryption = \OC_App::isEnabled('files_encryption');
+
+		 //we don't want to tests with app files_encryption enabled
+		\OC_App::disable('files_encryption');
+
+
+		$this->assertTrue(!\OC_App::isEnabled('files_encryption'));
+
+		// save file with content
+		$this->view->file_put_contents($this->filename, $this->data);
+		$this->view->mkdir($this->folder);
+		$this->view->file_put_contents($this->folder.'/'.$this->filename, $this->data);
+
+	}
+
+	function tearDown() {
+		$this->view->unlink($this->filename);
+		$this->view->deleteAll($this->folder);
+		// reset app files_encryption
+		if ($this->stateFilesEncryption) {
+			\OC_App::enable('files_encryption');
+		} else {
+			\OC_App::disable('files_encryption');
+		}
+	}
+
+	public static function tearDownAfterClass() {
+
+		// cleanup users
+		\OC_User::deleteUser(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
+		\OC_User::deleteUser(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+		\OC_User::deleteUser(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER3);
+	}
+
+	/**
+	 * @medium
+	 */
+	function testCreateShare() {
+
+		// share to user
+
+		// simulate a post request
+		$_POST['path'] = $this->filename;
+		$_POST['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2;
+		$_POST['shareType'] = \OCP\Share::SHARE_TYPE_USER;
+
+		$result = Share\Api::createShare(array());
+
+		$this->assertTrue($result->succeeded());
+		$data = $result->getData();
+
+		$share = $this->getShareFromId($data['id']);
+
+		$items = \OCP\Share::getItemShared('file', $share['item_source']);
+
+		$this->assertTrue(!empty($items));
+
+		// share link
+
+		// simulate a post request
+		$_POST['path'] = $this->folder;
+		$_POST['shareType'] = \OCP\Share::SHARE_TYPE_LINK;
+
+		$result = Share\Api::createShare(array());
+
+		// check if API call was successful
+		$this->assertTrue($result->succeeded());
+
+		$data = $result->getData();
+
+		// check if we have a token
+		$this->assertTrue(is_string($data['token']));
+
+		$share = $this->getShareFromId($data['id']);
+
+		$items = \OCP\Share::getItemShared('file', $share['item_source']);
+
+		$this->assertTrue(!empty($items));
+
+		$fileinfo = $this->view->getFileInfo($this->filename);
+
+		\OCP\Share::unshare('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+		$fileinfo = $this->view->getFileInfo($this->folder);
+
+		\OCP\Share::unshare('folder', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
+
+
+
+	}
+
+	/**
+	 * @medium
+	 * @depends testCreateShare
+	 */
+	function testGetAllShares() {
+
+		$fileinfo = $this->view->getFileInfo($this->filename);
+
+		\OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+		\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
+
+		$result = Share\Api::getAllShares(array());
+
+		$this->assertTrue($result->succeeded());
+
+        // test should return two shares created from testCreateShare()
+		$this->assertTrue(count($result->getData()) === 1);
+
+		\OCP\Share::unshare('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+	}
+
+	/**
+	 * @medium
+	 * @depends testCreateShare
+	 */
+	function testGetShareFromSource() {
+
+		$fileInfo = $this->view->getFileInfo($this->filename);
+
+		\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
+
+		\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK,
+				null, 1);
+
+		$_GET['path'] = $this->filename;
+
+		$result = Share\Api::getAllShares(array());
+
+		$this->assertTrue($result->succeeded());
+
+        // test should return one share created from testCreateShare()
+		$this->assertTrue(count($result->getData()) === 2);
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
+
+	}
+
+	/**
+	 * @medium
+	 * @depends testCreateShare
+	 */
+	function testGetShareFromSourceWithReshares() {
+
+		$fileInfo = $this->view->getFileInfo($this->filename);
+
+		// share the file as user1 to user2
+		\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
+
+		// login as user2 and reshare the file to user3
+		\Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+		\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER3, 31);
+
+		// login as user1 again
+		\Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
+
+		$_GET['path'] = $this->filename;
+
+		$result = Share\Api::getAllShares(array());
+
+		$this->assertTrue($result->succeeded());
+
+		// test should return one share
+		$this->assertTrue(count($result->getData()) === 1);
+
+		// now also ask for the reshares
+		$_GET['reshares'] = 'true';
+
+		$result = Share\Api::getAllShares(array());
+
+		$this->assertTrue($result->succeeded());
+
+		// now we should get two shares, the initial share and the reshare
+		$this->assertTrue(count($result->getData()) === 2);
+
+		// unshare files again
+
+		\Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER3);
+
+		\Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+	}
+
+	/**
+	 * @medium
+	 * @depends testCreateShare
+	 */
+	function testGetShareFromId() {
+
+		$fileInfo = $this->view->getFileInfo($this->filename);
+
+		$result = \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+			\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
+
+		// share was successful?
+		$this->assertTrue($result);
+
+		// get item to determine share ID
+		$result = \OCP\Share::getItemShared('file', $fileInfo['fileid']);
+
+		$this->assertEquals(1, count($result));
+
+		// get first element
+		$share = reset($result);
+
+		// call getShare() with share ID
+		$params = array('id' => $share['id']);
+		$result = Share\Api::getShare($params);
+
+		$this->assertTrue($result->succeeded());
+
+		// test should return one share created from testCreateShare()
+		$this->assertEquals(1, count($result->getData()));
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+			\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+	}
+
+	/**
+	 * @medium
+	 */
+	function testGetShareFromFolder() {
+
+		$fileInfo1 = $this->view->getFileInfo($this->filename);
+		$fileInfo2 = $this->view->getFileInfo($this->folder.'/'.$this->filename);
+
+		$result = \OCP\Share::shareItem('file', $fileInfo1['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
+
+		// share was successful?
+		$this->assertTrue($result);
+
+		$result = \OCP\Share::shareItem('folder', $fileInfo2['fileid'], \OCP\Share::SHARE_TYPE_LINK,
+				null, 1);
+
+		// share was successful?
+		$this->assertTrue(is_string($result));
+
+		$_GET['path'] = $this->folder;
+		$_GET['subfiles'] = 'true';
+
+		$result = Share\Api::getAllShares(array());
+
+		$this->assertTrue($result->succeeded());
+
+        // test should return one share within $this->folder
+		$this->assertTrue(count($result->getData()) === 1);
+
+		\OCP\Share::unshare('file', $fileInfo1['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+		\OCP\Share::unshare('folder', $fileInfo2['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
+
+	}
+
+	/**
+	 * @medium
+	 */
+	function testGetShareFromUnknownId() {
+
+		$params = array('id' => 0);
+
+		$result = Share\Api::getShare($params);
+
+		$this->assertEquals(404, $result->getStatusCode());
+        $meta = $result->getMeta();
+		$this->assertEquals('share doesn\'t exist', $meta['message']);
+
+	}
+
+	/**
+	 * @medium
+	 * @depends testCreateShare
+	 */
+	function testUpdateShare() {
+
+		$fileInfo = $this->view->getFileInfo($this->filename);
+
+		$result = \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
+
+		// share was successful?
+		$this->assertTrue($result);
+
+		$result = \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK,
+				null, 1);
+
+		// share was successful?
+		$this->assertTrue(is_string($result));
+
+		$items = \OCP\Share::getItemShared('file', null);
+
+		// make sure that we found a link share and a user share
+		$this->assertEquals(count($items), 2);
+
+		$linkShare = null;
+		$userShare = null;
+
+		foreach ($items as $item) {
+			if ($item['share_type'] === \OCP\Share::SHARE_TYPE_LINK) {
+				$linkShare = $item;
+			}
+			if ($item['share_type'] === \OCP\Share::SHARE_TYPE_USER) {
+				$userShare = $item;
+			}
+		}
+
+		// make sure that we found a link share and a user share
+		$this->assertTrue(is_array($linkShare));
+		$this->assertTrue(is_array($userShare));
+
+		// update permissions
+
+		$this->assertEquals('31', $userShare['permissions']);
+
+		$params = array();
+		$params['id'] = $userShare['id'];
+		$params['_put'] = array();
+		$params['_put']['permissions'] = 1;
+
+		$result = Share\Api::updateShare($params);
+
+        $meta = $result->getMeta();
+		$this->assertTrue($result->succeeded(), $meta['message']);
+
+		$items = \OCP\Share::getItemShared('file', $userShare['file_source']);
+
+		$newUserShare = null;
+		foreach ($items as $item) {
+			if ($item['share_with'] === \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2) {
+				$newUserShare = $item;
+				break;
+			}
+		}
+
+		$this->assertTrue(is_array($newUserShare));
+
+		$this->assertEquals('1', $newUserShare['permissions']);
+
+		// update password for link share
+
+		$this->assertTrue(empty($linkShare['share_with']));
+
+		$params = array();
+		$params['id'] = $linkShare['id'];
+		$params['_put'] = array();
+		$params['_put']['password'] = 'foo';
+
+		$result = Share\Api::updateShare($params);
+
+		$this->assertTrue($result->succeeded());
+
+		$items = \OCP\Share::getItemShared('file', $linkShare['file_source']);
+
+		$newLinkShare = null;
+		foreach ($items as $item) {
+			if ($item['share_type'] === \OCP\Share::SHARE_TYPE_LINK) {
+				$newLinkShare = $item;
+				break;
+			}
+		}
+
+		$this->assertTrue(is_array($newLinkShare));
+		$this->assertTrue(!empty($newLinkShare['share_with']));
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
+
+	}
+
+	/**
+	 * @medium
+	 */
+	function testUpdateShareUpload() {
+
+		$fileInfo = $this->view->getFileInfo($this->folder);
+
+		$result = \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK,
+				null, 1);
+
+		// share was successful?
+		$this->assertTrue(is_string($result));
+
+		$items = \OCP\Share::getItemShared('file', null);
+
+		// make sure that we found a link share and a user share
+		$this->assertEquals(count($items), 1);
+
+		$linkShare = null;
+
+		foreach ($items as $item) {
+			if ($item['share_type'] === \OCP\Share::SHARE_TYPE_LINK) {
+				$linkShare = $item;
+			}
+		}
+
+		// make sure that we found a link share
+		$this->assertTrue(is_array($linkShare));
+
+		// update public upload
+
+		$params = array();
+		$params['id'] = $linkShare['id'];
+		$params['_put'] = array();
+		$params['_put']['publicUpload'] = 'true';
+
+		$result = Share\Api::updateShare($params);
+
+		$this->assertTrue($result->succeeded());
+
+		$items = \OCP\Share::getItemShared('file', $linkShare['file_source']);
+
+		$updatedLinkShare = null;
+		foreach ($items as $item) {
+			if ($item['share_type'] === \OCP\Share::SHARE_TYPE_LINK) {
+				$updatedLinkShare = $item;
+				break;
+			}
+		}
+
+		$this->assertTrue(is_array($updatedLinkShare));
+		$this->assertEquals(7, $updatedLinkShare['permissions']);
+
+		// cleanup
+
+		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
+
+	}
+
+	/**
+	 * @medium
+	 * @depends testCreateShare
+	 */
+	function testDeleteShare() {
+
+		$fileInfo = $this->view->getFileInfo($this->filename);
+
+		\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+				\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
+
+		\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK,
+				null, 1);
+
+		$items = \OCP\Share::getItemShared('file', null);
+
+		$this->assertEquals(2, count($items));
+
+		foreach ($items as $item) {
+			$result = Share\Api::deleteShare(array('id' => $item['id']));
+
+			$this->assertTrue($result->succeeded());
+		}
+
+		$itemsAfterDelete = \OCP\Share::getItemShared('file', null);
+
+		$this->assertTrue(empty($itemsAfterDelete));
+
+	}
+
+	/**
+	 * @param $user
+	 * @param bool $create
+	 * @param bool $password
+	 */
+	private static function loginHelper($user, $create = false, $password = false) {
+		if ($create) {
+			\OC_User::createUser($user, $user);
+		}
+
+		if ($password === false) {
+			$password = $user;
+		}
+
+		\OC_Util::tearDownFS();
+		\OC_User::setUserId('');
+		\OC\Files\Filesystem::tearDown();
+		\OC_Util::setupFS($user);
+		\OC_User::setUserId($user);
+
+		$params['uid'] = $user;
+		$params['password'] = $password;
+	}
+
+	/**
+	 * @brief get some information from a given share
+	 * @param int $shareID
+	 * @return array with: item_source, share_type, share_with, item_type, permissions
+	 */
+	private function getShareFromId($shareID) {
+		$sql = 'SELECT `item_source`, `share_type`, `share_with`, `item_type`, `permissions` FROM `*PREFIX*share` WHERE `id` = ?';
+		$args = array($shareID);
+		$query = \OCP\DB::prepare($sql);
+		$result = $query->execute($args);
+
+		$share = Null;
+
+		if ($result && $result->numRows() > 0) {
+				$share = $result->fetchRow();
+		}
+
+		return $share;
+
+	}
+
+}
diff --git a/apps/files_texteditor/css/style.css b/apps/files_texteditor/css/style.css
index 4807b70..4eb90cc 100644
--- a/apps/files_texteditor/css/style.css
+++ b/apps/files_texteditor/css/style.css
@@ -1,3 +1,8 @@
+.ie8 .ace_editor div{
+	/* override core style.css font-size:100% that messes up the editor in IE8 */
+	font-size: 12px !important;
+	color: #123456;
+}
 #editor{
 	position: fixed;
 	display: block;
diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js
index b163f76..dc02fea 100644
--- a/apps/files_texteditor/js/editor.js
+++ b/apps/files_texteditor/js/editor.js
@@ -307,6 +307,10 @@ $(window).resize(function () {
 });
 var is_editor_shown = false;
 $(document).ready(function () {
+	if ($('#isPublic').val()){
+		// disable editor in public mode (not supported yet)
+		return;
+	}
 	if (typeof FileActions !== 'undefined') {
 		FileActions.register('text', 'Edit', OC.PERMISSION_READ, '', function (filename) {
 			showFileEditor($('#dir').val(), filename);
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index 2a8b491..c0a2f7d 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -1,4 +1,12 @@
 $(document).ready(function(){
+
+	if ($('#isPublic').val()){
+		// no versions actions in public mode
+		// beware of https://github.com/owncloud/core/issues/4545
+		// as enabling this might hang Chrome
+		return;
+	}
+
 	if (typeof FileActions !== 'undefined') {
 		// Add versions button to 'files/index.php'
 		FileActions.register(
diff --git a/apps/firstrunwizard/appinfo/app.php b/apps/firstrunwizard/appinfo/app.php
index 829f327..43a2fcd 100644
--- a/apps/firstrunwizard/appinfo/app.php
+++ b/apps/firstrunwizard/appinfo/app.php
@@ -22,7 +22,7 @@
  */
 
 
-OC::$CLASSPATH['OCA_FirstRunWizard\Config'] = 'apps/firstrunwizard/lib/firstrunwizard.php';
+OC::$CLASSPATH['OCA_FirstRunWizard\Config'] = 'firstrunwizard/lib/firstrunwizard.php';
 
 OCP\Util::addStyle( 'firstrunwizard', 'colorbox');
 OCP\Util::addScript( 'firstrunwizard', 'jquery.colorbox');
diff --git a/apps/gallery/lib/thumbnail.php b/apps/gallery/lib/thumbnail.php
index 16c806d..86b10b3 100644
--- a/apps/gallery/lib/thumbnail.php
+++ b/apps/gallery/lib/thumbnail.php
@@ -136,7 +136,7 @@ class Thumbnail {
 		}
 
 		$parent = dirname($path);
-		if ($parent !== DIRECTORY_SEPARATOR and $parent !== '') {
+		if ($parent !== DIRECTORY_SEPARATOR and $parent !== '' and $parent !== $path) {
 			self::removeHook(array('path' => $parent));
 		}
 	}
diff --git a/apps/search_lucene/appinfo/app.php b/apps/search_lucene/appinfo/app.php
index f5a0ac7..b9a9abf 100644
--- a/apps/search_lucene/appinfo/app.php
+++ b/apps/search_lucene/appinfo/app.php
@@ -32,19 +32,19 @@ OC::$CLASSPATH['OCA\Search_Lucene\Lucene'] = 'search_lucene/lib/lucene.php';
 OC::$CLASSPATH['OCA\Search_Lucene\Indexer'] = 'search_lucene/lib/indexer.php';
 OC::$CLASSPATH['OCA\Search_Lucene\Hooks'] = 'search_lucene/lib/hooks.php';
 
-OC::$CLASSPATH['Zend_Search_Lucene'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene.php';
-OC::$CLASSPATH['Zend_Search_Lucene_Index_Term'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Index/Term.php';
-OC::$CLASSPATH['Zend_Search_Lucene_Search_Query_Term'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Search/Query/Term.php';
-OC::$CLASSPATH['Zend_Search_Lucene_Field'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Field.php';
-OC::$CLASSPATH['Zend_Search_Lucene_Document'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Document.php';
-OC::$CLASSPATH['Zend_Search_Lucene_Document_Html'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Document/Html.php';
-OC::$CLASSPATH['Zend_Search_Lucene_Analysis_Analyzer'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Analysis/Analyzer.php';
+OC::$CLASSPATH['Zend_Search_Lucene'] = 'search_lucene/3rdparty/Zend/Search/Lucene.php';
+OC::$CLASSPATH['Zend_Search_Lucene_Index_Term'] = 'search_lucene/3rdparty/Zend/Search/Lucene/Index/Term.php';
+OC::$CLASSPATH['Zend_Search_Lucene_Search_Query_Term'] = 'search_lucene/3rdparty/Zend/Search/Lucene/Search/Query/Term.php';
+OC::$CLASSPATH['Zend_Search_Lucene_Field'] = 'search_lucene/3rdparty/Zend/Search/Lucene/Field.php';
+OC::$CLASSPATH['Zend_Search_Lucene_Document'] = 'search_lucene/3rdparty/Zend/Search/Lucene/Document.php';
+OC::$CLASSPATH['Zend_Search_Lucene_Document_Html'] = 'search_lucene/3rdparty/Zend/Search/Lucene/Document/Html.php';
+OC::$CLASSPATH['Zend_Search_Lucene_Analysis_Analyzer'] = 'search_lucene/3rdparty/Zend/Search/Lucene/Analysis/Analyzer.php';
 
 OC::$CLASSPATH['getID3'] = 'getid3/getid3.php';
 
-OC::$CLASSPATH['App_Search_Helper_PdfParser'] = 'apps/search_lucene/3rdparty/pdf2text.php';
+OC::$CLASSPATH['App_Search_Helper_PdfParser'] = 'search_lucene/3rdparty/pdf2text.php';
 
-OC::$CLASSPATH['Zend_Pdf'] = 'apps/search_lucene/3rdparty/Zend/Pdf.php';
+OC::$CLASSPATH['Zend_Pdf'] = 'search_lucene/3rdparty/Zend/Pdf.php';
 
 // --- always add js & css -----------------------------------------------
 
diff --git a/apps/updater/ajax/update.php b/apps/updater/ajax/update.php
index d63257b..9a6f848 100644
--- a/apps/updater/ajax/update.php
+++ b/apps/updater/ajax/update.php
@@ -106,7 +106,7 @@ try {
 	// We are done. Some cleanup
 	Downloader::cleanUp($packageVersion);
 	Updater::cleanUp();
-	$watcher->success((string) App::$l10n->t('All done. Click to the link below to start database upgrade.'));
+	$watcher->done((string) App::$l10n->t('All done. Click to the link below to start database upgrade.'));
 } catch (\Exception $e){
 	App::log($e->getMessage());
 	$watcher->failure((string) App::$l10n->t('Update failed'));
diff --git a/apps/updater/js/controllers.js b/apps/updater/js/controllers.js
index ae39099..ea44be8 100644
--- a/apps/updater/js/controllers.js
+++ b/apps/updater/js/controllers.js
@@ -9,24 +9,24 @@ function updateCtrl($scope, $routeParams) {
 		$('#updater-start').hide();
 		var updateEventSource = new OC.EventSource(OC.filePath('updater', 'ajax', 'update.php'));
 		updateEventSource.listen('success', function(message) {
-			$('<span>').append(message).append('<br />').appendTo($('#upd-progress'));
+			$('<span></span>').append(message).append('<br />').appendTo($('#upd-progress'));
 		});
 		updateEventSource.listen('error', function(message) {
-			$('<span>').addClass('error').append(message).append('<br />').appendTo($('#upd-progress'));
-			message = 'Please fix this and retry.';
-			$('<span>').addClass('error').append(message).append('<br />').appendTo($('#upd-progress'));
+			$('<span></span>').addClass('error').append(message).append('<br />').appendTo($('#upd-progress'));
+			message .= 'Please fix this and retry.';
+			$('<span></span>').addClass('error').append(message).append('<br />').appendTo($('#upd-progress'));
 			updateEventSource.close();
 		});
 		updateEventSource.listen('failure', function(message) {
-			$('<span>').addClass('error').append(message).append('<br />').appendTo($('#upd-progress'));
-			$('<span>')
+			$('<span></span>').addClass('error').append(message).append('<br />').appendTo($('#upd-progress'));
+			$('<span></span>')
 					.addClass('error bold')
 					.append('<br />')
 					.append(t('updater', 'The update was unsuccessful. Please report this issue to the <a href="https://github.com/owncloud/apps/issues" target="_blank">ownCloud community</a>.'))
 					.appendTo($('#upd-progress'));
 		});
 		updateEventSource.listen('done', function(message) {
-			$('<span>').addClass('bold').append('<br />').append('<a href="' + OC.webroot + '">' + OC.webroot + '</a>').appendTo($('#upd-progress'));
+			$('<span></span>').addClass('bold').append('<br />').append('<a href="' + OC.webroot + '">' + OC.webroot + '</a>').appendTo($('#upd-progress'));
 		});
 	};
 }
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index dbe998a..aa8db29 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -28,6 +28,8 @@ abstract class Access {
 	//never ever check this var directly, always use getPagedSearchResultState
 	protected $pagedSearchedSuccessful;
 
+	protected $cookies = array();
+
 	public function setConnector(Connection &$connection) {
 		$this->connection = $connection;
 	}
@@ -59,6 +61,8 @@ abstract class Access {
 			\OCP\Util::writeLog('user_ldap', 'LDAP resource not available.', \OCP\Util::DEBUG);
 			return false;
 		}
+		//all or nothing! otherwise we get in trouble with.
+		$this->initPagedSearch($filter, array($dn), $attr, 99999, 0);
 		$dn = $this->DNasBaseParameter($dn);
 		$rr = @ldap_read($cr, $dn, $filter, array($attr));
 		if(!is_resource($rr)) {
@@ -893,7 +897,9 @@ abstract class Access {
 		if(!$testConnection->setConfiguration($credentials)) {
 			return false;
 		}
-		return $testConnection->bind();
+		$result=$testConnection->bind();
+		$this->connection->bind();
+		return $result;
 	}
 
 	/**
@@ -1004,7 +1010,7 @@ abstract class Access {
 		$bases = $this->sanitizeDN($bases);
 		foreach($bases as $base) {
 			$belongsToBase = true;
-			if(mb_strripos($dn, $base, 0, 'UTF-8') !== (mb_strlen($dn, 'UTF-8')-mb_strlen($base))) {
+			if(mb_strripos($dn, $base, 0, 'UTF-8') !== (mb_strlen($dn, 'UTF-8')-mb_strlen($base, 'UTF-8'))) {
 				$belongsToBase = false;
 			}
 			if($belongsToBase) {
@@ -1029,9 +1035,12 @@ abstract class Access {
 		$offset -= $limit;
 		//we work with cache here
 		$cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' . $limit . '-' . $offset;
-		$cookie = $this->connection->getFromCache($cachekey);
-		if(is_null($cookie)) {
-			$cookie = '';
+		$cookie = '';
+		if(isset($this->cookies[$cachekey])) {
+			$cookie = $this->cookies[$cachekey];
+			if(is_null($cookie)) {
+				$cookie = '';
+			}
 		}
 		return $cookie;
 	}
@@ -1048,7 +1057,7 @@ abstract class Access {
 	private function setPagedResultCookie($base, $filter, $limit, $offset, $cookie) {
 		if(!empty($cookie)) {
 			$cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' .$limit . '-' . $offset;
-			$cookie = $this->connection->writeToCache($cachekey, $cookie);
+			$this->cookies[$cachekey] = $cookie;
 		}
 	}
 
diff --git a/config/config.sample.php b/config/config.sample.php
index 5c09269..092480d 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -181,5 +181,8 @@ $CONFIG = array(
 'customclient_ios' => '', //https://itunes.apple.com/us/app/owncloud/id543672169?mt=8
 
 // date format to be used while writing to the owncloud logfile
-'logdateformat' => 'F d, Y H:i:s'
+'logdateformat' => 'F d, Y H:i:s',
+
+/* timezone used while writing to the owncloud logfile (default: UTC) */
+'logtimezone' => 'Europe/Berlin',
 );
diff --git a/core/ajax/share.php b/core/ajax/share.php
index aed1caf..387ac8b 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -188,7 +188,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
 				while ($count < 15 && count($users) == $limit) {
 					$limit = 15 - $count;
 					if ($sharePolicy == 'groups_only') {
-						$users = OC_Group::DisplayNamesInGroups($groups, $_GET['search'], $limit, $offset);
+						$users = OC_Group::DisplayNamesInGroups($usergroups, $_GET['search'], $limit, $offset);
 					} else {
 						$users = OC_User::getDisplayNames($_GET['search'], $limit, $offset);
 					}
diff --git a/core/doc/admin/_sources/configuration/configuration_automation.txt b/core/doc/admin/_sources/configuration/configuration_automation.txt
index 9caa39a..3ba0ebc 100644
--- a/core/doc/admin/_sources/configuration/configuration_automation.txt
+++ b/core/doc/admin/_sources/configuration/configuration_automation.txt
@@ -4,7 +4,9 @@ Automatic Configuration
 If you need to install ownCloud on multiple servers you normally do not want
 to set-up each instance separately as described in the :doc:`configuration_database`. For this reason the automatic configuration feature has been introduced.
 
-To take advantage of this feature you need to create a configuration file, called :file:`../owncloud/config/autoconfig.php` and set the parameters as required. The file will automatically be removed after the initial configuration has been applied.
+To take advantage of this feature you need to create a configuration file, called :file:`../owncloud/config/autoconfig.php` and set the parameters as required. You can provide all parameters or just part of them - parameters which haven't been provided (if any) will be asked at "Finish setup" screen at first run of ownCloud.
+
+The :file:`../owncloud/config/autoconfig.php` will be automatically removed after the initial configuration has been applied.
 
 Parameters
 ----------
@@ -19,8 +21,25 @@ configuration file compared to the normal :file:`config.php`.
 | dbpass         | dbpassword    |
 +----------------+---------------+
 
+Sample Automatic Configurations
+-------------------------------
+
+Data Directory
+~~~~~~~~~~~~~~
+With the configuration below the "Finish setup" screen still will ask for database and admin credentials settings.
+
+.. code-block:: php
+
+    <?php
+    $AUTOCONFIG = array(
+      "directory"     => "/www/htdocs/owncloud/data",
+    );
+
+
 SQLite Database
 ~~~~~~~~~~~~~~~
+With the configuration below the "Finish setup" screen still will ask for data directory and admin credentials settings.
+
 .. code-block:: php
 
     <?php
@@ -28,13 +47,14 @@ SQLite Database
       "dbtype"        => "sqlite",
       "dbname"        => "owncloud",
       "dbtableprefix" => "",
-      "directory"     => "/www/htdocs/owncloud/data",
     );
 
 MySQL Database
 ~~~~~~~~~~~~~~
 Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in :doc:`configuration_database`.
 
+With the configuration below the "Finish setup" screen still will ask for data directory and admin credentials settings.
+
 .. code-block:: php
 
     <?php
@@ -45,15 +65,14 @@ Keep in mind that the automatic configuration does not unburden you from creatin
       "dbpass"        => "password",
       "dbhost"        => "localhost",
       "dbtableprefix" => "",
-      "adminlogin"    => "root",
-      "adminpass"     => "root-password",
-      "directory"     => "/www/htdocs/owncloud/data",
     );
 
 PostgreSQL Database
 ~~~~~~~~~~~~~~~~~~~
 Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in :doc:`configuration_database`.
 
+With the configuration below the "Finish setup" screen still will ask for data directory and admin credentials settings.
+
 .. code-block:: php
 
     <?php
@@ -64,7 +83,26 @@ Keep in mind that the automatic configuration does not unburden you from creatin
       "dbpass"        => "password",
       "dbhost"        => "localhost",
       "dbtableprefix" => "",
+    );
+    
+All Parameters
+~~~~~~~~~~~~~~
+Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in :doc:`configuration_database`.
+
+With the configuration below "Finish setup" will be skipped at first ownCloud run since all parameters are already preconfigured.
+
+.. code-block:: php
+
+    <?php
+    $AUTOCONFIG = array(
+      "dbtype"        => "mysql",
+      "dbname"        => "owncloud",
+      "dbuser"        => "username",
+      "dbpass"        => "password",
+      "dbhost"        => "localhost",
+      "dbtableprefix" => "",
       "adminlogin"    => "root",
       "adminpass"     => "root-password",
       "directory"     => "/www/htdocs/owncloud/data",
     );
+
diff --git a/core/doc/admin/_sources/configuration/configuration_database.txt b/core/doc/admin/_sources/configuration/configuration_database.txt
index e014420..4e83a72 100644
--- a/core/doc/admin/_sources/configuration/configuration_database.txt
+++ b/core/doc/admin/_sources/configuration/configuration_database.txt
@@ -96,7 +96,7 @@ It is not necessary to create a database and a database user in advance
 because this will automatically be done by ownCloud when you login for the
 first time.
 
-In the ownCloud counfiguration in :file:`config/config.php` you need to set at least the **datadirectory** parameter to the directory where your data and database should be stored. No authentication is required to access the database therefore most of the default parameters could be taken as it:
+In the ownCloud counfiguration in :file:`config/config.php` you need to set at least the **datadirectory** parameter to the directory where your data and database should be stored. Note that for the PDO SQLite driver this directory must be writable (this is recommended for ownCloud anyway).  No authentication is required to access the database therefore most of the default parameters could be taken as is:
 
 .. code-block:: php
 
diff --git a/core/doc/admin/_sources/installation/installation_others.txt b/core/doc/admin/_sources/installation/installation_others.txt
index e63d4b5..2bea011 100644
--- a/core/doc/admin/_sources/installation/installation_others.txt
+++ b/core/doc/admin/_sources/installation/installation_others.txt
@@ -40,8 +40,8 @@ Nginx Configuration
             rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
 
             index index.php;
-            error_page 403 = /core/templates/403.php;
-            error_page 404 = /core/templates/404.php;
+            error_page 403 /core/templates/403.php;
+            error_page 404 /core/templates/404.php;
 
             location = /robots.txt {
                 allow all;
diff --git a/core/doc/admin/_static/ajax-loader.gif b/core/doc/admin/_static/ajax-loader.gif
new file mode 100644
index 0000000..61faf8c
Binary files /dev/null and b/core/doc/admin/_static/ajax-loader.gif differ
diff --git a/core/doc/admin/_static/basic.css b/core/doc/admin/_static/basic.css
index 6882a58..43e8baf 100644
--- a/core/doc/admin/_static/basic.css
+++ b/core/doc/admin/_static/basic.css
@@ -79,6 +79,14 @@ div.sphinxsidebar input {
     font-size: 1em;
 }
 
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 170px;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    width: 30px;
+}
+
 img {
     border: 0;
 }
@@ -236,7 +244,6 @@ img.align-center, .figure.align-center, object.align-center {
 }
 
 .align-center {
-    clear: both;
     text-align: center;
 }
 
@@ -413,7 +420,7 @@ dl.glossary dt {
 }
 
 .footnote:target  {
-    background-color: #ffa
+    background-color: #ffa;
 }
 
 .line-block {
@@ -440,6 +447,11 @@ dl.glossary dt {
     font-style: oblique;
 }
 
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
 /* -- code displays --------------------------------------------------------- */
 
 pre {
@@ -525,4 +537,4 @@ span.eqno {
     #top-link {
         display: none;
     }
-}
+}
\ No newline at end of file
diff --git a/core/doc/admin/_static/comment-bright.png b/core/doc/admin/_static/comment-bright.png
new file mode 100644
index 0000000..551517b
Binary files /dev/null and b/core/doc/admin/_static/comment-bright.png differ
diff --git a/core/doc/admin/_static/comment-close.png b/core/doc/admin/_static/comment-close.png
new file mode 100644
index 0000000..09b54be
Binary files /dev/null and b/core/doc/admin/_static/comment-close.png differ
diff --git a/core/doc/admin/_static/comment.png b/core/doc/admin/_static/comment.png
new file mode 100644
index 0000000..92feb52
Binary files /dev/null and b/core/doc/admin/_static/comment.png differ
diff --git a/core/doc/admin/_static/doctools.js b/core/doc/admin/_static/doctools.js
index 8b9bd2c..d4619fd 100644
--- a/core/doc/admin/_static/doctools.js
+++ b/core/doc/admin/_static/doctools.js
@@ -2,7 +2,7 @@
  * doctools.js
  * ~~~~~~~~~~~
  *
- * Sphinx JavaScript utilties for all documentation.
+ * Sphinx JavaScript utilities for all documentation.
  *
  * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
  * :license: BSD, see LICENSE for details.
@@ -185,9 +185,9 @@ var Documentation = {
           body.highlightText(this.toLowerCase(), 'highlighted');
         });
       }, 10);
-      $('<li class="highlight-link"><a href="javascript:Documentation.' +
-        'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
-          .appendTo($('.sidebar .this-page-menu'));
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
+          .appendTo($('#searchbox'));
     }
   },
 
@@ -213,7 +213,7 @@ var Documentation = {
    * helper function to hide the search marks again
    */
   hideSearchWords : function() {
-    $('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
+    $('#searchbox .highlight-link').fadeOut(300);
     $('span.highlighted').removeClass('highlighted');
   },
 
diff --git a/core/doc/admin/_static/down-pressed.png b/core/doc/admin/_static/down-pressed.png
new file mode 100644
index 0000000..6f7ad78
Binary files /dev/null and b/core/doc/admin/_static/down-pressed.png differ
diff --git a/core/doc/admin/_static/down.png b/core/doc/admin/_static/down.png
new file mode 100644
index 0000000..3003a88
Binary files /dev/null and b/core/doc/admin/_static/down.png differ
diff --git a/core/doc/admin/_static/searchtools.js b/core/doc/admin/_static/searchtools.js
index dae92b5..663be4c 100644
--- a/core/doc/admin/_static/searchtools.js
+++ b/core/doc/admin/_static/searchtools.js
@@ -1,6 +1,6 @@
 /*
- * searchtools.js
- * ~~~~~~~~~~~~~~
+ * searchtools.js_t
+ * ~~~~~~~~~~~~~~~~
  *
  * Sphinx JavaScript utilties for the full-text search.
  *
@@ -36,10 +36,11 @@ jQuery.makeSearchSummary = function(text, keywords, hlwords) {
   return rv;
 }
 
+
 /**
  * Porter Stemmer
  */
-var PorterStemmer = function() {
+var Stemmer = function() {
 
   var step2list = {
     ational: 'ate',
@@ -300,20 +301,20 @@ var Search = {
   },
 
   query : function(query) {
-    var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in',
-                     'if', 'for', 'no', 'there', 'their', 'was', 'is',
-                     'be', 'to', 'that', 'but', 'they', 'not', 'such',
-                     'with', 'by', 'a', 'on', 'these', 'of', 'will',
-                     'this', 'near', 'the', 'or', 'at'];
-
-    // stem the searchterms and add them to the correct list
-    var stemmer = new PorterStemmer();
+    var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
+
+    // Stem the searchterms and add them to the correct list
+    var stemmer = new Stemmer();
     var searchterms = [];
     var excluded = [];
     var hlterms = [];
     var tmp = query.split(/\s+/);
-    var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
+    var objectterms = [];
     for (var i = 0; i < tmp.length; i++) {
+      if (tmp[i] != "") {
+          objectterms.push(tmp[i].toLowerCase());
+      }
+
       if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
           tmp[i] == "") {
         // skip this "word"
@@ -344,9 +345,6 @@ var Search = {
     var filenames = this._index.filenames;
     var titles = this._index.titles;
     var terms = this._index.terms;
-    var objects = this._index.objects;
-    var objtypes = this._index.objtypes;
-    var objnames = this._index.objnames;
     var fileMap = {};
     var files = null;
     // different result priorities
@@ -357,40 +355,19 @@ var Search = {
     $('#search-progress').empty();
 
     // lookup as object
-    if (object != null) {
-      for (var prefix in objects) {
-        for (var name in objects[prefix]) {
-          var fullname = (prefix ? prefix + '.' : '') + name;
-          if (fullname.toLowerCase().indexOf(object) > -1) {
-            match = objects[prefix][name];
-            descr = objnames[match[1]] + _(', in ') + titles[match[0]];
-            // XXX the generated anchors are not generally correct
-            // XXX there may be custom prefixes
-            result = [filenames[match[0]], fullname, '#'+fullname, descr];
-            switch (match[2]) {
-            case 1: objectResults.push(result); break;
-            case 0: importantResults.push(result); break;
-            case 2: unimportantResults.push(result); break;
-            }
-          }
-        }
-      }
+    for (var i = 0; i < objectterms.length; i++) {
+      var others = [].concat(objectterms.slice(0,i),
+                             objectterms.slice(i+1, objectterms.length))
+      var results = this.performObjectSearch(objectterms[i], others);
+      // Assume first word is most likely to be the object,
+      // other words more likely to be in description.
+      // Therefore put matches for earlier words first.
+      // (Results are eventually used in reverse order).
+      objectResults = results[0].concat(objectResults);
+      importantResults = results[1].concat(importantResults);
+      unimportantResults = results[2].concat(unimportantResults);
     }
 
-    // sort results descending
-    objectResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    importantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    unimportantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-
     // perform the search on the required terms
     for (var i = 0; i < searchterms.length; i++) {
       var word = searchterms[i];
@@ -489,7 +466,7 @@ var Search = {
             listItem.slideDown(5, function() {
               displayNextItem();
             });
-          });
+          }, "text");
         } else {
           // no source available, just display title
           Search.output.append(listItem);
@@ -510,9 +487,74 @@ var Search = {
       }
     }
     displayNextItem();
+  },
+
+  performObjectSearch : function(object, otherterms) {
+    var filenames = this._index.filenames;
+    var objects = this._index.objects;
+    var objnames = this._index.objnames;
+    var titles = this._index.titles;
+
+    var importantResults = [];
+    var objectResults = [];
+    var unimportantResults = [];
+
+    for (var prefix in objects) {
+      for (var name in objects[prefix]) {
+        var fullname = (prefix ? prefix + '.' : '') + name;
+        if (fullname.toLowerCase().indexOf(object) > -1) {
+          var match = objects[prefix][name];
+          var objname = objnames[match[1]][2];
+          var title = titles[match[0]];
+          // If more than one term searched for, we require other words to be
+          // found in the name/title/description
+          if (otherterms.length > 0) {
+            var haystack = (prefix + ' ' + name + ' ' +
+                            objname + ' ' + title).toLowerCase();
+            var allfound = true;
+            for (var i = 0; i < otherterms.length; i++) {
+              if (haystack.indexOf(otherterms[i]) == -1) {
+                allfound = false;
+                break;
+              }
+            }
+            if (!allfound) {
+              continue;
+            }
+          }
+          var descr = objname + _(', in ') + title;
+          anchor = match[3];
+          if (anchor == '')
+            anchor = fullname;
+          else if (anchor == '-')
+            anchor = objnames[match[1]][1] + '-' + fullname;
+          result = [filenames[match[0]], fullname, '#'+anchor, descr];
+          switch (match[2]) {
+          case 1: objectResults.push(result); break;
+          case 0: importantResults.push(result); break;
+          case 2: unimportantResults.push(result); break;
+          }
+        }
+      }
+    }
+
+    // sort results descending
+    objectResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    importantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    unimportantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    return [importantResults, objectResults, unimportantResults]
   }
 }
 
 $(document).ready(function() {
   Search.init();
-});
+});
\ No newline at end of file
diff --git a/core/doc/admin/_static/up-pressed.png b/core/doc/admin/_static/up-pressed.png
new file mode 100644
index 0000000..8bd587a
Binary files /dev/null and b/core/doc/admin/_static/up-pressed.png differ
diff --git a/core/doc/admin/_static/up.png b/core/doc/admin/_static/up.png
new file mode 100644
index 0000000..b946256
Binary files /dev/null and b/core/doc/admin/_static/up.png differ
diff --git a/core/doc/admin/_static/websupport.js b/core/doc/admin/_static/websupport.js
new file mode 100644
index 0000000..e9bd1b8
--- /dev/null
+++ b/core/doc/admin/_static/websupport.js
@@ -0,0 +1,808 @@
+/*
+ * websupport.js
+ * ~~~~~~~~~~~~~
+ *
+ * sphinx.websupport utilties for all documentation.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+(function($) {
+  $.fn.autogrow = function() {
+    return this.each(function() {
+    var textarea = this;
+
+    $.fn.autogrow.resize(textarea);
+
+    $(textarea)
+      .focus(function() {
+        textarea.interval = setInterval(function() {
+          $.fn.autogrow.resize(textarea);
+        }, 500);
+      })
+      .blur(function() {
+        clearInterval(textarea.interval);
+      });
+    });
+  };
+
+  $.fn.autogrow.resize = function(textarea) {
+    var lineHeight = parseInt($(textarea).css('line-height'), 10);
+    var lines = textarea.value.split('\n');
+    var columns = textarea.cols;
+    var lineCount = 0;
+    $.each(lines, function() {
+      lineCount += Math.ceil(this.length / columns) || 1;
+    });
+    var height = lineHeight * (lineCount + 1);
+    $(textarea).css('height', height);
+  };
+})(jQuery);
+
+(function($) {
+  var comp, by;
+
+  function init() {
+    initEvents();
+    initComparator();
+  }
+
+  function initEvents() {
+    $('a.comment-close').live("click", function(event) {
+      event.preventDefault();
+      hide($(this).attr('id').substring(2));
+    });
+    $('a.vote').live("click", function(event) {
+      event.preventDefault();
+      handleVote($(this));
+    });
+    $('a.reply').live("click", function(event) {
+      event.preventDefault();
+      openReply($(this).attr('id').substring(2));
+    });
+    $('a.close-reply').live("click", function(event) {
+      event.preventDefault();
+      closeReply($(this).attr('id').substring(2));
+    });
+    $('a.sort-option').live("click", function(event) {
+      event.preventDefault();
+      handleReSort($(this));
+    });
+    $('a.show-proposal').live("click", function(event) {
+      event.preventDefault();
+      showProposal($(this).attr('id').substring(2));
+    });
+    $('a.hide-proposal').live("click", function(event) {
+      event.preventDefault();
+      hideProposal($(this).attr('id').substring(2));
+    });
+    $('a.show-propose-change').live("click", function(event) {
+      event.preventDefault();
+      showProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.hide-propose-change').live("click", function(event) {
+      event.preventDefault();
+      hideProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.accept-comment').live("click", function(event) {
+      event.preventDefault();
+      acceptComment($(this).attr('id').substring(2));
+    });
+    $('a.delete-comment').live("click", function(event) {
+      event.preventDefault();
+      deleteComment($(this).attr('id').substring(2));
+    });
+    $('a.comment-markup').live("click", function(event) {
+      event.preventDefault();
+      toggleCommentMarkupBox($(this).attr('id').substring(2));
+    });
+  }
+
+  /**
+   * Set comp, which is a comparator function used for sorting and
+   * inserting comments into the list.
+   */
+  function setComparator() {
+    // If the first three letters are "asc", sort in ascending order
+    // and remove the prefix.
+    if (by.substring(0,3) == 'asc') {
+      var i = by.substring(3);
+      comp = function(a, b) { return a[i] - b[i]; };
+    } else {
+      // Otherwise sort in descending order.
+      comp = function(a, b) { return b[by] - a[by]; };
+    }
+
+    // Reset link styles and format the selected sort option.
+    $('a.sel').attr('href', '#').removeClass('sel');
+    $('a.by' + by).removeAttr('href').addClass('sel');
+  }
+
+  /**
+   * Create a comp function. If the user has preferences stored in
+   * the sortBy cookie, use those, otherwise use the default.
+   */
+  function initComparator() {
+    by = 'rating'; // Default to sort by rating.
+    // If the sortBy cookie is set, use that instead.
+    if (document.cookie.length > 0) {
+      var start = document.cookie.indexOf('sortBy=');
+      if (start != -1) {
+        start = start + 7;
+        var end = document.cookie.indexOf(";", start);
+        if (end == -1) {
+          end = document.cookie.length;
+          by = unescape(document.cookie.substring(start, end));
+        }
+      }
+    }
+    setComparator();
+  }
+
+  /**
+   * Show a comment div.
+   */
+  function show(id) {
+    $('#ao' + id).hide();
+    $('#ah' + id).show();
+    var context = $.extend({id: id}, opts);
+    var popup = $(renderTemplate(popupTemplate, context)).hide();
+    popup.find('textarea[name="proposal"]').hide();
+    popup.find('a.by' + by).addClass('sel');
+    var form = popup.find('#cf' + id);
+    form.submit(function(event) {
+      event.preventDefault();
+      addComment(form);
+    });
+    $('#s' + id).after(popup);
+    popup.slideDown('fast', function() {
+      getComments(id);
+    });
+  }
+
+  /**
+   * Hide a comment div.
+   */
+  function hide(id) {
+    $('#ah' + id).hide();
+    $('#ao' + id).show();
+    var div = $('#sc' + id);
+    div.slideUp('fast', function() {
+      div.remove();
+    });
+  }
+
+  /**
+   * Perform an ajax request to get comments for a node
+   * and insert the comments into the comments tree.
+   */
+  function getComments(id) {
+    $.ajax({
+     type: 'GET',
+     url: opts.getCommentsURL,
+     data: {node: id},
+     success: function(data, textStatus, request) {
+       var ul = $('#cl' + id);
+       var speed = 100;
+       $('#cf' + id)
+         .find('textarea[name="proposal"]')
+         .data('source', data.source);
+
+       if (data.comments.length === 0) {
+         ul.html('<li>No comments yet.</li>');
+         ul.data('empty', true);
+       } else {
+         // If there are comments, sort them and put them in the list.
+         var comments = sortComments(data.comments);
+         speed = data.comments.length * 100;
+         appendComments(comments, ul);
+         ul.data('empty', false);
+       }
+       $('#cn' + id).slideUp(speed + 200);
+       ul.slideDown(speed);
+     },
+     error: function(request, textStatus, error) {
+       showError('Oops, there was a problem retrieving the comments.');
+     },
+     dataType: 'json'
+    });
+  }
+
+  /**
+   * Add a comment via ajax and insert the comment into the comment tree.
+   */
+  function addComment(form) {
+    var node_id = form.find('input[name="node"]').val();
+    var parent_id = form.find('input[name="parent"]').val();
+    var text = form.find('textarea[name="comment"]').val();
+    var proposal = form.find('textarea[name="proposal"]').val();
+
+    if (text == '') {
+      showError('Please enter a comment.');
+      return;
+    }
+
+    // Disable the form that is being submitted.
+    form.find('textarea,input').attr('disabled', 'disabled');
+
+    // Send the comment to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.addCommentURL,
+      dataType: 'json',
+      data: {
+        node: node_id,
+        parent: parent_id,
+        text: text,
+        proposal: proposal
+      },
+      success: function(data, textStatus, error) {
+        // Reset the form.
+        if (node_id) {
+          hideProposeChange(node_id);
+        }
+        form.find('textarea')
+          .val('')
+          .add(form.find('input'))
+          .removeAttr('disabled');
+	var ul = $('#cl' + (node_id || parent_id));
+        if (ul.data('empty')) {
+          $(ul).empty();
+          ul.data('empty', false);
+        }
+        insertComment(data.comment);
+        var ao = $('#ao' + node_id);
+        ao.find('img').attr({'src': opts.commentBrightImage});
+        if (node_id) {
+          // if this was a "root" comment, remove the commenting box
+          // (the user can get it back by reopening the comment popup)
+          $('#ca' + node_id).slideUp();
+        }
+      },
+      error: function(request, textStatus, error) {
+        form.find('textarea,input').removeAttr('disabled');
+        showError('Oops, there was a problem adding the comment.');
+      }
+    });
+  }
+
+  /**
+   * Recursively append comments to the main comment list and children
+   * lists, creating the comment tree.
+   */
+  function appendComments(comments, ul) {
+    $.each(comments, function() {
+      var div = createCommentDiv(this);
+      ul.append($(document.createElement('li')).html(div));
+      appendComments(this.children, div.find('ul.comment-children'));
+      // To avoid stagnating data, don't store the comments children in data.
+      this.children = null;
+      div.data('comment', this);
+    });
+  }
+
+  /**
+   * After adding a new comment, it must be inserted in the correct
+   * location in the comment tree.
+   */
+  function insertComment(comment) {
+    var div = createCommentDiv(comment);
+
+    // To avoid stagnating data, don't store the comments children in data.
+    comment.children = null;
+    div.data('comment', comment);
+
+    var ul = $('#cl' + (comment.node || comment.parent));
+    var siblings = getChildren(ul);
+
+    var li = $(document.createElement('li'));
+    li.hide();
+
+    // Determine where in the parents children list to insert this comment.
+    for(i=0; i < siblings.length; i++) {
+      if (comp(comment, siblings[i]) <= 0) {
+        $('#cd' + siblings[i].id)
+          .parent()
+          .before(li.html(div));
+        li.slideDown('fast');
+        return;
+      }
+    }
+
+    // If we get here, this comment rates lower than all the others,
+    // or it is the only comment in the list.
+    ul.append(li.html(div));
+    li.slideDown('fast');
+  }
+
+  function acceptComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.acceptCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        $('#cm' + id).fadeOut('fast');
+        $('#cd' + id).removeClass('moderate');
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem accepting the comment.');
+      }
+    });
+  }
+
+  function deleteComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.deleteCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        var div = $('#cd' + id);
+        if (data == 'delete') {
+          // Moderator mode: remove the comment and all children immediately
+          div.slideUp('fast', function() {
+            div.remove();
+          });
+          return;
+        }
+        // User mode: only mark the comment as deleted
+        div
+          .find('span.user-id:first')
+          .text('[deleted]').end()
+          .find('div.comment-text:first')
+          .text('[deleted]').end()
+          .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
+                ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
+          .remove();
+        var comment = div.data('comment');
+        comment.username = '[deleted]';
+        comment.text = '[deleted]';
+        div.data('comment', comment);
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem deleting the comment.');
+      }
+    });
+  }
+
+  function showProposal(id) {
+    $('#sp' + id).hide();
+    $('#hp' + id).show();
+    $('#pr' + id).slideDown('fast');
+  }
+
+  function hideProposal(id) {
+    $('#hp' + id).hide();
+    $('#sp' + id).show();
+    $('#pr' + id).slideUp('fast');
+  }
+
+  function showProposeChange(id) {
+    $('#pc' + id).hide();
+    $('#hc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val(textarea.data('source'));
+    $.fn.autogrow.resize(textarea[0]);
+    textarea.slideDown('fast');
+  }
+
+  function hideProposeChange(id) {
+    $('#hc' + id).hide();
+    $('#pc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val('').removeAttr('disabled');
+    textarea.slideUp('fast');
+  }
+
+  function toggleCommentMarkupBox(id) {
+    $('#mb' + id).toggle();
+  }
+
+  /** Handle when the user clicks on a sort by link. */
+  function handleReSort(link) {
+    var classes = link.attr('class').split(/\s+/);
+    for (var i=0; i<classes.length; i++) {
+      if (classes[i] != 'sort-option') {
+	by = classes[i].substring(2);
+      }
+    }
+    setComparator();
+    // Save/update the sortBy cookie.
+    var expiration = new Date();
+    expiration.setDate(expiration.getDate() + 365);
+    document.cookie= 'sortBy=' + escape(by) +
+                     ';expires=' + expiration.toUTCString();
+    $('ul.comment-ul').each(function(index, ul) {
+      var comments = getChildren($(ul), true);
+      comments = sortComments(comments);
+      appendComments(comments, $(ul).empty());
+    });
+  }
+
+  /**
+   * Function to process a vote when a user clicks an arrow.
+   */
+  function handleVote(link) {
+    if (!opts.voting) {
+      showError("You'll need to login to vote.");
+      return;
+    }
+
+    var id = link.attr('id');
+    if (!id) {
+      // Didn't click on one of the voting arrows.
+      return;
+    }
+    // If it is an unvote, the new vote value is 0,
+    // Otherwise it's 1 for an upvote, or -1 for a downvote.
+    var value = 0;
+    if (id.charAt(1) != 'u') {
+      value = id.charAt(0) == 'u' ? 1 : -1;
+    }
+    // The data to be sent to the server.
+    var d = {
+      comment_id: id.substring(2),
+      value: value
+    };
+
+    // Swap the vote and unvote links.
+    link.hide();
+    $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
+      .show();
+
+    // The div the comment is displayed in.
+    var div = $('div#cd' + d.comment_id);
+    var data = div.data('comment');
+
+    // If this is not an unvote, and the other vote arrow has
+    // already been pressed, unpress it.
+    if ((d.value !== 0) && (data.vote === d.value * -1)) {
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
+    }
+
+    // Update the comments rating in the local data.
+    data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
+    data.vote = d.value;
+    div.data('comment', data);
+
+    // Change the rating text.
+    div.find('.rating:first')
+      .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
+
+    // Send the vote information to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.processVoteURL,
+      data: d,
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem casting that vote.');
+      }
+    });
+  }
+
+  /**
+   * Open a reply form used to reply to an existing comment.
+   */
+  function openReply(id) {
+    // Swap out the reply link for the hide link
+    $('#rl' + id).hide();
+    $('#cr' + id).show();
+
+    // Add the reply li to the children ul.
+    var div = $(renderTemplate(replyTemplate, {id: id})).hide();
+    $('#cl' + id)
+      .prepend(div)
+      // Setup the submit handler for the reply form.
+      .find('#rf' + id)
+      .submit(function(event) {
+        event.preventDefault();
+        addComment($('#rf' + id));
+        closeReply(id);
+      })
+      .find('input[type=button]')
+      .click(function() {
+        closeReply(id);
+      });
+    div.slideDown('fast', function() {
+      $('#rf' + id).find('textarea').focus();
+    });
+  }
+
+  /**
+   * Close the reply form opened with openReply.
+   */
+  function closeReply(id) {
+    // Remove the reply div from the DOM.
+    $('#rd' + id).slideUp('fast', function() {
+      $(this).remove();
+    });
+
+    // Swap out the hide link for the reply link
+    $('#cr' + id).hide();
+    $('#rl' + id).show();
+  }
+
+  /**
+   * Recursively sort a tree of comments using the comp comparator.
+   */
+  function sortComments(comments) {
+    comments.sort(comp);
+    $.each(comments, function() {
+      this.children = sortComments(this.children);
+    });
+    return comments;
+  }
+
+  /**
+   * Get the children comments from a ul. If recursive is true,
+   * recursively include childrens' children.
+   */
+  function getChildren(ul, recursive) {
+    var children = [];
+    ul.children().children("[id^='cd']")
+      .each(function() {
+        var comment = $(this).data('comment');
+        if (recursive)
+          comment.children = getChildren($(this).find('#cl' + comment.id), true);
+        children.push(comment);
+      });
+    return children;
+  }
+
+  /** Create a div to display a comment in. */
+  function createCommentDiv(comment) {
+    if (!comment.displayed && !opts.moderator) {
+      return $('<div class="moderate">Thank you!  Your comment will show up '
+               + 'once it is has been approved by a moderator.</div>');
+    }
+    // Prettify the comment rating.
+    comment.pretty_rating = comment.rating + ' point' +
+      (comment.rating == 1 ? '' : 's');
+    // Make a class (for displaying not yet moderated comments differently)
+    comment.css_class = comment.displayed ? '' : ' moderate';
+    // Create a div for this comment.
+    var context = $.extend({}, opts, comment);
+    var div = $(renderTemplate(commentTemplate, context));
+
+    // If the user has voted on this comment, highlight the correct arrow.
+    if (comment.vote) {
+      var direction = (comment.vote == 1) ? 'u' : 'd';
+      div.find('#' + direction + 'v' + comment.id).hide();
+      div.find('#' + direction + 'u' + comment.id).show();
+    }
+
+    if (opts.moderator || comment.text != '[deleted]') {
+      div.find('a.reply').show();
+      if (comment.proposal_diff)
+        div.find('#sp' + comment.id).show();
+      if (opts.moderator && !comment.displayed)
+        div.find('#cm' + comment.id).show();
+      if (opts.moderator || (opts.username == comment.username))
+        div.find('#dc' + comment.id).show();
+    }
+    return div;
+  }
+
+  /**
+   * A simple template renderer. Placeholders such as <%id%> are replaced
+   * by context['id'] with items being escaped. Placeholders such as <#id#>
+   * are not escaped.
+   */
+  function renderTemplate(template, context) {
+    var esc = $(document.createElement('div'));
+
+    function handle(ph, escape) {
+      var cur = context;
+      $.each(ph.split('.'), function() {
+        cur = cur[this];
+      });
+      return escape ? esc.text(cur || "").html() : cur;
+    }
+
+    return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
+      return handle(arguments[2], arguments[1] == '%' ? true : false);
+    });
+  }
+
+  /** Flash an error message briefly. */
+  function showError(message) {
+    $(document.createElement('div')).attr({'class': 'popup-error'})
+      .append($(document.createElement('div'))
+               .attr({'class': 'error-message'}).text(message))
+      .appendTo('body')
+      .fadeIn("slow")
+      .delay(2000)
+      .fadeOut("slow");
+  }
+
+  /** Add a link the user uses to open the comments popup. */
+  $.fn.comment = function() {
+    return this.each(function() {
+      var id = $(this).attr('id').substring(1);
+      var count = COMMENT_METADATA[id];
+      var title = count + ' comment' + (count == 1 ? '' : 's');
+      var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
+      var addcls = count == 0 ? ' nocomment' : '';
+      $(this)
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-open' + addcls,
+            id: 'ao' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: image,
+              alt: 'comment',
+              title: title
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              show($(this).attr('id').substring(2));
+            })
+        )
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-close hidden',
+            id: 'ah' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: opts.closeCommentImage,
+              alt: 'close',
+              title: 'close'
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              hide($(this).attr('id').substring(2));
+            })
+        );
+    });
+  };
+
+  var opts = {
+    processVoteURL: '/_process_vote',
+    addCommentURL: '/_add_comment',
+    getCommentsURL: '/_get_comments',
+    acceptCommentURL: '/_accept_comment',
+    deleteCommentURL: '/_delete_comment',
+    commentImage: '/static/_static/comment.png',
+    closeCommentImage: '/static/_static/comment-close.png',
+    loadingImage: '/static/_static/ajax-loader.gif',
+    commentBrightImage: '/static/_static/comment-bright.png',
+    upArrow: '/static/_static/up.png',
+    downArrow: '/static/_static/down.png',
+    upArrowPressed: '/static/_static/up-pressed.png',
+    downArrowPressed: '/static/_static/down-pressed.png',
+    voting: false,
+    moderator: false
+  };
+
+  if (typeof COMMENT_OPTIONS != "undefined") {
+    opts = jQuery.extend(opts, COMMENT_OPTIONS);
+  }
+
+  var popupTemplate = '\
+    <div class="sphinx-comments" id="sc<%id%>">\
+      <p class="sort-options">\
+        Sort by:\
+        <a href="#" class="sort-option byrating">best rated</a>\
+        <a href="#" class="sort-option byascage">newest</a>\
+        <a href="#" class="sort-option byage">oldest</a>\
+      </p>\
+      <div class="comment-header">Comments</div>\
+      <div class="comment-loading" id="cn<%id%>">\
+        loading comments... <img src="<%loadingImage%>" alt="" /></div>\
+      <ul id="cl<%id%>" class="comment-ul"></ul>\
+      <div id="ca<%id%>">\
+      <p class="add-a-comment">Add a comment\
+        (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
+      <div class="comment-markup-box" id="mb<%id%>">\
+        reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
+        <tt>``code``</tt>, \
+        code blocks: <tt>::</tt> and an indented block after blank line</div>\
+      <form method="post" id="cf<%id%>" class="comment-form" action="">\
+        <textarea name="comment" cols="80"></textarea>\
+        <p class="propose-button">\
+          <a href="#" id="pc<%id%>" class="show-propose-change">\
+            Propose a change ▹\
+          </a>\
+          <a href="#" id="hc<%id%>" class="hide-propose-change">\
+            Propose a change ▿\
+          </a>\
+        </p>\
+        <textarea name="proposal" id="pt<%id%>" cols="80"\
+                  spellcheck="false"></textarea>\
+        <input type="submit" value="Add comment" />\
+        <input type="hidden" name="node" value="<%id%>" />\
+        <input type="hidden" name="parent" value="" />\
+      </form>\
+      </div>\
+    </div>';
+
+  var commentTemplate = '\
+    <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
+      <div class="vote">\
+        <div class="arrow">\
+          <a href="#" id="uv<%id%>" class="vote" title="vote up">\
+            <img src="<%upArrow%>" />\
+          </a>\
+          <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
+            <img src="<%upArrowPressed%>" />\
+          </a>\
+        </div>\
+        <div class="arrow">\
+          <a href="#" id="dv<%id%>" class="vote" title="vote down">\
+            <img src="<%downArrow%>" id="da<%id%>" />\
+          </a>\
+          <a href="#" id="du<%id%>" class="un vote" title="vote down">\
+            <img src="<%downArrowPressed%>" />\
+          </a>\
+        </div>\
+      </div>\
+      <div class="comment-content">\
+        <p class="tagline comment">\
+          <span class="user-id"><%username%></span>\
+          <span class="rating"><%pretty_rating%></span>\
+          <span class="delta"><%time.delta%></span>\
+        </p>\
+        <div class="comment-text comment"><#text#></div>\
+        <p class="comment-opts comment">\
+          <a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
+          <a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
+          <a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
+          <a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
+          <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
+          <span id="cm<%id%>" class="moderation hidden">\
+            <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
+          </span>\
+        </p>\
+        <pre class="proposal" id="pr<%id%>">\
+<#proposal_diff#>\
+        </pre>\
+          <ul class="comment-children" id="cl<%id%>"></ul>\
+        </div>\
+        <div class="clearleft"></div>\
+      </div>\
+    </div>';
+
+  var replyTemplate = '\
+    <li>\
+      <div class="reply-div" id="rd<%id%>">\
+        <form id="rf<%id%>">\
+          <textarea name="comment" cols="80"></textarea>\
+          <input type="submit" value="Add reply" />\
+          <input type="button" value="Cancel" />\
+          <input type="hidden" name="parent" value="<%id%>" />\
+          <input type="hidden" name="node" value="" />\
+        </form>\
+      </div>\
+    </li>';
+
+  $(document).ready(function() {
+    init();
+  });
+})(jQuery);
+
+$(document).ready(function() {
+  // add comment anchors for all paragraphs that are commentable
+  $('.sphinx-has-comment').comment();
+
+  // highlight search words in search results
+  $("div.context").each(function() {
+    var params = $.getQueryParameters();
+    var terms = (params.q) ? params.q[0].split(/\s+/) : [];
+    var result = $(this);
+    $.each(terms, function() {
+      result.highlightText(this.toLowerCase(), 'highlighted');
+    });
+  });
+
+  // directly open comment window if requested
+  var anchor = document.location.hash;
+  if (anchor.substring(0, 9) == '#comment-') {
+    $('#ao' + anchor.substring(9)).click();
+    document.location.hash = '#s' + anchor.substring(9);
+  }
+});
diff --git a/core/doc/admin/configuration/auth_ldap.html b/core/doc/admin/configuration/auth_ldap.html
index 89f8bb6..482023d 100644
--- a/core/doc/admin/configuration/auth_ldap.html
+++ b/core/doc/admin/configuration/auth_ldap.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>User Authentication with LDAP — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>User Authentication with LDAP — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Background Jobs" href="background_jobs.html" />
     <link rel="prev" title="Configuration" href="index.html" />
diff --git a/core/doc/admin/configuration/background_jobs.html b/core/doc/admin/configuration/background_jobs.html
index a706e2c..27f4930 100644
--- a/core/doc/admin/configuration/background_jobs.html
+++ b/core/doc/admin/configuration/background_jobs.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Background Jobs — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Background Jobs — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="3rd-Party Configuration" href="configuration_3rdparty.html" />
     <link rel="prev" title="User Authentication with LDAP" href="auth_ldap.html" />
diff --git a/core/doc/admin/configuration/configuration_3rdparty.html b/core/doc/admin/configuration/configuration_3rdparty.html
index 2ae4e13..9ebc5b0 100644
--- a/core/doc/admin/configuration/configuration_3rdparty.html
+++ b/core/doc/admin/configuration/configuration_3rdparty.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>3rd-Party Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>3rd-Party Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Apps Configuration" href="configuration_apps.html" />
     <link rel="prev" title="Background Jobs" href="background_jobs.html" />
diff --git a/core/doc/admin/configuration/configuration_apps.html b/core/doc/admin/configuration/configuration_apps.html
index 91606ea..ebb4b8c 100644
--- a/core/doc/admin/configuration/configuration_apps.html
+++ b/core/doc/admin/configuration/configuration_apps.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Apps Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Apps Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Automatic Configuration" href="configuration_automation.html" />
     <link rel="prev" title="3rd-Party Configuration" href="configuration_3rdparty.html" />
@@ -177,12 +180,12 @@ folder.</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 
   <span class="s2">"apps_paths"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-      <span class="m">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
+      <span class="mi">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
               <span class="s2">"path"</span>     <span class="o">=></span> <span class="nx">OC</span><span class="o">::</span><span class="nv">$SERVERROOT</span><span class="o">.</span><span class="s2">"/apps"</span><span class="p">,</span>
               <span class="s2">"url"</span>      <span class="o">=></span> <span class="s2">"/apps"</span><span class="p">,</span>
               <span class="s2">"writable"</span> <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
       <span class="p">),</span>
-      <span class="m">1</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
+      <span class="mi">1</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
               <span class="s2">"path"</span>     <span class="o">=></span> <span class="nx">OC</span><span class="o">::</span><span class="nv">$SERVERROOT</span><span class="o">.</span><span class="s2">"/apps2"</span><span class="p">,</span>
               <span class="s2">"url"</span>      <span class="o">=></span> <span class="s2">"/apps2"</span><span class="p">,</span>
               <span class="s2">"writable"</span> <span class="o">=></span> <span class="k">true</span><span class="p">,</span>
diff --git a/core/doc/admin/configuration/configuration_automation.html b/core/doc/admin/configuration/configuration_automation.html
index d40bdeb..274954c 100644
--- a/core/doc/admin/configuration/configuration_automation.html
+++ b/core/doc/admin/configuration/configuration_automation.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Automatic Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Automatic Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Custom Client Configuration" href="configuration_custom_clients.html" />
     <link rel="prev" title="Apps Configuration" href="configuration_apps.html" />
@@ -121,6 +124,7 @@
 <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 <li class="toctree-l2 current"><a class="current reference internal" href="">Automatic Configuration</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#sample-automatic-configurations">Sample Automatic Configurations</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
@@ -158,7 +162,8 @@
 <h1>Automatic Configuration<a class="headerlink" href="#automatic-configuration" title="Permalink to this headline">¶</a></h1>
 <p>If you need to install ownCloud on multiple servers you normally do not want
 to set-up each instance separately as described in the <a class="reference internal" href="configuration_database.html"><em>Database Configuration</em></a>. For this reason the automatic configuration feature has been introduced.</p>
-<p>To take advantage of this feature you need to create a configuration file, called <tt class="file docutils literal"><span class="pre">../owncloud/config/autoconfig.php</span></tt> and set the parameters as required. The file will automatically be removed after the initial configuration has been applied.</p>
+<p>To take advantage of this feature you need to create a configuration file, called <tt class="file docutils literal"><span class="pre">../owncloud/config/autoconfig.php</span></tt> and set the parameters as required. You can provide all parameters or just part of them - parameters which haven’t been provided (if any) will be asked at “Finish setup” screen at first run of ownCloud.</p>
+<p>The <tt class="file docutils literal"><span class="pre">../owncloud/config/autoconfig.php</span></tt> will be automatically removed after the initial configuration has been applied.</p>
 <div class="section" id="parameters">
 <h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 <p>You need to keep in mind that two parameters are named differently in this
@@ -169,27 +174,40 @@ configuration file compared to the normal <tt class="file docutils literal"><spa
 <col width="48%" />
 </colgroup>
 <thead valign="bottom">
-<tr><th class="head">autoconfig.php</th>
+<tr class="row-odd"><th class="head">autoconfig.php</th>
 <th class="head">config.php</th>
 </tr>
 </thead>
 <tbody valign="top">
-<tr><td>directory</td>
+<tr class="row-even"><td>directory</td>
 <td>datadirectory</td>
 </tr>
-<tr><td>dbpass</td>
+<tr class="row-odd"><td>dbpass</td>
 <td>dbpassword</td>
 </tr>
 </tbody>
 </table>
+</div>
+<div class="section" id="sample-automatic-configurations">
+<h2>Sample Automatic Configurations<a class="headerlink" href="#sample-automatic-configurations" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="data-directory">
+<h3>Data Directory<a class="headerlink" href="#data-directory" title="Permalink to this headline">¶</a></h3>
+<p>With the configuration below the “Finish setup” screen still will ask for database and admin credentials settings.</p>
+<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
+<span class="nv">$AUTOCONFIG</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
+  <span class="s2">"directory"</span>     <span class="o">=></span> <span class="s2">"/www/htdocs/owncloud/data"</span><span class="p">,</span>
+<span class="p">);</span>
+</pre></div>
+</div>
+</div>
 <div class="section" id="sqlite-database">
 <h3>SQLite Database<a class="headerlink" href="#sqlite-database" title="Permalink to this headline">¶</a></h3>
+<p>With the configuration below the “Finish setup” screen still will ask for data directory and admin credentials settings.</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 <span class="nv">$AUTOCONFIG</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
   <span class="s2">"dbtype"</span>        <span class="o">=></span> <span class="s2">"sqlite"</span><span class="p">,</span>
   <span class="s2">"dbname"</span>        <span class="o">=></span> <span class="s2">"owncloud"</span><span class="p">,</span>
   <span class="s2">"dbtableprefix"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
-  <span class="s2">"directory"</span>     <span class="o">=></span> <span class="s2">"/www/htdocs/owncloud/data"</span><span class="p">,</span>
 <span class="p">);</span>
 </pre></div>
 </div>
@@ -197,6 +215,7 @@ configuration file compared to the normal <tt class="file docutils literal"><spa
 <div class="section" id="mysql-database">
 <h3>MySQL Database<a class="headerlink" href="#mysql-database" title="Permalink to this headline">¶</a></h3>
 <p>Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in <a class="reference internal" href="configuration_database.html"><em>Database Configuration</em></a>.</p>
+<p>With the configuration below the “Finish setup” screen still will ask for data directory and admin credentials settings.</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 <span class="nv">$AUTOCONFIG</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
   <span class="s2">"dbtype"</span>        <span class="o">=></span> <span class="s2">"mysql"</span><span class="p">,</span>
@@ -205,9 +224,6 @@ configuration file compared to the normal <tt class="file docutils literal"><spa
   <span class="s2">"dbpass"</span>        <span class="o">=></span> <span class="s2">"password"</span><span class="p">,</span>
   <span class="s2">"dbhost"</span>        <span class="o">=></span> <span class="s2">"localhost"</span><span class="p">,</span>
   <span class="s2">"dbtableprefix"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
-  <span class="s2">"adminlogin"</span>    <span class="o">=></span> <span class="s2">"root"</span><span class="p">,</span>
-  <span class="s2">"adminpass"</span>     <span class="o">=></span> <span class="s2">"root-password"</span><span class="p">,</span>
-  <span class="s2">"directory"</span>     <span class="o">=></span> <span class="s2">"/www/htdocs/owncloud/data"</span><span class="p">,</span>
 <span class="p">);</span>
 </pre></div>
 </div>
@@ -215,6 +231,7 @@ configuration file compared to the normal <tt class="file docutils literal"><spa
 <div class="section" id="postgresql-database">
 <h3>PostgreSQL Database<a class="headerlink" href="#postgresql-database" title="Permalink to this headline">¶</a></h3>
 <p>Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in <a class="reference internal" href="configuration_database.html"><em>Database Configuration</em></a>.</p>
+<p>With the configuration below the “Finish setup” screen still will ask for data directory and admin credentials settings.</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 <span class="nv">$AUTOCONFIG</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
   <span class="s2">"dbtype"</span>        <span class="o">=></span> <span class="s2">"pgsql"</span><span class="p">,</span>
@@ -223,6 +240,22 @@ configuration file compared to the normal <tt class="file docutils literal"><spa
   <span class="s2">"dbpass"</span>        <span class="o">=></span> <span class="s2">"password"</span><span class="p">,</span>
   <span class="s2">"dbhost"</span>        <span class="o">=></span> <span class="s2">"localhost"</span><span class="p">,</span>
   <span class="s2">"dbtableprefix"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
+<span class="p">);</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="all-parameters">
+<h3>All Parameters<a class="headerlink" href="#all-parameters" title="Permalink to this headline">¶</a></h3>
+<p>Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in <a class="reference internal" href="configuration_database.html"><em>Database Configuration</em></a>.</p>
+<p>With the configuration below “Finish setup” will be skipped at first ownCloud run since all parameters are already preconfigured.</p>
+<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
+<span class="nv">$AUTOCONFIG</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
+  <span class="s2">"dbtype"</span>        <span class="o">=></span> <span class="s2">"mysql"</span><span class="p">,</span>
+  <span class="s2">"dbname"</span>        <span class="o">=></span> <span class="s2">"owncloud"</span><span class="p">,</span>
+  <span class="s2">"dbuser"</span>        <span class="o">=></span> <span class="s2">"username"</span><span class="p">,</span>
+  <span class="s2">"dbpass"</span>        <span class="o">=></span> <span class="s2">"password"</span><span class="p">,</span>
+  <span class="s2">"dbhost"</span>        <span class="o">=></span> <span class="s2">"localhost"</span><span class="p">,</span>
+  <span class="s2">"dbtableprefix"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
   <span class="s2">"adminlogin"</span>    <span class="o">=></span> <span class="s2">"root"</span><span class="p">,</span>
   <span class="s2">"adminpass"</span>     <span class="o">=></span> <span class="s2">"root-password"</span><span class="p">,</span>
   <span class="s2">"directory"</span>     <span class="o">=></span> <span class="s2">"/www/htdocs/owncloud/data"</span><span class="p">,</span>
diff --git a/core/doc/admin/configuration/configuration_custom_clients.html b/core/doc/admin/configuration/configuration_custom_clients.html
index 3ef20c9..ddc7e3e 100644
--- a/core/doc/admin/configuration/configuration_custom_clients.html
+++ b/core/doc/admin/configuration/configuration_custom_clients.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Custom Client Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Custom Client Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Database Configuration" href="configuration_database.html" />
     <link rel="prev" title="Automatic Configuration" href="configuration_automation.html" />
diff --git a/core/doc/admin/configuration/configuration_database.html b/core/doc/admin/configuration/configuration_database.html
index 43efc8c..8fe454f 100644
--- a/core/doc/admin/configuration/configuration_database.html
+++ b/core/doc/admin/configuration/configuration_database.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Database Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Database Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Use Server-Side Encryption" href="configuration_encryption.html" />
     <link rel="prev" title="Custom Client Configuration" href="configuration_custom_clients.html" />
@@ -239,7 +242,7 @@ enabled the SQLite extension in PHP. The PHP configuration in <tt class="file do
 <p>It is not necessary to create a database and a database user in advance
 because this will automatically be done by ownCloud when you login for the
 first time.</p>
-<p>In the ownCloud counfiguration in <tt class="file docutils literal"><span class="pre">config/config.php</span></tt> you need to set at least the <strong>datadirectory</strong> parameter to the directory where your data and database should be stored. No authentication is required to access the database therefore most of the default parameters could be taken as it:</p>
+<p>In the ownCloud counfiguration in <tt class="file docutils literal"><span class="pre">config/config.php</span></tt> you need to set at least the <strong>datadirectory</strong> parameter to the directory where your data and database should be stored. Note that for the PDO SQLite driver this directory must be writable (this is recommended for ownCloud anyway).  No authentication is required to access the database therefore most of the default parameters could be taken as is:</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 
   <span class="s2">"dbtype"</span>        <span class="o">=></span> <span class="s2">"sqlite"</span><span class="p">,</span>
diff --git a/core/doc/admin/configuration/configuration_encryption.html b/core/doc/admin/configuration/configuration_encryption.html
index 41bf5f3..2bd6179 100644
--- a/core/doc/admin/configuration/configuration_encryption.html
+++ b/core/doc/admin/configuration/configuration_encryption.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Use Server-Side Encryption — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Use Server-Side Encryption — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Knowledge Base Configuration" href="configuration_knowledgebase.html" />
     <link rel="prev" title="Database Configuration" href="configuration_database.html" />
diff --git a/core/doc/admin/configuration/configuration_knowledgebase.html b/core/doc/admin/configuration/configuration_knowledgebase.html
index 0213cfa..95d76de 100644
--- a/core/doc/admin/configuration/configuration_knowledgebase.html
+++ b/core/doc/admin/configuration/configuration_knowledgebase.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Knowledge Base Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Knowledge Base Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Language Configuration" href="configuration_language.html" />
     <link rel="prev" title="Use Server-Side Encryption" href="configuration_encryption.html" />
diff --git a/core/doc/admin/configuration/configuration_language.html b/core/doc/admin/configuration/configuration_language.html
index cefec9c..dd829d6 100644
--- a/core/doc/admin/configuration/configuration_language.html
+++ b/core/doc/admin/configuration/configuration_language.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Language Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Language Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Logging Configuration" href="configuration_logging.html" />
     <link rel="prev" title="Knowledge Base Configuration" href="configuration_knowledgebase.html" />
diff --git a/core/doc/admin/configuration/configuration_logging.html b/core/doc/admin/configuration/configuration_logging.html
index d2f6bab..dfd80c5 100644
--- a/core/doc/admin/configuration/configuration_logging.html
+++ b/core/doc/admin/configuration/configuration_logging.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Logging Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Logging Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Mail Configuration" href="configuration_mail.html" />
     <link rel="prev" title="Language Configuration" href="configuration_language.html" />
diff --git a/core/doc/admin/configuration/configuration_mail.html b/core/doc/admin/configuration/configuration_mail.html
index 3b1c041..57da64f 100644
--- a/core/doc/admin/configuration/configuration_mail.html
+++ b/core/doc/admin/configuration/configuration_mail.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Mail Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Mail Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Maintenance Mode Configuration" href="configuration_maintenance.html" />
     <link rel="prev" title="Logging Configuration" href="configuration_logging.html" />
@@ -184,7 +187,7 @@ semicolon:</p>
 
   <span class="s2">"mail_smtpmode"</span>     <span class="o">=></span> <span class="s2">"smtp"</span><span class="p">,</span>
   <span class="s2">"mail_smtphost"</span>     <span class="o">=></span> <span class="s2">"smtp-1.server.dom;smtp-2.server.dom:425"</span><span class="p">,</span>
-  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="m">25</span><span class="p">,</span>
+  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="mi">25</span><span class="p">,</span>
 </pre></div>
 </div>
 <p>or</p>
@@ -192,14 +195,14 @@ semicolon:</p>
 
   <span class="s2">"mail_smtpmode"</span>     <span class="o">=></span> <span class="s2">"smtp"</span><span class="p">,</span>
   <span class="s2">"mail_smtphost"</span>     <span class="o">=></span> <span class="s2">"smtp.server.dom"</span><span class="p">,</span>
-  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="m">425</span><span class="p">,</span>
+  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="mi">425</span><span class="p">,</span>
 </pre></div>
 </div>
 <p>If a malware or SPAM scanner is running on the SMTP server it might be
 necessary that you increase the SMTP timeout to e.g. 30s:</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 
-  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="m">30</span><span class="p">,</span>
+  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="mi">30</span><span class="p">,</span>
 </pre></div>
 </div>
 <p>If the SMTP server accepts unsecure connections, the default setting can be
@@ -265,8 +268,8 @@ email out of the box.</p>
 
   <span class="s2">"mail_smtpmode"</span>     <span class="o">=></span> <span class="s2">"php"</span><span class="p">,</span>
   <span class="s2">"mail_smtphost"</span>     <span class="o">=></span> <span class="s2">"127.0.0.1"</span><span class="p">,</span>
-  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="m">25</span><span class="p">,</span>
-  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="m">10</span><span class="p">,</span>
+  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="mi">25</span><span class="p">,</span>
+  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="mi">10</span><span class="p">,</span>
   <span class="s2">"mail_smtpsecure"</span>   <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
   <span class="s2">"mail_smtpauth"</span>     <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
   <span class="s2">"mail_smtpauthtype"</span> <span class="o">=></span> <span class="s2">"LOGIN"</span><span class="p">,</span>
@@ -285,8 +288,8 @@ ownCloud should be able to send email out of the box.</p>
 
   <span class="s2">"mail_smtpmode"</span>     <span class="o">=></span> <span class="s2">"sendmail"</span><span class="p">,</span>
   <span class="s2">"mail_smtphost"</span>     <span class="o">=></span> <span class="s2">"127.0.0.1"</span><span class="p">,</span>
-  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="m">25</span><span class="p">,</span>
-  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="m">10</span><span class="p">,</span>
+  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="mi">25</span><span class="p">,</span>
+  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="mi">10</span><span class="p">,</span>
   <span class="s2">"mail_smtpsecure"</span>   <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
   <span class="s2">"mail_smtpauth"</span>     <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
   <span class="s2">"mail_smtpauthtype"</span> <span class="o">=></span> <span class="s2">"LOGIN"</span><span class="p">,</span>
@@ -305,8 +308,8 @@ be able to send email out of the box.</p>
 
   <span class="s2">"mail_smtpmode"</span>     <span class="o">=></span> <span class="s2">"qmail"</span><span class="p">,</span>
   <span class="s2">"mail_smtphost"</span>     <span class="o">=></span> <span class="s2">"127.0.0.1"</span><span class="p">,</span>
-  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="m">25</span><span class="p">,</span>
-  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="m">10</span><span class="p">,</span>
+  <span class="s2">"mail_smtpport"</span>     <span class="o">=></span> <span class="mi">25</span><span class="p">,</span>
+  <span class="s2">"mail_smtptimeout"</span>  <span class="o">=></span> <span class="mi">10</span><span class="p">,</span>
   <span class="s2">"mail_smtpsecure"</span>   <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
   <span class="s2">"mail_smtpauth"</span>     <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
   <span class="s2">"mail_smtpauthtype"</span> <span class="o">=></span> <span class="s2">"LOGIN"</span><span class="p">,</span>
diff --git a/core/doc/admin/configuration/configuration_maintenance.html b/core/doc/admin/configuration/configuration_maintenance.html
index 5670086..6553ad1 100644
--- a/core/doc/admin/configuration/configuration_maintenance.html
+++ b/core/doc/admin/configuration/configuration_maintenance.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Maintenance Mode Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Maintenance Mode Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Reverse Proxy Configuration" href="configuration_reverseproxy.html" />
     <link rel="prev" title="Mail Configuration" href="configuration_mail.html" />
diff --git a/core/doc/admin/configuration/configuration_reverseproxy.html b/core/doc/admin/configuration/configuration_reverseproxy.html
index 586daac..59ce834 100644
--- a/core/doc/admin/configuration/configuration_reverseproxy.html
+++ b/core/doc/admin/configuration/configuration_reverseproxy.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Reverse Proxy Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Reverse Proxy Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Uploading big files > 512MB (as set by default)" href="configuring_big_file_upload.html" />
     <link rel="prev" title="Maintenance Mode Configuration" href="configuration_maintenance.html" />
diff --git a/core/doc/admin/configuration/configuring_big_file_upload.html b/core/doc/admin/configuration/configuring_big_file_upload.html
index 8e13f41..744604a 100644
--- a/core/doc/admin/configuration/configuring_big_file_upload.html
+++ b/core/doc/admin/configuration/configuring_big_file_upload.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Uploading big files > 512MB (as set by default) — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Uploading big files > 512MB (as set by default) — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Custom Mount Configuration Web-GUI" href="custom_mount_config_gui.html" />
     <link rel="prev" title="Reverse Proxy Configuration" href="configuration_reverseproxy.html" />
diff --git a/core/doc/admin/configuration/custom_mount_config.html b/core/doc/admin/configuration/custom_mount_config.html
index f315773..b473139 100644
--- a/core/doc/admin/configuration/custom_mount_config.html
+++ b/core/doc/admin/configuration/custom_mount_config.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Custom Mount Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Custom Mount Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Custom User Backend Configuration" href="custom_user_backend.html" />
     <link rel="prev" title="Custom Mount Configuration Web-GUI" href="custom_mount_config_gui.html" />
@@ -228,9 +231,10 @@ takes the following options:</p>
 </ul>
 <div class="section" id="id1">
 <h4>Example<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{ "class":"\\OC\\Files\\Storage\\Local",
-  "options":{ "datadir":"\/mnt\/additional_storage" }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span> <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\Local"</span><span class="p">,</span>
+  <span class="nt">"options"</span><span class="p">:{</span> <span class="nt">"datadir"</span><span class="p">:</span><span class="s2">"\/mnt\/additional_storage"</span> <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
@@ -255,15 +259,16 @@ to ‘/’)</li>
 </ul>
 <div class="section" id="id2">
 <h4>Example<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\FTP",
-    "options":{
-        "host":"ftp.myhost.com",
-        "user":"johndoe",
-        "password":"secret",
-        "root":"\/Videos",
-        "secure":"false"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\FTP"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"host"</span><span class="p">:</span><span class="s2">"ftp.myhost.com"</span><span class="p">,</span>
+        <span class="nt">"user"</span><span class="p">:</span><span class="s2">"johndoe"</span><span class="p">,</span>
+        <span class="nt">"password"</span><span class="p">:</span><span class="s2">"secret"</span><span class="p">,</span>
+        <span class="nt">"root"</span><span class="p">:</span><span class="s2">"\/Videos"</span><span class="p">,</span>
+        <span class="nt">"secure"</span><span class="p">:</span><span class="s2">"false"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
@@ -286,14 +291,15 @@ to ‘/’)</li>
 </ul>
 <div class="section" id="id3">
 <h4>Example<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\SFTP",
-    "options":{
-        "host":"ssh.myhost.com",
-        "user":"johndoe",
-        "password":"secret",
-        "root":"\/Books"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\SFTP"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"host"</span><span class="p">:</span><span class="s2">"ssh.myhost.com"</span><span class="p">,</span>
+        <span class="nt">"user"</span><span class="p">:</span><span class="s2">"johndoe"</span><span class="p">,</span>
+        <span class="nt">"password"</span><span class="p">:</span><span class="s2">"secret"</span><span class="p">,</span>
+        <span class="nt">"root"</span><span class="p">:</span><span class="s2">"\/Books"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
@@ -321,15 +327,16 @@ to ‘/’)</li>
 </div>
 <div class="section" id="id4">
 <h4>Example<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\SMB",
-    "options":{
-        "host":"myhost.com",
-        "user":"johndoe",
-        "password":"secret",
-        "share":"\/test",
-        "root":"\/Pictures"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\SMB"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"host"</span><span class="p">:</span><span class="s2">"myhost.com"</span><span class="p">,</span>
+        <span class="nt">"user"</span><span class="p">:</span><span class="s2">"johndoe"</span><span class="p">,</span>
+        <span class="nt">"password"</span><span class="p">:</span><span class="s2">"secret"</span><span class="p">,</span>
+        <span class="nt">"share"</span><span class="p">:</span><span class="s2">"\/test"</span><span class="p">,</span>
+        <span class="nt">"root"</span><span class="p">:</span><span class="s2">"\/Pictures"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 </div>
 </div>
@@ -350,14 +357,15 @@ defaults to ‘/’)</li>
 </ul>
 <div class="section" id="id5">
 <h4>Example<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\DAV",
-    "options":{
-        "host":"myhost.com\/webdav.php",
-        "user":"johndoe",
-        "password":"secret",
-        "secure":"true"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\DAV"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"host"</span><span class="p">:</span><span class="s2">"myhost.com\/webdav.php"</span><span class="p">,</span>
+        <span class="nt">"user"</span><span class="p">:</span><span class="s2">"johndoe"</span><span class="p">,</span>
+        <span class="nt">"password"</span><span class="p">:</span><span class="s2">"secret"</span><span class="p">,</span>
+        <span class="nt">"secure"</span><span class="p">:</span><span class="s2">"true"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 </div>
 </div>
@@ -374,13 +382,14 @@ options:</p>
 </ul>
 <div class="section" id="id6">
 <h4>Example<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\AmazonS3",
-    "options":{
-        "key":"key",
-        "secret":"secret",
-        "bucket":"bucket"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\AmazonS3"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"key"</span><span class="p">:</span><span class="s2">"key"</span><span class="p">,</span>
+        <span class="nt">"secret"</span><span class="p">:</span><span class="s2">"secret"</span><span class="p">,</span>
+        <span class="nt">"bucket"</span><span class="p">:</span><span class="s2">"bucket"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 </div>
 </div>
@@ -398,15 +407,16 @@ be used is <strong>\OC\Files\Storage\Dropbox</strong> and takes the following op
 </ul>
 <div class="section" id="id7">
 <h4>Example<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\Dropbox",
-    "options":{
-        "configured":"#configured",
-        "app_key":"key",
-        "app_secret":"secret",
-        "token":"#token",
-        "token_secret":"#token_secret"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\Dropbox"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"configured"</span><span class="p">:</span><span class="s2">"#configured"</span><span class="p">,</span>
+        <span class="nt">"app_key"</span><span class="p">:</span><span class="s2">"key"</span><span class="p">,</span>
+        <span class="nt">"app_secret"</span><span class="p">:</span><span class="s2">"secret"</span><span class="p">,</span>
+        <span class="nt">"token"</span><span class="p">:</span><span class="s2">"#token"</span><span class="p">,</span>
+        <span class="nt">"token_secret"</span><span class="p">:</span><span class="s2">"#token_secret"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 </div>
 </div>
@@ -426,14 +436,15 @@ It takes the following options:</p>
 </ul>
 <div class="section" id="id8">
 <h4>Example<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\Google",
-    "options":{
-        "configured":"#configured",
-        "client_id":"#client_id",
-        "client_secret":"#client_secret",
-        "token":"#token"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\Google"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"configured"</span><span class="p">:</span><span class="s2">"#configured"</span><span class="p">,</span>
+        <span class="nt">"client_id"</span><span class="p">:</span><span class="s2">"#client_id"</span><span class="p">,</span>
+        <span class="nt">"client_secret"</span><span class="p">:</span><span class="s2">"#client_secret"</span><span class="p">,</span>
+        <span class="nt">"token"</span><span class="p">:</span><span class="s2">"#token"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 </div>
 </div>
@@ -455,15 +466,16 @@ defaults to ‘/’)</li>
 </ul>
 <div class="section" id="id9">
 <h4>Example<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h4>
-<div class="highlight-json"><pre>{   "class":"\\OC\\Files\\Storage\\SWIFT",
-    "options":{
-        "host":"swift.myhost.com\/auth",
-        "user":"johndoe",
-        "token":"secret",
-        "root":"\/Videos",
-        "secure":"true"
-    }
-}</pre>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>   <span class="nt">"class"</span><span class="p">:</span><span class="s2">"\\OC\\Files\\Storage\\SWIFT"</span><span class="p">,</span>
+    <span class="nt">"options"</span><span class="p">:{</span>
+        <span class="nt">"host"</span><span class="p">:</span><span class="s2">"swift.myhost.com\/auth"</span><span class="p">,</span>
+        <span class="nt">"user"</span><span class="p">:</span><span class="s2">"johndoe"</span><span class="p">,</span>
+        <span class="nt">"token"</span><span class="p">:</span><span class="s2">"secret"</span><span class="p">,</span>
+        <span class="nt">"root"</span><span class="p">:</span><span class="s2">"\/Videos"</span><span class="p">,</span>
+        <span class="nt">"secure"</span><span class="p">:</span><span class="s2">"true"</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
 </div>
 </div>
 </div>
diff --git a/core/doc/admin/configuration/custom_mount_config_gui.html b/core/doc/admin/configuration/custom_mount_config_gui.html
index 4056124..29b9a42 100644
--- a/core/doc/admin/configuration/custom_mount_config_gui.html
+++ b/core/doc/admin/configuration/custom_mount_config_gui.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Custom Mount Configuration Web-GUI — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Custom Mount Configuration Web-GUI — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Custom Mount Configuration" href="custom_mount_config.html" />
     <link rel="prev" title="Uploading big files > 512MB (as set by default)" href="configuring_big_file_upload.html" />
diff --git a/core/doc/admin/configuration/custom_user_backend.html b/core/doc/admin/configuration/custom_user_backend.html
index 4ce3f23..ff8118b 100644
--- a/core/doc/admin/configuration/custom_user_backend.html
+++ b/core/doc/admin/configuration/custom_user_backend.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Custom User Backend Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Custom User Backend Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Serving static files via web server" href="xsendfile.html" />
     <link rel="prev" title="Custom Mount Configuration" href="custom_mount_config.html" />
@@ -163,10 +166,10 @@ syntax:</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 
 <span class="s2">"user_backends"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-    <span class="m">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
+    <span class="mi">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
             <span class="s2">"class"</span>     <span class="o">=></span> <span class="o">...</span><span class="p">,</span>
             <span class="s2">"arguments"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-                              <span class="m">0</span> <span class="o">=></span> <span class="o">...</span>
+                              <span class="mi">0</span> <span class="o">=></span> <span class="o">...</span>
                               <span class="p">),</span>
     <span class="p">),</span>
 <span class="p">),</span>
@@ -184,10 +187,10 @@ syntax:</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 
 <span class="s2">"user_backends"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-    <span class="m">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
+    <span class="mi">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
             <span class="s2">"class"</span>     <span class="o">=></span> <span class="s2">"OC_User_IMAP"</span><span class="p">,</span>
             <span class="s2">"arguments"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-                              <span class="m">0</span> <span class="o">=></span> <span class="s1">'{imap.gmail.com:993/imap/ssl}'</span>
+                              <span class="mi">0</span> <span class="o">=></span> <span class="s1">'{imap.gmail.com:993/imap/ssl}'</span>
                               <span class="p">),</span>
     <span class="p">),</span>
 <span class="p">),</span>
@@ -205,10 +208,10 @@ syntax:</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 
 <span class="s2">"user_backends"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-    <span class="m">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
+    <span class="mi">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
             <span class="s2">"class"</span>     <span class="o">=></span> <span class="s2">"OC_User_SMB"</span><span class="p">,</span>
             <span class="s2">"arguments"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-                              <span class="m">0</span> <span class="o">=></span> <span class="s1">'localhost'</span>
+                              <span class="mi">0</span> <span class="o">=></span> <span class="s1">'localhost'</span>
                               <span class="p">),</span>
     <span class="p">),</span>
 <span class="p">),</span>
@@ -225,10 +228,10 @@ syntax:</p>
 <div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 
 <span class="s2">"user_backends"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-    <span class="m">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
+    <span class="mi">0</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
             <span class="s2">"class"</span>     <span class="o">=></span> <span class="s2">"OC_User_FTP"</span><span class="p">,</span>
             <span class="s2">"arguments"</span> <span class="o">=></span> <span class="k">array</span> <span class="p">(</span>
-                              <span class="m">0</span> <span class="o">=></span> <span class="s1">'localhost'</span>
+                              <span class="mi">0</span> <span class="o">=></span> <span class="s1">'localhost'</span>
                               <span class="p">),</span>
     <span class="p">),</span>
 <span class="p">),</span>
diff --git a/core/doc/admin/configuration/index.html b/core/doc/admin/configuration/index.html
index 3ce87a4..0ed26cb 100644
--- a/core/doc/admin/configuration/index.html
+++ b/core/doc/admin/configuration/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Configuration — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Configuration — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="next" title="User Authentication with LDAP" href="auth_ldap.html" />
     <link rel="prev" title="Other Web Servers" href="../installation/installation_others.html" />
 <script type="text/javascript">
diff --git a/core/doc/admin/configuration/xsendfile.html b/core/doc/admin/configuration/xsendfile.html
index fcfda6d..788c1ac 100644
--- a/core/doc/admin/configuration/xsendfile.html
+++ b/core/doc/admin/configuration/xsendfile.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Serving static files via web server — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Serving static files via web server — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Configuration" href="index.html" />
     <link rel="next" title="Maintenance" href="../maintenance/index.html" />
     <link rel="prev" title="Custom User Backend Configuration" href="custom_user_backend.html" />
diff --git a/core/doc/admin/contents.html b/core/doc/admin/contents.html
index 0919fa0..57acb54 100644
--- a/core/doc/admin/contents.html
+++ b/core/doc/admin/contents.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>ownCloud documentation contents — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>ownCloud documentation contents — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="index.html" />
     <link rel="next" title="Admin Documentation" href="index.html" />
 <script type="text/javascript">
 (function () {
@@ -217,6 +220,7 @@
 </li>
 <li class="toctree-l2"><a class="reference internal" href="configuration/configuration_automation.html">Automatic Configuration</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="configuration/configuration_automation.html#parameters">Parameters</a></li>
+<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_automation.html#sample-automatic-configurations">Sample Automatic Configurations</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" href="configuration/configuration_custom_clients.html">Custom Client Configuration</a><ul>
diff --git a/core/doc/admin/genindex.html b/core/doc/admin/genindex.html
index 491dce9..aeab170 100644
--- a/core/doc/admin/genindex.html
+++ b/core/doc/admin/genindex.html
@@ -1,16 +1,21 @@
 
+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Index — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Index — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +29,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="index.html" />
 <script type="text/javascript">
 (function () {
   /**
@@ -127,11 +132,11 @@
 					<div class="page-content">
 						
 
-   <h1 id="index">Index</h1>
+<h1 id="index">Index</h1>
 
-   <div class="genindex-jumpbox">
-   
-   </div>
+<div class="genindex-jumpbox">
+ 
+</div>
 
 
 					</div>
diff --git a/core/doc/admin/index.html b/core/doc/admin/index.html
index c4ded72..05dba85 100644
--- a/core/doc/admin/index.html
+++ b/core/doc/admin/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Admin Documentation — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Admin Documentation — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="#" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="#" />
     <link rel="next" title="Installation" href="installation/index.html" />
     <link rel="prev" title="ownCloud documentation contents" href="contents.html" />
 <script type="text/javascript">
diff --git a/core/doc/admin/installation/index.html b/core/doc/admin/installation/index.html
index cab9b36..433f319 100644
--- a/core/doc/admin/installation/index.html
+++ b/core/doc/admin/installation/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Installation — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Installation — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="next" title="Appliances" href="installation_appliance.html" />
     <link rel="prev" title="Admin Documentation" href="../index.html" />
 <script type="text/javascript">
diff --git a/core/doc/admin/installation/installation_appliance.html b/core/doc/admin/installation/installation_appliance.html
index cbe744c..c921805 100644
--- a/core/doc/admin/installation/installation_appliance.html
+++ b/core/doc/admin/installation/installation_appliance.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Appliances — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Appliances — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Installation" href="index.html" />
     <link rel="next" title="Linux Distributions" href="installation_linux.html" />
     <link rel="prev" title="Installation" href="index.html" />
@@ -164,7 +167,7 @@ run ownCloud on appliance hardware (i.e. NAS filers, routers, etc.).</p>
 <li><a class="reference external" href="http://wiki.qnap.com/wiki/Category:OwnCloud">QNAP Guide</a> for QNAP NAS appliances</li>
 <li><a class="reference external" href="http://wiki.openwrt.org/doc/howto/owncloud">OpenWrt Guide</a> for the popular embedded distribution for routers and NAS devices.</li>
 </ul>
-<div class="admonition-todo admonition " id="index-0">
+<div class="admonition-todo admonition" id="index-0">
 <p class="first admonition-title">Todo</p>
 <p class="last">Tutorials for running owncloud on Synology and Dreamplug.</p>
 </div>
diff --git a/core/doc/admin/installation/installation_linux.html b/core/doc/admin/installation/installation_linux.html
index a77bb08..ce5b9db 100644
--- a/core/doc/admin/installation/installation_linux.html
+++ b/core/doc/admin/installation/installation_linux.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Linux Distributions — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Linux Distributions — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Installation" href="index.html" />
     <link rel="next" title="Mac OS X" href="installation_macos.html" />
     <link rel="prev" title="Appliances" href="installation_appliance.html" />
diff --git a/core/doc/admin/installation/installation_macos.html b/core/doc/admin/installation/installation_macos.html
index e3504c5..30272fc 100644
--- a/core/doc/admin/installation/installation_macos.html
+++ b/core/doc/admin/installation/installation_macos.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Mac OS X — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Mac OS X — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Installation" href="index.html" />
     <link rel="next" title="Windows 7 and Windows Server 2008" href="installation_windows.html" />
     <link rel="prev" title="Linux Distributions" href="installation_linux.html" />
diff --git a/core/doc/admin/installation/installation_others.html b/core/doc/admin/installation/installation_others.html
index 59c29ce..f4dc051 100644
--- a/core/doc/admin/installation/installation_others.html
+++ b/core/doc/admin/installation/installation_others.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Other Web Servers — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Other Web Servers — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Installation" href="index.html" />
     <link rel="next" title="Configuration" href="../configuration/index.html" />
     <link rel="prev" title="Manual Installation" href="installation_source.html" />
@@ -185,8 +188,8 @@ server {
         rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
 
         index index.php;
-        error_page 403 = /core/templates/403.php;
-        error_page 404 = /core/templates/404.php;
+        error_page 403 /core/templates/403.php;
+        error_page 404 /core/templates/404.php;
 
         location = /robots.txt {
             allow all;
diff --git a/core/doc/admin/installation/installation_source.html b/core/doc/admin/installation/installation_source.html
index 9f1c26e..7abd901 100644
--- a/core/doc/admin/installation/installation_source.html
+++ b/core/doc/admin/installation/installation_source.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Manual Installation — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Manual Installation — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Installation" href="index.html" />
     <link rel="next" title="Other Web Servers" href="installation_others.html" />
     <link rel="prev" title="Univention Corporate Server" href="installation_ucs.html" />
@@ -184,7 +187,7 @@ this <a class="reference external" href="https://launchpad.net/~ondrej/+archive/
 sudo apt-get update
 sudo apt-get install php5</pre>
 </div>
-<div class="admonition-todo admonition " id="index-0">
+<div class="admonition-todo admonition" id="index-0">
 <p class="first admonition-title">Todo</p>
 <p class="last">Document other distributions.</p>
 </div>
diff --git a/core/doc/admin/installation/installation_ucs.html b/core/doc/admin/installation/installation_ucs.html
index 94951ca..aef6d52 100644
--- a/core/doc/admin/installation/installation_ucs.html
+++ b/core/doc/admin/installation/installation_ucs.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Univention Corporate Server — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Univention Corporate Server — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Installation" href="index.html" />
     <link rel="next" title="Manual Installation" href="installation_source.html" />
     <link rel="prev" title="Windows 7 and Windows Server 2008" href="installation_windows.html" />
@@ -165,139 +168,139 @@ assign your required value.</p>
 <col width="20%" />
 </colgroup>
 <thead valign="bottom">
-<tr><th class="head">Key</th>
+<tr class="row-odd"><th class="head">Key</th>
 <th class="head">Default</th>
 <th class="head">Description</th>
 <th class="head">Introduced</th>
 </tr>
 </thead>
 <tbody valign="top">
-<tr><td>owncloud/directory/data</td>
+<tr class="row-even"><td>owncloud/directory/data</td>
 <td>/var/lib/owncloud</td>
 <td>Specifies where the file storage will be placed</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/db/name</td>
+<tr class="row-odd"><td>owncloud/db/name</td>
 <td>owncloud</td>
 <td>Name of the MySQL database. ownCloud will create an own user for it.</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/user/quota</td>
+<tr class="row-even"><td>owncloud/user/quota</td>
 <td>(empty)</td>
 <td>The default quota, when a user is being added. Assign values in human readable strings, e.g. “2 GB”. Unlimited if empty.</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/user/enabled</td>
+<tr class="row-odd"><td>owncloud/user/enabled</td>
 <td>0</td>
 <td>Wether a new user is allowed to use ownCloud by default.</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/group/enabled</td>
+<tr class="row-even"><td>owncloud/group/enabled</td>
 <td>0</td>
 <td>Wether a new group is allowed to be used in ownCloud by default.</td>
 <td>2012.4.0.4</td>
 </tr>
-<tr><td>owncloud/ldap/base/users</td>
+<tr class="row-odd"><td>owncloud/ldap/base/users</td>
 <td>cn=users,$ldap_base</td>
 <td>The users-subtree in the LDAP directory. If left blank it will fall back to the LDAP base.</td>
 <td>2012.4.0.4</td>
 </tr>
-<tr><td>owncloud/ldap/base/groups</td>
+<tr class="row-even"><td>owncloud/ldap/base/groups</td>
 <td>cn=groups,$ldap_base</td>
 <td>The groups-subtree in the LDAP directory. If left blank it will fall back to the LDAP base.</td>
 <td>2012.4.0.4</td>
 </tr>
-<tr><td>owncloud/ldap/groupMemberAssoc</td>
+<tr class="row-odd"><td>owncloud/ldap/groupMemberAssoc</td>
 <td>uniqueMember</td>
 <td>The LDAP attribute showing the group-member relationship. Possible values: uniqueMember, memberUid and member</td>
 <td>2012.4.0.4</td>
 </tr>
-<tr><td>owncloud/ldap/tls</td>
+<tr class="row-even"><td>owncloud/ldap/tls</td>
 <td>1</td>
 <td>Whether to talk to the LDAP server via TLS.</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/ldap/disableMainServer</td>
+<tr class="row-odd"><td>owncloud/ldap/disableMainServer</td>
 <td>0</td>
 <td>Deactivates the (first) LDAP Configuration</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/ldap/cacheTTL</td>
+<tr class="row-even"><td>owncloud/ldap/cacheTTL</td>
 <td>600</td>
 <td>Lifetime of the ownCloud LDAP Cache in seconds</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/ldap/UUIDAttribute</td>
+<tr class="row-odd"><td>owncloud/ldap/UUIDAttribute</td>
 <td>(empty)</td>
 <td>Attribute that provides a unique value for each user and group entry. Empty value for autodetection.</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/ldap/loginFilter</td>
+<tr class="row-even"><td>owncloud/ldap/loginFilter</td>
 <td>(&(|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0)) (!(uid=*$)) (&(uid=%uid) (ownCloudEnabled=1)))</td>
 <td>The LDAP filter that shall be used when a user tries to log in.</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/ldap/userlistFilter</td>
+<tr class="row-odd"><td>owncloud/ldap/userlistFilter</td>
 <td>(&(|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0))(!(uid=*$)) (&(ownCloudEnabled=1)))</td>
 <td>The LDAP filter that shall be used when the user list is being retrieved (e.g. for sharing)</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/ldap/groupFilter</td>
+<tr class="row-even"><td>owncloud/ldap/groupFilter</td>
 <td>(&(objectClass=posixGroup) (ownCloudEnabled=1))</td>
 <td>The LDAP filter that shall be used when the group list is being retrieved (e.g. for sharing)</td>
 <td>2012.4.0.4</td>
 </tr>
-<tr><td>owncloud/ldap/internalNameAttribute</td>
+<tr class="row-odd"><td>owncloud/ldap/internalNameAttribute</td>
 <td>uid</td>
 <td>Attribute that should be used to create the user’s owncloud internal name</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/ldap/displayName</td>
+<tr class="row-even"><td>owncloud/ldap/displayName</td>
 <td>uid</td>
 <td>The LDAP attribute that should be displayed as name in ownCloud</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/ldap/user/searchAttributes</td>
+<tr class="row-odd"><td>owncloud/ldap/user/searchAttributes</td>
 <td>uid,givenName,sn,description,employeeNumber,mailPrimaryAddress</td>
 <td>Attributes taken into consideration when searching for users (comma separated)</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/ldap/user/quotaAttribute</td>
+<tr class="row-even"><td>owncloud/ldap/user/quotaAttribute</td>
 <td>ownCloudQuota</td>
 <td>Name of the quota attribute. The default attribute is provided by owncloud-schema.</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/ldap/user/homeAttribute</td>
+<tr class="row-odd"><td>owncloud/ldap/user/homeAttribute</td>
 <td>(empty)</td>
 <td>Attribute that should be used to create the user’s owncloud internal home folder</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/ldap/group/displayName</td>
+<tr class="row-even"><td>owncloud/ldap/group/displayName</td>
 <td>cn</td>
 <td>The LDAP attribute that should be used as groupname in ownCloud</td>
 <td>2012.4.0.4</td>
 </tr>
-<tr><td>owncloud/ldap/group/searchAttributes</td>
+<tr class="row-odd"><td>owncloud/ldap/group/searchAttributes</td>
 <td>cn,description, mailPrimaryAddress</td>
 <td>Attributes taken into consideration when searching for groups (comma separated)</td>
 <td>5.0.9</td>
 </tr>
-<tr><td>owncloud/join/users/update</td>
+<tr class="row-even"><td>owncloud/join/users/update</td>
 <td>yes</td>
 <td>Wether ownCloud LDAP schema should be applied to existing users</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/group/enableDomainUsers</td>
+<tr class="row-odd"><td>owncloud/group/enableDomainUsers</td>
 <td>1</td>
 <td>Wether the group “Domain Users” shall be enabled for ownCloud on install</td>
 <td>2012.4.0.4</td>
 </tr>
-<tr><td>owncloud/join/users/filter</td>
+<tr class="row-even"><td>owncloud/join/users/filter</td>
 <td>(&(|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0)) (!(|(uid=*$) (uid=owncloudsystemuser) (uid=join-backup) (uid=join-slave))) (!(objectClass=ownCloudUser)))</td>
 <td>Filters, on which LDAP users the ownCloud schema should be applied to. The default excludes system users and already ownCloudUsers.</td>
 <td>2012.0.1</td>
 </tr>
-<tr><td>owncloud/join/groups/filter</td>
+<tr class="row-odd"><td>owncloud/join/groups/filter</td>
 <td>(empty)</td>
 <td>Filters which LDAP groups will be en/disabled for ownCloud when running the script /usr/share/owncloud/update-groups.sh</td>
 <td>2012.4.0.4</td>
diff --git a/core/doc/admin/installation/installation_windows.html b/core/doc/admin/installation/installation_windows.html
index 69956e7..b3a1470 100644
--- a/core/doc/admin/installation/installation_windows.html
+++ b/core/doc/admin/installation/installation_windows.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Windows 7 and Windows Server 2008 — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Windows 7 and Windows Server 2008 — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Installation" href="index.html" />
     <link rel="next" title="Univention Corporate Server" href="installation_ucs.html" />
     <link rel="prev" title="Mac OS X" href="installation_macos.html" />
@@ -336,8 +339,8 @@ administrator, and expand the little arrow.</li>
 <li>Select MySQL as the database, and enter your MySQL database user name,</li>
 </ol>
 <blockquote>
-password and desired instance name – use the user name and password you setup
-for MySQL earlier in step 3, and pick any name for the database instance.</blockquote>
+<div>password and desired instance name – use the user name and password you setup
+for MySQL earlier in step 3, and pick any name for the database instance.</div></blockquote>
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
 <p class="last">The owncloud admin password and the MySQL password CANNOT be the same
diff --git a/core/doc/admin/issues/index.html b/core/doc/admin/issues/index.html
index c93570b..8e2c678 100644
--- a/core/doc/admin/issues/index.html
+++ b/core/doc/admin/issues/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Issues — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Issues — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="prev" title="Backing Up ownCloud" href="../maintenance/backup.html" />
 <script type="text/javascript">
 (function () {
diff --git a/core/doc/admin/maintenance/backup.html b/core/doc/admin/maintenance/backup.html
index e0b68b3..89f8b28 100644
--- a/core/doc/admin/maintenance/backup.html
+++ b/core/doc/admin/maintenance/backup.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Backing Up ownCloud — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Backing Up ownCloud — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Maintenance" href="index.html" />
     <link rel="next" title="Issues" href="../issues/index.html" />
     <link rel="prev" title="Updating ownCloud" href="update.html" />
@@ -164,17 +167,17 @@
 <h3>MySQL<a class="headerlink" href="#mysql" title="Permalink to this headline">¶</a></h3>
 <p>MySQL is the recommended database engine. To backup MySQL:</p>
 <blockquote>
-mysqldump –lock-tables -u [username] -p[password] > owncloud.sql</blockquote>
+<div>mysqldump –lock-tables -u [username] -p[password] > owncloud.sql</div></blockquote>
 </div>
 <div class="section" id="sqlite">
 <h3>SQLite<a class="headerlink" href="#sqlite" title="Permalink to this headline">¶</a></h3>
 <blockquote>
-sqlite3 owncloud.db .dump > owncloud.bak</blockquote>
+<div>sqlite3 owncloud.db .dump > owncloud.bak</div></blockquote>
 </div>
 <div class="section" id="postgresql">
 <h3>PostgreSQL<a class="headerlink" href="#postgresql" title="Permalink to this headline">¶</a></h3>
 <blockquote>
-pg_dump owncloud > owncloud.bak</blockquote>
+<div>pg_dump owncloud > owncloud.bak</div></blockquote>
 </div>
 </div>
 </div>
diff --git a/core/doc/admin/maintenance/index.html b/core/doc/admin/maintenance/index.html
index 1b9b036..806f362 100644
--- a/core/doc/admin/maintenance/index.html
+++ b/core/doc/admin/maintenance/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Maintenance — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Maintenance — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="next" title="Migrating ownCloud Installations" href="migrating.html" />
     <link rel="prev" title="Serving static files via web server" href="../configuration/xsendfile.html" />
 <script type="text/javascript">
diff --git a/core/doc/admin/maintenance/migrating.html b/core/doc/admin/maintenance/migrating.html
index 9927712..d86a63b 100644
--- a/core/doc/admin/maintenance/migrating.html
+++ b/core/doc/admin/maintenance/migrating.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Migrating ownCloud Installations — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Migrating ownCloud Installations — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Maintenance" href="index.html" />
     <link rel="next" title="Updating ownCloud" href="update.html" />
     <link rel="prev" title="Maintenance" href="index.html" />
diff --git a/core/doc/admin/maintenance/update.html b/core/doc/admin/maintenance/update.html
index 4581e09..75559a2 100644
--- a/core/doc/admin/maintenance/update.html
+++ b/core/doc/admin/maintenance/update.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Updating ownCloud — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Updating ownCloud — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Maintenance" href="index.html" />
     <link rel="next" title="Backing Up ownCloud" href="backup.html" />
     <link rel="prev" title="Migrating ownCloud Installations" href="migrating.html" />
diff --git a/core/doc/admin/search.html b/core/doc/admin/search.html
index 01de2a4..48b64e4 100644
--- a/core/doc/admin/search.html
+++ b/core/doc/admin/search.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Search — ownCloud Administrators Manual v5.0 documentation</title>
+    <title>Search — ownCloud Administrators Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -25,7 +28,7 @@
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud Administrators Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud Administrators Manual 5.0 documentation" href="index.html" />
   <script type="text/javascript">
     jQuery(function() { Search.loadIndex("searchindex.js"); });
   </script>
diff --git a/core/doc/admin/searchindex.js b/core/doc/admin/searchindex.js
index cf1ff5c..11ec1c6 100644
--- a/core/doc/admin/searchindex.js
+++ b/core/doc/admin/searchindex.js
@@ -1 +1 @@
-Search.setIndex({objects:{},terms:{retain:[17,34],four:27,token_secret:26,sorri:20,loginfilt:31,aur:24,swap:13,under:[21,18,16,13],worth:18,everi:[31,18,5,20,30],affect:[24,20],upload:[11,32,2,21,13,8,10],verif:[10,20],seper:31,"10g":32,enjoi:31,second:[31,20],even:[17,21,32],dialogu:20,followsymlink:24,asid:21,"10t15":6,"new":[11,24,31,4,30,20],subtre:31,abov:[14,24,4,5,13,30,20],never:[30,20],here:[14,0,32,2,21,20],studio:1,path:[14,22,23,2,32,25,26,28,20],apps_path:25,uuidattribut:31, [...]
\ No newline at end of file
+Search.setIndex({objects:{},terms:{retain:[17,34],four:27,token_secret:26,sorri:20,loginfilt:31,aur:24,swap:13,under:[21,18,16,13],worth:18,everi:[31,18,5,20,30],affect:[24,20],upload:[11,32,2,21,13,8,10],verif:[10,20],seper:31,"10g":32,enjoi:31,second:[31,20],even:[17,21,32],dialogu:20,followsymlink:24,asid:21,"10t15":6,"new":[11,24,31,4,30,20],subtre:31,abov:[14,24,4,5,13,30,20],never:[30,20],here:[14,0,32,2,21,20],studio:1,path:[14,22,23,2,32,25,26,28,20],apps_path:25,uuidattribut:31, [...]
\ No newline at end of file
diff --git a/core/doc/user/_sources/files/files.txt b/core/doc/user/_sources/files/files.txt
index c161f10..e55afaf 100644
--- a/core/doc/user/_sources/files/files.txt
+++ b/core/doc/user/_sources/files/files.txt
@@ -3,7 +3,7 @@ Accessing your Files (WebDav)
 
 Your ownCloud instance can be accessed on every platform via the web interface. There are also options to integrate it with your desktop.
 
-.. note:: You will have to adjust **youradress.com/** to the URL of your ownCloud server installation
+.. note:: You will have to adjust **youraddress.com/** to the URL of your ownCloud server installation
 
 
 Linux
@@ -14,7 +14,7 @@ Gnome 3/Nautilus
 
 The URL that you have to use to connect to the owncloud installation in nautilus is::
 
-  davs://youraddress.com/files/webdav.php
+  davs://youraddress.com/owncloud/remote.php/webdav
 
 
 .. image:: ../images/gnome3_nautilus_webdav.png
@@ -25,7 +25,7 @@ KDE/Dolphin
 ~~~~~~~~~~~
 Click in the adress area and enter::
 
-    webdav://youraddress.com/files/webdav.php
+    webdav://youraddress.com/owncloud/remote.php/webdav
 
 .. image:: ../images/dolphin_webdav.png
 
@@ -41,7 +41,7 @@ or:
 * Server: Your ownCloud domain name, for example **youraddress.com** (without **http://** before or directories afterwards).
 * Folder: Enter::
 
-        owncloud/files/webdav.php
+        owncloud/remote.php/webdav
 
 5. Create icon checkbox: Tick to get a bookmark in the Places column
 6. Port & Encrypted checkbox: Leave as it is unless you have special settings or an SSL certificate.
@@ -62,14 +62,14 @@ Mounting from command line
 
 4. Edit :file:`/etc/fstab` and add the following line for each user who wants to mount the folder (with your details where appropriate)::
 
-        youradress.com/files/webdav.php /home/<username>/owncloud davfs user,rw,noauto 0 0
+        youraddress.com/owncloud/remote.php/webdav /home/<username>/owncloud davfs user,rw,noauto 0 0
 
 Then, as each user who wants to mount the folder:
 
 1. Create the folders **owncloud/** and **.davfs2/** in your home directory
 2. Create the file secrets inside **.davfs2/**, fill it with the following (with your credentials where appropriate)::
 
-        youradress.com/files/webdav.php <username> <password>
+        youraddress.com/owncloud/remote.php/webdav <username> <password>
 
 3. Ensure the file is only writable by you either through the file manager, or via::
 
@@ -107,7 +107,7 @@ In the Finder, choose **Go > Connect to Server,** type the address of the server
 
 The URL that you have to use to connect to the owncloud installation in finder is::
 
-  http://youraddress.com/files/webdav.php
+  http://youraddress.com/owncloud/remote.php/webdav
 
 .. image:: ../images/osx_webdav2.png
 
@@ -133,24 +133,24 @@ ownCloud to one or more directories of your local hard drive.
 Mapping via the command line
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Suppose your ownCloud is installed at **https://www.yourserver.com/owncloud**,
+Suppose your ownCloud is installed at **https://youraddress.com/owncloud**,
 that is, entering this URL in your webbrowser will bring up the login screen.
 Running::
 
-  net use Z: https://www.yourserver.com/owncloud/remote.php/webdav /user:youruser yourpassword
+  net use Z: https://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword
 
 will map the files of your ownCloud account to the drive letter Z:. An alternative
 syntax is::
 
-  net use Z: \\www.yourserver.com at ssl\owncloud\remote.php\webdav /user:youruser yourpassword
+  net use Z: \\youraddress.com at ssl\owncloud\remote.php\webdav /user:youruser yourpassword
 
 Appending **/persistent** makes the connection persistent across reboots.
 
 You can also mount your ownCloud via HTTP, leaving the connection unencrypted.
 Use either of the following syntaxes::
 
-  net use Z: http://www.yourserver.com/owncloud/remote.php/webdav /user:youruser yourpassword
-  net use Z: \\www.yourserver.com\owncloud\remote.php\webdav /user:youruser yourpassword
+  net use Z: http://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword
+  net use Z: \\youraddress.com\owncloud\remote.php\webdav /user:youruser yourpassword
 
 Please note that this allows anyone to sniff your ownCloud data with ease, especially on public WiFi hotspots. Plain HTTP should therefore only be used in conjunction with a VPN tunnel when used on Laptops.
 
@@ -159,7 +159,7 @@ Using Windows Explorer
 
 Right-click on **Computer** entry and select **Map network drive...**. Choose a local network drive to map ownCloud to. Finally, enter the address to your ownCloud instance, followed by **/remote.php/webdav**, e.g. ::
 
-  https://www.yourserver.com/owncloud/remote.php/webdav
+  https://youraddress.com/owncloud/remote.php/webdav
 
 for an SSL protected server. Check **Reconnect at logon** to make this mapping persistent across reboots. If you want to connect as another user, check **Connect using different credentials**.
 
@@ -176,7 +176,7 @@ Using Cyberduck (4.2.1)
 Specify a server without any leading protocol information. e.g.:
 
 Server
-  owncloudhost.com
+  youraddress.com
 
 The port depends on whether your ownCloud server supports SSL or not. Cyberduck requires that you select a different connection type depending on whethr SSL is to be used ('WebDAV' or 'WebDAV (HTTPS/SSL)'):
 
@@ -227,7 +227,7 @@ Mobile
 -------
 To connect to your ownCloud server with the **ownCloud** mobile apps, use the base URL and folder only::
 
-    example.com/owncloud
+    youraddress.com/owncloud
 
 No need to add remote.php/webdav as you do for any other WebDAV client.
 
@@ -238,7 +238,7 @@ good (proprietary) app for `Android App`_ , `iPhone`_ & `BlackBerry`_.
 
 The URL for these is::
 
-    example.com/owncloud/remote.php/webdav
+    youraddress.com/owncloud/remote.php/webdav
 
 .. _in your file manager: http://en.wikipedia.org/wiki/Webdav#WebDAV_client_applications
 .. _Sync your ownCloud folders and local folders: http://owncloud.org/documentation/sync-clients/
diff --git a/core/doc/user/_static/ajax-loader.gif b/core/doc/user/_static/ajax-loader.gif
new file mode 100644
index 0000000..61faf8c
Binary files /dev/null and b/core/doc/user/_static/ajax-loader.gif differ
diff --git a/core/doc/user/_static/basic.css b/core/doc/user/_static/basic.css
index 6882a58..43e8baf 100644
--- a/core/doc/user/_static/basic.css
+++ b/core/doc/user/_static/basic.css
@@ -79,6 +79,14 @@ div.sphinxsidebar input {
     font-size: 1em;
 }
 
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 170px;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    width: 30px;
+}
+
 img {
     border: 0;
 }
@@ -236,7 +244,6 @@ img.align-center, .figure.align-center, object.align-center {
 }
 
 .align-center {
-    clear: both;
     text-align: center;
 }
 
@@ -413,7 +420,7 @@ dl.glossary dt {
 }
 
 .footnote:target  {
-    background-color: #ffa
+    background-color: #ffa;
 }
 
 .line-block {
@@ -440,6 +447,11 @@ dl.glossary dt {
     font-style: oblique;
 }
 
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
 /* -- code displays --------------------------------------------------------- */
 
 pre {
@@ -525,4 +537,4 @@ span.eqno {
     #top-link {
         display: none;
     }
-}
+}
\ No newline at end of file
diff --git a/core/doc/user/_static/comment-bright.png b/core/doc/user/_static/comment-bright.png
new file mode 100644
index 0000000..551517b
Binary files /dev/null and b/core/doc/user/_static/comment-bright.png differ
diff --git a/core/doc/user/_static/comment-close.png b/core/doc/user/_static/comment-close.png
new file mode 100644
index 0000000..09b54be
Binary files /dev/null and b/core/doc/user/_static/comment-close.png differ
diff --git a/core/doc/user/_static/comment.png b/core/doc/user/_static/comment.png
new file mode 100644
index 0000000..92feb52
Binary files /dev/null and b/core/doc/user/_static/comment.png differ
diff --git a/core/doc/user/_static/doctools.js b/core/doc/user/_static/doctools.js
index 8b9bd2c..d4619fd 100644
--- a/core/doc/user/_static/doctools.js
+++ b/core/doc/user/_static/doctools.js
@@ -2,7 +2,7 @@
  * doctools.js
  * ~~~~~~~~~~~
  *
- * Sphinx JavaScript utilties for all documentation.
+ * Sphinx JavaScript utilities for all documentation.
  *
  * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
  * :license: BSD, see LICENSE for details.
@@ -185,9 +185,9 @@ var Documentation = {
           body.highlightText(this.toLowerCase(), 'highlighted');
         });
       }, 10);
-      $('<li class="highlight-link"><a href="javascript:Documentation.' +
-        'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
-          .appendTo($('.sidebar .this-page-menu'));
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
+          .appendTo($('#searchbox'));
     }
   },
 
@@ -213,7 +213,7 @@ var Documentation = {
    * helper function to hide the search marks again
    */
   hideSearchWords : function() {
-    $('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
+    $('#searchbox .highlight-link').fadeOut(300);
     $('span.highlighted').removeClass('highlighted');
   },
 
diff --git a/core/doc/user/_static/down-pressed.png b/core/doc/user/_static/down-pressed.png
new file mode 100644
index 0000000..6f7ad78
Binary files /dev/null and b/core/doc/user/_static/down-pressed.png differ
diff --git a/core/doc/user/_static/down.png b/core/doc/user/_static/down.png
new file mode 100644
index 0000000..3003a88
Binary files /dev/null and b/core/doc/user/_static/down.png differ
diff --git a/core/doc/user/_static/searchtools.js b/core/doc/user/_static/searchtools.js
index dae92b5..663be4c 100644
--- a/core/doc/user/_static/searchtools.js
+++ b/core/doc/user/_static/searchtools.js
@@ -1,6 +1,6 @@
 /*
- * searchtools.js
- * ~~~~~~~~~~~~~~
+ * searchtools.js_t
+ * ~~~~~~~~~~~~~~~~
  *
  * Sphinx JavaScript utilties for the full-text search.
  *
@@ -36,10 +36,11 @@ jQuery.makeSearchSummary = function(text, keywords, hlwords) {
   return rv;
 }
 
+
 /**
  * Porter Stemmer
  */
-var PorterStemmer = function() {
+var Stemmer = function() {
 
   var step2list = {
     ational: 'ate',
@@ -300,20 +301,20 @@ var Search = {
   },
 
   query : function(query) {
-    var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in',
-                     'if', 'for', 'no', 'there', 'their', 'was', 'is',
-                     'be', 'to', 'that', 'but', 'they', 'not', 'such',
-                     'with', 'by', 'a', 'on', 'these', 'of', 'will',
-                     'this', 'near', 'the', 'or', 'at'];
-
-    // stem the searchterms and add them to the correct list
-    var stemmer = new PorterStemmer();
+    var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
+
+    // Stem the searchterms and add them to the correct list
+    var stemmer = new Stemmer();
     var searchterms = [];
     var excluded = [];
     var hlterms = [];
     var tmp = query.split(/\s+/);
-    var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
+    var objectterms = [];
     for (var i = 0; i < tmp.length; i++) {
+      if (tmp[i] != "") {
+          objectterms.push(tmp[i].toLowerCase());
+      }
+
       if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
           tmp[i] == "") {
         // skip this "word"
@@ -344,9 +345,6 @@ var Search = {
     var filenames = this._index.filenames;
     var titles = this._index.titles;
     var terms = this._index.terms;
-    var objects = this._index.objects;
-    var objtypes = this._index.objtypes;
-    var objnames = this._index.objnames;
     var fileMap = {};
     var files = null;
     // different result priorities
@@ -357,40 +355,19 @@ var Search = {
     $('#search-progress').empty();
 
     // lookup as object
-    if (object != null) {
-      for (var prefix in objects) {
-        for (var name in objects[prefix]) {
-          var fullname = (prefix ? prefix + '.' : '') + name;
-          if (fullname.toLowerCase().indexOf(object) > -1) {
-            match = objects[prefix][name];
-            descr = objnames[match[1]] + _(', in ') + titles[match[0]];
-            // XXX the generated anchors are not generally correct
-            // XXX there may be custom prefixes
-            result = [filenames[match[0]], fullname, '#'+fullname, descr];
-            switch (match[2]) {
-            case 1: objectResults.push(result); break;
-            case 0: importantResults.push(result); break;
-            case 2: unimportantResults.push(result); break;
-            }
-          }
-        }
-      }
+    for (var i = 0; i < objectterms.length; i++) {
+      var others = [].concat(objectterms.slice(0,i),
+                             objectterms.slice(i+1, objectterms.length))
+      var results = this.performObjectSearch(objectterms[i], others);
+      // Assume first word is most likely to be the object,
+      // other words more likely to be in description.
+      // Therefore put matches for earlier words first.
+      // (Results are eventually used in reverse order).
+      objectResults = results[0].concat(objectResults);
+      importantResults = results[1].concat(importantResults);
+      unimportantResults = results[2].concat(unimportantResults);
     }
 
-    // sort results descending
-    objectResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    importantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    unimportantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-
     // perform the search on the required terms
     for (var i = 0; i < searchterms.length; i++) {
       var word = searchterms[i];
@@ -489,7 +466,7 @@ var Search = {
             listItem.slideDown(5, function() {
               displayNextItem();
             });
-          });
+          }, "text");
         } else {
           // no source available, just display title
           Search.output.append(listItem);
@@ -510,9 +487,74 @@ var Search = {
       }
     }
     displayNextItem();
+  },
+
+  performObjectSearch : function(object, otherterms) {
+    var filenames = this._index.filenames;
+    var objects = this._index.objects;
+    var objnames = this._index.objnames;
+    var titles = this._index.titles;
+
+    var importantResults = [];
+    var objectResults = [];
+    var unimportantResults = [];
+
+    for (var prefix in objects) {
+      for (var name in objects[prefix]) {
+        var fullname = (prefix ? prefix + '.' : '') + name;
+        if (fullname.toLowerCase().indexOf(object) > -1) {
+          var match = objects[prefix][name];
+          var objname = objnames[match[1]][2];
+          var title = titles[match[0]];
+          // If more than one term searched for, we require other words to be
+          // found in the name/title/description
+          if (otherterms.length > 0) {
+            var haystack = (prefix + ' ' + name + ' ' +
+                            objname + ' ' + title).toLowerCase();
+            var allfound = true;
+            for (var i = 0; i < otherterms.length; i++) {
+              if (haystack.indexOf(otherterms[i]) == -1) {
+                allfound = false;
+                break;
+              }
+            }
+            if (!allfound) {
+              continue;
+            }
+          }
+          var descr = objname + _(', in ') + title;
+          anchor = match[3];
+          if (anchor == '')
+            anchor = fullname;
+          else if (anchor == '-')
+            anchor = objnames[match[1]][1] + '-' + fullname;
+          result = [filenames[match[0]], fullname, '#'+anchor, descr];
+          switch (match[2]) {
+          case 1: objectResults.push(result); break;
+          case 0: importantResults.push(result); break;
+          case 2: unimportantResults.push(result); break;
+          }
+        }
+      }
+    }
+
+    // sort results descending
+    objectResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    importantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    unimportantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    return [importantResults, objectResults, unimportantResults]
   }
 }
 
 $(document).ready(function() {
   Search.init();
-});
+});
\ No newline at end of file
diff --git a/core/doc/user/_static/up-pressed.png b/core/doc/user/_static/up-pressed.png
new file mode 100644
index 0000000..8bd587a
Binary files /dev/null and b/core/doc/user/_static/up-pressed.png differ
diff --git a/core/doc/user/_static/up.png b/core/doc/user/_static/up.png
new file mode 100644
index 0000000..b946256
Binary files /dev/null and b/core/doc/user/_static/up.png differ
diff --git a/core/doc/user/_static/websupport.js b/core/doc/user/_static/websupport.js
new file mode 100644
index 0000000..e9bd1b8
--- /dev/null
+++ b/core/doc/user/_static/websupport.js
@@ -0,0 +1,808 @@
+/*
+ * websupport.js
+ * ~~~~~~~~~~~~~
+ *
+ * sphinx.websupport utilties for all documentation.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+(function($) {
+  $.fn.autogrow = function() {
+    return this.each(function() {
+    var textarea = this;
+
+    $.fn.autogrow.resize(textarea);
+
+    $(textarea)
+      .focus(function() {
+        textarea.interval = setInterval(function() {
+          $.fn.autogrow.resize(textarea);
+        }, 500);
+      })
+      .blur(function() {
+        clearInterval(textarea.interval);
+      });
+    });
+  };
+
+  $.fn.autogrow.resize = function(textarea) {
+    var lineHeight = parseInt($(textarea).css('line-height'), 10);
+    var lines = textarea.value.split('\n');
+    var columns = textarea.cols;
+    var lineCount = 0;
+    $.each(lines, function() {
+      lineCount += Math.ceil(this.length / columns) || 1;
+    });
+    var height = lineHeight * (lineCount + 1);
+    $(textarea).css('height', height);
+  };
+})(jQuery);
+
+(function($) {
+  var comp, by;
+
+  function init() {
+    initEvents();
+    initComparator();
+  }
+
+  function initEvents() {
+    $('a.comment-close').live("click", function(event) {
+      event.preventDefault();
+      hide($(this).attr('id').substring(2));
+    });
+    $('a.vote').live("click", function(event) {
+      event.preventDefault();
+      handleVote($(this));
+    });
+    $('a.reply').live("click", function(event) {
+      event.preventDefault();
+      openReply($(this).attr('id').substring(2));
+    });
+    $('a.close-reply').live("click", function(event) {
+      event.preventDefault();
+      closeReply($(this).attr('id').substring(2));
+    });
+    $('a.sort-option').live("click", function(event) {
+      event.preventDefault();
+      handleReSort($(this));
+    });
+    $('a.show-proposal').live("click", function(event) {
+      event.preventDefault();
+      showProposal($(this).attr('id').substring(2));
+    });
+    $('a.hide-proposal').live("click", function(event) {
+      event.preventDefault();
+      hideProposal($(this).attr('id').substring(2));
+    });
+    $('a.show-propose-change').live("click", function(event) {
+      event.preventDefault();
+      showProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.hide-propose-change').live("click", function(event) {
+      event.preventDefault();
+      hideProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.accept-comment').live("click", function(event) {
+      event.preventDefault();
+      acceptComment($(this).attr('id').substring(2));
+    });
+    $('a.delete-comment').live("click", function(event) {
+      event.preventDefault();
+      deleteComment($(this).attr('id').substring(2));
+    });
+    $('a.comment-markup').live("click", function(event) {
+      event.preventDefault();
+      toggleCommentMarkupBox($(this).attr('id').substring(2));
+    });
+  }
+
+  /**
+   * Set comp, which is a comparator function used for sorting and
+   * inserting comments into the list.
+   */
+  function setComparator() {
+    // If the first three letters are "asc", sort in ascending order
+    // and remove the prefix.
+    if (by.substring(0,3) == 'asc') {
+      var i = by.substring(3);
+      comp = function(a, b) { return a[i] - b[i]; };
+    } else {
+      // Otherwise sort in descending order.
+      comp = function(a, b) { return b[by] - a[by]; };
+    }
+
+    // Reset link styles and format the selected sort option.
+    $('a.sel').attr('href', '#').removeClass('sel');
+    $('a.by' + by).removeAttr('href').addClass('sel');
+  }
+
+  /**
+   * Create a comp function. If the user has preferences stored in
+   * the sortBy cookie, use those, otherwise use the default.
+   */
+  function initComparator() {
+    by = 'rating'; // Default to sort by rating.
+    // If the sortBy cookie is set, use that instead.
+    if (document.cookie.length > 0) {
+      var start = document.cookie.indexOf('sortBy=');
+      if (start != -1) {
+        start = start + 7;
+        var end = document.cookie.indexOf(";", start);
+        if (end == -1) {
+          end = document.cookie.length;
+          by = unescape(document.cookie.substring(start, end));
+        }
+      }
+    }
+    setComparator();
+  }
+
+  /**
+   * Show a comment div.
+   */
+  function show(id) {
+    $('#ao' + id).hide();
+    $('#ah' + id).show();
+    var context = $.extend({id: id}, opts);
+    var popup = $(renderTemplate(popupTemplate, context)).hide();
+    popup.find('textarea[name="proposal"]').hide();
+    popup.find('a.by' + by).addClass('sel');
+    var form = popup.find('#cf' + id);
+    form.submit(function(event) {
+      event.preventDefault();
+      addComment(form);
+    });
+    $('#s' + id).after(popup);
+    popup.slideDown('fast', function() {
+      getComments(id);
+    });
+  }
+
+  /**
+   * Hide a comment div.
+   */
+  function hide(id) {
+    $('#ah' + id).hide();
+    $('#ao' + id).show();
+    var div = $('#sc' + id);
+    div.slideUp('fast', function() {
+      div.remove();
+    });
+  }
+
+  /**
+   * Perform an ajax request to get comments for a node
+   * and insert the comments into the comments tree.
+   */
+  function getComments(id) {
+    $.ajax({
+     type: 'GET',
+     url: opts.getCommentsURL,
+     data: {node: id},
+     success: function(data, textStatus, request) {
+       var ul = $('#cl' + id);
+       var speed = 100;
+       $('#cf' + id)
+         .find('textarea[name="proposal"]')
+         .data('source', data.source);
+
+       if (data.comments.length === 0) {
+         ul.html('<li>No comments yet.</li>');
+         ul.data('empty', true);
+       } else {
+         // If there are comments, sort them and put them in the list.
+         var comments = sortComments(data.comments);
+         speed = data.comments.length * 100;
+         appendComments(comments, ul);
+         ul.data('empty', false);
+       }
+       $('#cn' + id).slideUp(speed + 200);
+       ul.slideDown(speed);
+     },
+     error: function(request, textStatus, error) {
+       showError('Oops, there was a problem retrieving the comments.');
+     },
+     dataType: 'json'
+    });
+  }
+
+  /**
+   * Add a comment via ajax and insert the comment into the comment tree.
+   */
+  function addComment(form) {
+    var node_id = form.find('input[name="node"]').val();
+    var parent_id = form.find('input[name="parent"]').val();
+    var text = form.find('textarea[name="comment"]').val();
+    var proposal = form.find('textarea[name="proposal"]').val();
+
+    if (text == '') {
+      showError('Please enter a comment.');
+      return;
+    }
+
+    // Disable the form that is being submitted.
+    form.find('textarea,input').attr('disabled', 'disabled');
+
+    // Send the comment to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.addCommentURL,
+      dataType: 'json',
+      data: {
+        node: node_id,
+        parent: parent_id,
+        text: text,
+        proposal: proposal
+      },
+      success: function(data, textStatus, error) {
+        // Reset the form.
+        if (node_id) {
+          hideProposeChange(node_id);
+        }
+        form.find('textarea')
+          .val('')
+          .add(form.find('input'))
+          .removeAttr('disabled');
+	var ul = $('#cl' + (node_id || parent_id));
+        if (ul.data('empty')) {
+          $(ul).empty();
+          ul.data('empty', false);
+        }
+        insertComment(data.comment);
+        var ao = $('#ao' + node_id);
+        ao.find('img').attr({'src': opts.commentBrightImage});
+        if (node_id) {
+          // if this was a "root" comment, remove the commenting box
+          // (the user can get it back by reopening the comment popup)
+          $('#ca' + node_id).slideUp();
+        }
+      },
+      error: function(request, textStatus, error) {
+        form.find('textarea,input').removeAttr('disabled');
+        showError('Oops, there was a problem adding the comment.');
+      }
+    });
+  }
+
+  /**
+   * Recursively append comments to the main comment list and children
+   * lists, creating the comment tree.
+   */
+  function appendComments(comments, ul) {
+    $.each(comments, function() {
+      var div = createCommentDiv(this);
+      ul.append($(document.createElement('li')).html(div));
+      appendComments(this.children, div.find('ul.comment-children'));
+      // To avoid stagnating data, don't store the comments children in data.
+      this.children = null;
+      div.data('comment', this);
+    });
+  }
+
+  /**
+   * After adding a new comment, it must be inserted in the correct
+   * location in the comment tree.
+   */
+  function insertComment(comment) {
+    var div = createCommentDiv(comment);
+
+    // To avoid stagnating data, don't store the comments children in data.
+    comment.children = null;
+    div.data('comment', comment);
+
+    var ul = $('#cl' + (comment.node || comment.parent));
+    var siblings = getChildren(ul);
+
+    var li = $(document.createElement('li'));
+    li.hide();
+
+    // Determine where in the parents children list to insert this comment.
+    for(i=0; i < siblings.length; i++) {
+      if (comp(comment, siblings[i]) <= 0) {
+        $('#cd' + siblings[i].id)
+          .parent()
+          .before(li.html(div));
+        li.slideDown('fast');
+        return;
+      }
+    }
+
+    // If we get here, this comment rates lower than all the others,
+    // or it is the only comment in the list.
+    ul.append(li.html(div));
+    li.slideDown('fast');
+  }
+
+  function acceptComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.acceptCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        $('#cm' + id).fadeOut('fast');
+        $('#cd' + id).removeClass('moderate');
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem accepting the comment.');
+      }
+    });
+  }
+
+  function deleteComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.deleteCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        var div = $('#cd' + id);
+        if (data == 'delete') {
+          // Moderator mode: remove the comment and all children immediately
+          div.slideUp('fast', function() {
+            div.remove();
+          });
+          return;
+        }
+        // User mode: only mark the comment as deleted
+        div
+          .find('span.user-id:first')
+          .text('[deleted]').end()
+          .find('div.comment-text:first')
+          .text('[deleted]').end()
+          .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
+                ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
+          .remove();
+        var comment = div.data('comment');
+        comment.username = '[deleted]';
+        comment.text = '[deleted]';
+        div.data('comment', comment);
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem deleting the comment.');
+      }
+    });
+  }
+
+  function showProposal(id) {
+    $('#sp' + id).hide();
+    $('#hp' + id).show();
+    $('#pr' + id).slideDown('fast');
+  }
+
+  function hideProposal(id) {
+    $('#hp' + id).hide();
+    $('#sp' + id).show();
+    $('#pr' + id).slideUp('fast');
+  }
+
+  function showProposeChange(id) {
+    $('#pc' + id).hide();
+    $('#hc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val(textarea.data('source'));
+    $.fn.autogrow.resize(textarea[0]);
+    textarea.slideDown('fast');
+  }
+
+  function hideProposeChange(id) {
+    $('#hc' + id).hide();
+    $('#pc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val('').removeAttr('disabled');
+    textarea.slideUp('fast');
+  }
+
+  function toggleCommentMarkupBox(id) {
+    $('#mb' + id).toggle();
+  }
+
+  /** Handle when the user clicks on a sort by link. */
+  function handleReSort(link) {
+    var classes = link.attr('class').split(/\s+/);
+    for (var i=0; i<classes.length; i++) {
+      if (classes[i] != 'sort-option') {
+	by = classes[i].substring(2);
+      }
+    }
+    setComparator();
+    // Save/update the sortBy cookie.
+    var expiration = new Date();
+    expiration.setDate(expiration.getDate() + 365);
+    document.cookie= 'sortBy=' + escape(by) +
+                     ';expires=' + expiration.toUTCString();
+    $('ul.comment-ul').each(function(index, ul) {
+      var comments = getChildren($(ul), true);
+      comments = sortComments(comments);
+      appendComments(comments, $(ul).empty());
+    });
+  }
+
+  /**
+   * Function to process a vote when a user clicks an arrow.
+   */
+  function handleVote(link) {
+    if (!opts.voting) {
+      showError("You'll need to login to vote.");
+      return;
+    }
+
+    var id = link.attr('id');
+    if (!id) {
+      // Didn't click on one of the voting arrows.
+      return;
+    }
+    // If it is an unvote, the new vote value is 0,
+    // Otherwise it's 1 for an upvote, or -1 for a downvote.
+    var value = 0;
+    if (id.charAt(1) != 'u') {
+      value = id.charAt(0) == 'u' ? 1 : -1;
+    }
+    // The data to be sent to the server.
+    var d = {
+      comment_id: id.substring(2),
+      value: value
+    };
+
+    // Swap the vote and unvote links.
+    link.hide();
+    $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
+      .show();
+
+    // The div the comment is displayed in.
+    var div = $('div#cd' + d.comment_id);
+    var data = div.data('comment');
+
+    // If this is not an unvote, and the other vote arrow has
+    // already been pressed, unpress it.
+    if ((d.value !== 0) && (data.vote === d.value * -1)) {
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
+    }
+
+    // Update the comments rating in the local data.
+    data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
+    data.vote = d.value;
+    div.data('comment', data);
+
+    // Change the rating text.
+    div.find('.rating:first')
+      .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
+
+    // Send the vote information to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.processVoteURL,
+      data: d,
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem casting that vote.');
+      }
+    });
+  }
+
+  /**
+   * Open a reply form used to reply to an existing comment.
+   */
+  function openReply(id) {
+    // Swap out the reply link for the hide link
+    $('#rl' + id).hide();
+    $('#cr' + id).show();
+
+    // Add the reply li to the children ul.
+    var div = $(renderTemplate(replyTemplate, {id: id})).hide();
+    $('#cl' + id)
+      .prepend(div)
+      // Setup the submit handler for the reply form.
+      .find('#rf' + id)
+      .submit(function(event) {
+        event.preventDefault();
+        addComment($('#rf' + id));
+        closeReply(id);
+      })
+      .find('input[type=button]')
+      .click(function() {
+        closeReply(id);
+      });
+    div.slideDown('fast', function() {
+      $('#rf' + id).find('textarea').focus();
+    });
+  }
+
+  /**
+   * Close the reply form opened with openReply.
+   */
+  function closeReply(id) {
+    // Remove the reply div from the DOM.
+    $('#rd' + id).slideUp('fast', function() {
+      $(this).remove();
+    });
+
+    // Swap out the hide link for the reply link
+    $('#cr' + id).hide();
+    $('#rl' + id).show();
+  }
+
+  /**
+   * Recursively sort a tree of comments using the comp comparator.
+   */
+  function sortComments(comments) {
+    comments.sort(comp);
+    $.each(comments, function() {
+      this.children = sortComments(this.children);
+    });
+    return comments;
+  }
+
+  /**
+   * Get the children comments from a ul. If recursive is true,
+   * recursively include childrens' children.
+   */
+  function getChildren(ul, recursive) {
+    var children = [];
+    ul.children().children("[id^='cd']")
+      .each(function() {
+        var comment = $(this).data('comment');
+        if (recursive)
+          comment.children = getChildren($(this).find('#cl' + comment.id), true);
+        children.push(comment);
+      });
+    return children;
+  }
+
+  /** Create a div to display a comment in. */
+  function createCommentDiv(comment) {
+    if (!comment.displayed && !opts.moderator) {
+      return $('<div class="moderate">Thank you!  Your comment will show up '
+               + 'once it is has been approved by a moderator.</div>');
+    }
+    // Prettify the comment rating.
+    comment.pretty_rating = comment.rating + ' point' +
+      (comment.rating == 1 ? '' : 's');
+    // Make a class (for displaying not yet moderated comments differently)
+    comment.css_class = comment.displayed ? '' : ' moderate';
+    // Create a div for this comment.
+    var context = $.extend({}, opts, comment);
+    var div = $(renderTemplate(commentTemplate, context));
+
+    // If the user has voted on this comment, highlight the correct arrow.
+    if (comment.vote) {
+      var direction = (comment.vote == 1) ? 'u' : 'd';
+      div.find('#' + direction + 'v' + comment.id).hide();
+      div.find('#' + direction + 'u' + comment.id).show();
+    }
+
+    if (opts.moderator || comment.text != '[deleted]') {
+      div.find('a.reply').show();
+      if (comment.proposal_diff)
+        div.find('#sp' + comment.id).show();
+      if (opts.moderator && !comment.displayed)
+        div.find('#cm' + comment.id).show();
+      if (opts.moderator || (opts.username == comment.username))
+        div.find('#dc' + comment.id).show();
+    }
+    return div;
+  }
+
+  /**
+   * A simple template renderer. Placeholders such as <%id%> are replaced
+   * by context['id'] with items being escaped. Placeholders such as <#id#>
+   * are not escaped.
+   */
+  function renderTemplate(template, context) {
+    var esc = $(document.createElement('div'));
+
+    function handle(ph, escape) {
+      var cur = context;
+      $.each(ph.split('.'), function() {
+        cur = cur[this];
+      });
+      return escape ? esc.text(cur || "").html() : cur;
+    }
+
+    return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
+      return handle(arguments[2], arguments[1] == '%' ? true : false);
+    });
+  }
+
+  /** Flash an error message briefly. */
+  function showError(message) {
+    $(document.createElement('div')).attr({'class': 'popup-error'})
+      .append($(document.createElement('div'))
+               .attr({'class': 'error-message'}).text(message))
+      .appendTo('body')
+      .fadeIn("slow")
+      .delay(2000)
+      .fadeOut("slow");
+  }
+
+  /** Add a link the user uses to open the comments popup. */
+  $.fn.comment = function() {
+    return this.each(function() {
+      var id = $(this).attr('id').substring(1);
+      var count = COMMENT_METADATA[id];
+      var title = count + ' comment' + (count == 1 ? '' : 's');
+      var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
+      var addcls = count == 0 ? ' nocomment' : '';
+      $(this)
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-open' + addcls,
+            id: 'ao' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: image,
+              alt: 'comment',
+              title: title
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              show($(this).attr('id').substring(2));
+            })
+        )
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-close hidden',
+            id: 'ah' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: opts.closeCommentImage,
+              alt: 'close',
+              title: 'close'
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              hide($(this).attr('id').substring(2));
+            })
+        );
+    });
+  };
+
+  var opts = {
+    processVoteURL: '/_process_vote',
+    addCommentURL: '/_add_comment',
+    getCommentsURL: '/_get_comments',
+    acceptCommentURL: '/_accept_comment',
+    deleteCommentURL: '/_delete_comment',
+    commentImage: '/static/_static/comment.png',
+    closeCommentImage: '/static/_static/comment-close.png',
+    loadingImage: '/static/_static/ajax-loader.gif',
+    commentBrightImage: '/static/_static/comment-bright.png',
+    upArrow: '/static/_static/up.png',
+    downArrow: '/static/_static/down.png',
+    upArrowPressed: '/static/_static/up-pressed.png',
+    downArrowPressed: '/static/_static/down-pressed.png',
+    voting: false,
+    moderator: false
+  };
+
+  if (typeof COMMENT_OPTIONS != "undefined") {
+    opts = jQuery.extend(opts, COMMENT_OPTIONS);
+  }
+
+  var popupTemplate = '\
+    <div class="sphinx-comments" id="sc<%id%>">\
+      <p class="sort-options">\
+        Sort by:\
+        <a href="#" class="sort-option byrating">best rated</a>\
+        <a href="#" class="sort-option byascage">newest</a>\
+        <a href="#" class="sort-option byage">oldest</a>\
+      </p>\
+      <div class="comment-header">Comments</div>\
+      <div class="comment-loading" id="cn<%id%>">\
+        loading comments... <img src="<%loadingImage%>" alt="" /></div>\
+      <ul id="cl<%id%>" class="comment-ul"></ul>\
+      <div id="ca<%id%>">\
+      <p class="add-a-comment">Add a comment\
+        (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
+      <div class="comment-markup-box" id="mb<%id%>">\
+        reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
+        <tt>``code``</tt>, \
+        code blocks: <tt>::</tt> and an indented block after blank line</div>\
+      <form method="post" id="cf<%id%>" class="comment-form" action="">\
+        <textarea name="comment" cols="80"></textarea>\
+        <p class="propose-button">\
+          <a href="#" id="pc<%id%>" class="show-propose-change">\
+            Propose a change ▹\
+          </a>\
+          <a href="#" id="hc<%id%>" class="hide-propose-change">\
+            Propose a change ▿\
+          </a>\
+        </p>\
+        <textarea name="proposal" id="pt<%id%>" cols="80"\
+                  spellcheck="false"></textarea>\
+        <input type="submit" value="Add comment" />\
+        <input type="hidden" name="node" value="<%id%>" />\
+        <input type="hidden" name="parent" value="" />\
+      </form>\
+      </div>\
+    </div>';
+
+  var commentTemplate = '\
+    <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
+      <div class="vote">\
+        <div class="arrow">\
+          <a href="#" id="uv<%id%>" class="vote" title="vote up">\
+            <img src="<%upArrow%>" />\
+          </a>\
+          <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
+            <img src="<%upArrowPressed%>" />\
+          </a>\
+        </div>\
+        <div class="arrow">\
+          <a href="#" id="dv<%id%>" class="vote" title="vote down">\
+            <img src="<%downArrow%>" id="da<%id%>" />\
+          </a>\
+          <a href="#" id="du<%id%>" class="un vote" title="vote down">\
+            <img src="<%downArrowPressed%>" />\
+          </a>\
+        </div>\
+      </div>\
+      <div class="comment-content">\
+        <p class="tagline comment">\
+          <span class="user-id"><%username%></span>\
+          <span class="rating"><%pretty_rating%></span>\
+          <span class="delta"><%time.delta%></span>\
+        </p>\
+        <div class="comment-text comment"><#text#></div>\
+        <p class="comment-opts comment">\
+          <a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
+          <a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
+          <a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
+          <a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
+          <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
+          <span id="cm<%id%>" class="moderation hidden">\
+            <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
+          </span>\
+        </p>\
+        <pre class="proposal" id="pr<%id%>">\
+<#proposal_diff#>\
+        </pre>\
+          <ul class="comment-children" id="cl<%id%>"></ul>\
+        </div>\
+        <div class="clearleft"></div>\
+      </div>\
+    </div>';
+
+  var replyTemplate = '\
+    <li>\
+      <div class="reply-div" id="rd<%id%>">\
+        <form id="rf<%id%>">\
+          <textarea name="comment" cols="80"></textarea>\
+          <input type="submit" value="Add reply" />\
+          <input type="button" value="Cancel" />\
+          <input type="hidden" name="parent" value="<%id%>" />\
+          <input type="hidden" name="node" value="" />\
+        </form>\
+      </div>\
+    </li>';
+
+  $(document).ready(function() {
+    init();
+  });
+})(jQuery);
+
+$(document).ready(function() {
+  // add comment anchors for all paragraphs that are commentable
+  $('.sphinx-has-comment').comment();
+
+  // highlight search words in search results
+  $("div.context").each(function() {
+    var params = $.getQueryParameters();
+    var terms = (params.q) ? params.q[0].split(/\s+/) : [];
+    var result = $(this);
+    $.each(terms, function() {
+      result.highlightText(this.toLowerCase(), 'highlighted');
+    });
+  });
+
+  // directly open comment window if requested
+  var anchor = document.location.hash;
+  if (anchor.substring(0, 9) == '#comment-') {
+    $('#ao' + anchor.substring(9)).click();
+    document.location.hash = '#s' + anchor.substring(9);
+  }
+});
diff --git a/core/doc/user/bookmarks.html b/core/doc/user/bookmarks.html
index 73942aa..bba0cd5 100644
--- a/core/doc/user/bookmarks.html
+++ b/core/doc/user/bookmarks.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Using the Bookmarks App — ownCloud User Manual v5.0 documentation</title>
+    <title>Using the Bookmarks App — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="index.html" />
     <link rel="next" title="Native Media Player Support" href="mediaplayer.html" />
     <link rel="prev" title="Troubleshooting" href="pim/troubleshooting.html" />
 <script type="text/javascript">
diff --git a/core/doc/user/contents.html b/core/doc/user/contents.html
index 817b4a8..b0ec247 100644
--- a/core/doc/user/contents.html
+++ b/core/doc/user/contents.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>ownCloud documentation contents — ownCloud User Manual v5.0 documentation</title>
+    <title>ownCloud documentation contents — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="index.html" />
     <link rel="next" title="User Documentation" href="index.html" />
 <script type="text/javascript">
 (function () {
diff --git a/core/doc/user/files/configuring_big_file_upload.html b/core/doc/user/files/configuring_big_file_upload.html
index 13084a4..c39cbc7 100644
--- a/core/doc/user/files/configuring_big_file_upload.html
+++ b/core/doc/user/files/configuring_big_file_upload.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Big Files — ownCloud User Manual v5.0 documentation</title>
+    <title>Big Files — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
 <script type="text/javascript">
 (function () {
   /**
diff --git a/core/doc/user/files/deletedfiles.html b/core/doc/user/files/deletedfiles.html
index 12ad86a..7f5840b 100644
--- a/core/doc/user/files/deletedfiles.html
+++ b/core/doc/user/files/deletedfiles.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Deleted Files — ownCloud User Manual v5.0 documentation</title>
+    <title>Deleted Files — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Files & Synchronization" href="index.html" />
     <link rel="next" title="Desktop Synchronisation" href="sync.html" />
     <link rel="prev" title="Version Control" href="versioncontrol.html" />
diff --git a/core/doc/user/files/encryption.html b/core/doc/user/files/encryption.html
index a0e045c..2169e97 100644
--- a/core/doc/user/files/encryption.html
+++ b/core/doc/user/files/encryption.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Files Encryption — ownCloud User Manual v5.0 documentation</title>
+    <title>Files Encryption — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Files & Synchronization" href="index.html" />
     <link rel="next" title="Contacts & Calendar" href="../pim/index.html" />
     <link rel="prev" title="Desktop Synchronisation" href="sync.html" />
diff --git a/core/doc/user/files/files.html b/core/doc/user/files/files.html
index f936d56..c2d090f 100644
--- a/core/doc/user/files/files.html
+++ b/core/doc/user/files/files.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Accessing your Files (WebDav) — ownCloud User Manual v5.0 documentation</title>
+    <title>Accessing your Files (WebDav) — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Files & Synchronization" href="index.html" />
     <link rel="next" title="Version Control" href="versioncontrol.html" />
     <link rel="prev" title="Files & Synchronization" href="index.html" />
@@ -150,14 +153,14 @@
 <p>Your ownCloud instance can be accessed on every platform via the web interface. There are also options to integrate it with your desktop.</p>
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
-<p class="last">You will have to adjust <strong>youradress.com/</strong> to the URL of your ownCloud server installation</p>
+<p class="last">You will have to adjust <strong>youraddress.com/</strong> to the URL of your ownCloud server installation</p>
 </div>
 <div class="section" id="linux">
 <h2>Linux<a class="headerlink" href="#linux" title="Permalink to this headline">¶</a></h2>
 <div class="section" id="gnome-3-nautilus">
 <h3>Gnome 3/Nautilus<a class="headerlink" href="#gnome-3-nautilus" title="Permalink to this headline">¶</a></h3>
 <p>The URL that you have to use to connect to the owncloud installation in nautilus is:</p>
-<div class="highlight-python"><pre>davs://youraddress.com/files/webdav.php</pre>
+<div class="highlight-python"><pre>davs://youraddress.com/owncloud/remote.php/webdav</pre>
 </div>
 <img alt="../_images/gnome3_nautilus_webdav.png" src="../_images/gnome3_nautilus_webdav.png" />
 <p>If your server connection is not HTTPS-secured, use <cite>dav://</cite> instead of <cite>davs://</cite> .</p>
@@ -165,7 +168,7 @@
 <div class="section" id="kde-dolphin">
 <h3>KDE/Dolphin<a class="headerlink" href="#kde-dolphin" title="Permalink to this headline">¶</a></h3>
 <p>Click in the adress area and enter:</p>
-<div class="highlight-python"><pre>webdav://youraddress.com/files/webdav.php</pre>
+<div class="highlight-python"><pre>webdav://youraddress.com/owncloud/remote.php/webdav</pre>
 </div>
 <img alt="../_images/dolphin_webdav.png" src="../_images/dolphin_webdav.png" />
 <p>or:</p>
@@ -183,7 +186,7 @@
 <li><p class="first">Server: Your ownCloud domain name, for example <strong>youraddress.com</strong> (without <strong>http://</strong> before or directories afterwards).</p>
 </li>
 <li><p class="first">Folder: Enter:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">owncloud</span><span class="o">/</span><span class="n">files</span><span class="o">/</span><span class="n">webdav</span><span class="o">.</span><span class="n">php</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">owncloud</span><span class="o">/</span><span class="n">remote</span><span class="o">.</span><span class="n">php</span><span class="o">/</span><span class="n">webdav</span>
 </pre></div>
 </div>
 </li>
@@ -209,7 +212,7 @@
 </div>
 </li>
 <li><p class="first">Edit <tt class="file docutils literal"><span class="pre">/etc/fstab</span></tt> and add the following line for each user who wants to mount the folder (with your details where appropriate):</p>
-<div class="highlight-python"><pre>youradress.com/files/webdav.php /home/<username>/owncloud davfs user,rw,noauto 0 0</pre>
+<div class="highlight-python"><pre>youraddress.com/owncloud/remote.php/webdav /home/<username>/owncloud davfs user,rw,noauto 0 0</pre>
 </div>
 </li>
 </ol>
@@ -218,7 +221,7 @@
 <li><p class="first">Create the folders <strong>owncloud/</strong> and <strong>.davfs2/</strong> in your home directory</p>
 </li>
 <li><p class="first">Create the file secrets inside <strong>.davfs2/</strong>, fill it with the following (with your credentials where appropriate):</p>
-<div class="highlight-python"><pre>youradress.com/files/webdav.php <username> <password></pre>
+<div class="highlight-python"><pre>youraddress.com/owncloud/remote.php/webdav <username> <password></pre>
 </div>
 </li>
 <li><p class="first">Ensure the file is only writable by you either through the file manager, or via:</p>
@@ -254,7 +257,7 @@
 <p>In the Finder, choose <strong>Go > Connect to Server,</strong> type the address of the server in the <strong>Server Address</strong> field, and click <strong>Connect</strong>.</p>
 <img alt="../_images/osx_webdav1.png" src="../_images/osx_webdav1.png" />
 <p>The URL that you have to use to connect to the owncloud installation in finder is:</p>
-<div class="highlight-python"><pre>http://youraddress.com/files/webdav.php</pre>
+<div class="highlight-python"><pre>http://youraddress.com/owncloud/remote.php/webdav</pre>
 </div>
 <img alt="../_images/osx_webdav2.png" src="../_images/osx_webdav2.png" />
 <p>For details, check the respective <a class="reference external" href="http://docs.info.apple.com/article.html?path=Mac/10.6/en/8160.html">vendor documentation</a> at the Apple website.</p>
@@ -272,27 +275,27 @@ ownCloud to one or more directories of your local hard drive.</p>
 </div>
 <div class="section" id="mapping-via-the-command-line">
 <h3>Mapping via the command line<a class="headerlink" href="#mapping-via-the-command-line" title="Permalink to this headline">¶</a></h3>
-<p>Suppose your ownCloud is installed at <strong>https://www.yourserver.com/owncloud</strong>,
+<p>Suppose your ownCloud is installed at <strong>https://youraddress.com/owncloud</strong>,
 that is, entering this URL in your webbrowser will bring up the login screen.
 Running:</p>
-<div class="highlight-python"><pre>net use Z: https://www.yourserver.com/owncloud/remote.php/webdav /user:youruser yourpassword</pre>
+<div class="highlight-python"><pre>net use Z: https://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword</pre>
 </div>
 <p>will map the files of your ownCloud account to the drive letter Z:. An alternative
 syntax is:</p>
-<div class="highlight-python"><pre>net use Z: \\www.yourserver.com at ssl\owncloud\remote.php\webdav /user:youruser yourpassword</pre>
+<div class="highlight-python"><pre>net use Z: \\youraddress.com at ssl\owncloud\remote.php\webdav /user:youruser yourpassword</pre>
 </div>
 <p>Appending <strong>/persistent</strong> makes the connection persistent across reboots.</p>
 <p>You can also mount your ownCloud via HTTP, leaving the connection unencrypted.
 Use either of the following syntaxes:</p>
-<div class="highlight-python"><pre>net use Z: http://www.yourserver.com/owncloud/remote.php/webdav /user:youruser yourpassword
-net use Z: \\www.yourserver.com\owncloud\remote.php\webdav /user:youruser yourpassword</pre>
+<div class="highlight-python"><pre>net use Z: http://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword
+net use Z: \\youraddress.com\owncloud\remote.php\webdav /user:youruser yourpassword</pre>
 </div>
 <p>Please note that this allows anyone to sniff your ownCloud data with ease, especially on public WiFi hotspots. Plain HTTP should therefore only be used in conjunction with a VPN tunnel when used on Laptops.</p>
 </div>
 <div class="section" id="using-windows-explorer">
 <h3>Using Windows Explorer<a class="headerlink" href="#using-windows-explorer" title="Permalink to this headline">¶</a></h3>
 <p>Right-click on <strong>Computer</strong> entry and select <strong>Map network drive...</strong>. Choose a local network drive to map ownCloud to. Finally, enter the address to your ownCloud instance, followed by <strong>/remote.php/webdav</strong>, e.g.</p>
-<div class="highlight-python"><pre>https://www.yourserver.com/owncloud/remote.php/webdav</pre>
+<div class="highlight-python"><pre>https://youraddress.com/owncloud/remote.php/webdav</pre>
 </div>
 <p>for an SSL protected server. Check <strong>Reconnect at logon</strong> to make this mapping persistent across reboots. If you want to connect as another user, check <strong>Connect using different credentials</strong>.</p>
 <div class="figure">
@@ -306,7 +309,7 @@ net use Z: \\www.yourserver.com\owncloud\remote.php\webdav /user:youruser yourpa
 <p>Specify a server without any leading protocol information. e.g.:</p>
 <dl class="docutils">
 <dt>Server</dt>
-<dd>owncloudhost.com</dd>
+<dd>youraddress.com</dd>
 </dl>
 <p>The port depends on whether your ownCloud server supports SSL or not. Cyberduck requires that you select a different connection type depending on whethr SSL is to be used (‘WebDAV’ or ‘WebDAV (HTTPS/SSL)’):</p>
 <dl class="docutils">
@@ -340,7 +343,7 @@ by clicking on <strong>Modify</strong>. In order to increase the limit to the ma
 value of 4GB, pick <strong>Decimal</strong> and enter <strong>4294967295</strong> as value. Afterwards,
 reboot Windows or restart the <strong>WebClient</strong> service.</dd>
 </dl>
-<div class="admonition-todo admonition " id="index-0">
+<div class="admonition-todo admonition" id="index-0">
 <p class="first admonition-title">Todo</p>
 <p class="last">document registry keys on file size limit and not complaining in no network cases</p>
 </div>
@@ -354,7 +357,7 @@ get around this issue, you can use the <a class="reference internal" href="index
 <div class="section" id="mobile">
 <h2>Mobile<a class="headerlink" href="#mobile" title="Permalink to this headline">¶</a></h2>
 <p>To connect to your ownCloud server with the <strong>ownCloud</strong> mobile apps, use the base URL and folder only:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">example</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">owncloud</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">youraddress</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">owncloud</span>
 </pre></div>
 </div>
 <p>No need to add remote.php/webdav as you do for any other WebDAV client.</p>
@@ -363,7 +366,7 @@ free to <a class="reference external" href="/contribute/">contribute, if you can
 connect to ownCloud from your phone via WebDAV. <a class="reference external" href="http://seanashton.net/webdav/">WebDAV Navigator</a> is a
 good (proprietary) app for <a class="reference external" href="http://market.android.com/details?id=com.schimera.webdavnavlite">Android App</a> , <a class="reference external" href="http://itunes.apple.com/app/webdav-navigator/id382551345">iPhone</a> & <a class="reference external" href="http://appworld.blackberry.com/webstore/content/46279">BlackBerry</a>.</p>
 <p>The URL for these is:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">example</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">owncloud</span><span class="o">/</span><span class="n">remote</span><span class="o">.</span><span class="n">php</span><span class="o">/</span><span class="n">webdav</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">youraddress</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">owncloud</span><span class="o">/</span><span class="n">remote</span><span class="o">.</span><span class="n">php</span><span class="o">/</span><span class="n">webdav</span>
 </pre></div>
 </div>
 </div>
diff --git a/core/doc/user/files/index.html b/core/doc/user/files/index.html
index c3a141d..272c181 100644
--- a/core/doc/user/files/index.html
+++ b/core/doc/user/files/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Files & Synchronization — ownCloud User Manual v5.0 documentation</title>
+    <title>Files & Synchronization — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="next" title="Accessing your Files (WebDav)" href="files.html" />
     <link rel="prev" title="The ownCloud Web Interface" href="../webinterface.html" />
 <script type="text/javascript">
diff --git a/core/doc/user/files/sync.html b/core/doc/user/files/sync.html
index 333f8d4..413a87f 100644
--- a/core/doc/user/files/sync.html
+++ b/core/doc/user/files/sync.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Desktop Synchronisation — ownCloud User Manual v5.0 documentation</title>
+    <title>Desktop Synchronisation — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Files & Synchronization" href="index.html" />
     <link rel="next" title="Files Encryption" href="encryption.html" />
     <link rel="prev" title="Deleted Files" href="deletedfiles.html" />
diff --git a/core/doc/user/files/versioncontrol.html b/core/doc/user/files/versioncontrol.html
index f54447b..368ab45 100644
--- a/core/doc/user/files/versioncontrol.html
+++ b/core/doc/user/files/versioncontrol.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Version Control — ownCloud User Manual v5.0 documentation</title>
+    <title>Version Control — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Files & Synchronization" href="index.html" />
     <link rel="next" title="Deleted Files" href="deletedfiles.html" />
     <link rel="prev" title="Accessing your Files (WebDav)" href="files.html" />
diff --git a/core/doc/user/genindex.html b/core/doc/user/genindex.html
index c2900a6..aefaafb 100644
--- a/core/doc/user/genindex.html
+++ b/core/doc/user/genindex.html
@@ -1,16 +1,21 @@
 
+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Index — ownCloud User Manual v5.0 documentation</title>
+    <title>Index — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +29,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="index.html" />
 <script type="text/javascript">
 (function () {
   /**
@@ -129,11 +134,11 @@
 					<div class="page-content">
 						
 
-   <h1 id="index">Index</h1>
+<h1 id="index">Index</h1>
 
-   <div class="genindex-jumpbox">
-   
-   </div>
+<div class="genindex-jumpbox">
+ 
+</div>
 
 
 					</div>
diff --git a/core/doc/user/index.html b/core/doc/user/index.html
index 2546d0a..efe0cc8 100644
--- a/core/doc/user/index.html
+++ b/core/doc/user/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>User Documentation — ownCloud User Manual v5.0 documentation</title>
+    <title>User Documentation — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="#" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="#" />
     <link rel="next" title="The ownCloud Web Interface" href="webinterface.html" />
     <link rel="prev" title="ownCloud documentation contents" href="contents.html" />
 <script type="text/javascript">
diff --git a/core/doc/user/mediaplayer.html b/core/doc/user/mediaplayer.html
index 44ac2c4..927f850 100644
--- a/core/doc/user/mediaplayer.html
+++ b/core/doc/user/mediaplayer.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Native Media Player Support — ownCloud User Manual v5.0 documentation</title>
+    <title>Native Media Player Support — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="index.html" />
     <link rel="next" title="User Account Migration" href="migration.html" />
     <link rel="prev" title="Using the Bookmarks App" href="bookmarks.html" />
 <script type="text/javascript">
diff --git a/core/doc/user/migration.html b/core/doc/user/migration.html
index 92b7f3d..82a0f6c 100644
--- a/core/doc/user/migration.html
+++ b/core/doc/user/migration.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>User Account Migration — ownCloud User Manual v5.0 documentation</title>
+    <title>User Account Migration — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="index.html" />
     <link rel="prev" title="Native Media Player Support" href="mediaplayer.html" />
 <script type="text/javascript">
 (function () {
diff --git a/core/doc/user/pim/calendar.html b/core/doc/user/pim/calendar.html
index 486c3a3..8a7f06d 100644
--- a/core/doc/user/pim/calendar.html
+++ b/core/doc/user/pim/calendar.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Using the Calendar App — ownCloud User Manual v5.0 documentation</title>
+    <title>Using the Calendar App — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Contacts & Calendar" href="index.html" />
     <link rel="next" title="iOS - Synchronize iPhone/iPad" href="sync_ios.html" />
     <link rel="prev" title="Using the Contacts App" href="contacts.html" />
diff --git a/core/doc/user/pim/contacts.html b/core/doc/user/pim/contacts.html
index 7b6c84a..a5071cf 100644
--- a/core/doc/user/pim/contacts.html
+++ b/core/doc/user/pim/contacts.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Using the Contacts App — ownCloud User Manual v5.0 documentation</title>
+    <title>Using the Contacts App — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Contacts & Calendar" href="index.html" />
     <link rel="next" title="Using the Calendar App" href="calendar.html" />
     <link rel="prev" title="Contacts & Calendar" href="index.html" />
diff --git a/core/doc/user/pim/index.html b/core/doc/user/pim/index.html
index 864e11a..f948836 100644
--- a/core/doc/user/pim/index.html
+++ b/core/doc/user/pim/index.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Contacts & Calendar — ownCloud User Manual v5.0 documentation</title>
+    <title>Contacts & Calendar — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="next" title="Using the Contacts App" href="contacts.html" />
     <link rel="prev" title="Files Encryption" href="../files/encryption.html" />
 <script type="text/javascript">
diff --git a/core/doc/user/pim/sync_ios.html b/core/doc/user/pim/sync_ios.html
index 0e15c90..5c52519 100644
--- a/core/doc/user/pim/sync_ios.html
+++ b/core/doc/user/pim/sync_ios.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>iOS - Synchronize iPhone/iPad — ownCloud User Manual v5.0 documentation</title>
+    <title>iOS - Synchronize iPhone/iPad — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Contacts & Calendar" href="index.html" />
     <link rel="next" title="Synchronizing with OS X" href="sync_osx.html" />
     <link rel="prev" title="Using the Calendar App" href="calendar.html" />
diff --git a/core/doc/user/pim/sync_kde.html b/core/doc/user/pim/sync_kde.html
index 1e46ba9..7d458f8 100644
--- a/core/doc/user/pim/sync_kde.html
+++ b/core/doc/user/pim/sync_kde.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Synchronizing with KDE SC — ownCloud User Manual v5.0 documentation</title>
+    <title>Synchronizing with KDE SC — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Contacts & Calendar" href="index.html" />
     <link rel="next" title="Troubleshooting" href="troubleshooting.html" />
     <link rel="prev" title="Thunderbird - Synchronize Address Book" href="sync_thunderbird.html" />
diff --git a/core/doc/user/pim/sync_osx.html b/core/doc/user/pim/sync_osx.html
index 8e9fb77..25540d8 100644
--- a/core/doc/user/pim/sync_osx.html
+++ b/core/doc/user/pim/sync_osx.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Synchronizing with OS X — ownCloud User Manual v5.0 documentation</title>
+    <title>Synchronizing with OS X — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Contacts & Calendar" href="index.html" />
     <link rel="next" title="Thunderbird - Synchronize Address Book" href="sync_thunderbird.html" />
     <link rel="prev" title="iOS - Synchronize iPhone/iPad" href="sync_ios.html" />
diff --git a/core/doc/user/pim/sync_thunderbird.html b/core/doc/user/pim/sync_thunderbird.html
index 3e77611..4ed7fc0 100644
--- a/core/doc/user/pim/sync_thunderbird.html
+++ b/core/doc/user/pim/sync_thunderbird.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Thunderbird - Synchronize Address Book — ownCloud User Manual v5.0 documentation</title>
+    <title>Thunderbird - Synchronize Address Book — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Contacts & Calendar" href="index.html" />
     <link rel="next" title="Synchronizing with KDE SC" href="sync_kde.html" />
     <link rel="prev" title="Synchronizing with OS X" href="sync_osx.html" />
@@ -153,7 +156,7 @@
 <li><a class="reference external" href="http://www.sogo.nu/english/downloads/frontends.html">http://www.sogo.nu/english/downloads/frontends.html</a> <strong>Sogo Connector</strong> (latest release)</li>
 </ol>
 <blockquote>
-With an installed Thunderbird mailtool, and installed SoGo Connector:</blockquote>
+<div>With an installed Thunderbird mailtool, and installed SoGo Connector:</div></blockquote>
 <ol class="arabic simple">
 <li>Thunderbird Addressbook is in the Thunderbird “Tools” Menu</li>
 <li>In the Thunderbird Addressbook application:<ul>
diff --git a/core/doc/user/pim/troubleshooting.html b/core/doc/user/pim/troubleshooting.html
index cdff6cd..cc2c2cd 100644
--- a/core/doc/user/pim/troubleshooting.html
+++ b/core/doc/user/pim/troubleshooting.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Troubleshooting — ownCloud User Manual v5.0 documentation</title>
+    <title>Troubleshooting — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="../_static/underscore.js"></script>
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="../index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="../index.html" />
     <link rel="up" title="Contacts & Calendar" href="index.html" />
     <link rel="next" title="Using the Bookmarks App" href="../bookmarks.html" />
     <link rel="prev" title="Synchronizing with KDE SC" href="sync_kde.html" />
diff --git a/core/doc/user/search.html b/core/doc/user/search.html
index 7a387c4..3ba68b6 100644
--- a/core/doc/user/search.html
+++ b/core/doc/user/search.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Search — ownCloud User Manual v5.0 documentation</title>
+    <title>Search — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -25,7 +28,7 @@
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="index.html" />
   <script type="text/javascript">
     jQuery(function() { Search.loadIndex("searchindex.js"); });
   </script>
diff --git a/core/doc/user/searchindex.js b/core/doc/user/searchindex.js
index 1f7d4ae..f23ed46 100644
--- a/core/doc/user/searchindex.js
+++ b/core/doc/user/searchindex.js
@@ -1 +1 @@
-Search.setIndex({objects:{},terms:{all:[11,0,20,18,8,14,12,17,19],entri:8,month:17,abil:[0,19],follow:[3,18,8,15,11,12,13,17,19],oldest:[6,15],calendarnam:17,content:[1,11,4],decid:14,middl:[19,8],depend:8,decim:8,carddav:[3,18,19,13],articl:[5,8],program:[7,17],under:3,leav:[18,8],sourc:[0,18],everi:[5,6,8,15,17,19],risk:8,reader:20,offlin:8,ical:[17,18],govern:10,veri:7,brows:[0,8],cool:16,administr:[10,6,11,14],youraddress:8,button:[16,11,17,19,12],list:[7,20,19],upload:[0,10,11,12,14 [...]
\ No newline at end of file
+Search.setIndex({objects:{},terms:{all:[11,0,20,18,8,14,12,17,19],entri:8,month:17,abil:[0,19],follow:[3,18,8,15,11,12,13,17,19],oldest:[6,15],calendarnam:17,content:[1,11,4],decid:14,middl:[19,8],depend:8,decim:8,carddav:[3,18,19,13],articl:[5,8],program:[7,17],under:3,leav:[18,8],sourc:[0,18],everi:[5,6,8,15,17,19],risk:8,reader:20,offlin:8,ical:[17,18],govern:10,veri:7,brows:[0,8],cool:16,administr:[10,6,11,14],youraddress:8,button:[16,11,17,19,12],list:[7,20,19],upload:[0,10,11,12,14 [...]
\ No newline at end of file
diff --git a/core/doc/user/webinterface.html b/core/doc/user/webinterface.html
index 55fb1c1..f7eba81 100644
--- a/core/doc/user/webinterface.html
+++ b/core/doc/user/webinterface.html
@@ -2,15 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>The ownCloud Web Interface — ownCloud User Manual v5.0 documentation</title>
+    <title>The ownCloud Web Interface — ownCloud User Manual 5.0 documentation</title>
+    
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
@@ -24,7 +27,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/bootstrap.js"></script>
-    <link rel="top" title="ownCloud User Manual v5.0 documentation" href="index.html" />
+    <link rel="top" title="ownCloud User Manual 5.0 documentation" href="index.html" />
     <link rel="next" title="Files & Synchronization" href="files/index.html" />
     <link rel="prev" title="User Documentation" href="index.html" />
 <script type="text/javascript">
diff --git a/core/js/multiselect.js b/core/js/multiselect.js
index bc4223f..48d521e 100644
--- a/core/js/multiselect.js
+++ b/core/js/multiselect.js
@@ -176,10 +176,10 @@
 			});
 			button.parent().data('preventHide',false);
 			if(settings.createText){
-				var li=$('<li class="creator">+ <em>'+settings.createText+'<em></li>');
+				var li=$('<li class="creator">+ '+settings.createText+'</li>');
 				li.click(function(event){
 					li.empty();
-					var input=$('<input class="new">');
+					var input=$('<input type="text" class="new">');
 					li.append(input);
 					input.focus();
 					input.css('width',button.innerWidth());
@@ -316,4 +316,4 @@
 		
 		return span;
 	};
-})( jQuery );
\ No newline at end of file
+})( jQuery );
diff --git a/core/js/share.js b/core/js/share.js
index 4664594..a34542a 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -4,57 +4,76 @@ OC.Share={
 	SHARE_TYPE_LINK:3,
 	SHARE_TYPE_EMAIL:4,
 	itemShares:[],
-	statuses:[],
+	statuses:{},
 	droppedDown:false,
+	/**
+	 * Loads ALL share statuses from server, stores them in OC.Share.statuses then
+	 * calls OC.Share.updateIcons() to update the files "Share" icon to "Shared"
+	 * according to their share status and share type.
+	 */
 	loadIcons:function(itemType) {
 		// Load all share icons
 		$.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getItemsSharedStatuses', itemType: itemType }, function(result) {
 			if (result && result.status === 'success') {
+				OC.Share.statuses = {};
 				$.each(result.data, function(item, data) {
 					OC.Share.statuses[item] = data;
-					var hasLink = data['link'];
-					// Links override shared in terms of icon display
-					if (hasLink) {
-						var image = OC.imagePath('core', 'actions/public');
-					} else {
-						var image = OC.imagePath('core', 'actions/shared');
-					}
-					if (itemType != 'file' && itemType != 'folder') {
-						$('a.share[data-item="'+item+'"]').css('background', 'url('+image+') no-repeat center');
-					} else {
-						var file = $('tr[data-id="'+item+'"]');
-						if (file.length > 0) {
-							var action = $(file).find('.fileactions .action[data-action="Share"]');
-							var img = action.find('img').attr('src', image);
-							action.addClass('permanent');
-							action.html(' '+t('core', 'Shared')).prepend(img);
-						} else {
-							var dir = $('#dir').val();
-							if (dir.length > 1) {
-								var last = '';
-								var path = dir;
-								// Search for possible parent folders that are shared
-								while (path != last) {
-									if (path == data['path']) {
-										var actions = $('.fileactions .action[data-action="Share"]');
-										$.each(actions, function(index, action) {
-											var img = $(action).find('img');
-											if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
-												img.attr('src', image);
-												$(action).addClass('permanent');
-												$(action).html(' '+t('core', 'Shared')).prepend(img);
-											}
-										});
+				});
+				OC.Share.updateIcons(itemType);
+			}
+		});
+	},
+	/**
+	 * Updates the files' "Share" icons according to the known
+	 * sharing states stored in OC.Share.statuses.
+	 * (not reloaded from server)
+	 */
+	updateIcons:function(itemType){
+		var item;
+		for (item in OC.Share.statuses){
+			var data = OC.Share.statuses[item];
+
+			var hasLink = data['link'];
+			// Links override shared in terms of icon display
+			if (hasLink) {
+				var image = OC.imagePath('core', 'actions/public');
+			} else {
+				var image = OC.imagePath('core', 'actions/shared');
+			}
+			if (itemType != 'file' && itemType != 'folder') {
+				$('a.share[data-item="'+item+'"]').css('background', 'url('+image+') no-repeat center');
+			} else {
+				var file = $('tr[data-id="'+item+'"]');
+				if (file.length > 0) {
+					var action = $(file).find('.fileactions .action[data-action="Share"]');
+					var img = action.find('img').attr('src', image);
+					action.addClass('permanent');
+					action.html(' '+t('core', 'Shared')).prepend(img);
+				} else {
+					var dir = $('#dir').val();
+					if (dir.length > 1) {
+						var last = '';
+						var path = dir;
+						// Search for possible parent folders that are shared
+						while (path != last) {
+							if (path == data['path'] && !data['link']) {
+								var actions = $('.fileactions .action[data-action="Share"]');
+								$.each(actions, function(index, action) {
+									var img = $(action).find('img');
+									if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
+										img.attr('src', image);
+										$(action).addClass('permanent');
+										$(action).html(' '+t('core', 'Shared')).prepend(img);
 									}
-									last = path;
-									path = OC.Share.dirname(path);
-								}
+								});
 							}
+							last = path;
+							path = OC.Share.dirname(path);
 						}
 					}
-				});
+				}
 			}
-		});
+		}
 	},
 	updateIcon:function(itemType, itemSource) {
 		var shares = false;
@@ -214,7 +233,9 @@ OC.Share={
 			if (data.shares) {
 				$.each(data.shares, function(index, share) {
 					if (share.share_type == OC.Share.SHARE_TYPE_LINK) {
-						OC.Share.showLink(share.token, share.share_with, itemSource);
+						if ( !('file_target' in share) ) {
+							OC.Share.showLink(share.token, share.share_with, itemSource);
+						}
 					} else {
 						if (share.collection) {
 							OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.collection);
@@ -233,6 +254,7 @@ OC.Share={
 	// 			} else {
 					$.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getShareWith', search: search.term, itemShares: OC.Share.itemShares }, function(result) {
 						if (result.status == 'success' && result.data.length > 0) {
+							$( "#shareWith" ).autocomplete( "option", "autoFocus", true );
 							response(result.data);
 						} else {
 							// Suggest sharing via email if valid email address
@@ -240,6 +262,7 @@ OC.Share={
 // 							if (pattern.test(search.term)) {
 // 								response([{label: t('core', 'Share via email:')+' '+search.term, value: {shareType: OC.Share.SHARE_TYPE_EMAIL, shareWith: search.term}}]);
 // 							} else {
+								$( "#shareWith" ).autocomplete( "option", "autoFocus", false );
 								response([t('core', 'No people found')]);
 // 							}
 						}
@@ -412,7 +435,7 @@ OC.Share={
 			dateFormat : 'dd-mm-yy'
 		});
 	}
-}
+};
 
 $(document).ready(function() {
 
@@ -501,7 +524,7 @@ $(document).ready(function() {
 
 	$(document).on('change', '#dropdown .permissions', function() {
 		if ($(this).attr('name') == 'edit') {
-			var li = $(this).parent().parent()
+			var li = $(this).parent().parent();
 			var checkboxes = $('.permissions', li);
 			var checked = $(this).is(':checked');
 			// Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck
diff --git a/lib/base.php b/lib/base.php
index 2ac58b2..e8f67db 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -769,6 +769,7 @@ class OC {
 				OC_User::setMagicInCookie($_COOKIE['oc_username'], $token);
 				// login
 				OC_User::setUserId($_COOKIE['oc_username']);
+				OC_User::setDisplayName($_COOKIE['oc_username'], $_COOKIE['display_name']);
 				OC_Util::redirectToDefaultPage();
 				// doesn't return
 			}
diff --git a/lib/cache/file.php b/lib/cache/file.php
index 361138e..eed2637 100644
--- a/lib/cache/file.php
+++ b/lib/cache/file.php
@@ -40,6 +40,24 @@ class OC_Cache_File{
 		return $result;
 	}
 
+	/**
+	 * Returns the size of the stored/cached data
+	 *
+	 * @param $key
+	 * @return int
+	 */
+	public function size($key) {
+		$result = 0;
+		$proxyStatus = \OC_FileProxy::$enabled;
+		\OC_FileProxy::$enabled = false;
+		if ($this->hasKey($key)) {
+			$storage = $this->getStorage();
+			$result = $storage->filesize($key);
+		}
+		\OC_FileProxy::$enabled = $proxyStatus;
+		return $result;
+	}
+
 	public function set($key, $value, $ttl=0) {
 		$storage = $this->getStorage();
 		$result = false;
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 1434e97..3cccf6e 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -50,23 +50,24 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
 	 */
 	public function createFile($name, $data = null) {
 
-		if (!\OC\Files\Filesystem::isCreatable($this->path)) {
-			throw new \Sabre_DAV_Exception_Forbidden();
-		}
-
 		if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
 			$info = OC_FileChunking::decodeName($name);
 			if (empty($info)) {
 				throw new Sabre_DAV_Exception_NotImplemented();
 			}
-			$chunk_handler = new OC_FileChunking($info);
-			$chunk_handler->store($info['index'], $data);
-			if ($chunk_handler->isComplete()) {
-				$newPath = $this->path . '/' . $info['name'];
-				$chunk_handler->file_assemble($newPath);
-				return OC_Connector_Sabre_Node::getETagPropertyForPath($newPath);
+
+			if (!\OC\Files\Filesystem::isCreatable($this->path) &&
+					!\OC\Files\Filesystem::isUpdatable($this->path . '/' . $info['name'])) {
+				throw new \Sabre_DAV_Exception_Forbidden();
 			}
+
+			return $this->createFileChunked($name, $data);
 		} else {
+
+			if (!\OC\Files\Filesystem::isCreatable($this->path)) {
+				throw new \Sabre_DAV_Exception_Forbidden();
+			}
+
 			$newPath = $this->path . '/' . $name;
 
 			// mark file as partial while uploading (ignored by the scanner)
@@ -88,7 +89,13 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
 			}
 
 			// rename to correct path
-			\OC\Files\Filesystem::rename($partpath, $newPath);
+			$renameOkay = \OC\Files\Filesystem::rename($partpath, $newPath);
+			$fileExists = \OC\Files\Filesystem::file_exists($newPath);
+			if ($renameOkay === false || $fileExists === false) {
+				\OC_Log::write('webdav', '\OC\Files\Filesystem::rename() failed', \OC_Log::ERROR);
+				\OC\Files\Filesystem::unlink($partpath);
+				throw new Sabre_DAV_Exception();
+			}
 
 			// allow sync clients to send the mtime along in a header
 			$mtime = OC_Request::hasModificationTime();
@@ -251,7 +258,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
 	 * If the array is empty, all properties should be returned
 	 *
 	 * @param array $properties
-	 * @return void
+	 * @return array
 	 */
 	public function getProperties($properties) {
 		$props = parent::getProperties($properties);
@@ -261,4 +268,34 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
 		}
 		return $props;
 	}
+
+	private function createFileChunked($name, $data)
+	{
+		$info = OC_FileChunking::decodeName($name);
+		if (empty($info)) {
+			throw new Sabre_DAV_Exception_NotImplemented();
+		}
+		$chunk_handler = new OC_FileChunking($info);
+		$bytesWritten = $chunk_handler->store($info['index'], $data);
+
+		//detect aborted upload
+		if (isset ($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT' ) {
+			if (isset($_SERVER['CONTENT_LENGTH'])) {
+				$expected = $_SERVER['CONTENT_LENGTH'];
+				if ($bytesWritten != $expected) {
+					$chunk_handler->remove($info['index']);
+					throw new Sabre_DAV_Exception_BadRequest(
+						'expected filesize ' . $expected . ' got ' . $bytesWritten);
+				}
+			}
+		}
+
+		if ($chunk_handler->isComplete()) {
+			$newPath = $this->path . '/' . $info['name'];
+			$chunk_handler->file_assemble($newPath);
+			return OC_Connector_Sabre_Node::getETagPropertyForPath($newPath);
+		}
+
+		return null;
+	}
 }
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index 06ab73e..bbfb27a 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -53,6 +53,13 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
 		// mark file as partial while uploading (ignored by the scanner)
 		$partpath = $this->path . '.part';
 
+		// if file is located in /Shared we write the part file to the users
+		// root folder because we can't create new files in /shared
+		// we extend the name with a random number to avoid overwriting a existing file
+		if (dirname($partpath) === '/Shared') {
+			$partpath = pathinfo($partpath, PATHINFO_FILENAME) . rand() . '.part';
+		}
+
 		\OC\Files\Filesystem::file_put_contents($partpath, $data);
 
 		//detect aborted upload
@@ -69,7 +76,14 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
 		}
 
 		// rename to correct path
-		\OC\Files\Filesystem::rename($partpath, $this->path);
+		$renameOkay = \OC\Files\Filesystem::rename($partpath, $this->path);
+		$fileExists = \OC\Files\Filesystem::file_exists($this->path);
+		if ($renameOkay === false || $fileExists === false) {
+			\OC_Log::write('webdav', '\OC\Files\Filesystem::rename() failed', \OC_Log::ERROR);
+			\OC\Files\Filesystem::unlink($partpath);
+			throw new Sabre_DAV_Exception();
+		}
+
 
 		//allow sync clients to send the mtime along in a header
 		$mtime = OC_Request::hasModificationTime();
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index 1ffa048..f6a1c56 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -78,6 +78,11 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
 	 */
 	public function setName($name) {
 
+		// rename is only allowed if the update privilege is granted
+		if (!\OC\Files\Filesystem::isUpdatable($this->path)) {
+			throw new \Sabre_DAV_Exception_Forbidden();
+		}
+
 		list($parentPath, ) = Sabre_DAV_URLUtil::splitPath($this->path);
 		list(, $newName) = Sabre_DAV_URLUtil::splitPath($name);
 
@@ -135,6 +140,12 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
 	 *  Even if the modification time is set to a custom value the access time is set to now.
 	 */
 	public function touch($mtime) {
+
+		// touch is only allowed if the update privilege is granted
+		if (!\OC\Files\Filesystem::isUpdatable($this->path)) {
+			throw new \Sabre_DAV_Exception_Forbidden();
+		}
+
 		\OC\Files\Filesystem::touch($this->path, $mtime);
 	}
 
diff --git a/lib/db.php b/lib/db.php
index 56fa1ce..01f8864 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -236,7 +236,7 @@ class OC_DB {
 
 			// Prepare options array
 			$options = array(
-					'portability' => MDB2_PORTABILITY_ALL - MDB2_PORTABILITY_FIX_CASE,
+					'portability' => MDB2_PORTABILITY_ALL - MDB2_PORTABILITY_FIX_CASE - MDB2_PORTABILITY_RTRIM,
 					'log_line_break' => '<br>',
 					'idxname_format' => '%s',
 					'debug' => true,
@@ -427,7 +427,56 @@ class OC_DB {
 		}
 		return false;
 	}
-
+	
+	/**
+	 * @brief execute a prepared statement, on error write log and throw exception
+	 * @param mixed $stmt OC_DB_StatementWrapper,
+	 *					  an array with 'sql' and optionally 'limit' and 'offset' keys
+	 *					.. or a simple sql query string
+	 * @param array $parameters
+	 * @return MDB2_Result|PDOStatementWrapper|bool|int result
+	 * @throws DatabaseException
+	 */
+	static public function executeAudited( $stmt, array $parameters = null) {
+		if (is_string($stmt)) {
+			// convert to an array with 'sql'
+			if (stripos($stmt,'LIMIT') !== false) { //OFFSET requires LIMIT, se we only neet to check for LIMIT
+				// TODO try to convert LIMIT OFFSET notation to parameters, see fixLimitClauseForMSSQL
+				$message = 'LIMIT and OFFSET are forbidden for portability reasons,'
+						 . ' pass an array with \'limit\' and \'offset\' instead';
+				throw new DatabaseException($message, $stmt);
+			}
+			$stmt = array('sql' => $stmt, 'limit' => null, 'offset' => null);
+		}
+		if (is_array($stmt)){
+			// convert to prepared statement
+			if ( ! array_key_exists('sql', $stmt) ) {
+				$message = 'statement array must at least contain key \'sql\'';
+				throw new DatabaseException($message, '');
+			}
+			if ( ! array_key_exists('limit', $stmt) ) {
+				$stmt['limit'] = null;
+			}
+			if ( ! array_key_exists('limit', $stmt) ) {
+				$stmt['offset'] = null;
+			}
+			$stmt = self::prepare($stmt['sql'], $stmt['limit'], $stmt['offset']);
+		}
+		if ($stmt instanceof PDOStatementWrapper || $stmt instanceof MDB2_Statement_Common) {
+			/** @var $stmt PDOStatementWrapper|MDB2_Statement_Common */
+			$result = $stmt->execute($parameters);
+			self::raiseExceptionOnError($result, 'Could not execute statement');
+		} else {
+			if (is_object($stmt)) {
+				$message = 'Expected a prepared statement or array got ' . get_class($stmt);
+			} else {
+				$message = 'Expected a prepared statement or array got ' . gettype($stmt);
+			}
+			throw new DatabaseException($message, '');
+		}
+		return $result;
+	}
+	
 	/**
 	 * @brief gets last value of autoincrement
 	 * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix
@@ -735,7 +784,8 @@ class OC_DB {
 				$stmt = self::prepare($query);
 				$result = $stmt->execute($inserts);
 				if (self::isError($result)) {
-					OC_Log::write('core', self::getErrorMessage($result), OC_Log::FATAL);
+					$entry = self::getErrorMessage($result);
+					OC_Log::write('core', $entry, OC_Log::FATAL);
 					OC_Template::printErrorPage( $entry );
 				}
 
@@ -1001,6 +1051,38 @@ class OC_DB {
 
 		return false;
 	}
+	/**
+	 * check if a result is an error, writes a log entry and throws an exception, works with MDB2 and PDOException
+	 * @param mixed $result
+	 * @param string $message
+	 * @return void
+	 * @throws DatabaseException
+	 */
+	public static function raiseExceptionOnError($result, $message = null) {
+		if(self::isError($result)) {
+			if ($message === null) {
+				$message = self::getErrorMessage($result);
+			} else {
+				$message .= ', Root cause:' . self::getErrorMessage($result);
+			}
+			throw new DatabaseException($message, self::getErrorCode($result));
+		}
+	}
+
+	/**
+	 * @param mixed $error
+	 * @return int|mixed|null
+	 */
+	public static function getErrorCode($error) {
+		$code = null;
+		if ( self::$backend==self::BACKEND_MDB2 and PEAR::isError($error) ) {
+			/** @var $error PEAR_Error */
+			$code = $error->getCode();
+		} elseif ( self::$backend==self::BACKEND_PDO and self::$PDO ) {
+			$code = self::$PDO->errorCode();
+		}
+		return $code;
+	}
 
 	/**
 	 * returns the error code and message as a string for logging
@@ -1059,6 +1141,9 @@ class PDOStatementWrapper{
 
 	/**
 	 * make execute return the result or updated row count instead of a bool
+	 *
+	 * @param array $input
+	 * @return $this|bool|int
 	 */
 	public function execute($input=array()) {
 		$this->lastArguments = $input;
@@ -1183,7 +1268,7 @@ class PDOStatementWrapper{
 	public function numRows() {
 		$regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i';
 		if (preg_match($regex, $this->statement->queryString, $output) > 0) {
-			$query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}", PDO::FETCH_NUM);
+			$query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}");
 			return $query->execute($this->lastArguments)->fetchColumn();
 		}else{
 			return $this->statement->rowCount();
diff --git a/lib/filechunking.php b/lib/filechunking.php
index e6d6927..bee6f70 100644
--- a/lib/filechunking.php
+++ b/lib/filechunking.php
@@ -34,10 +34,19 @@ class OC_FileChunking {
 		return $this->cache;
 	}
 
+	/**
+	 * Stores the given $data under the given $key - the number of stored bytes is returned
+	 *
+	 * @param $index
+	 * @param $data
+	 * @return int
+	 */
 	public function store($index, $data) {
 		$cache = $this->getCache();
 		$name = $this->getPrefix().$index;
 		$cache->set($name, $data);
+
+		return $cache->size($name);
 	}
 
 	public function isComplete() {
@@ -58,12 +67,34 @@ class OC_FileChunking {
 		$count = 0;
 		for($i=0; $i < $this->info['chunkcount']; $i++) {
 			$chunk = $cache->get($prefix.$i);
-			$cache->remove($prefix.$i);
 			$count += fwrite($f, $chunk);
 		}
+
+		$this->cleanup();
 		return $count;
 	}
 
+	/**
+	 * Removes all chunks which belong to this transmission
+	 */
+	public function cleanup() {
+		$cache = $this->getCache();
+		$prefix = $this->getPrefix();
+		for($i=0; $i < $this->info['chunkcount']; $i++) {
+			$cache->remove($prefix.$i);
+		}
+	}
+
+	/**
+	 * Removes one specific chunk
+	 * @param $index
+	 */
+	public function remove($index) {
+		$cache = $this->getCache();
+		$prefix = $this->getPrefix();
+		$cache->remove($prefix.$index);
+	}
+
 	public function signature_split($orgfile, $input) {
 		$info = unpack('n', fread($input, 2));
 		$blocksize = $info[1];
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 76e1ee9..e70eb34 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -52,13 +52,17 @@ class Cache {
 			$this->storageId = md5($this->storageId);
 		}
 
-		$query = \OC_DB::prepare('SELECT `numeric_id` FROM `*PREFIX*storages` WHERE `id` = ?');
-		$result = $query->execute(array($this->storageId));
+		$result = \OC_DB::executeAudited(
+			'SELECT `numeric_id` FROM `*PREFIX*storages` WHERE `id` = ?',
+			array($this->storageId)
+		);
 		if ($row = $result->fetchRow()) {
 			$this->numericId = $row['numeric_id'];
 		} else {
-			$query = \OC_DB::prepare('INSERT INTO `*PREFIX*storages`(`id`) VALUES(?)');
-			$query->execute(array($this->storageId));
+			\OC_DB::executeAudited(
+				'INSERT INTO `*PREFIX*storages`(`id`) VALUES(?)',
+				array($this->storageId)
+			);
 			$this->numericId = \OC_DB::insertid('*PREFIX*storages');
 		}
 	}
@@ -67,6 +71,19 @@ class Cache {
 		return $this->numericId;
 	}
 
+	public static function storageExists($storageId) {
+		if (strlen($storageId) > 64) {
+			$storageId = md5($storageId);
+		}
+		$query = \OC_DB::prepare('SELECT `numeric_id` FROM `*PREFIX*storages` WHERE `id` = ?');
+		$result = $query->execute(array($storageId));
+		if ($row = $result->fetchRow()) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
 	/**
 	 * normalize mimetypes
 	 *
@@ -75,13 +92,17 @@ class Cache {
 	 */
 	public function getMimetypeId($mime) {
 		if (!isset($this->mimetypeIds[$mime])) {
-			$query = \OC_DB::prepare('SELECT `id` FROM `*PREFIX*mimetypes` WHERE `mimetype` = ?');
-			$result = $query->execute(array($mime));
+			$result = \OC_DB::executeAudited(
+				'SELECT `id` FROM `*PREFIX*mimetypes` WHERE `mimetype` = ?',
+				array($mime)
+			);
 			if ($row = $result->fetchRow()) {
 				$this->mimetypeIds[$mime] = $row['id'];
 			} else {
-				$query = \OC_DB::prepare('INSERT INTO `*PREFIX*mimetypes`(`mimetype`) VALUES(?)');
-				$query->execute(array($mime));
+				\OC_DB::executeAudited(
+					'INSERT INTO `*PREFIX*mimetypes`(`mimetype`) VALUES(?)',
+					array($mime)
+				);
 				$this->mimetypeIds[$mime] = \OC_DB::insertid('*PREFIX*mimetypes');
 			}
 			$this->mimetypes[$this->mimetypeIds[$mime]] = $mime;
@@ -91,8 +112,10 @@ class Cache {
 
 	public function getMimetype($id) {
 		if (!isset($this->mimetypes[$id])) {
-			$query = \OC_DB::prepare('SELECT `mimetype` FROM `*PREFIX*mimetypes` WHERE `id` = ?');
-			$result = $query->execute(array($id));
+			$result = \OC_DB::executeAudited(
+				'SELECT `mimetype` FROM `*PREFIX*mimetypes` WHERE `id` = ?',
+				array($id)
+			);
 			if ($row = $result->fetchRow()) {
 				$this->mimetypes[$id] = $row['mimetype'];
 			} else {
@@ -119,10 +142,13 @@ class Cache {
 			$where = 'WHERE `fileid` = ?';
 			$params = array($file);
 		}
-		$query = \OC_DB::prepare(
-			'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `unencrypted_size`, `etag`
-			 FROM `*PREFIX*filecache` ' . $where);
-		$result = $query->execute($params);
+		$result = \OC_DB::executeAudited(
+			'SELECT `fileid`, `storage`, `path`, `parent`, `name`,
+				`mimetype`, `mimepart`, `size`, `mtime`,
+				`encrypted`, `unencrypted_size`, `etag`
+			 FROM `*PREFIX*filecache` ' . $where,
+			$params
+		);
 		$data = $result->fetchRow();
 
 		//FIXME hide this HACK in the next database layer, or just use doctrine and get rid of MDB2 and PDO
@@ -160,13 +186,16 @@ class Cache {
 	public function getFolderContents($folder) {
 		$fileId = $this->getId($folder);
 		if ($fileId > -1) {
-			$query = \OC_DB::prepare(
-				'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `unencrypted_size` , `etag`
-				 FROM `*PREFIX*filecache` WHERE `parent` = ? ORDER BY `name` ASC');
-			$result = $query->execute(array($fileId));
-			if (\OC_DB::isError($result)) {
-				\OCP\Util::writeLog('cache', 'getFolderContents failed: ' . $result->getMessage(), \OCP\Util::ERROR);
-			}
+			$result = \OC_DB::executeAudited('
+				SELECT `fileid`, `storage`, `path`, `parent`,
+					`name`, `mimetype`, `mimepart`, `size`,
+					`mtime`, `encrypted`,
+					`unencrypted_size`, `etag`
+				FROM `*PREFIX*filecache`
+				WHERE `parent` = ?
+				ORDER BY `name` ASC',
+				array($fileId)
+			);
 			$files = $result->fetchAll();
 			foreach ($files as &$file) {
 				$file['mimetype'] = $this->getMimetype($file['mimetype']);
@@ -217,12 +246,11 @@ class Cache {
 			$params[] = $this->numericId;
 			$valuesPlaceholder = array_fill(0, count($queryParts), '?');
 
-			$query = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache`(' . implode(', ', $queryParts) . ')'
-				. ' VALUES(' . implode(', ', $valuesPlaceholder) . ')');
-			$result = $query->execute($params);
-			if (\OC_DB::isError($result)) {
-				\OCP\Util::writeLog('cache', 'Insert to cache failed: ' . $result->getMessage(), \OCP\Util::ERROR);
-			}
+			\OC_DB::executeAudited('
+				INSERT INTO `*PREFIX*filecache`(' . implode(', ', $queryParts) . ')
+				VALUES(' . implode(', ', $valuesPlaceholder) . ')',
+				$params
+			);
 
 			return (int)\OC_DB::insertid('*PREFIX*filecache');
 		}
@@ -248,9 +276,12 @@ class Cache {
 		list($queryParts, $params) = $this->buildParts($data);
 		$params[] = $id;
 
-		$query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET ' . implode(' = ?, ', $queryParts) . '=?'
-			. ' WHERE `fileid` = ?');
-		$query->execute($params);
+		\OC_DB::executeAudited('
+			UPDATE `*PREFIX*filecache`
+			SET ' . implode(' = ?, ', $queryParts) . '=?
+			WHERE `fileid` = ?',
+			$params
+		);
 	}
 
 	/**
@@ -292,8 +323,11 @@ class Cache {
 
 		$pathHash = md5($file);
 
-		$query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path_hash` = ?');
-		$result = $query->execute(array($this->numericId, $pathHash));
+		$result = \OC_DB::executeAudited('
+			SELECT `fileid` FROM `*PREFIX*filecache`
+			WHERE `storage` = ? AND `path_hash` = ?',
+			array($this->numericId, $pathHash)
+		);
 
 		if ($row = $result->fetchRow()) {
 			return $row['fileid'];
@@ -343,8 +377,10 @@ class Cache {
 				$this->remove($child['path']);
 			}
 		}
-		$query = \OC_DB::prepare('DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?');
-		$query->execute(array($entry['fileid']));
+		\OC_DB::executeAudited('
+			DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?',
+			array($entry['fileid'])
+		);
 
 		$permissionsCache = new Permissions($this->storageId);
 		$permissionsCache->remove($entry['fileid']);
@@ -367,32 +403,48 @@ class Cache {
 
 		if ($sourceData['mimetype'] === 'httpd/unix-directory') {
 			//find all child entries
-			$query = \OC_DB::prepare('SELECT `path`, `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path` LIKE ?');
-			$result = $query->execute(array($this->getNumericStorageId(), $source . '/%'));
+			$result = \OC_DB::executeAudited('
+				SELECT `path`, `fileid` FROM `*PREFIX*filecache`
+				WHERE `storage` = ? AND `path` LIKE ?',
+				array($this->getNumericStorageId(), $source . '/%')
+			);
 			$childEntries = $result->fetchAll();
 			$sourceLength = strlen($source);
 			$query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ? WHERE `fileid` = ?');
 
 			foreach ($childEntries as $child) {
 				$targetPath = $target . substr($child['path'], $sourceLength);
-				$query->execute(array($targetPath, md5($targetPath), $child['fileid']));
+				\OC_DB::executeAudited($query,
+					array(
+						$targetPath,
+						md5($targetPath),
+						$child['fileid']
+					)
+				);
 			}
 		}
 
-		$query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ?, `name` = ?, `parent` =?'
-			. ' WHERE `fileid` = ?');
-		$query->execute(array($target, md5($target), basename($target), $newParentId, $sourceId));
+		\OC_DB::executeAudited('
+			UPDATE `*PREFIX*filecache`
+			SET `path` = ?, `path_hash` = ?, `name` = ?, `parent` =?
+			WHERE `fileid` = ?',
+			array($target, md5($target), basename($target), $newParentId, $sourceId)
+		);
 	}
 
 	/**
 	 * remove all entries for files that are stored on the storage from the cache
 	 */
 	public function clear() {
-		$query = \OC_DB::prepare('DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?');
-		$query->execute(array($this->numericId));
+		\OC_DB::executeAudited('
+			DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?',
+			array($this->numericId)
+		);
 
-		$query = \OC_DB::prepare('DELETE FROM `*PREFIX*storages` WHERE `id` = ?');
-		$query->execute(array($this->storageId));
+		\OC_DB::executeAudited('
+			DELETE FROM `*PREFIX*storages` WHERE `id` = ?',
+			array($this->storageId)
+		);
 	}
 
 	/**
@@ -405,11 +457,12 @@ class Cache {
 		$file = $this->normalize($file);
 
 		$pathHash = md5($file);
-		$query = \OC_DB::prepare('SELECT `size` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path_hash` = ?');
-		$result = $query->execute(array($this->numericId, $pathHash));
-		if( \OC_DB::isError($result)) {
-			\OCP\Util::writeLog('cache', 'get status failed: ' . $result->getMessage(), \OCP\Util::ERROR);
-		}
+		$result = \OC_DB::executeAudited('
+			SELECT `size`
+			FROM `*PREFIX*filecache`
+			WHERE `storage` = ? AND `path_hash` = ?',
+			array($this->numericId, $pathHash)
+		);
 		if ($row = $result->fetchRow()) {
 			if ((int)$row['size'] === -1) {
 				return self::SHALLOW;
@@ -435,11 +488,14 @@ class Cache {
 		// normalize pattern
 		$pattern = $this->normalize($pattern);
 
-		$query = \OC_DB::prepare('
-			SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `unencrypted_size`, `etag`
-			FROM `*PREFIX*filecache` WHERE `name` LIKE ? AND `storage` = ?'
+		$result = \OC_DB::executeAudited('
+			SELECT `fileid`, `storage`, `path`, `parent`, `name`,
+				`mimetype`, `mimepart`, `size`, `mtime`,
+				`encrypted`, `unencrypted_size`, `etag`
+			FROM `*PREFIX*filecache`
+			WHERE `name` LIKE ? AND `storage` = ?',
+			array($pattern, $this->numericId)
 		);
-		$result = $query->execute(array($pattern, $this->numericId));
 		$files = array();
 		while ($row = $result->fetchRow()) {
 			$row['mimetype'] = $this->getMimetype($row['mimetype']);
@@ -461,12 +517,17 @@ class Cache {
 		} else {
 			$where = '`mimepart` = ?';
 		}
-		$query = \OC_DB::prepare('
-			SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `unencrypted_size`, `etag`
-			FROM `*PREFIX*filecache` WHERE ' . $where . ' AND `storage` = ?'
-		);
 		$mimetype = $this->getMimetypeId($mimetype);
-		$result = $query->execute(array($mimetype, $this->numericId));
+		
+		$result = \OC_DB::executeAudited('
+			SELECT `fileid`, `storage`, `path`, `parent`, `name`,
+				`mimetype`, `mimepart`, `size`, `mtime`,
+				`encrypted`, `unencrypted_size`, `etag`
+			FROM `*PREFIX*filecache`
+			WHERE ' . $where . ' AND `storage` = ?',
+			array($mimetype, $this->numericId)
+		);
+		
 		$files = array();
 		while ($row = $result->fetchRow()) {
 			$row['mimetype'] = $this->getMimetype($row['mimetype']);
@@ -503,9 +564,12 @@ class Cache {
 		$entry = $this->get($path);
 		if ($entry && $entry['mimetype'] === 'httpd/unix-directory') {
 			$id = $entry['fileid'];
-			$query = \OC_DB::prepare('SELECT SUM(`size`), MIN(`size`) FROM `*PREFIX*filecache` '.
-				'WHERE `parent` = ? AND `storage` = ?');
-			$result = $query->execute(array($id, $this->getNumericStorageId()));
+			$result = \OC_DB::executeAudited('
+				SELECT SUM(`size`), MIN(`size`)
+				FROM `*PREFIX*filecache`
+				WHERE `parent` = ? AND `storage` = ?',
+				array($id, $this->getNumericStorageId())
+			);
 			if ($row = $result->fetchRow()) {
 				list($sum, $min) = array_values($row);
 				$sum = (int)$sum;
@@ -518,7 +582,7 @@ class Cache {
 				if ($entry['size'] !== $totalSize) {
 					$this->update($id, array('size' => $totalSize));
 				}
-				
+
 			}
 		}
 		return $totalSize;
@@ -530,8 +594,12 @@ class Cache {
 	 * @return int[]
 	 */
 	public function getAll() {
-		$query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ?');
-		$result = $query->execute(array($this->numericId));
+		$result = \OC_DB::executeAudited('
+			SELECT `fileid`
+			FROM `*PREFIX*filecache`
+			WHERE `storage` = ?',
+			array($this->numericId)
+		);
 		$ids = array();
 		while ($row = $result->fetchRow()) {
 			$ids[] = $row['fileid'];
@@ -549,12 +617,15 @@ class Cache {
 	 * @return string|bool the path of the folder or false when no folder matched
 	 */
 	public function getIncomplete() {
-		$query = \OC_DB::prepare('SELECT `path` FROM `*PREFIX*filecache`'
-			. ' WHERE `storage` = ? AND `size` = -1 ORDER BY `fileid` DESC',1);
-		$result = $query->execute(array($this->numericId));
-		if (\OC_DB::isError($result)) {
-			\OCP\Util::writeLog('cache', 'getIncomplete failed: ' . $result->getMessage(), \OCP\Util::ERROR);
-		}
+		$query = \OC_DB::prepare('
+			SELECT `path`
+			FROM `*PREFIX*filecache`
+			WHERE `storage` = ? AND `size` = -1
+			ORDER BY `fileid` DESC', 1);
+		$result = \OC_DB::executeAudited(
+			$query,
+			array($this->numericId)
+		);
 		if ($row = $result->fetchRow()) {
 			return $row['path'];
 		} else {
@@ -568,8 +639,12 @@ class Cache {
 	 * @return array, first element holding the storage id, second the path
 	 */
 	static public function getById($id) {
-		$query = \OC_DB::prepare('SELECT `storage`, `path` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
-		$result = $query->execute(array($id));
+		$result = \OC_DB::executeAudited('
+			SELECT `storage`, `path`
+			FROM `*PREFIX*filecache`
+			WHERE `fileid` = ?',
+			array($id)
+		);
 		if ($row = $result->fetchRow()) {
 			$numericId = $row['storage'];
 			$path = $row['path'];
@@ -577,8 +652,12 @@ class Cache {
 			return null;
 		}
 
-		$query = \OC_DB::prepare('SELECT `id` FROM `*PREFIX*storages` WHERE `numeric_id` = ?');
-		$result = $query->execute(array($numericId));
+		$result = \OC_DB::executeAudited('
+			SELECT `id`
+			FROM `*PREFIX*storages`
+			WHERE `numeric_id` = ?',
+			array($numericId)
+		);
 		if ($row = $result->fetchRow()) {
 			return array($row['id'], $path);
 		} else {
@@ -592,6 +671,7 @@ class Cache {
 	 * @return string
 	 */
 	public function normalize($path) {
-
 		return \OC_Util::normalizeUnicode($path);
-	}}
+	}
+
+}
diff --git a/lib/files/cache/updater.php b/lib/files/cache/updater.php
index 9781c76..c9d67f8 100644
--- a/lib/files/cache/updater.php
+++ b/lib/files/cache/updater.php
@@ -78,30 +78,58 @@ class Updater {
 	}
 
 	/**
+	 * @brief get file owner and path
+	 * @param string $filename
+	 * @return array with the oweners uid and the owners path
+	 */
+	private static function getUidAndFilename($filename) {
+		$uid = \OC\Files\Filesystem::getOwner($filename);
+		\OC\Files\Filesystem::initMountPoints($uid);
+		if ( $uid != \OCP\User::getUser() ) {
+			$info = \OC\Files\Filesystem::getFileInfo($filename);
+			$ownerView = new \OC\Files\View('/'.$uid.'/files');
+			$filename = $ownerView->getPath($info['fileid']);
+		}
+		return array($uid, '/files/'.$filename);
+	}
+
+	/**
 	 * Update the mtime and ETag of all parent folders
 	 *
 	 * @param string $path
 	 * @param string $time
 	 */
 	static public function correctFolder($path, $time) {
+
 		if ($path !== '' && $path !== '/') {
-			$parent = dirname($path);
-			if ($parent === '.') {
-				$parent = '';
-			}
+
+			list($owner, $realPath) = self::getUidAndFilename(dirname($path));
+
 			/**
 			 * @var \OC\Files\Storage\Storage $storage
 			 * @var string $internalPath
 			 */
-			list($storage, $internalPath) = self::resolvePath($parent);
-			if ($storage) {
-				$cache = $storage->getCache();
-				$id = $cache->getId($internalPath);
-				if ($id !== -1) {
-					$cache->update($id, array('mtime' => $time, 'etag' => $storage->getETag($internalPath)));
-					self::correctFolder($parent, $time);
+
+			$view = new \OC\Files\View('/' . $owner);
+
+			list($storage, $internalPath) = $view->resolvePath($realPath);
+			$cache = $storage->getCache();
+			$id = $cache->getId($internalPath);
+
+			while ($id !== -1) {
+				$cache->update($id, array('mtime' => $time, 'etag' => $storage->getETag($internalPath)));
+				$realPath = dirname($realPath);
+				// check storage for parent in case we change the storage in this step
+				list($storage, $internalPath) = $view->resolvePath($realPath);
+				if ($internalPath) {
+					$cache = $storage->getCache();
+					$id = $cache->getId($internalPath);
+				} else {
+					$id = -1;
 				}
+
 			}
+
 		}
 	}
 
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index 4b44558..14ca882 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -221,7 +221,11 @@ class Filesystem {
 		$parser = new \OC\ArrayParser();
 
 		$root = \OC_User::getHome($user);
-		self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
+		if (\OC\Files\Cache\Cache::storageExists('local::' . $root . '/') or is_null($user)) {
+			self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
+		} else {
+			self::mount('\OC\Files\Storage\Home', array('user' => $user, 'datadir' => $root), $user);
+		}
 		$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
 
 		//move config file to it's new position
diff --git a/lib/files/storage/home.php b/lib/files/storage/home.php
new file mode 100644
index 0000000..9521730
--- /dev/null
+++ b/lib/files/storage/home.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Copyright (c) 2012 Robin Appelman <icewind at owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Files\Storage;
+
+/**
+ * Specialized version of Local storage for home directory usage
+ */
+class Home extends Local {
+	/**
+	 * @var \OC\User\User $user
+	 */
+	protected $user;
+
+	public function __construct($arguments) {
+		$this->user = $arguments['user'];
+		$this->datadir = $arguments['datadir'];
+		if (substr($this->datadir, -1) !== '/') {
+			$this->datadir .= '/';
+		}
+	}
+
+	public function getId() {
+		return 'home::' . $this->user;
+	}
+}
\ No newline at end of file
diff --git a/lib/files/view.php b/lib/files/view.php
index 1e2a957..f02e3d4 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -110,7 +110,9 @@ class View {
 	 * @return array consisting of the storage and the internal path
 	 */
 	public function resolvePath($path) {
-		return Filesystem::resolvePath($this->getAbsolutePath($path));
+		$a = $this->getAbsolutePath($path);
+		$p = Filesystem::normalizePath($a);
+		return Filesystem::resolvePath($p);
 	}
 
 	/**
@@ -698,7 +700,10 @@ class View {
 			return false;
 		}
 		$defaultRoot = Filesystem::getRoot();
-		return (strlen($this->fakeRoot) >= strlen($defaultRoot)) && (substr($this->fakeRoot, 0, strlen($defaultRoot)) === $defaultRoot);
+		if($this->fakeRoot === $defaultRoot){
+			return true;
+		}
+		return (strlen($this->fakeRoot) > strlen($defaultRoot)) && (substr($this->fakeRoot, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/');
 	}
 
 	private function runHooks($hooks, $path, $post = false) {
diff --git a/lib/helper.php b/lib/helper.php
index ddd6ce9..819b1e8 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -162,17 +162,35 @@ class OC_Helper {
 		// Read the selected theme from the config file
 		$theme = OC_Util::getTheme();
 
+		//if a theme has a png but not an svg always use the png
+		$basename = substr(basename($image),0,-4);
+
 		// Check if the app is in the app folder
 		if( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/img/$image" )) {
 			return OC::$WEBROOT."/themes/$theme/apps/$app/img/$image";
+		}elseif( ! file_exists( OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.svg")
+			&& file_exists( OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.png")) {
+			return OC::$WEBROOT . "/themes/$theme/apps/$app/img/$basename.png";
 		}elseif( file_exists(OC_App::getAppPath($app)."/img/$image" )) {
 			return OC_App::getAppWebPath($app)."/img/$image";
+		}elseif( ! file_exists( OC_App::getAppPath($app) . "/img/$basename.svg")
+			&& file_exists( OC_App::getAppPath($app) . "/img/$basename.png")) {
+			return OC_App::getAppPath($app) . "/img/$basename.png";
 		}elseif( !empty( $app ) and file_exists( OC::$SERVERROOT."/themes/$theme/$app/img/$image" )) {
 			return OC::$WEBROOT."/themes/$theme/$app/img/$image";
+		}elseif( !empty($app) and (!file_exists( OC::$SERVERROOT . "/themes/$theme/$app/img/$basename.svg")
+			&& file_exists( OC::$SERVERROOT . "/themes/$theme/$app/img/$basename.png"))) {
+			return OC::$WEBROOT . "/themes/$theme/$app/img/$basename.png";
 		}elseif( !empty( $app ) and file_exists( OC::$SERVERROOT."/$app/img/$image" )) {
 			return OC::$WEBROOT."/$app/img/$image";
+		}elseif( !empty($app) and (!file_exists( OC::$SERVERROOT . "/$app/img/$basename.svg")
+			&& file_exists( OC::$SERVERROOT . "/$app/img/$basename.png"))) {
+			return OC::$WEBROOT . "/$app/img/$basename.png";
 		}elseif( file_exists( OC::$SERVERROOT."/themes/$theme/core/img/$image" )) {
 			return OC::$WEBROOT."/themes/$theme/core/img/$image";
+		}elseif( ! file_exists( OC::$SERVERROOT . "/themes/$theme/core/img/$basename.svg")
+			&& file_exists( OC::$SERVERROOT . "/themes/$theme/core/img/$basename.png")) {
+			return OC::$WEBROOT . "/themes/$theme/core/img/$basename.png";
 		}elseif( file_exists( OC::$SERVERROOT."/core/img/$image" )) {
 			return OC::$WEBROOT."/core/img/$image";
 		}else{
@@ -517,11 +535,11 @@ class OC_Helper {
 	 * copy the contents of one stream to another
 	 * @param resource $source
 	 * @param resource $target
-	 * @return int the number of bytes copied
+	 * @return array the number of bytes copied and result
 	 */
 	public static function streamCopy($source, $target) {
-		if(!$source or !$target) {
-			return false;
+		if (!$source or !$target) {
+			return array(0, false);
 		}
 		$result = true;
 		$count = 0;
diff --git a/lib/log.php b/lib/log.php
index 3f33348..e31e2a8 100644
--- a/lib/log.php
+++ b/lib/log.php
@@ -36,6 +36,8 @@ class OC_Log {
 				call_user_func(array(self::$class, 'init'));
 			}
 			$log_class=self::$class;
+			// remove username/passswords from URLs before writing the to the log file
+			$message = preg_replace('/\/\/(.*):(.*)@/', '//xxx:xxx@', $message);
 			$log_class::write($app, $message, $level);
 		}
 	}
diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php
index d16b953..aecf78b 100644
--- a/lib/log/owncloud.php
+++ b/lib/log/owncloud.php
@@ -35,7 +35,17 @@ class OC_Log_Owncloud {
 	public static function init() {
 		$defaultLogFile = OC_Config::getValue("datadirectory", OC::$SERVERROOT.'/data').'/owncloud.log';
 		self::$logFile = OC_Config::getValue("logfile", $defaultLogFile);
-		if (!file_exists(self::$logFile)) {
+
+		/*
+		* Fall back to default log file if specified logfile does not exist
+		* and can not be created. Error suppression is required in order to
+		* not end up in the error handler which will try to log the error.
+		* A better solution (compared to error suppression) would be checking
+		* !is_writable(dirname(self::$logFile)) before touch(), but
+		* is_writable() on directories used to be pretty unreliable on Windows
+		* for at least some time.
+		*/
+		if (!file_exists(self::$logFile) && !@touch(self::$logFile)) {
 			self::$logFile = $defaultLogFile;
 		}
 	}
@@ -51,8 +61,16 @@ class OC_Log_Owncloud {
 		if($level>=$minLevel) {
 			// default to ISO8601
 			$format = OC_Config::getValue('logdateformat', 'c');
-			$time = date($format, time());
-			$entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time);
+			$logtimezone=OC_Config::getValue( "logtimezone", 'UTC' );
+			try {
+				$timezone = new DateTimeZone($logtimezone);
+			} catch (Exception $e) {
+				$timezone = new DateTimeZone('UTC');
+			}
+			$time = new DateTime(null, $timezone);
+			$entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time->format($format));
+
+
 			$handle = @fopen(self::$logFile, 'a');
 			if ($handle) {
 				fwrite($handle, json_encode($entry)."\n");
diff --git a/lib/public/share.php b/lib/public/share.php
index 0a88ea4..7ba5fa5 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -155,13 +155,13 @@ class Share {
 
 		while ($source !== -1) {
 
-			// Fetch all shares of this file path from DB
+			// Fetch all shares with another user
 			$query = \OC_DB::prepare(
 				'SELECT `share_with`
 				FROM
 				`*PREFIX*share`
 				WHERE
-				`item_source` = ? AND `share_type` = ?'
+				`item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')'
 			);
 
 			$result = $query->execute(array($source, self::SHARE_TYPE_USER));
@@ -180,7 +180,7 @@ class Share {
 				FROM
 				`*PREFIX*share`
 				WHERE
-				`item_source` = ? AND `share_type` = ?'
+				`item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')'
 			);
 
 			$result = $query->execute(array($source, self::SHARE_TYPE_GROUP));
@@ -201,7 +201,7 @@ class Share {
 					FROM
 					`*PREFIX*share`
 					WHERE
-					`item_source` = ? AND `share_type` = ?'
+					`item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')'
 				);
 
 				$result = $query->execute(array($source, self::SHARE_TYPE_LINK));
@@ -293,7 +293,18 @@ class Share {
 		if (\OC_DB::isError($result)) {
 			\OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result) . ', token=' . $token, \OC_Log::ERROR);
 		}
-		return $result->fetchRow();
+		$row = $result->fetchRow();
+
+		if (!empty($row['expiration'])) {
+			$now = new \DateTime();
+			$expirationDate = new \DateTime($row['expiration'], new \DateTimeZone('UTC'));
+			if ($now > $expirationDate) {
+				self::delete($row['id']);
+				return false;
+			}
+		}
+
+		return $row;
 	}
 
 	/**
@@ -749,10 +760,10 @@ class Share {
 
 	/**
 	* @brief Get the backend class for the specified item type
-	* @param string Item type
-	* @return Sharing backend object
+	* @param string $itemType
+	* @return Share_Backend
 	*/
-	private static function getBackend($itemType) {
+	public static function getBackend($itemType) {
 		if (isset(self::$backends[$itemType])) {
 			return self::$backends[$itemType];
 		} else if (isset(self::$backendTypes[$itemType]['class'])) {
diff --git a/lib/setup.php b/lib/setup.php
index 5d5ef77..2a43f7b 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -328,7 +328,13 @@ class OC_Setup {
 		$connection_string = "host='$e_host' dbname=postgres user='$e_user' password='$e_password'";
 		$connection = @pg_connect($connection_string);
 		if(!$connection) {
-			throw new Exception($l->t('PostgreSQL username and/or password not valid'));
+			// Try if we can connect to the DB with the specified name
+			$e_dbname = addslashes($dbname);
+			$connection_string = "host='$e_host' dbname='$e_dbname' user='$e_user' password='$e_password'";
+			$connection = @pg_connect($connection_string);
+
+			if(!$connection)
+				throw new DatabaseSetupException($l->t('PostgreSQL username and/or password not valid'));
 		}
 		$e_user = pg_escape_string($dbuser);
 		//check for roles creation rights in postgresql
diff --git a/lib/updater.php b/lib/updater.php
index cbba543..d0ae1fb 100644
--- a/lib/updater.php
+++ b/lib/updater.php
@@ -27,7 +27,6 @@ class OC_Updater extends BasicEmitter {
 	 * @return array | bool
 	 */
 	static public function check($updaterUrl='http://apps.owncloud.com/updater.php') {
-		OC_Appconfig::setValue('core', 'lastupdatedat', microtime(true));
 		if ((\OC_Appconfig::getValue('core', 'lastupdatedat') + 1800) > time()) {
 			return json_decode(\OC_Appconfig::getValue('core', 'lastupdateResult'), true);
 		}
@@ -75,7 +74,7 @@ class OC_Updater extends BasicEmitter {
 
 		if(OC_Config::getValue('updatechecker', true)==true) {
 			$data=OC_Updater::check();
-			if(isset($data['version']) and $data['version']<>'') {
+			if(isset($data['version']) && !empty($data['version'])) {
 				$txt='<span style="color:#AA0000; font-weight:bold;">'
 				.$l->t('%s is available. Get <a href="%s">more information</a>',
 				array($data['versionstring'], $data['web'])).'</span>';
diff --git a/lib/user.php b/lib/user.php
index 55ffc26..6cb9c22 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -645,12 +645,12 @@ class OC_User {
 	/**
 	 * @brief Remove cookie for "remember username"
 	 */
-	public static function unsetMagicInCookie() {
-		unset($_COOKIE["oc_username"]);
+	public function unsetMagicInCookie() {
+		unset($_COOKIE["oc_username"]); //TODO: DI
 		unset($_COOKIE["oc_token"]);
 		unset($_COOKIE["oc_remember_login"]);
-		setcookie("oc_username", null, -1);
-		setcookie("oc_token", null, -1);
-		setcookie("oc_remember_login", null, -1);
+		setcookie('oc_username', '', time()-3600, \OC::$WEBROOT);
+		setcookie('oc_token', '', time()-3600, \OC::$WEBROOT);
+		setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT);
 	}
 }
diff --git a/lib/user/database.php b/lib/user/database.php
index 35cc68e..cbdccd4 100644
--- a/lib/user/database.php
+++ b/lib/user/database.php
@@ -85,7 +85,7 @@ class OC_User_Database extends OC_User_Backend {
 	 */
 	public function deleteUser( $uid ) {
 		// Delete user-group-relation
-		$query = OC_DB::prepare( 'DELETE FROM `*PREFIX*users` WHERE uid = ?' );
+		$query = OC_DB::prepare( 'DELETE FROM `*PREFIX*users` WHERE `uid` = ?' );
 		$query->execute( array( $uid ));
 		return true;
 	}
diff --git a/lib/util.php b/lib/util.php
index 9ba1bdb..2e377c8 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -77,7 +77,7 @@ class OC_Util {
 	public static function getVersion() {
 		// hint: We only can count up. Reset minor/patchlevel when
 		// updating major/minor version number.
-		return array(5, 00, 22);
+		return array(5, 00, 23);
 	}
 
 	/**
@@ -85,7 +85,7 @@ class OC_Util {
 	 * @return string
 	 */
 	public static function getVersionString() {
-		return '5.0.12';
+		return '5.0.13 RC1';
 	}
 
 	/**
@@ -404,6 +404,7 @@ class OC_Util {
 	 * Check if the user is a admin, redirects to home if not
 	 */
 	public static function checkAdminUser() {
+		\OC_Util::checkLoggedIn();
 		if( !OC_User::isAdminUser(OC_User::getUser())) {
 			header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
 			exit();
@@ -436,6 +437,7 @@ class OC_Util {
 	 * @return array $groups where the current user is subadmin
 	 */
 	public static function checkSubAdminUser() {
+		\OC_Util::checkLoggedIn();
 		if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
 			header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
 			exit();

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



More information about the Pkg-owncloud-commits mailing list