[Pkg-owncloud-commits] [owncloud] 98/104: Imported Upstream version 6.0.1~rc1+dfsg

David Prévot taffit at moszumanska.debian.org
Sat Jan 18 13:33:43 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit 31c1dade3dedd7d7646a054f255440d70c2586f6
Merge: 4c9d9d4 a4e842f
Author: David Prévot <taffit at debian.org>
Date:   Thu Jan 16 22:31:20 2014 -0400

    Imported Upstream version 6.0.1~rc1+dfsg

 .htaccess                                          |   3 +
 apps/activity/js/script.js                         |   2 +-
 apps/contacts/appinfo/migrate.php                  |   2 +-
 apps/contacts/js/app.js                            |  40 +-
 apps/contacts/js/contacts.js                       |   9 +-
 apps/contacts/js/groups.js                         |   1 +
 apps/contacts/lib/contact.php                      |   4 +-
 apps/contacts/lib/controller/exportcontroller.php  |  15 +-
 apps/contacts/lib/utils/properties.php             |   4 +-
 apps/documents/ajax/documentController.php         |  21 +-
 apps/documents/ajax/download.php                   |  18 +
 apps/documents/ajax/sessionController.php          |  73 +-
 apps/documents/appinfo/routes.php                  |   8 +-
 apps/documents/css/style.css                       |   4 +
 apps/documents/js/documents.js                     |   2 +-
 apps/documents/js/viewer/viewer.js                 |   2 +-
 apps/documents/lib/download/range.php              |  18 +-
 apps/documents/lib/download/simple.php             |  11 +-
 apps/documents/lib/file.php                        |  63 +-
 apps/documents/lib/filter.php                      |  65 ++
 apps/documents/lib/genesis.php                     |   7 +-
 apps/documents/lib/storage.php                     |  32 +-
 apps/files/download.php                            |   7 +-
 apps/files/js/file-upload.js                       |  12 +-
 apps/files/js/fileactions.js                       |   2 +-
 apps/files/js/filelist.js                          |  52 +-
 apps/files/js/files.js                             |  14 +-
 apps/files/l10n/ru_RU.php                          |  17 -
 apps/files/templates/part.breadcrumb.php           |  12 +-
 apps/files_encryption/hooks/hooks.php              |  63 +-
 apps/files_encryption/lib/helper.php               |   3 +-
 apps/files_encryption/lib/proxy.php                |  20 +-
 apps/files_encryption/lib/util.php                 |  68 +-
 apps/files_encryption/tests/helper.php             |  37 +
 apps/files_encryption/tests/proxy.php              |  69 +-
 apps/files_encryption/tests/share.php              |  27 +-
 apps/files_encryption/tests/util.php               |   6 +
 apps/files_external/3rdparty/smb4php/smb.php       |   6 +-
 apps/files_external/js/dropbox.js                  |  17 +-
 apps/files_external/js/google.js                   |  21 +-
 apps/files_external/js/settings.js                 |  14 +-
 apps/files_external/l10n/ru_RU.php                 |   6 -
 apps/files_external/lib/config.php                 |   6 +-
 apps/files_external/lib/webdav.php                 |  42 +-
 apps/files_sharing/ajax/publicpreview.php          |   4 +-
 apps/files_sharing/js/public.js                    |   6 +-
 apps/files_sharing/js/share.js                     |   2 +-
 apps/files_sharing/l10n/ru_RU.php                  |   8 -
 apps/files_sharing/lib/share/file.php              |   2 +-
 apps/files_sharing/lib/sharedstorage.php           |  41 +-
 apps/files_sharing/tests/base.php                  |   4 +-
 apps/files_texteditor/js/editor.js                 |   7 -
 apps/files_trashbin/download.php                   |  51 --
 apps/files_trashbin/js/trash.js                    |  14 +-
 apps/files_trashbin/l10n/ru_RU.php                 |   6 -
 apps/files_trashbin/lib/trashbin.php               |   6 +-
 apps/files_trashbin/templates/part.breadcrumb.php  |   8 +-
 apps/files_versions/download.php                   |   7 +-
 apps/files_versions/js/versions.js                 |  16 +-
 apps/files_versions/lib/versions.php               |   6 +-
 apps/gallery/ajax/getimages.php                    |   3 +-
 apps/gallery/ajax/image.php                        |   7 +-
 apps/gallery/ajax/thumbnail.php                    |   9 +-
 apps/gallery/js/gallery.js                         |  16 +-
 apps/gallery/js/thumbnail.js                       |   4 +
 apps/gallery/lib/thumbnail.php                     |  14 +-
 apps/gallery/templates/public.php                  |   2 +-
 apps/updater/ajax/update.php                       |  15 +-
 apps/updater/js/controllers.js                     |  21 +-
 apps/updater/lib/downloader.php                    |   6 +-
 apps/updater/lib/helper.php                        |  10 +-
 apps/updater/lib/location/apps.php                 |  18 +-
 apps/updater/update.php                            |   2 +
 apps/user_ldap/l10n/ru_RU.php                      |  12 -
 apps/user_ldap/lib/access.php                      | 145 +++-
 apps/user_ldap/lib/connection.php                  |   3 +-
 apps/user_ldap/lib/wizard.php                      |  11 +-
 apps/user_ldap/templates/part.settingcontrols.php  |   2 +-
 apps/user_ldap/templates/part.wizardcontrols.php   |   2 +-
 apps/user_ldap/tests/user_ldap.php                 |  54 ++
 apps/user_ldap/user_ldap.php                       |  15 +-
 apps/user_ldap/user_proxy.php                      |  15 +
 core/command/user/report.php                       |  61 ++
 core/css/styles.css                                |  14 +-
 core/doc/admin/_images/oc_admin_app_page.png       | Bin 0 -> 28370 bytes
 core/doc/admin/_images/oc_admin_user_manage.png    | Bin 0 -> 21025 bytes
 .../_sources/configuration/configuration_apps.txt  |  20 +-
 .../_sources/configuration/configuration_users.txt | 224 ++++++
 core/doc/admin/_sources/configuration/index.txt    |   3 +-
 core/doc/admin/_sources/index.txt                  |   3 +-
 .../_sources/installation/installation_source.txt  |  38 +-
 core/doc/admin/_sources/maintenance/backup.txt     |   2 +-
 core/doc/admin/_sources/maintenance/update.txt     |   8 +-
 core/doc/admin/configuration/auth_ldap.html        |   5 +-
 core/doc/admin/configuration/background_jobs.html  |   3 +-
 .../configuration/configuration_3rdparty.html      |   5 +-
 .../admin/configuration/configuration_apps.html    |  29 +-
 .../configuration/configuration_automation.html    |   5 +-
 .../configuration_custom_clients.html              |   3 +-
 .../configuration/configuration_database.html      |   3 +-
 .../configuration/configuration_encryption.html    |   3 +-
 .../configuration/configuration_knowledgebase.html |   3 +-
 .../configuration/configuration_language.html      |   3 +-
 .../admin/configuration/configuration_logging.html |   3 +-
 .../admin/configuration/configuration_mail.html    |   3 +-
 .../configuration/configuration_maintenance.html   |   3 +-
 .../admin/configuration/configuration_preview.html |   3 +-
 .../configuration/configuration_reverseproxy.html  |   3 +-
 .../admin/configuration/configuration_users.html   | 378 ++++++++++
 .../configuration/configuring_big_file_upload.html |   3 +-
 .../admin/configuration/custom_mount_config.html   |   3 +-
 .../configuration/custom_mount_config_gui.html     |   3 +-
 .../admin/configuration/custom_user_backend.html   |   3 +-
 core/doc/admin/configuration/index.html            |   8 +-
 core/doc/admin/configuration/xsendfile.html        |   3 +-
 core/doc/admin/contents.html                       |  15 +-
 core/doc/admin/index.html                          |   3 +-
 .../admin/installation/installation_source.html    |  40 +-
 core/doc/admin/maintenance/backup.html             |   6 +-
 core/doc/admin/maintenance/index.html              |   6 +-
 core/doc/admin/maintenance/migrating.html          |   2 +-
 core/doc/admin/maintenance/restore.html            |   2 +-
 core/doc/admin/maintenance/update.html             |  19 +-
 core/doc/user/_images/bookmark_addurl.jpg          | Bin 11368 -> 0 bytes
 core/doc/user/_images/bookmark_addurl.png          | Bin 0 -> 9464 bytes
 core/doc/user/_images/bookmark_setting.jpg         | Bin 6410 -> 0 bytes
 core/doc/user/_images/bookmark_setting.png         | Bin 0 -> 8861 bytes
 core/doc/user/_images/calendar_createevent.png     | Bin 21501 -> 17972 bytes
 core/doc/user/_images/calendar_export.png          | Bin 25552 -> 18885 bytes
 core/doc/user/_images/calendar_import.png          | Bin 8445 -> 8250 bytes
 .../doc/user/_images/calendar_manage-calendars.png | Bin 32895 -> 39313 bytes
 core/doc/user/_images/contact_bottombar.jpg        | Bin 2233 -> 0 bytes
 core/doc/user/_images/contact_bottombar.png        | Bin 0 -> 890 bytes
 core/doc/user/_images/contact_del_ab.jpg           | Bin 28610 -> 0 bytes
 core/doc/user/_images/contact_del_ab.png           | Bin 0 -> 10105 bytes
 core/doc/user/_images/contact_emptycontact.jpg     | Bin 10690 -> 0 bytes
 core/doc/user/_images/contact_emptycontact.png     | Bin 0 -> 19910 bytes
 core/doc/user/_images/contact_import.jpg           | Bin 20281 -> 0 bytes
 core/doc/user/_images/contact_uploadbutton.png     | Bin 0 -> 4305 bytes
 core/doc/user/_images/files_versioning.png         | Bin 0 -> 9333 bytes
 core/doc/user/_images/oc_connect.png               | Bin 50629 -> 107250 bytes
 core/doc/user/_images/oc_documents.png             | Bin 0 -> 33956 bytes
 core/doc/user/_images/oc_documents_col_edit.png    | Bin 0 -> 15944 bytes
 core/doc/user/_images/oc_documents_edit.png        | Bin 0 -> 24685 bytes
 core/doc/user/_images/oc_documents_share.png       | Bin 0 -> 15529 bytes
 core/doc/user/_images/oc_files_share.png           | Bin 0 -> 11553 bytes
 core/doc/user/_images/oc_filesweb.png              | Bin 0 -> 28666 bytes
 core/doc/user/_images/oc_filesweb_navigate.png     | Bin 0 -> 5159 bytes
 core/doc/user/_images/oc_filesweb_new.png          | Bin 0 -> 5434 bytes
 core/doc/user/_images/oc_ui.png                    | Bin 134914 -> 138786 bytes
 core/doc/user/_images/oc_user_preferences.png      | Bin 0 -> 24304 bytes
 core/doc/user/_sources/bookmarks.txt               |  44 +-
 core/doc/user/_sources/contents.txt                |   2 +
 core/doc/user/_sources/documents.txt               |  68 ++
 .../_sources/files/configuring_big_file_upload.txt |   2 +-
 core/doc/user/_sources/files/deletedfiles.txt      |  17 +-
 core/doc/user/_sources/files/encryption.txt        |   2 +-
 core/doc/user/_sources/files/files.txt             |  64 +-
 core/doc/user/_sources/files/filesweb.txt          |  85 +++
 core/doc/user/_sources/files/index.txt             |   1 +
 core/doc/user/_sources/files/sync.txt              |   4 +-
 core/doc/user/_sources/files/versioncontrol.txt    |  22 +-
 core/doc/user/_sources/index.txt                   |  15 +-
 core/doc/user/_sources/migration.txt               |   4 +-
 core/doc/user/_sources/pim/calendar.txt            |  20 +-
 core/doc/user/_sources/pim/contacts.txt            |  65 +-
 core/doc/user/_sources/pim/sync_osx.txt            |  16 +-
 core/doc/user/_sources/pim/sync_thunderbird.txt    |  18 +-
 core/doc/user/_sources/userpreferences.txt         |  31 +
 core/doc/user/_sources/webinterface.txt            |  24 +-
 core/doc/user/bookmarks.html                       |  50 +-
 core/doc/user/contents.html                        |  40 +-
 core/doc/user/documents.html                       | 216 ++++++
 core/doc/user/external_storage/google_drive.html   |   4 +-
 .../user/files/configuring_big_file_upload.html    |  11 +-
 core/doc/user/files/deletedfiles.html              |  25 +-
 core/doc/user/files/encryption.html                |  11 +-
 core/doc/user/files/files.html                     |  67 +-
 core/doc/user/files/filesweb.html                  | 244 +++++++
 core/doc/user/files/index.html                     |  14 +-
 core/doc/user/files/quota.html                     |   7 +-
 core/doc/user/files/sync.html                      |  15 +-
 core/doc/user/files/versioncontrol.html            |  30 +-
 core/doc/user/genindex.html                        |   2 +
 core/doc/user/index.html                           |  25 +-
 core/doc/user/migration.html                       |   8 +-
 core/doc/user/objects.inv                          |   4 +-
 core/doc/user/pim/calendar.html                    |  31 +-
 core/doc/user/pim/contacts.html                    |  72 +-
 core/doc/user/pim/index.html                       |   6 +-
 core/doc/user/pim/sync_ios.html                    |   4 +-
 core/doc/user/pim/sync_kde.html                    |   6 +-
 core/doc/user/pim/sync_osx.html                    |  22 +-
 core/doc/user/pim/sync_thunderbird.html            |  26 +-
 core/doc/user/pim/troubleshooting.html             |   4 +-
 core/doc/user/search.html                          |   2 +
 .../user/{migration.html => userpreferences.html}  |  55 +-
 core/doc/user/webinterface.html                    |  29 +-
 core/js/js.js                                      |  20 +-
 core/js/share.js                                   |  10 +-
 core/l10n/ru_RU.php                                |  21 -
 core/register_command.php                          |   1 +
 core/skeleton/ownCloudUserManual.pdf               | Bin 1393287 -> 1558533 bytes
 core/templates/installation.php                    |   2 +-
 l10n/ru_RU/core.po                                 | 773 ---------------------
 l10n/ru_RU/files.po                                | 411 -----------
 l10n/ru_RU/files_encryption.po                     | 201 ------
 l10n/ru_RU/files_external.po                       | 123 ----
 l10n/ru_RU/files_sharing.po                        |  84 ---
 l10n/ru_RU/files_trashbin.po                       |  60 --
 l10n/ru_RU/files_versions.po                       |  43 --
 l10n/ru_RU/lib.po                                  | 341 ---------
 l10n/ru_RU/settings.po                             | 657 -----------------
 l10n/ru_RU/user_ldap.po                            | 515 --------------
 l10n/ru_RU/user_webdavauth.po                      |  36 -
 lib/base.php                                       |   4 +-
 lib/l10n/ru_RU.php                                 |  12 -
 lib/private/allconfig.php                          |  24 +-
 lib/private/api.php                                |  42 +-
 lib/private/connector/sabre/file.php               |   7 +-
 lib/private/db/mdb2schemareader.php                |   8 +
 lib/private/files.php                              |   7 +-
 lib/private/files/cache/cache.php                  |  22 +-
 lib/private/files/cache/homecache.php              |   2 +-
 lib/private/files/cache/scanner.php                |   2 +-
 lib/private/files/storage/local.php                |   2 +-
 lib/private/files/view.php                         |  13 +
 lib/private/helper.php                             |   6 +-
 lib/private/memcache/apcu.php                      |   2 +-
 lib/private/memcache/xcache.php                    |  36 +-
 lib/private/mimetypes.list.php                     |   3 +-
 lib/private/preview/movies.php                     |   2 +-
 lib/private/preview/office.php                     |   2 +-
 lib/private/request.php                            |  23 +
 lib/private/response.php                           |  14 +
 lib/private/server.php                             |  12 +-
 lib/private/session/internal.php                   |  13 +-
 lib/private/session/memory.php                     |   2 +-
 lib/private/setup.php                              |   3 +
 lib/private/tags.php                               |   2 +-
 lib/private/template.php                           |   3 +-
 lib/private/user.php                               |   2 +
 lib/private/user/backend.php                       |  17 +-
 lib/private/user/database.php                      | 139 ++--
 lib/private/user/dummy.php                         |   9 +
 lib/private/user/manager.php                       |  39 +-
 lib/private/user/session.php                       |  14 +-
 lib/private/user/user.php                          |  50 +-
 lib/private/util.php                               |   8 +-
 lib/public/iconfig.php                             |  15 +-
 lib/public/response.php                            |   9 +
 lib/public/share.php                               |  10 +-
 lib/public/util.php                                |   3 +-
 settings/js/users.js                               |   2 +-
 settings/l10n/ru_RU.php                            |  10 -
 version.php                                        |   8 +-
 256 files changed, 3389 insertions(+), 4489 deletions(-)

diff --cc .htaccess
index 08e2a82,fa6263c..fa6263c
mode 100644,100755..100644
--- a/.htaccess
+++ b/.htaccess
diff --cc apps/activity/js/script.js
index 1b46160,0000000..c2f0db6
mode 100644,000000..100644
--- a/apps/activity/js/script.js
+++ b/apps/activity/js/script.js
@@@ -1,80 -1,0 +1,80 @@@
 +$(function(){
 +
 +	function processElements($elem){
 +		$elem.find('.avatar').each(function(){
 +			var $this = $(this);
 +			$this.avatar($this.data('user'), 32);
 +		});
 +		$elem.find('.tooltip').tipsy({gravity:'s', fade:true});
 +	}
 +
 +	var $container = $('#container');
 +	processElements($container);
 +
 +	$container.imagesLoaded(function(){
 +		$container.find('.boxcontainer').masonry({
 +			itemSelector: '.box',
 +			isAnimated: true
 +		});
 +	});
 +
 +	$container.infinitescroll({
 +			navSelector  : '#page-nav',    // selector for the paged navigation
 +			nextSelector : '#page-nav a',  // selector for the NEXT link (to page 2)
 +			itemSelector : '.group',     // selector for all items you'll retrieve
 +			pixelsFromNavToBottom: 150,
 +			extraScrollPx: 50,
 +			prefill: true,
 +			path : function(page){
 +				return OC.filePath('activity', 'ajax', 'fetch.php') + '?page=' + page;
 +			},
 +			loading: {
 +				finishedMsg: t('activity', 'No more activities to load.'),
 +				msgText: t('activity', 'Loading older activities'),
- 				img: OC.filePath('activity', 'img', 'load-circle.png') 
++				img: OC.filePath('core', 'img', 'loading-small.gif')
 +			}
 +		},
 +		// trigger Masonry as a callback
 +		function( newGroups ) {
 +			// hide new items while they are loading
 +			var $newGroups = $( newGroups );
 +			var $newBoxes;
 +
 +			// check whether first new group has the same date
 +			// as the last group we had before
 +			// If that's the case, we'll merge its boxes into the last group's
 +			// container.
 +			var $firstNewGroup = $newGroups.first();
 +			var $lastGroup = $firstNewGroup.prevAll('.group:first');
 +			var $appendedBoxes;
 +			if ( $lastGroup.data('date') === $firstNewGroup.data('date') ){
 +				// append the boxes
 +				$appendedBoxes = $firstNewGroup.find('.box').addClass('loading');
 +				var $lastBoxContainer = $lastGroup.find('.boxcontainer');
 +
 +				$lastBoxContainer.append($appendedBoxes);
 +				processElements($appendedBoxes);
 +				$lastBoxContainer.masonry('appended', $appendedBoxes, true);
 +				$appendedBoxes.imagesLoaded(function(){
 +					// append the boxes into the last group
 +					$appendedBoxes.toggleClass('loading loaded');
 +				});
 +				// remove from list to process
 +				$newGroups.slice(1);
 +				// discard the ajax-returned header
 +				$firstNewGroup.remove();
 +			}
 +
 +			$newBoxes = $newGroups.find('.box').addClass('loading');
 +
 +			processElements($newBoxes);
 +			$newGroups.find('.boxcontainer').masonry();
 +			// ensure that images load before adding to masonry layout
 +			$newBoxes.imagesLoaded(function(){
 +				// show elems now they're ready
 +				$newBoxes.toggleClass('loading loaded');
 +			});
 +		}
 +	);
 +});
 +
diff --cc apps/contacts/appinfo/migrate.php
index aa50563,0000000..1e1f283
mode 100644,000000..100644
--- a/apps/contacts/appinfo/migrate.php
+++ b/apps/contacts/appinfo/migrate.php
@@@ -1,86 -1,0 +1,86 @@@
 +<?php
 +namespace OCA\Contacts;
 +
- class MigrationProvider extends OC_Migration_Provider{
++class MigrationProvider extends \OC_Migration_Provider{
 +
 +	// Create the xml for the user supplied
 +	function export( ) {
 +		$options = array(
 +			'table'=>'contacts_addressbooks',
 +			'matchcol'=>'userid',
 +			'matchval'=>$this->uid,
 +			'idcol'=>'id'
 +		);
 +		$ids = $this->content->copyRows( $options );
 +
 +		$options = array(
 +			'table'=>'contacts_cards',
 +			'matchcol'=>'addressbookid',
 +			'matchval'=>$ids
 +		);
 +
 +		// Export tags
 +		$ids2 = $this->content->copyRows( $options );
 +
 +		// If both returned some ids then they worked
 +		return (is_array($ids) && is_array($ids2));
 +
 +	}
 +
 +	// Import function for contacts
 +	function import() {
 +		switch($this->appinfo->version) {
 +			default:
 +				// All versions of the app have had the same db structure, so all can use the same import function
 +				$query = $this->content->prepare('SELECT * FROM `contacts_addressbooks` WHERE `userid` = ?');
 +				$results = $query->execute(array($this->olduid));
 +				$idmap = array();
 +				while($row = $results->fetchRow()) {
 +					// Import each addressbook
 +					$addressbookquery = OCP\DB::prepare('INSERT INTO `*PREFIX*contacts_addressbooks` '
 +						. '(`userid`, `displayname`, `uri`, `description`, `ctag`) VALUES (?, ?, ?, ?, ?)');
 +					$addressbookquery->execute(
 +						array(
 +							$this->uid,
 +							$row['displayname'],
 +							$row['uri'],
 +							$row['description'],
 +							$row['ctag']
 +						)
 +					);
 +					// Map the id
 +					$idmap[$row['id']] = OCP\DB::insertid('*PREFIX*contacts_addressbooks');
 +					// Make the addressbook active
 +					OCA\Contacts\Addressbook::setActive($idmap[$row['id']], true);
 +				}
 +				// Now tags
 +				foreach($idmap as $oldid => $newid) {
 +
 +					$query = $this->content->prepare('SELECT * FROM `contacts_cards` WHERE `addressbookid` = ?');
 +					$results = $query->execute(array($oldid));
 +					while($row = $results->fetchRow()) {
 +						// Import the contacts
 +						$contactquery = OCP\DB::prepare('INSERT INTO `*PREFIX*contacts_cards` '
 +							. '(`addressbookid`, `fullname`, `carddata`, `uri`, `lastmodified`) VALUES (?, ?, ?, ?, ?)');
 +						$contactquery->execute(
 +							array(
 +								$newid,
 +								$row['fullname'],
 +								$row['carddata'],
 +								$row['uri'],
 +								$row['lastmodified']
 +							)
 +						);
 +					}
 +				}
 +				// All done!
 +			break;
 +		}
 +
 +		return true;
 +	}
 +
 +}
 +
 +// Load the provider
 +new MigrationProvider('contacts');
diff --cc apps/contacts/js/app.js
index 06fdb79,0000000..5b34b0e
mode 100644,000000..100644
--- a/apps/contacts/js/app.js
+++ b/apps/contacts/js/app.js
@@@ -1,1594 -1,0 +1,1622 @@@
 +Modernizr.load({
 +	test: Modernizr.input.placeholder,
 +	nope: [
 +			OC.filePath('contacts', 'css', 'placeholder_polyfill.min.css'),
 +			OC.filePath('contacts', 'js', 'placeholder_polyfill.jquery.min.combo.js')
 +		]
 +});
 +
 +(function($) {
 +	$.QueryString = (function(a) {
 +		if (a == "") return {};
 +		var b = {};
 +		for (var i = 0; i < a.length; ++i)
 +		{
 +			var p=a[i].split('=');
 +			if (p.length != 2) continue;
 +			b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " "));
 +		}
 +		return b;
 +	})(window.location.search.substr(1).split('&'))
 +})(jQuery);
 +
 +var utils = {};
 +
 +/**
 + * utils.isArray
 + *
 + * Best guess if object is an array.
 + */
 +utils.isArray = function(obj) {
 +     // do an instanceof check first
 +     if (obj instanceof Array) {
 +         return true;
 +     }
 +     // then check for obvious falses
 +     if (typeof obj !== 'object') {
 +         return false;
 +     }
 +     if (utils.type(obj) === 'array') {
 +         return true;
 +     }
 +     return false;
 +};
 +
 +utils.isInt = function(s) {
 +  return typeof s === 'number' && (s.toString().search(/^-?[0-9]+$/) === 0);
 +};
 +
 +utils.isUInt = function(s) {
 +  return typeof s === 'number' && (s.toString().search(/^[0-9]+$/) === 0);
 +};
 +
 +/**
 + * utils.type
 + *
 + * Attempt to ascertain actual object type.
 + */
 +utils.type = function(obj) {
 +    if (obj === null || typeof obj === 'undefined') {
 +        return String (obj);
 +    }
 +    return Object.prototype.toString.call(obj)
 +        .replace(/\[object ([a-zA-Z]+)\]/, '$1').toLowerCase();
 +};
 +
 +utils.moveCursorToEnd = function(el) {
 +	if (typeof el.selectionStart === 'number') {
 +		el.selectionStart = el.selectionEnd = el.value.length;
 +	} else if (typeof el.createTextRange !== 'undefined') {
 +		el.focus();
 +		var range = el.createTextRange();
 +		range.collapse(false);
 +		range.select();
 +	}
 +};
 +
 +Array.prototype.clone = function() {
 +  return this.slice(0);
 +};
 +
 +Array.prototype.clean = function(deleteValue) {
 +	var arr = this.clone();
 +	for (var i = 0; i < arr.length; i++) {
 +		if (arr[i] == deleteValue) {
 +			arr.splice(i, 1);
 +			i--;
 +		}
 +	}
 +	return arr;
 +};
 +
 +// Keep it DRY ;)
 +var wrongKey = function(event) {
 +	return ((event.type === 'keydown' || event.type === 'keypress') 
 +		&& (event.keyCode !== 32 && event.keyCode !== 13));
 +};
 +
 +/**
 + * Simply notifier
 + * Arguments:
 + * @param string message - The text message to show.
 + * @param int timeout - The timeout in seconds before the notification disappears. Default 10.
 + * @param function timeouthandler - A function to run on timeout.
 + * @param function clickhandler - A function to run on click. If a timeouthandler is given it will be cancelled on click.
 + * @param object data - An object that will be passed as argument to the timeouthandler and clickhandler functions.
 + * @param bool cancel - If set cancel all ongoing timer events and hide the notification.
 + */
 +OC.notify = function(params) {
 +	var self = this;
 +	if(!self.notifier) {
 +		self.notifier = $('#notification');
 +		self.notifier.on('click', function() { $(this).fadeOut();});
 +	}
 +	if(params.cancel) {
 +		self.notifier.off('click');
 +		for(var id in self.notifier.data()) {
 +			if($.isNumeric(id)) {
 +				clearTimeout(parseInt(id));
 +			}
 +		}
 +		self.notifier.text('').fadeOut().removeData();
 +	}
 +	if(params.message) {
 +		self.notifier.text(params.message).fadeIn().css('display', 'inline');
 +	}
 +
 +	var timer = setTimeout(function() {
 +		self.notifier.fadeOut();
 +		if(params.timeouthandler && $.isFunction(params.timeouthandler)) {
 +			params.timeouthandler(self.notifier.data(dataid));
 +			self.notifier.off('click');
 +			self.notifier.removeData(dataid);
 +		}
 +	}, params.timeout && $.isNumeric(params.timeout) ? parseInt(params.timeout)*1000 : 10000);
 +	var dataid = timer.toString();
 +	if(params.data) {
 +		self.notifier.data(dataid, params.data);
 +	}
 +	if(params.clickhandler && $.isFunction(params.clickhandler)) {
 +		self.notifier.on('click', function() {
 +			clearTimeout(timer);
 +			self.notifier.off('click');
 +			params.clickhandler(self.notifier.data(dataid));
 +			self.notifier.removeData(dataid);
 +		});
 +	}
 +};
 +
 +
 +OC.Contacts = OC.Contacts || {
 +	init:function() {
 +		if(oc_debug === true) {
 +			$.error = console.error;
 +		}
 +		var self = this;
 +
 +		this.lastSelectedContacts = [];
 +		this.scrollTimeoutMiliSecs = 100;
 +		this.isScrolling = false;
 +		this.cacheElements();
 +		this.storage = new OC.Contacts.Storage();
 +		this.addressBooks = new OC.Contacts.AddressBookList(
 +			this.storage,
 +			$('#app-settings-content'),
 +			$('#addressBookTemplate')
 +		);
 +		this.contacts = new OC.Contacts.ContactList(
 +			this.storage,
 +			this.addressBooks,
 +			this.$contactList,
 +			this.$contactListItemTemplate,
 +			this.$contactDragItemTemplate,
 +			this.$contactFullTemplate,
 +			this.detailTemplates
 +		);
 +		this.groups = new OC.Contacts.GroupList(
 +			this.storage,
 +			this.$groupList,
 +			this.$groupListItemTemplate
 +		);
 +		self.groups.loadGroups(function() {
 +			self.loading(self.$navigation, false);
 +		});
 +		// Hide the list while populating it.
 +		this.$contactList.hide();
 +		$.when(this.addressBooks.loadAddressBooks()).then(function(addressBooks) {
 +			var num = addressBooks.length;
 +			var deferreds = $(addressBooks).map(function(i, elem) {
 +				return self.contacts.loadContacts(this.getBackend(), this.getId(), this.isActive());
 +			});
 +			// This little beauty is from http://stackoverflow.com/a/6162959/373007 ;)
 +			$.when.apply(null, deferreds.get()).then(function(response) {
 +				self.contacts.setSortOrder(contacts_sortby);
 +				self.$contactList.show();
 +				$(document).trigger('status.contacts.loaded', {
 +					numcontacts: self.contacts.length
 +				});
 +				self.loading(self.$rightContent, false);
 +				// TODO: Move this to event handler
 +				self.groups.selectGroup({id:contacts_lastgroup});
 +				var id = $.QueryString['id']; // Keep for backwards compatible links.
 +				if(!id) {
 +					id = window.location.hash.substr(1);
 +				}
 +				console.log('Groups loaded, id from url:', id);
 +				if(id) {
 +					self.openContact(id);
 +				}
 +				if(!contacts_properties_indexed) {
 +					// Wait a couple of mins then check if contacts are indexed.
 +					setTimeout(function() {
 +							$.when($.post(OC.Router.generate('contacts_index_properties')))
 +								.then(function(response) {
 +									if(!response.isIndexed) {
 +										OC.notify({message:t('contacts', 'Indexing contacts'), timeout:20});
 +									}
 +								});
 +					}, 10000);
 +				} else {
 +					console.log('contacts are indexed.');
 +				}
 +			}).fail(function(response) {
 +				console.warn(response);
 +				self.$rightContent.removeClass('loading');
 +				message = t('contacts', 'Unrecoverable error loading address books: {msg}', {msg:response.message});
 +				OC.dialogs.alert(message, t('contacts', 'Error.'));
 +			});
 +		}).fail(function(response) {
 +			console.log(response.message);
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +		$(OC.Tags).on('change', this.groups.categoriesChanged)
 +		this.bindEvents();
 +		this.$toggleAll.show();
 +		this.hideActions();
 +	},
 +	loading:function(obj, state) {
 +		$(obj).toggleClass('loading', state);
 +	},
 +	/**
 +	 * Show/hide elements in the header
 +	 * @param act An array of actions to show based on class name e.g ['add', 'delete']
 +	 */
 +	hideActions:function() {
 +		this.showActions(false);
 +	},
 +	showActions:function(act) {
 +		console.log('showActions', act);
 +		//console.trace();
 +		this.$headeractions.children().hide();
 +		if(act && act.length > 0) {
 +			this.$contactList.addClass('multiselect');
 +			this.$contactListHeader.find('.actions').show();
 +			this.$contactListHeader.find('.info').hide();
 +			this.$headeractions.children('.'+act.join(',.')).show();
 +		} else {
 +			this.$contactListHeader.find('.actions').hide();
 +			this.$contactListHeader.find('.info').show();
 +			this.$contactList.removeClass('multiselect');
 +		}
 +	},
 +	showAction:function(act, show) {
 +		this.$headeractions.find('.' + act).toggle(show);
 +	},
 +	cacheElements: function() {
 +		var self = this;
 +		this.detailTemplates = {};
 +		// Load templates for contact details.
 +		// The weird double loading is because jquery apparently doesn't
 +		// create a searchable object from a script element.
 +		$.each($($('#contactDetailsTemplate').html()), function(idx, node) {
 +			var $node = $(node);
 +			if($node.is('div')) {
 +				var $tmpl = $(node.innerHTML);
 +				self.detailTemplates[$tmpl.data('element')] = $node;
 +			}
 +		});
 +		this.$groupListItemTemplate = $('#groupListItemTemplate');
 +		this.$contactListItemTemplate = $('#contactListItemTemplate');
 +		this.$contactDragItemTemplate = $('#contactDragItemTemplate');
 +		this.$contactFullTemplate = $('#contactFullTemplate');
 +		this.$contactDetailsTemplate = $('#contactDetailsTemplate');
 +		this.$rightContent = $('#app-content');
 +		this.$navigation = $('#app-navigation');
 +		//this.$header = $('#contactsheader');
 +		this.$groupList = $('#grouplist');
 +		this.$contactList = $('#contactlist');
 +		this.$contactListHeader = $('#contactsHeader');
 +		this.$sortOrder = this.$contactListHeader.find('.action.sort');
 +		this.$sortOrder.val(contacts_sortby||'fn');
 +		this.$headeractions = this.$contactListHeader.find('.actions');
 +		this.$toggleAll = this.$contactListHeader.find('.toggle');
 +		this.$groups = this.$headeractions.find('.groups');
 +		this.$ninjahelp = $('#ninjahelp');
 +		this.$firstRun = $('#firstrun');
 +		this.$settings = $('#app-settings');
 +	},
 +	// Build the select to add/remove from groups.
 +	buildGroupSelect: function() {
 +		// If a contact is open we know which categories it's in
 +		if(this.currentid) {
 +			var contact = this.contacts.findById(this.currentid);
 +			if(contact === null) {
 +				return false;
 +			}
 +			this.$groups.find('optgroup,option:not([value="-1"])').remove();
 +			var addopts = '', rmopts = '';
 +			$.each(this.groups.categories, function(i, category) {
 +				if(contact.inGroup(category.name)) {
 +					rmopts += '<option value="' + category.id + '">' + category.name + '</option>';
 +				} else {
 +					addopts += '<option value="' + category.id + '">' + category.name + '</option>';
 +				}
 +			});
 +			if(addopts.length) {
 +				$(addopts).appendTo(this.$groups)
 +				.wrapAll('<optgroup data-action="add" label="' + t('contacts', 'Add to...') + '"/>');
 +			}
 +			if(rmopts.length) {
 +				$(rmopts).appendTo(this.$groups)
 +				.wrapAll('<optgroup data-action="remove" label="' + t('contacts', 'Remove from...') + '"/>');
 +			}
 +		} else if(this.contacts.getSelectedContacts().length > 0) { // Otherwise add all categories to both add and remove
 +			this.$groups.find('optgroup,option:not([value="-1"])').remove();
 +			var addopts = '', rmopts = '';
 +			$.each(this.groups.categories, function(i, category) {
 +				rmopts += '<option value="' + category.id + '">' + category.name + '</option>';
 +				addopts += '<option value="' + category.id + '">' + category.name + '</option>';
 +			});
 +			$(addopts).appendTo(this.$groups)
 +				.wrapAll('<optgroup data-action="add" label="' + t('contacts', 'Add to...') + '"/>');
 +			$(rmopts).appendTo(this.$groups)
 +				.wrapAll('<optgroup data-action="remove" label="' + t('contacts', 'Remove from...') + '"/>');
 +		} else {
 +			// 3rd option: No contact open, none checked, just show "Add group..."
 +			this.$groups.find('optgroup,option:not([value="-1"])').remove();
 +		}
 +		$('<option value="add">' + t('contacts', 'Add group...') + '</option>').appendTo(this.$groups);
 +		this.$groups.val(-1);
 +	},
 +	bindEvents: function() {
 +		var self = this;
 +
 +		// Should fix Opera check for delayed delete.
 +		$(window).unload(function (){
 +			$(window).trigger('beforeunload');
 +		});
 +
 +		this.hashChange = function() {
 +			console.log('hashchange', window.location.hash)
 +			var id = String(window.location.hash.substr(1));
 +			if(id && id != self.currentid && self.contacts.findById(id) !== null) {
 +				self.openContact(id);
 +			} else if(!id && self.currentid) {
 +				self.closeContact(self.currentid);
 +			}
 +		}
 +
 +		// This apparently get's called on some weird occasions.
 +		//$(window).bind('popstate', this.hashChange);
 +		$(window).bind('hashchange', this.hashChange);
 +		
 +		// App specific events
 +		$(document).bind('status.contact.deleted', function(e, data) {
 +			var id = String(data.id);
 +			if(id == self.currentid) {
 +				delete self.currentid;
 +			}
 +			console.log('contact', data.id, 'deleted');
 +			// update counts on group lists
 +			self.groups.removeFromAll(data.id, true, true);
 +		});
 +
 +		$(document).bind('status.contact.added', function(e, data) {
 +			self.currentid = String(data.id);
 +			self.buildGroupSelect();
 +			self.hideActions();
 +		});
 +
 +		// Keep error messaging at one place to be able to replace it.
 +		$(document).bind('status.contacts.error', function(e, data) {
 +			var message = data.message || data;
 +			console.warn(message);
 +			//console.trace();
 +			OC.notify({message:message});
 +		});
 +
 +		$(document).bind('status.contact.enabled', function(e, enabled) {
 +			console.log('status.contact.enabled', enabled);
 +			/*if(enabled) {
 +				self.showActions(['back', 'download', 'delete', 'groups']);
 +			} else {
 +				self.showActions(['back']);
 +			}*/
 +		});
 +
 +		$(document).bind('status.contacts.count', function(e, response) {
 +			console.log('Num contacts:', response.count);
 +			if(response.count > 0) {
 +				self.$contactList.show();
 +				self.$firstRun.hide();
 +			}
 +		});
 +
 +		$(document).bind('status.contacts.loaded status.contacts.deleted', function(e, response) {
 +			console.log('status.contacts.loaded', response);
 +			if(response.error) {
 +				$(document).trigger('status.contacts.error', response);
 +				console.log('Error loading contacts!');
 +			} else {
 +				if(response.numcontacts === 0) {
 +					self.$contactListHeader.hide();
 +					self.$contactList.hide();
 +					self.$firstRun.show();
 +				} else {
 +					self.$contactListHeader.show();
 +					self.$contactList.show();
 +					self.$firstRun.hide();
 +				$.each(self.addressBooks.addressBooks, function(idx, addressBook) {
 +					console.log('addressBook', addressBook);
 +					if(!addressBook.isActive()) {
 +						self.contacts.showFromAddressbook(addressBook.getId(), false);
 +					}
 +				});
 +				}
 +			}
 +		});
 +
 +		$(document).bind('status.contact.currentlistitem', function(e, result) {
 +			//console.log('status.contact.currentlistitem', result, self.$rightContent.height());
 +			if(self.dontScroll !== true) {
 +				if(result.pos > self.$rightContent.height()) {
 +					self.$rightContent.scrollTop(result.pos - self.$rightContent.height() + result.height);
 +				}
 +				else if(result.pos < self.$rightContent.offset().top) {
 +					self.$rightContent.scrollTop(result.pos);
 +				}
 +			} else {
 +				setTimeout(function() {
 +					self.dontScroll = false;
 +				}, 100);
 +			}
 +			self.currentlistid = result.id;
 +		});
 +
 +		$(document).bind('status.nomorecontacts', function(e, result) {
 +			console.log('status.nomorecontacts', result);
 +			self.$contactList.hide();
 +			self.$firstRun.show();
 +		});
 +
 +		$(document).bind('status.visiblecontacts', function(e, result) {
 +			console.log('status.visiblecontacts', result);
 +			// TODO: To be decided.
 +		});
 +
 +		$(document).bind('request.openurl', function(e, data) {
 +			switch(data.type) {
 +				case 'url':
 +					var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!-\/]))?/;
 +					//if(new RegExp("[a-zA-Z0-9]+://([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?").test(data.url)) {
 +					if(regexp.test(data.url)) {
 +						var newWindow = window.open(data.url,'_blank');
 +						newWindow.focus();
 +					} else {
 +						$(document).trigger('status.contacts.error', {
 +							error: true,
 +							message: t('contacts', 'Invalid URL: "{url}"', {url:data.url})
 +						});
 +					}
 +					break;
 +				case 'email':
 +					var regexp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 +					if(regexp.test(data.url)) {
 +						console.log('success');
 +						try {
 +							window.location = 'mailto:' + data.url;
 +						} catch(e) {
 +							alert(t('contacts', 'There was an error opening a mail composer.'));
 +						}
 +					} else {
 +						$(document).trigger('status.contacts.error', {
 +							error: true,
 +							message: t('contacts', 'Invalid email: "{url}"', {url:data.url})
 +						});
 +					}
 +					break;
 +			}
 +		});
 +
 +		// A contact id was in the request
 +		$(document).bind('request.loadcontact', function(e, result) {
 +			console.log('request.loadcontact', result);
 +			if(self.numcontacts) {
 +				self.openContact(result.id);
 +			} else {
 +				// Contacts are not loaded yet, try again.
 +				console.log('waiting for contacts to load');
 +				setTimeout(function() {
 +					$(document).trigger('request.loadcontact', {
 +						id: result.id
 +					});
 +				}, 1000);
 +			}
 +		});
 +
 +		$(document).bind('request.contact.move', function(e, data) {
 +			console.log('contact', data, 'request.contact.move');
 +			var from = self.addressBooks.find(data.from);
 +			var to = self.addressBooks.find(data.target);
 +			self.addressBooks.moveContact(data.contact, data.from, data.target);
 +		});
 +
 +		$(document).bind('request.contact.setasfavorite', function(e, data) {
 +			console.log('contact', data.id, 'request.contact.setasfavorite');
 +			self.groups.setAsFavorite(data.id, data.state);
 +		});
 +
 +		$(document).bind('request.contact.addtogroup', function(e, data) {
 +			self.groups.addTo(data.id, data.groupid, function(response) {
 +				console.log('contact', data.id, 'request.contact.addtogroup', response);
 +			});
 +		});
 +
 +		$(document).bind('request.contact.removefromgroup', function(e, data) {
 +			console.log('contact', data.id, 'request.contact.removefromgroup');
 +			self.groups.removeFrom(data.id, data.groupid);
 +		});
 +
 +		$(document).bind('request.contact.export', function(e, data) {
 +			console.log('request.contact.export', data);
 +			document.location.href = OC.Router.generate('contacts_contact_export', data);
 +		});
 +
 +		$(document).bind('request.contact.close', function(e, data) {
 +			var id = String(data.id);
 +			console.log('contact', data.id, 'request.contact.close');
 +			self.closeContact(id);
 +		});
 +
 +		$(document).bind('request.contact.open', function(e, data) {
 +			var id = String(data.id);
 +			console.log('contact', data.id, 'request.contact.open');
 +			self.openContact(id);
 +		});
 +
 +		$(document).bind('request.contact.delete', function(e, data) {
 +			var id = String(data.contactId);
 +			console.log('contact', data, 'request.contact.delete');
 +			self.closeContact(id);
 +			self.contacts.delayedDelete(data);
 +			self.$contactList.removeClass('dim');
 +			self.hideActions();
 +		});
 +
 +		$(document).bind('request.contact.merge', function(e, data) {
 +			console.log('contact','request.contact.merge', data);
 +			var merger = self.contacts.findById(data.merger);
 +			var mergees = [];
 +			if(!merger) {
 +				$(document).trigger('status.contacts.error', {
 +					message: t('contacts', 'Merge failed. Cannot find contact: {id}', {id:data.merger})
 +				});
 +				return;
 +			}
 +			$.each(data.mergees, function(idx, id) {
 +				var contact = self.contacts.findById(id);
 +				if(!contact) {
 +					console.warn('cannot find', id, 'by id');
 +				}
 +				mergees.push(contact);
 +			});
 +			if(!merger.merge(mergees)) {
 +				$(document).trigger('status.contacts.error', {
 +					message: t('contacts', 'Merge failed.')
 +				});
 +				return;
 +			}
 +			merger.saveAll(function(response) {
 +				if(response.error) {
 +					$(document).trigger('status.contacts.error', {
 +						message: t('contacts', 'Merge failed. Error saving contact.')
 +					});
 +					return;
 +				} else {
 +					if(data.deleteOther) {
 +						self.contacts.delayedDelete(mergees);
 +					}
 +					console.log('merger', merger);
 +					self.openContact(merger.getId());
 +				}
 +			});
 +		});
 +
 +		$(document).bind('request.select.contactphoto.fromlocal', function(e, metadata) {
 +			console.log('request.select.contactphoto.fromlocal', metadata);
 +			$('#contactphoto_fileupload').trigger('click', metadata);
 +		});
 +
 +		$(document).bind('request.select.contactphoto.fromcloud', function(e, metadata) {
 +			console.log('request.select.contactphoto.fromcloud', metadata);
 +			OC.dialogs.filepicker(t('contacts', 'Select photo'), function(path) {
 +				self.cloudPhotoSelected(metadata, path);
 +			}, false, 'image', true);
 +		});
 +
 +		$(document).bind('request.edit.contactphoto', function(e, metadata) {
 +			console.log('request.edit.contactphoto', metadata);
 +			self.editCurrentPhoto(metadata);
 +		});
 +
 +		$(document).bind('request.groups.reload', function(e, result) {
 +			console.log('request.groups.reload', result);
 +			self.groups.loadGroups(function() {
 +				self.groups.triggerLastGroup();
 +			});
 +		});
 +
 +		$(document).bind('status.group.groupremoved', function(e, result) {
 +			console.log('status.group.groupremoved', result);
 +			if(parseInt(result.groupid) === parseInt(self.currentgroup)) {
 +				self.contacts.showContacts([]);
 +				self.currentgroup = 'all';
 +			}
 +			$.each(result.contacts, function(idx, contactid) {
 +				var contact = self.contacts.findById(contactid);
 +
 +				contact.removeFromGroup(result.groupname);
 +			});
 +		});
 +
 +		$(document).bind('status.group.grouprenamed', function(e, result) {
 +			console.log('status.group.grouprenamed', result);
 +			$.each(result.contacts, function(idx, contactid) {
 +				var contact = self.contacts.findById(contactid);
 +				if(!contact) {
 +					console.warn('Couldn\'t find contact', contactid)
 +					return true; // continue
 +				}
 +				contact.renameGroup(result.from, result.to);
 +			});
 +		});
 +
 +		$(document).bind('status.group.contactremoved', function(e, result) {
 +			console.log('status.group.contactremoved', result, self.currentgroup, result.groupid);
 +			var contact = self.contacts.findById(result.contactid);
 +			if(contact) {
 +				if(contact.inGroup(result.groupname)) {
 +					contact.removeFromGroup(result.groupname);
 +				}
 +				if(parseInt(self.currentgroup) === parseInt(result.groupid)) {
 +					console.log('Hiding', contact.getId());
 +					contact.hide();
 +				}
 +			}
 +		});
 +
 +		$(document).bind('status.group.contactadded', function(e, result) {
 +			console.log('status.group.contactadded', result);
 +			var contact = self.contacts.findById(result.contactid);
 +			if(contact) {
 +				if(!contact.inGroup(result.groupname)) {
 +					contact.addToGroup(result.groupname);
 +				}
 +				if(parseInt(self.currentgroup) === parseInt(result.groupid)) {
 +					console.log('Showing', contact.getId());
 +					contact.show();
 +				}
 +			}
 +		});
 +
 +		// Group sorted, save the sort order
 +		$(document).bind('status.groups.sorted', function(e, result) {
 +			console.log('status.groups.sorted', result);
 +			$.when(self.storage.setPreference('groupsort', result.sortorder)).then(function(response) {
 +				if(response.error) {
 +					$(document).trigger('status.contacts.error', {
 +						message: response ? response.message : t('contacts', 'Network or server error. Please inform administrator.')
 +					});
 +				}
 +			})
 +			.fail(function(response) {
 +				console.log(response.message);
 +				$(document).trigger('status.contacts.error', response);
 +				done = true;
 +			});
 +		});
 +		// Group selected, only show contacts from that group
 +		$(document).bind('status.group.selected', function(e, result) {
 +			console.log('status.group.selected', result);
 +			self.currentgroup = result.id;
 +			// Close any open contact.
 +			if(self.currentid) {
 +				var id = self.currentid;
 +				self.closeContact(id);
 +				self.jumpToContact(id);
 +			}
 +			self.$contactList.show();
 +			self.$toggleAll.show();
 +			self.hideActions();
 +			if(result.type === 'category' ||  result.type === 'fav') {
 +				self.contacts.showContacts(result.contacts);
 +			} else if(result.type === 'shared') {
 +				self.contacts.showFromAddressbook(self.currentgroup, true, true);
 +			} else if(result.type === 'uncategorized') {
 +				self.contacts.showUncategorized();
 +			} else {
 +				self.contacts.showContacts(self.currentgroup);
 +			}
 +			$.when(self.storage.setPreference('lastgroup', self.currentgroup)).then(function(response) {
 +				if(response.error) {
 +					$(document).trigger('status.contacts.error', response);
 +				}
 +			})
 +			.fail(function(response) {
 +				console.log(response.message);
 +				$(document).trigger('status.contacts.error', response);
 +				done = true;
 +			});
 +			self.$rightContent.scrollTop(0);
 +		});
 +		// mark items whose title was hid under the top edge as read
 +		/*this.$rightContent.scroll(function() {
 +			// prevent too many scroll requests;
 +			if(!self.isScrolling) {
 +				self.isScrolling = true;
 +				var num = self.$contactList.find('tr').length;
 +				//console.log('num', num);
 +				var offset = self.$contactList.find('tr:eq(' + (num-20) + ')').offset().top;
 +				if(offset < self.$rightContent.height()) {
 +					console.log('load more');
 +					self.contacts.loadContacts(num, function() {
 +						self.isScrolling = false;
 +					});
 +				} else {
 +					setTimeout(function() {
 +						self.isScrolling = false;
 +					}, self.scrollTimeoutMiliSecs);
 +				}
 +				//console.log('scroll, unseen:', offset, self.$rightContent.height());
 +			}
 +		});*/
 +		$('#contactphoto_fileupload').on('click', function(event, metadata) {
 +			var form = $('#file_upload_form');
 +			var url = OC.Router.generate(
 +				'contacts_upload_contact_photo',
 +				{backend: metadata.backend, addressBookId: metadata.addressBookId, contactId: metadata.contactId}
 +			);
 +			form.attr('action', url);
 +		}).on('change', function() {
 +			console.log('#contactphoto_fileupload, change');
 +			self.uploadPhoto(this.files);
 +		});
 +
 +		var target = $('#file_upload_target');
 +		target.load(function() {
 +			var response = $.parseJSON(target.contents().text());
 +			if(response && response.status == 'success') {
 +				console.log('response', response);
 +				self.editPhoto(
 +					response.data.metadata,
 +					response.data.tmp
 +				);
 +				//alert('File: ' + file.tmp + ' ' + file.name + ' ' + file.mime);
 +			} else if(response) {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		});
 +
 +		this.$ninjahelp.find('.close').on('click keydown',function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			self.$ninjahelp.hide();
 +		});
 +
 +		this.$toggleAll.on('change', function(event) {
 +			event.stopPropagation();
 +			event.preventDefault();
 +			var isChecked = $(this).is(':checked');
 +			self.setAllChecked(isChecked);
 +			if(self.$groups.find('option').length === 1) {
 +				self.buildGroupSelect();
 +			}
 +			if(isChecked) {
 +				self.showActions(['toggle', 'add', 'download', 'groups', 'delete', 'favorite', 'merge']);
 +			} else {
 +				self.hideActions();
 +			}
 +		});
 +
 +		this.$contactList.on('change', 'input:checkbox', function(event) {
 +			var selected = self.contacts.getSelectedContacts();
 +			var id = String($(this).val());
 +			// Save list of last selected contact to be able to select range
 +			($(this).is(':checked') && self.lastSelectedContacts.indexOf(id) === -1)
 +				? self.lastSelectedContacts.push(id)
 +				: self.lastSelectedContacts.splice(self.lastSelectedContacts.indexOf(id), 1);
 +
 +			if(selected.length > 0 && self.$groups.find('option').length === 1) {
 +				self.buildGroupSelect();
 +			}
 +			if(selected.length === 0) {
 +				self.hideActions();
 +			} else if(selected.length === 1) {
 +				self.showActions(['toggle', 'add', 'download', 'groups', 'delete', 'favorite']);
 +			} else {
 +				self.showActions(['toggle', 'add', 'download', 'groups', 'delete', 'favorite', 'merge']);
 +			}
 +		});
 +
 +		this.$sortOrder.on('change', function() {
 +			$(this).blur().addClass('loading');
 +			contacts_sortby = $(this).val();
 +			self.contacts.setSortOrder();
 +			$(this).removeClass('loading');
 +			self.storage.setPreference('sortby', contacts_sortby);
 +		});
 +
 +		// Add to/remove from group multiple contacts.
 +		this.$groups.on('change', function() {
 +			var $opt = $(this).find('option:selected');
 +			var action = $opt.parent().data('action');
 +			var groupName, groupId, buildnow = false;
 +
 +			var contacts = self.contacts.getSelectedContacts();
 +			var ids = $.map(contacts, function(c) {return c.getId();});
 +
 +			self.setAllChecked(false);
 +			self.$toggleAll.prop('checked', false);
 +			if(!self.currentid) {
 +				self.hideActions();
 +			}
 +
 +			if($opt.val() === 'add') { // Add new group
 +				action = 'add';
 +				console.log('add group...');
 +				self.$groups.val(-1);
 +				self.addGroup(function(response) {
 +					if(!response.error) {
 +						groupId = response.id;
 +						groupName = response.name;
 +						self.groups.addTo(ids, groupId, function(result) {
 +							if(!result.error) {
 +								$.each(ids, function(idx, id) {
 +									// Delay each contact to not trigger too many ajax calls
 +									// at a time.
 +									setTimeout(function() {
 +										var contact = self.contacts.findById(id);
 +										if(contact === null) {
 +											return true;
 +										}
 +										contact.addToGroup(groupName);
 +										// I don't think this is used...
 +										if(buildnow) {
 +											self.buildGroupSelect();
 +										}
 +									}, 1000);
 +								});
 +							} else {
 +								$(document).trigger('status.contacts.error', result);
 +							}
 +						});
 +					} else {
 +						$(document).trigger('status.contacts.error', response);
 +					}
 +				});
 +				return;
 +			}
 +
 +			groupName = $opt.text(), groupId = $opt.val();
 +
 +			if(action === 'add') {
 +				self.groups.addTo(ids, $opt.val(), function(result) {
 +					console.log('after add', result);
 +					if(!result.error) {
 +						$.each(result.ids, function(idx, id) {
 +							// Delay each contact to not trigger too many ajax calls
 +							// at a time.
 +							setTimeout(function() {
 +								console.log('adding', id, 'to', groupName);
 +								var contact = self.contacts.findById(id);
 +								if(contact === null) {
 +									return true;
 +								}
 +								contact.addToGroup(groupName);
 +								// I don't think this is used...
 +								if(buildnow) {
 +									self.buildGroupSelect();
 +								}
 +							}, 1000);
 +						});
 +					} else {
 +						var msg = result.message ? result.message : t('contacts', 'Error adding to group.');
 +						$(document).trigger('status.contacts.error', {message:msg});
 +					}
 +				});
 +				if(!buildnow) {
 +					self.$groups.val(-1).hide().find('optgroup,option:not([value="-1"])').remove();
 +				}
 +			} else if(action === 'remove') {
 +				self.groups.removeFrom(ids, $opt.val(), false, function(result) {
 +					console.log('after remove', result);
 +					if(!result.error) {
 +						var groupname = $opt.text(), groupid = $opt.val();
 +						$.each(result.ids, function(idx, id) {
 +							var contact = self.contacts.findById(id);
 +							if(contact === null) {
 +								return true;
 +							}
 +							contact.removeFromGroup(groupname);
 +							if(buildnow) {
 +								self.buildGroupSelect();
 +							}
 +						});
 +					} else {
 +						var msg = result.message ? result.message : t('contacts', 'Error removing from group.');
 +						$(document).trigger('status.contacts.error', {message:msg});
 +					}
 +				});
 +				if(!buildnow) {
 +					self.$groups.val(-1).hide().find('optgroup,option:not([value="-1"])').remove();
 +				}
 +			} // else something's wrong ;)
 +			self.setAllChecked(false);
 +		});
 +
 +		this.$contactList.on('mouseenter', 'tr.contact', function(event) {
 +			var $td = $(this).find('td').filter(':visible').last();
 +			$('<a />').addClass('svg delete action').appendTo($td);
 +		});
 +
 +		this.$contactList.on('mouseleave', 'tr.contact', function(event) {
 +			$(this).find('a.delete').remove();
 +		});
 +
 +		// Prevent Firefox from selecting the table-cell
 +		this.$contactList.mousedown(function (event) {
 +			if (event.ctrlKey || event.metaKey || event.shiftKey) {
 +				event.preventDefault();
 +			}
 +		});
 +
 +		// Contact list. Either open a contact or perform an action (mailto etc.)
 +		this.$contactList.on('click', 'tr.contact', function(event) {
 +			if($(event.target).is('input')) {
 +				return;
 +			}
 +			// Select a single contact or a range of contacts.
 +			if(event.ctrlKey || event.metaKey || event.shiftKey) {
 +				event.stopPropagation();
 +				event.preventDefault();
 +				self.dontScroll = true;
 +				var $input = $(this).find('input:checkbox');
 +				var index = self.$contactList.find('tr.contact:visible').index($(this));
 +				if(event.shiftKey && self.lastSelectedContacts.length > 0) {
 +					self.contacts.selectRange(
 +						$(this).data('id'),
 +						self.lastSelectedContacts[self.lastSelectedContacts.length-1]
 +					);
 +				} else {
 +					self.contacts.setSelected($(this).data('id'), !$input.prop('checked'));
 +				}
 +				return;
 +			}
 +			if($(event.target).is('a.mailto')) {
 +				$(document).trigger('request.openurl', {
 +					type: 'email',
 +					url: $.trim($(this).find('.email').text())
 +				});
 +				return;
 +			}
 +			if($(event.target).is('a.delete')) {
 +				$(document).trigger('request.contact.delete', {
 +					contactId: $(this).data('id')
 +				});
 +				return;
 +			}
 +			self.openContact(String($(this).data('id')));
 +		});
 +
 +		this.$settings.find('#app-settings-header').on('click keydown',function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			var bodyListener = function(e) {
 +				if(self.$settings.find($(e.target)).length == 0) {
 +					self.$settings.switchClass('open', '');
 +				}
 +			};
 +			if(self.$settings.hasClass('open')) {
 +				self.$settings.switchClass('open', '');
 +				$('body').unbind('click', bodyListener);
 +			} else {
 +				self.$settings.switchClass('', 'open');
 +				$('body').bind('click', bodyListener);
 +			}
 +		});
 +
 +		var addContact = function() {
 +			console.log('add');
 +			self.$toggleAll.hide();
 +			if(self.currentid) {
 +				if(self.currentid === 'new') {
 +					return;
 +				} else {
 +					var contact = self.contacts.findById(self.currentid);
 +					if(contact) {
 +						contact.close();
 +					}
 +				}
 +			}
 +			self.currentid = 'new';
 +			// Properties that the contact doesn't know
 +			console.log('addContact, groupid', self.currentgroup);
 +			var groupprops = {
 +				favorite: false,
 +				groups: self.groups.categories,
 +				currentgroup: {id:self.currentgroup, name:self.groups.nameById(self.currentgroup)}
 +			};
 +			self.$firstRun.hide();
 +			self.$contactList.show();
 +			self.tmpcontact = self.contacts.addContact(groupprops);
 +			self.tmpcontact.prependTo(self.$contactList.find('tbody')).show().find('.fullname').focus();
 +			self.$rightContent.scrollTop(0);
 +			self.hideActions();
 +		};
 +
 +		this.$firstRun.on('click keydown', '.import', function(event) {
 +			event.preventDefault();
 +			event.stopPropagation();
 +			self.$settings.find('.settings').click();
 +		});
 +
 +		this.$firstRun.on('click keydown', '.add-contact', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			addContact();
 +		});
 +
 +		this.$groupList.on('click keydown', '.add-contact', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			addContact();
 +		});
 +
 +		this.$contactListHeader.on('click keydown', '.delete', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			console.log('delete');
 +			if(self.currentid) {
 +				console.assert(typeof self.currentid === 'string', 'self.currentid is not a string');
 +				contactInfo = self.contacts[self.currentid].metaData();
 +				self.contacts.delayedDelete(contactInfo);
 +			} else {
 +				self.contacts.delayedDelete(self.contacts.getSelectedContacts());
 +			}
 +			self.hideActions();
 +		});
 +
 +		this.$contactListHeader.on('click keydown', '.download', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
- 			console.log('download');
++
++			var doDownload = function(contacts) {
++				// Only get backend, addressbookid and contactid
++				contacts = $.map(contacts, function(c) {return c.metaData();});
++				var targets = {};
++				// Try to shorten request URI
++				$.each(contacts, function(idx, contact) {
++					if(!targets[contact.backend]) {
++						targets[contact.backend] = {};
++					}
++					if(!targets[contact.backend][contact.addressBookId]) {
++						targets[contact.backend][contact.addressBookId] = [];
++					}
++					targets[contact.backend][contact.addressBookId].push(contact.contactId);
++				});
++				var url = OC.Router.generate('contacts_export_selected', {t:targets});
++				//console.log('export url', url);
++				document.location.href = url;
++			};
 +			var contacts = self.contacts.getSelectedContacts();
- 			// Only get backend, addressbookid and contactid
- 			contacts = $.map(contacts, function(c) {return c.metaData();});
- 			var url = OC.Router.generate('contacts_export_selected', {contacts:contacts});
- 			console.log('export url', url);
- 			document.location.href = url;
++			console.log('download', contacts.length);
++
++			// The 300 is just based on my little testing with Apache2
++			// Other web servers may fail before.
++			if(contacts.length > 300) {
++				OC.notify({
++					message:t('contacts',"You have selected over 300 contacts.\nThis will most likely fail! Click here to try anyway."),
++					timeout:5,
++					clickhandler:function() {
++						doDownload(contacts);
++					}
++				});
++			} else {
++				doDownload(contacts);
++			}
 +		});
 +
 +		this.$contactListHeader.on('click keydown', '.merge', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			console.log('merge');
 +			self.mergeSelectedContacts();
 +		});
 +
 +		this.$contactListHeader.on('click keydown', '.favorite', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +
 +			var contacts = self.contacts.getSelectedContacts();
 +
 +			self.setAllChecked(false);
 +			self.$toggleAll.prop('checked', false);
 +			if(!self.currentid) {
 +				self.hideActions();
 +			}
 +
 +			$.each(contacts, function(idx, contact) {
 +				if(!self.groups.isFavorite(contact.getId())) {
 +					self.groups.setAsFavorite(contact.getId(), true, function(result) {
 +						if(result.status !== 'success') {
 +							$(document).trigger('status.contacts.error', {message:
 +								t('contacts',
 +									'Error setting {name} as favorite.',
 +									{name:contact.getDisplayName()})
 +							});
 +						}
 +					});
 +				}
 +			});
 +
 +			self.hideActions();
 +		});
 +
 +		this.$contactList.on('mouseenter', 'td.email', function(event) {
 +			if($.trim($(this).text()).length > 3) {
 +				$(this).find('.mailto').css('display', 'inline-block'); //.fadeIn(100);
 +			}
 +		});
 +		this.$contactList.on('mouseleave', 'td.email', function(event) {
 +			$(this).find('.mailto').fadeOut(100);
 +		});
 +
 +		$('body').on('touchmove', function(event) {
 +			event.preventDefault();
 +		});
 +		
 +		$(document).on('keyup', function(event) {
 +			if(!$(event.target).is('body') || event.isPropagationStopped()) {
 +				return;
 +			}
 +			var keyCode = Math.max(event.keyCode, event.which);
 +			// TODO: This should go in separate method
 +			console.log(event, keyCode + ' ' + event.target.nodeName);
 +			/**
 +			* To add:
 +			* Shift-a: add addressbook
 +			* u (85): hide/show leftcontent
 +			* f (70): add field
 +			*/
 +			switch(keyCode) {
 +				case 13: // Enter?
 +					console.log('Enter?');
 +					if(!self.currentid && self.currentlistid) {
 +						self.openContact(self.currentlistid);
 +					}
 +					break;
 +				case 27: // Esc
 +					if(self.$ninjahelp.is(':visible')) {
 +						self.$ninjahelp.hide();
 +					} else if(self.currentid) {
 +						self.closeContact(self.currentid);
 +					}
 +					break;
 +				case 46: // Delete
 +					if(event.shiftKey) {
 +						self.contacts.delayedDelete(self.currentid);
 +					}
 +					break;
 +				case 40: // down
 +				case 74: // j
 +					console.log('next');
 +					if(!self.currentid && self.currentlistid) {
 +						self.contacts.contacts[self.currentlistid].next();
 +					}
 +					break;
 +				case 65: // a
 +					if(event.shiftKey) {
 +						console.log('add group?');
 +						break;
 +					}
 +					self.addContact();
 +					break;
 +				case 38: // up
 +				case 75: // k
 +					console.log('previous');
 +					if(!self.currentid && self.currentlistid) {
 +						self.contacts.contacts[self.currentlistid].prev();
 +					}
 +					break;
 +				case 34: // PageDown
 +				case 78: // n
 +					console.log('page down');
 +					break;
 +				case 79: // o
 +					console.log('open contact?');
 +					break;
 +				case 33: // PageUp
 +				case 80: // p
 +					// prev addressbook
 +					//OC.contacts.contacts.previousAddressbook();
 +					break;
 +				case 82: // r
 +					console.log('refresh - what?');
 +					break;
 +				case 63: // ? German.
 +					if(event.shiftKey) {
 +						self.$ninjahelp.toggle('fast');
 +					}
 +					break;
 +				case 171: // ? Danish
 +				case 191: // ? Standard qwerty
 +					self.$ninjahelp.toggle('fast').position({my: "center",at: "center",of: "#content"});
 +					break;
 +			}
 +
 +		});
 +
 +		// find all with a title attribute and tipsy them
 +		$('.tooltipped.downwards:not(.onfocus)').tipsy({gravity: 'n'});
 +		$('.tooltipped.upwards:not(.onfocus)').tipsy({gravity: 's'});
 +		$('.tooltipped.rightwards:not(.onfocus)').tipsy({gravity: 'w'});
 +		$('.tooltipped.leftwards:not(.onfocus)').tipsy({gravity: 'e'});
 +		$('.tooltipped.downwards.onfocus').tipsy({trigger: 'focus', gravity: 'n'});
 +		$('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'});
 +	},
 +	mergeSelectedContacts: function() {
 +		var contacts = this.contacts.getSelectedContacts();
 +		var self = this;
 +		this.$rightContent.append('<div id="merge_contacts_dialog"></div>');
 +		if(!this.$mergeContactsTmpl) {
 +			this.$mergeContactsTmpl = $('#mergeContactsTemplate');
 +		}
 +		var $dlg = this.$mergeContactsTmpl.octemplate();
 +		var $liTmpl = $dlg.find('li').detach();
 +		var $mergeList = $dlg.find('.mergelist');
 +		$.each(contacts, function(idx, contact) {
 +			var $li = $liTmpl
 +				.octemplate({idx: idx, id: contact.getId(), displayname: contact.getDisplayName()});
 +			if(!contact.data.thumbnail) {
 +				$li.addClass('thumbnail');
 +			} else {
 +				$li.css('background-image', 'url(data:image/png;base64,' + contact.data.thumbnail + ')');
 +			}
 +			if(idx === 0) {
 +				$li.find('input:radio').prop('checked', true);
 +			}
 +			$mergeList.append($li);
 +		});
 +		$('#merge_contacts_dialog').html($dlg).ocdialog({
 +			modal: true,
 +			closeOnEscape: true,
 +			title:  t('contacts', 'Merge contacts'),
 +			height: 'auto', width: 'auto',
 +			buttons: [
 +				{
 +					text: t('contacts', 'Merge contacts'),
 +					click:function() {
 +						// Do the merging, use $(this) to get dialog
 +						var contactid = $(this).find('input:radio:checked').val();
 +						var others = [];
 +						var deleteOther = $(this).find('#delete_other').prop('checked');
 +						console.log('Selected contact', contactid, 'Delete others', deleteOther);
 +						$.each($(this).find('input:radio:not(:checked)'), function(idx, item) {
 +							others.push($(item).val());
 +						});
 +						console.log('others', others);
 +						$(document).trigger('request.contact.merge', {
 +							merger: contactid,
 +							mergees: others,
 +							deleteOther: deleteOther
 +						});
 +
 +						$(this).ocdialog('close');
 +					},
 +					defaultButton: true
 +				},
 +				{
 +					text: t('contacts', 'Cancel'),
 +					click:function(dlg) {
 +						$(this).ocdialog('close');
 +						return false;
 +					}
 +				}
 +			],
 +			close: function(event, ui) {
 +				$(this).ocdialog('destroy').remove();
 +				$('#add_group_dialog').remove();
 +			},
 +			open: function(event, ui) {
 +				$dlg.find('input').focus();
 +			}
 +		});
 +	},
 +	addGroup: function(cb) {
 +		var self = this;
 +		this.$rightContent.append('<div id="add_group_dialog"></div>');
 +		if(!this.$addGroupTmpl) {
 +			this.$addGroupTmpl = $('#addGroupTemplate');
 +		}
 +		this.$contactList.addClass('dim');
 +		var $dlg = this.$addGroupTmpl.octemplate();
 +		$('#add_group_dialog').html($dlg).ocdialog({
 +			modal: true,
 +			closeOnEscape: true,
 +			title:  t('contacts', 'Add group'),
 +			height: 'auto', width: 'auto',
 +			buttons: [
 +				{
 +					text: t('contacts', 'OK'),
 +					click:function() {
 +						var name = $(this).find('input').val();
 +						if(name.trim() === '') {
 +							return false;
 +						}
 +						self.groups.addGroup(
 +							{name:$dlg.find('input:text').val()},
 +							function(response) {
 +								if(typeof cb === 'function') {
 +									cb(response);
 +								} else {
 +									if(response.error) {
 +										$(document).trigger('status.contacts.error', response);
 +									}
 +								}
 +							});
 +						$(this).ocdialog('close');
 +					},
 +					defaultButton: true
 +				},
 +				{
 +					text: t('contacts', 'Cancel'),
 +					click:function(dlg) {
 +						$(this).ocdialog('close');
 +						return false;
 +					}
 +				}
 +			],
 +			close: function(event, ui) {
 +				$(this).ocdialog('destroy').remove();
 +				$('#add_group_dialog').remove();
 +				self.$contactList.removeClass('dim');
 +			},
 +			open: function(event, ui) {
 +				$dlg.find('input').focus();
 +			}
 +		});
 +	},
 +	setAllChecked: function(checked) {
 +		var selector = checked ? 'input:checkbox:visible:not(checked)' : 'input:checkbox:visible:checked';
 +		$.each(this.$contactList.find(selector), function() {
 +			$(this).prop('checked', checked);
 +		});
 +		this.lastSelectedContacts = [];
 +	},
 +	jumpToContact: function(id) {
 +		this.$rightContent.scrollTop(this.contacts.contactPos(id)-30);
 +	},
 +	closeContact: function(id) {
 +		$(window).unbind('hashchange', this.hashChange);
 +		if(this.currentid === 'new') {
 +			this.tmpcontact.slideUp().remove();
 +			this.$contactList.show();
 +		} else {
 +			var contact = this.contacts.findById(id);
 +			if(contact) {
 +				contact.close();
 +			}
 +		}
 +		delete this.currentid;
 +		this.hideActions();
 +		this.$groups.find('optgroup,option:not([value="-1"])').remove();
 +		if(this.contacts.length === 0) {
 +			$(document).trigger('status.nomorecontacts');
 +		}
 +		window.location.hash = '';
 +		$(window).bind('hashchange', this.hashChange);
 +	},
 +	openContact: function(id) {
 +		var self = this;
 +		if(typeof id == 'undefined' || id == 'undefined') {
 +			console.warn('id is undefined!');
 +			console.trace();
 +		}
 +		this.hideActions();
 +		console.log('Contacts.openContact', id, typeof id);
 +		if(this.currentid && this.currentid !== id) {
 +			this.contacts.closeContact(this.currentid);
 +		}
 +		$(window).unbind('hashchange', this.hashChange);
 +		this.currentid = id;
 +		this.setAllChecked(false);
 +		console.assert(typeof this.currentid === 'string', 'Current ID not string');
 +		// Properties that the contact doesn't know
 +		var groupprops = {
 +			favorite: this.groups.isFavorite(this.currentid),
 +			groups: this.groups.categories,
 +			currentgroup: {id:this.currentgroup, name:this.groups.nameById(this.currentgroup)}
 +		};
 +		var contact = this.contacts.findById(this.currentid);
 +		if(!contact) {
 +			console.warn('Error opening', this.currentid);
 +			$(document).trigger('status.contacts.error', {
 +				message: t('contacts', 'Could not find contact: {id}', {id:this.currentid})
 +			});
 +			this.currentid = null;
 +			return;
 +		}
 +		var $contactelem = contact.renderContact(groupprops);
 +		var $listElement = contact.getListItemElement();
 +		console.log('selected element', $listElement);
 +		window.location.hash = this.currentid;
 +		self.jumpToContact(self.currentid);
 +		$contactelem.insertAfter($listElement).show().find('.fullname').focus();
 +		$listElement.hide();
 +		setTimeout(function() {
 +			$(window).bind('hashchange', self.hashChange);
 +		}, 500);
 +	},
 +	update: function() {
 +		console.log('update');
 +	},
 +	uploadPhoto:function(filelist) {
 +		console.log('uploadPhoto');
 +		var self = this;
 +		if(!filelist) {
 +			$(document).trigger('status.contacts.error', {message:t('contacts','No files selected for upload.')});
 +			return;
 +		}
 +		var file = filelist[0];
 +		var form = $('#file_upload_form');
 +		var totalSize=0;
 +		if(file.size > $('#max_upload').val()) {
 +			$(document).trigger('status.contacts.error', {
 +				message:t(
 +					'contacts',
 +					'The file you are trying to upload exceed the maximum size for file uploads on this server.')
 +			});
 +			return;
 +		} else {
 +			form.submit();
 +		}
 +	},
 +	cloudPhotoSelected:function(metadata, path) {
 +		var self = this;
 +		console.log('cloudPhotoSelected', metadata);
 +		var url = OC.Router.generate(
 +			'contacts_cache_fs_photo',
 +			{backend: metadata.backend, addressBookId: metadata.addressBookId, contactId: metadata.contactId, path: path}
 +		);
 +		var jqXHR = $.getJSON(url, function(response) {
 +			console.log('response', response);
 +			response = self.storage.formatResponse(response, jqXHR);
 +			if(!response.error) {
 +				self.editPhoto(metadata, response.data.tmp);
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		});
 +	},
 +	editCurrentPhoto:function(metadata) {
 +		var self = this;
 +		var url = OC.Router.generate(
 +			'contacts_cache_contact_photo',
 +			{backend: metadata.backend, addressBookId: metadata.addressBookId, contactId: metadata.contactId}
 +		);
 +		console.log('url', url);
 +		var jqXHR = $.getJSON(url, function(response) {
 +			response = self.storage.formatResponse(response, jqXHR)
 +			if(!response.error) {
 +				self.editPhoto(metadata, response.data.tmp);
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		});
 +	},
 +	editPhoto:function(metadata, tmpkey) {
 +		var $x, $y, $w, $h;
 +		console.log('editPhoto', metadata, tmpkey);
 +		$('.tipsy').remove();
 +		// Simple event handler, called from onChange and onSelect
 +		// event handlers, as per the Jcrop invocation below
 +		var showCoords = function(c) {
 +			$('#x').val(c.x);
 +			$('#y').val(c.y);
 +			$('#w').val(c.w);
 +			$('#h').val(c.h);
 +		};
 +
 +		var clearCoords = function() {
 +			$('#coords input').val('');
 +		};
 +
 +		var self = this;
 +		if(!this.$cropBoxTmpl) {
 +			this.$cropBoxTmpl = $('#cropBoxTemplate');
 +		}
 +		var $container = $('<div />').appendTo($('body'));
 +		var url = OC.Router.generate(
 +			'contacts_crop_contact_photo',
 +			{backend: metadata.backend, addressBookId: metadata.addressBookId, contactId: metadata.contactId, key: tmpkey}
 +		);
 +		var $dlg = this.$cropBoxTmpl.octemplate(
 +			{
 +				action: url,
 +				backend: metadata.backend,
 +				addressbookid: metadata.addressbookid,
 +				contactid: metadata.contactid,
 +				tmpkey: tmpkey
 +			}).prependTo($container);
 +
 +		$.when(this.storage.getTempContactPhoto(
 +			metadata.backend,
 +			metadata.addressBookId,
 +			metadata.contactId,
 +			tmpkey
 +		))
 +		.then(function(image) {
 +			var x = 5, y = 5, w = h = Math.min(image.width, image.height);
 +			//$dlg.css({'min-width': w, 'min-height': h});
 +			console.log(x,y,w,h);
 +			$(image).attr('id', 'cropbox').prependTo($dlg).show()
 +			.Jcrop({
 +				onChange:	showCoords,
 +				onSelect:	showCoords,
 +				onRelease:	clearCoords,
 +				//maxSize:	[w, h],
 +				bgColor:	'black',
 +				bgOpacity:	.4,
 +				boxWidth:	400,
 +				boxHeight:	400,
 +				setSelect:	[ x, y, w-10, h-10 ],
 +				aspectRatio: 1
 +			});
 +			$container.ocdialog({
 +				modal: true,
 +				closeOnEscape: true,
 +				title:  t('contacts', 'Edit profile picture'),
 +				height: image.height+100, width: image.width+20,
 +				buttons: [
 +					{
 +						text: t('contacts', 'Crop photo'),
 +						click:function() {
 +							self.savePhoto($(this), function() {
 +								$container.ocdialog('close');
 +							});
 +						},
 +						defaultButton: true
 +					}
 +				],
 +				close: function(event, ui) {
 +					$(this).ocdialog('destroy').remove();
 +					$container.remove();
 +				},
 +				open: function(event, ui) {
 +					showCoords({x:x,y:y,w:w-10,h:h-10});
 +				}
 +			});
 +		})
 +		.fail(function() {
 +			console.warn('Error getting temporary photo');
 +		});
 +	},
 +	savePhoto:function($dlg, cb) {
 +		var $form = $dlg.find('#cropform');
 +		var $target = $dlg.find('#crop_target');
 +		console.log('target', $target);
 +		$target.on('load', function() {
 +			console.log('submitted');
 +			var response = $.parseJSON($target.contents().text());
 +			console.log('response', response);
 +			if(response && response.status == 'success') {
 +				$(document).trigger('status.contact.photoupdated', {
 +					id: response.data.id,
 +					thumbnail: response.data.thumbnail
 +				});
 +			} else {
 +				if(!response) {
 +					$(document).trigger('status.contacts.error', {
 +						message:t('contacts', 'Network or server error. Please inform administrator.')
 +					});
 +				} else {
 +					$(document).trigger('status.contacts.error', response);
 +				}
 +			}
 +			cb();
 +		});
 +		$form.submit();
 +	},
 +};
 +
 +$(document).ready(function() {
 +
 +	OC.Router.registerLoadedCallback(function() {
 +		$.getScript(OC.Router.generate('contacts_jsconfig'))
 +		.done(function() {
 +			OC.Contacts.init();
 +		})
 +		.fail(function(jqxhr, settings, exception) {
 +			console.log('Failed loading settings.', jqxhr, settings, exception);
 +		});
 +	});
 +
 +});
diff --cc apps/contacts/js/contacts.js
index 69ff122,0000000..e4b12c1
mode 100644,000000..100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@@ -1,2499 -1,0 +1,2502 @@@
 +OC.Contacts = OC.Contacts || {};
 +
 +
 +(function(window, $, OC) {
 +	'use strict';
 +	/**
 +	* An item which binds the appropriate html and event handlers
 +	* @param parent the parent ContactList
 +	* @param id The integer contact id.
 +	* @param metadata An metadata object containing and 'owner' string variable, a 'backend' string variable and an integer 'permissions' variable.
 +	* @param data the data used to populate the contact
 +	* @param listtemplate the jquery object used to render the contact list item
 +	* @param fulltemplate the jquery object used to render the entire contact
 +	* @param detailtemplates A map of jquery objects used to render the contact parts e.g. EMAIL, TEL etc.
 +	*/
 +	var Contact = function(parent, id, metadata, data, listtemplate, dragtemplate, fulltemplate, detailtemplates) {
 +		//console.log('contact:', id, metadata, data); //parent, id, data, listtemplate, fulltemplate);
 +		this.parent = parent,
 +			this.storage = parent.storage,
 +			this.id = id,
 +			this.metadata = metadata,
 +			this.data = data,
 +			this.$dragTemplate = dragtemplate,
 +			this.$listTemplate = listtemplate,
 +			this.$fullTemplate = fulltemplate;
 +			this.detailTemplates = detailtemplates;
 +			this.displayNames = {};
 +			this.sortOrder = contacts_sortby || 'fn';
 +		this.undoQueue = [];
 +		this.multi_properties = ['EMAIL', 'TEL', 'IMPP', 'ADR', 'URL'];
 +	};
 +
 +	Contact.prototype.metaData = function() {
 +		return {
 +			contactId: this.id,
 +			addressBookId: this.metadata.parent,
 +			backend: this.metadata.backend
 +		}
 +	};
 +
 +	Contact.prototype.getDisplayName = function() {
 +		return this.displayNames[this.sortOrder];
 +	};
 +
 +	Contact.prototype.setDisplayMethod = function(method) {
 +		if(this.sortOrder === method) {
 +			return;
 +		}
 +		this.sortOrder = method;
 +		// ~30% faster than jQuery.
 +		try {
 +			this.$listelem.get(0).firstElementChild.getElementsByClassName('nametext')[0].innerHTML = escapeHTML(this.displayNames[method]);
 +		} catch(e) {
 +			var $elem = this.$listelem.find('.nametext').text(escapeHTML(this.displayNames[method]));
 +			$elem.text(escapeHTML(this.displayNames[method]));
 +		}
 +	};
 +
 +	Contact.prototype.getId = function() {
 +		return this.id;
 +	};
 +
 +	Contact.prototype.getOwner = function() {
 +		return this.metadata.owner;
 +	};
 +
 +	Contact.prototype.setOwner = function(owner) {
 +		this.metadata.owner = owner;
 +	};
 +
 +	Contact.prototype.getPermissions = function() {
 +		return this.metadata.permissions;
 +	};
 +
 +	Contact.prototype.hasPermission = function(permission) {
 +		//console.log('hasPermission', this.getPermissions(), permission, this.getPermissions() & permission);
 +		return (this.getPermissions() & permission);
 +	};
 +
 +	Contact.prototype.getParent = function() {
 +		return this.metadata.parent;
 +	};
 +
 +	Contact.prototype.setParent = function(parent) {
 +		this.metadata.parent = parent;
 +	};
 +
 +	Contact.prototype.getBackend = function() {
 +		return this.metadata.backend;
 +	};
 +
 +	Contact.prototype.setBackend = function(backend) {
 +		this.metadata.backend = backend;
 +	};
 +
 +	Contact.prototype.reload = function(data) {
 +		console.log('Contact.reload', data);
 +		this.id = data.metadata.id;
 +		this.metadata = data.metadata;
 +		this.data = data.data;
 +		/*if(this.$fullelem) {
 +			this.$fullelem.replaceWith(this.renderContact(this.groupprops));
 +		}*/
 +	};
 +
 +	Contact.prototype.merge = function(mergees) {
 +		console.log('Contact.merge, mergees', mergees);
 +		if(!mergees instanceof Array && !mergees instanceof Contact) {
 +			throw new TypeError('BadArgument: Contact.merge() only takes Contacts');
 +		} else {
 +			if(mergees instanceof Contact) {
 +				mergees = [mergees];
 +			}
 +		}
 +
 +		// For multi_properties
 +		var addIfNotExists = function(name, newproperty) {
 +			// If the property isn't set at all just add it and return.
 +			if(!self.data[name]) {
 +				self.data[name] = [newproperty];
 +				return;
 +			}
 +			var found = false;
 +			$.each(self.data[name], function(idx, property) {
 +				if(name === 'ADR') {
 +					// Do a simple string comparison
 +					if(property.value.join(';').toLowerCase() === newproperty.value.join(';').toLowerCase()) {
 +						found = true;
 +						return false; // break loop
 +					}
 +				} else {
 +					if(property.value.toLowerCase() === newproperty.value.toLowerCase()) {
 +						found = true;
 +						return false; // break loop
 +					}
 +				}
 +			});
 +			if(found) {
 +				return;
 +			}
 +			// Not found, so adding it.
 +			self.data[name].push(newproperty);
 +		}
 +
 +		var self = this;
 +		$.each(mergees, function(idx, mergee) {
 +			console.log('Contact.merge, mergee', mergee);
 +			if(!mergee instanceof Contact) {
 +				throw new TypeError('BadArgument: Contact.merge() only takes Contacts');
 +			}
 +			if(mergee === self) {
 +				throw new Error('BadArgument: Why should I merge with myself?');
 +			}
 +			$.each(mergee.data, function(name, properties) {
 +				if(self.multi_properties.indexOf(name) === -1) {
 +					if(self.data[name] && self.data[name].length > 0) {
 +						// If the property exists don't touch it.
 +						return true; // continue
 +					} else {
 +						// Otherwise add it.
 +						self.data[name] = properties;
 +					}
 +				} else {
 +					$.each(properties, function(idx, property) {
 +						addIfNotExists(name, property);
 +					});
 +				}
 +			});
 +			console.log('Merged', self.data);
 +		});
 +		return true;
 +	};
 +
 +	Contact.prototype.showActions = function(act) {
 +		this.$footer.children().hide();
 +		if(act && act.length > 0) {
 +			this.$footer.children('.'+act.join(',.')).show();
 +		}
 +	};
 +
 +	Contact.prototype.setAsSaving = function(obj, state) {
 +		if(!obj) {
 +			return;
 +		}
 +		$(obj).prop('disabled', state);
 +		$(obj).toggleClass('loading', state);
 +		/*if(state) {
 +			$(obj).addClass('loading');
 +		} else {
 +			$(obj).removeClass('loading');
 +		}*/
 +	};
 +
 +	Contact.prototype.handleURL = function(obj) {
 +		if(!obj) {
 +			return;
 +		}
 +		var $container = this.propertyContainerFor(obj);
 +		$(document).trigger('request.openurl', {
 +			type: $container.data('element'),
 +			url: this.valueFor(obj)
 +		});
 +	};
 +
 +	/**
 +	 * Update group name internally. No saving as this is done by groups backend.
 +	 */
 +	Contact.prototype.renameGroup = function(from, to) {
 +		if(!this.data.CATEGORIES.length) {
 +			console.warn(this.getDisplayName(), 'had no groups!?!');
 +			return;
 +		}
 +		var groups = this.data.CATEGORIES[0].value;
 +		var self = this;
 +		$.each(groups, function(idx, group) {
 +			if(from.toLowerCase() === group.toLowerCase()) {
 +				console.log('Updating group name for', self.getDisplayName(), group, to);
 +				self.data.CATEGORIES[0].value[idx] = to;
 +				return false; // break
 +			}
 +		});
 +		$(document).trigger('status.contact.updated', {
 +			property: 'CATEGORIES',
 +			contact: this
 +		});
 +	};
 +
 +	Contact.prototype.pushToUndo = function(params) {
 +		// Check if the same property has been changed before
 +		// and update it's checksum if so.
 +		if(typeof params.oldchecksum !== 'undefined') {
 +			$.each(this.undoQueue, function(idx, item) {
 +				if(item.checksum === params.oldchecksum) {
 +					item.checksum = params.newchecksum;
 +					if(params.action === 'delete') {
 +						item.action = 'delete';
 +					}
 +					return false; // Break loop
 +				}
 +			});
 +		}
 +		this.undoQueue.push({
 +			action:params.action, 
 +			name: params.name,
 +			checksum: params.newchecksum,
 +			newvalue: params.newvalue,
 +			oldvalue: params.oldvalue
 +		});
 +		//console.log('undoQueue', this.undoQueue);
 +	}
 +	
 +	Contact.prototype.addProperty = function($option, name) {
 +		console.log('Contact.addProperty', name)
 +		var $elem;
 +		switch(name) {
 +			case 'NICKNAME':
 +			case 'TITLE':
 +			case 'ORG':
 +			case 'BDAY':
 +			case 'NOTE':
 +				$elem = this.$fullelem.find('[data-element="' + name.toLowerCase() + '"]');
 +				$elem.addClass('new').show();
 +				$elem.find('input:not(:checkbox),textarea').first().focus();
 +				$option.prop('disabled', true);
 +				break;
 +			case 'TEL':
 +			case 'URL':
 +			case 'EMAIL':
 +				var $elem = this.renderStandardProperty(name.toLowerCase());
 +				var $list = this.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				$list.append($elem);
 +				$elem.find('input.value').addClass('new');
 +				$elem.find('input:not(:checkbox)').first().focus();
 +				break;
 +			case 'ADR':
 +				var $elem = this.renderAddressProperty();
 +				var $list = this.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				$list.append($elem);
 +				$elem.find('.display').trigger('click');
 +				$elem.find('input.value').addClass('new');
 +				$elem.find('input:not(:checkbox)').first().focus();
 +				break;
 +			case 'IMPP':
 +				var $elem = this.renderIMProperty();
 +				var $list = this.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				$list.append($elem);
 +				$elem.find('input.value').addClass('new');
 +				$elem.find('input:not(:checkbox)').first().focus();
 +				break;
 +		}
 +
 +		if($elem) {
 +			// If there's already a property of this type enable setting as preferred.
 +			if(this.multi_properties.indexOf(name) !== -1 && this.data[name] && this.data[name].length > 0) {
 +				var selector = 'li[data-element="' + name.toLowerCase() + '"]';
 +				$.each(this.$fullelem.find(selector), function(idx, elem) {
 +					$(elem).find('input.parameter[value="PREF"]').show();
 +				});
 +			} else if(this.multi_properties.indexOf(name) !== -1) {
 +				$elem.find('input.parameter[value="PREF"]').hide();
 +			}
 +			$elem.find('select.type[name="parameters[TYPE][]"]')
 +				.combobox({
 +					singleclick: true,
 +					classes: ['propertytype', 'float', 'label'],
 +				});
 +		}
 +	};
 +
 +	Contact.prototype.deleteProperty = function(params) {
 +		var obj = params.obj;
 +		if(!this.enabled) {
 +			return;
 +		}
 +		var element = this.propertyTypeFor(obj);
 +		var $container = this.propertyContainerFor(obj);
 +		console.log('Contact.deleteProperty, element', element, $container);
 +		var params = {
 +			name: element,
 +			value: null
 +		};
 +		if(this.multi_properties.indexOf(element) !== -1) {
 +			params['checksum'] = this.checksumFor(obj);
 +			if(params['checksum'] === 'new' && $.trim(this.valueFor(obj)) === '') {
 +				// If there's only one property of this type enable setting as preferred.
 +				if(this.data[element].length === 1) {
 +					var selector = 'li[data-element="' + element.toLowerCase() + '"]';
 +					this.$fullelem.find(selector).find('input.parameter[value="PREF"]').hide();
 +				}
 +				$container.remove();
 +				return;
 +			}
 +		}
 +		this.setAsSaving(obj, true);
 +		var self = this;
 +		$.when(this.storage.patchContact(this.metadata.backend, this.metadata.parent, this.id, params))
 +			.then(function(response) {
 +			if(!response.error) {
 +				if(self.multi_properties.indexOf(element) !== -1) {
 +					// First find out if an existing element by looking for checksum
 +					var checksum = self.checksumFor(obj);
 +					self.pushToUndo({
 +						action:'delete', 
 +						name: element,
 +						oldchecksum: self.checksumFor(obj),
 +						newvalue: self.valueFor(obj)
 +					});
 +					if(checksum) {
 +						for(var i in self.data[element]) {
 +							if(self.data[element][i].checksum === checksum) {
 +								// Found it
 +								self.data[element].splice(self.data[element].indexOf(self.data[element][i]), 1);
 +								break;
 +							}
 +						}
 +					}
 +					// If there's only one property of this type enable setting as preferred.
 +					if(self.data[element].length === 1) {
 +						var selector = 'li[data-element="' + element.toLowerCase() + '"]';
 +						self.$fullelem.find(selector).find('input.parameter[value="PREF"]').hide();
 +					}
 +					$container.remove();
 +				} else {
 +					self.pushToUndo({
 +						action:'delete', 
 +						name: element,
 +						newvalue: $container.find('input.value').val()
 +					});
 +					self.setAsSaving(obj, false);
 +					if(element === 'PHOTO') {
 +						self.data.PHOTO[0].value = false;
 +						self.data.thumbnail = null;
 +					} else {
 +						self.$fullelem.find('[data-element="' + element.toLowerCase() + '"]').hide();
 +						$container.find('input.value').val('');
 +						self.$addMenu.find('option[value="' + element.toUpperCase() + '"]').prop('disabled', false);
 +					}
 +				}
 +				$(document).trigger('status.contact.updated', {
 +					property: element,
 +					contact: self
 +				});
 +				return true;
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +				self.setAsSaving(obj, false);
 +				return false;
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log(response.message);
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +;
 +	};
 +
 +	/**
 +	 * @brief Save all properties. Used for merging contacts.
 +	 * If this is a new contact it will first be saved to the datastore and a
 +	 * new datastructure will be added to the object.
 +	 */
 +	Contact.prototype.saveAll = function(cb) {
 +		console.log('Contact.saveAll');
 +		if(!this.id) {
 +			var self = this;
 +			this.add({isnew:true}, function(response) {
 +				if(response.error) {
 +					console.warn('No response object');
 +					return false;
 +				}
 +				self.saveAll();
 +			});
 +			return;
 +		}
 +		var self = this;
 +		this.setAsSaving(this.$fullelem, true);
 +		var data = JSON.stringify(this.data);
 +		//console.log('stringified', data);
 +		$.when(this.storage.saveAllProperties(this.metadata.backend, this.metadata.parent, this.id, {data:this.data}))
 +			.then(function(response) {
 +			if(!response.error) {
 +				self.data = response.data.data;
 +				self.metadata = response.data.metadata;
 +				if(typeof cb === 'function') {
 +					cb({error:false});
 +				}
 +			} else {
 +				$(document).trigger('status.contacts.error', {
 +					message: response.message
 +				});
 +				if(typeof cb === 'function') {
 +					cb({error:true, message:response.message});
 +				}
 +			}
 +			self.setAsSaving(self.$fullelem, false);
 +		});
 +	}
 +
 +	/**
 +	 * @brief Act on change of a property.
 +	 * If this is a new contact it will first be saved to the datastore and a
 +	 * new datastructure will be added to the object.
 +	 * If the obj argument is not provided 'name' and 'value' MUST be provided
 +	 * and this is only allowed for single elements like N, FN, CATEGORIES.
 +	 * @param obj. The form form field that has changed.
 +	 * @param name. The optional name of the element.
 +	 * @param value. The optional value.
 +	 */
 +	Contact.prototype.saveProperty = function(params) {
 +		console.log('Contact.saveProperty', params);
 +		if(!this.id) {
 +			var self = this;
 +			this.add({isnew:true}, function(response) {
 +				if(!response || response.status === 'error') {
 +					console.warn('No response object');
 +					return false;
 +				}
 +				self.saveProperty(params);
 +				self.showActions(['close', 'add', 'export', 'delete']);
 +			});
 +			return;
 +		}
 +		var obj = null;
 +		var element = null;
 +		var args = [];
 +		if(params.obj) {
 +			obj = params.obj;
 +			args = this.argumentsFor(obj);
 +			//args['parameters'] = $.param(this.parametersFor(obj));
 +			element = this.propertyTypeFor(obj);
 +		} else {
 +			args = params;
 +			element = params.name;
 +			var value = utils.isArray(params.value)
 +				? $.param(params.value)
 +				: encodeURIComponent(params.value);
 +		}
 +		if(!args) {
 +			console.log('No arguments. returning');
 +			return false;
 +		}
 +		console.log('args', args);
 +		var self = this;
 +		this.setAsSaving(obj, true);
 +		$.when(this.storage.patchContact(this.metadata.backend, this.metadata.parent, this.id, args))
 +			.then(function(response) {
 +			if(!response.error) {
 +				if(!self.data[element]) {
 +					self.data[element] = [];
 +				}
 +				if(self.multi_properties.indexOf(element) !== -1) {
 +					// First find out if an existing element by looking for checksum
 +					var checksum = self.checksumFor(obj);
 +					var value = self.valueFor(obj);
 +					var parameters = self.parametersFor(obj);
 +					if(parameters['TYPE'] && parameters['TYPE'].indexOf('PREF') !== -1) {
 +						parameters['PREF'] = 1;
 +						parameters['TYPE'].splice(parameters['TYPE'].indexOf('PREF', 1));
 +					}
 +					if(checksum && checksum !== 'new') {
 +						self.pushToUndo({
 +							action:'save', 
 +							name: element,
 +							newchecksum: response.data.checksum,
 +							oldchecksum: checksum,
 +							newvalue: value,
 +							oldvalue: obj.defaultValue
 +						});
 +						$.each(self.data[element], function(i, el) {
 +							if(el.checksum === checksum) {
 +								self.data[element][i] = {
 +									name: element,
 +									value: value,
 +									parameters: parameters,
 +									checksum: response.data.checksum
 +								};
 +								return false;
 +							}
 +						});
 +					} else {
 +						$(obj).removeClass('new');
 +						self.pushToUndo({
 +							action:'add', 
 +							name: element,
 +							newchecksum: response.data.checksum,
 +							newvalue: value,
 +						});
 +						self.data[element].push({
 +							name: element,
 +							value: value,
 +							parameters: parameters,
 +							checksum: response.data.checksum,
 +						});
 +					}
 +					self.propertyContainerFor(obj).data('checksum', response.data.checksum);
 +				} else {
 +					// Save value and parameters internally
 +					var value = obj ? self.valueFor(obj) : params.value;
 +					self.pushToUndo({
 +						action: ((obj && obj.defaultValue) || self.data[element].length) ? 'save' : 'add', // FIXME
 +						name: element,
 +						newvalue: value,
 +					});
 +					switch(element) {
 +						case 'CATEGORIES':
 +							// We deal with this in addToGroup()
 +							break;
 +						case 'BDAY':
 +							// reverse order again.
 +							value = $.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate(datepickerFormatDate, value));
 +							self.data[element][0] = {
 +								name: element,
 +								value: value,
 +								parameters: self.parametersFor(obj),
 +								checksum: response.data.checksum
 +							};
 +							break;
 +						case 'FN':
 +							if(!self.data.FN || !self.data.FN.length) {
 +								self.data.FN = [{name:'FN', value:'', parameters:[]}];
 +							}
 +							self.data.FN[0]['value'] = value;
 +							var nempty = true;
 +							if(!self.data.N) {
 +								// TODO: Maybe add a method for constructing new elements?
 +								self.data.N = [{name:'N',value:['', '', '', '', ''],parameters:[]}];
 +							}
 +							$.each(self.data.N[0]['value'], function(idx, val) {
 +								if(val) {
 +									nempty = false;
 +									return false;
 +								}
 +							});
 +							if(nempty) {
 +								self.data.N[0]['value'] = ['', '', '', '', ''];
 +								var nvalue = value.split(' ');
 +								// Very basic western style parsing. I'm not gonna implement
 +								// https://github.com/android/platform_packages_providers_contactsprovider/blob/master/src/com/android/providers/contacts/NameSplitter.java ;)
 +								self.data.N[0]['value'][0] = nvalue.length > 2 && nvalue.slice(nvalue.length-1).toString() || nvalue[1] || '';
 +								self.data.N[0]['value'][1] = nvalue[0] || '';
 +								self.data.N[0]['value'][2] = nvalue.length > 2 && nvalue.slice(1, nvalue.length-1).join(' ') || '';
 +								setTimeout(function() {
 +									self.saveProperty({name:'N', value:self.data.N[0].value.join(';')});
 +									setTimeout(function() {
 +										self.$fullelem.find('.fullname').next('.action.edit').trigger('click');
 +										OC.notify({message:t('contacts', 'Is this correct?')});
 +									}, 1000);
 +								}
 +								, 500);
 +							}
 +							break;
 +						case 'N':
 +							if(!utils.isArray(value)) {
 +								value = value.split(';');
 +								// Then it is auto-generated from FN.
 +								var $nelems = self.$fullelem.find('.n.editor input');
 +								$.each(value, function(idx, val) {
 +									self.$fullelem.find('#n_' + idx).val(val).get(0).defaultValue = val;
 +								});
 +							}
 +							var $fullname = self.$fullelem.find('.fullname'), fullname = '';
 +							var update_fn = false;
 +							if(!self.data.FN) {
 +								self.data.FN = [{name:'FN', value:'', parameters:[]}];
 +							}
 +							/* If FN is empty fill it with the values from N.
 +							 * As N consists of several fields which each trigger a change/save
 +							 * also check if the contents of FN equals parts of N and fill
 +							 * out the rest.
 +							 */
 +							if(self.data.FN[0]['value'] === '') {
 +								self.data.FN[0]['value'] = value[1] + ' ' + value[0];
 +								$fullname.val(self.data.FN[0]['value']);
 +								update_fn = true;
 +							} else if($fullname.val() == value[1] + ' ') {
 +								self.data.FN[0]['value'] = value[1] + ' ' + value[0];
 +								$fullname.val(self.data.FN[0]['value']);
 +								update_fn = true;
 +							} else if($fullname.val() == ' ' + value[0]) {
 +								self.data.FN[0]['value'] = value[1] + ' ' + value[0];
 +								$fullname.val(self.data.FN[0]['value']);
 +								update_fn = true;
 +							}
 +							if(update_fn) {
 +								setTimeout(function() {
 +									self.saveProperty({name:'FN', value:self.data.FN[0]['value']});
 +								}, 1000);
 +							}
 +						case 'NICKNAME':
 +						case 'ORG':
 +							// Auto-fill FN if empty
 +							if(!self.data.FN) {
 +								self.data.FN = [{name:'FN', value:value, parameters:[]}];
 +								self.$fullelem.find('.fullname').val(value).trigger('change');
 +							}
 +						case 'TITLE':
 +						case 'NOTE':
 +							self.data[element][0] = {
 +								name: element,
 +								value: value,
 +								parameters: self.parametersFor(obj),
 +								checksum: response.data.checksum
 +							};
 +							break;
 +						default:
 +							break;
 +					}
 +				}
 +				self.setAsSaving(obj, false);
 +				$(document).trigger('status.contact.updated', {
 +					property: element,
 +					contact: self
 +				});
 +				return true;
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +				self.setAsSaving(obj, false);
 +				return false;
 +			}
 +		});
 +	};
 +
 +	/**
 +	 * Hide contact list element.
 +	 */
 +	Contact.prototype.hide = function() {
 +		this.getListItemElement().hide();
 +	};
 +
 +	/**
 +	 * Show contact list element.
 +	 */
 +	Contact.prototype.show = function() {
 +		this.getListItemElement().show();
 +	};
 +
 +	/**
 +	 * Remove any open contact from the DOM.
 +	 */
 +	Contact.prototype.close = function() {
 +		$(document).unbind('status.contact.photoupdated');
 +		console.log('Contact.close', this);
 +		if(this.$fullelem) {
 +			this.$fullelem.hide().remove();
 +			this.getListItemElement().show();
 +			this.$fullelem = null;
 +			return true;
 +		} else {
 +			return false;
 +		}
 +	};
 +
 +	/**
 +	 * Remove any open contact from the DOM and detach it's list
 +	 * element from the DOM.
 +	 * @returns The contact object.
 +	 */
 +	Contact.prototype.detach = function() {
 +		if(this.$fullelem) {
 +			this.$fullelem.remove();
 +		}
 +		if(this.$listelem) {
 +			this.$listelem.detach();
 +			return this;
 +		}
 +	};
 +
 +	/**
 +	 * Set a contacts list element as (un)checked
 +	 * @returns The contact object.
 +	 */
 +	Contact.prototype.setChecked = function(checked) {
 +		if(this.$listelem) {
 +			this.$listelem.find('input:checkbox').prop('checked', checked);
 +			return this;
 +		}
 +	};
 +
 +	/**
 +	 * Set a contact to en/disabled depending on its permissions.
 +	 * @param boolean enabled
 +	 */
 +	Contact.prototype.setEnabled = function(enabled) {
 +		if(enabled) {
 +			this.$fullelem.find('#addproperty').show();
 +		} else {
 +			this.$fullelem.find('#addproperty,.action.delete,.action.edit').hide();
 +		}
 +		this.enabled = enabled;
 +		this.$fullelem.find('.value,.action,.parameter').each(function () {
 +			$(this).prop('disabled', !enabled);
 +		});
 +		$(document).trigger('status.contact.enabled', enabled);
 +	};
 +
 +	/**
 +	 * Add a contact to data store.
 +	 * @params params. An object which can contain the optional properties:
 +	 *		aid: The id of the addressbook to add the contact to. Per default it will be added to the first.
 +	 *		fn: The formatted name of the contact.
 +	 * @param cb Optional callback function which
 +	 * @returns The callback gets an object as argument with a variable 'status' of either 'success'
 +	 * or 'error'. On success the 'data' property of that object contains the contact id as 'id', the
 +	 * addressbook id as 'aid' and the contact data structure as 'details'.
 +	 */
 +	Contact.prototype.add = function(params, cb) {
 +		var self = this;
 +		$.when(this.storage.addContact(this.metadata.backend, this.metadata.parent))
 +			.then(function(response) {
 +			if(!response.error) {
 +				self.id = String(response.data.metadata.id);
 +				self.metadata = response.data.metadata;
 +				self.data = response.data.data;
 +				self.$groupSelect.multiselect('enable');
 +				// Add contact to current group
 +				if(self.groupprops
 +					&& ['all', 'fav', 'uncategorized'].indexOf(self.groupprops.currentgroup.id) === -1
 +				) {
 +					if(!self.data.CATEGORIES) {
 +						self.addToGroup(self.groupprops.currentgroup.name);
 +						$(document).trigger('request.contact.addtogroup', {
 +							id: self.id,
 +							groupid: self.groupprops.currentgroup.id
 +						});
 +						self.$groupSelect.find('option[value="' + self.groupprops.currentgroup.id + '"]')
 +							.attr('selected', 'selected');
 +						self.$groupSelect.multiselect('refresh');
 +					}
 +				}
 +				$(document).trigger('status.contact.added', {
 +					id: self.id,
 +					contact: self
 +				});
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +				return false;
 +			}
 +			if(typeof cb == 'function') {
 +				cb(response);
 +			}
 +		});
 +	};
 +	/**
 +	 * Delete contact from data store and remove it from the DOM
 +	 * @param cb Optional callback function which
 +	 * @returns An object with a variable 'status' of either success
 +	 *	or 'error'
 +	 */
 +	Contact.prototype.destroy = function(cb) {
 +		var self = this;
 +		$.when(this.storage.deleteContact(
 +			this.metadata.backend,
 +			this.metadata.parent,
 +			this.id)
 +		).then(function(response) {
 +		//$.post(OC.filePath('contacts', 'ajax', 'contact/delete.php'),
 +		//	   {id: this.id}, function(response) {
 +			if(!response.error) {
 +				if(self.$listelem) {
 +					self.$listelem.remove();
 +				}
 +				if(self.$fullelem) {
 +					self.$fullelem.remove();
 +				}
 +			}
 +			if(typeof cb == 'function') {
 +				if(response.error) {
 +					cb(response);
 +				} else {
 +					cb({id:self.id});
 +				}
 +			}
 +		});
 +	};
 +
 +	Contact.prototype.argumentsFor = function(obj) {
 +		console.log('Contact.argumentsFor', $(obj));
 +		var args = {};
 +		var ptype = this.propertyTypeFor(obj);
 +		args['name'] = ptype;
 +
 +		if(this.multi_properties.indexOf(ptype) !== -1) {
 +			args['checksum'] = this.checksumFor(obj);
 +		}
 +
 +		if($(obj).hasClass('propertycontainer')) {
 +			if($(obj).is('select[data-element="categories"]')) {
 +				args['value'] = [];
 +				$.each($(obj).find(':selected'), function(idx, e) {
 +					args['value'].push($(e).text());
 +				});
 +			} else {
 +				args['value'] = $(obj).val();
 +			}
 +		} else {
 +			var $elements = this.propertyContainerFor(obj)
 +				.find('input.value,select.value,textarea.value');
 +			if($elements.length > 1) {
 +				args['value'] = [];
 +				$.each($elements, function(idx, e) {
 +					args['value'][parseInt($(e).attr('name').substr(6,1))] = $(e).val();
 +					//args['value'].push($(e).val());
 +				});
 +			} else {
 +				var value = $elements.val();
 +				switch(args['name']) {
 +					case 'BDAY':
 +						try {
 +							args['value'] = $.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate(datepickerFormatDate, value));
 +						} catch(e) {
 +							$(document).trigger(
 +								'status.contacts.error',
 +								{message:t('contacts', 'Error parsing date: {date}', {date:value})}
 +							);
 +							return false;
 +						}
 +						break;
 +					default:
 +						args['value'] = value;
 +						break;
 +				}
 +			}
 +		}
 +		args['parameters'] = this.parametersFor(obj);
 +		console.log('Contact.argumentsFor', args);
 +		return args;
 +	};
 +
 +	Contact.prototype.queryStringFor = function(obj) {
 +		var q = 'id=' + this.id;
 +		var ptype = this.propertyTypeFor(obj);
 +		q += '&name=' + ptype;
 +
 +		if(this.multi_properties.indexOf(ptype) !== -1) {
 +			q += '&checksum=' + this.checksumFor(obj);
 +		}
 +
 +		if($(obj).hasClass('propertycontainer')) {
 +			if($(obj).is('select[data-element="categories"]')) {
 +				$.each($(obj).find(':selected'), function(idx, e) {
 +					q += '&value=' + encodeURIComponent($(e).text());
 +				});
 +			} else {
 +				q += '&value=' + encodeURIComponent($(obj).val());
 +			}
 +		} else {
 +			var $elements = this.propertyContainerFor(obj)
 +				.find('input.value,select.value,textarea.value,.parameter');
 +			if($elements.length > 1) {
 +				q += '&' + $elements.serialize();
 +			} else {
 +				q += '&value=' + encodeURIComponent($elements.val());
 +			}
 +		}
 +		return q;
 +	};
 +
 +	Contact.prototype.propertyContainerFor = function(obj) {
 +		return $(obj).hasClass('propertycontainer')
 +			? $(obj)
 +			: $(obj).parents('.propertycontainer').first();
 +	};
 +
 +	Contact.prototype.checksumFor = function(obj) {
 +		return this.propertyContainerFor(obj).data('checksum');
 +	};
 +
 +	Contact.prototype.valueFor = function(obj) {
 +		var $container = this.propertyContainerFor(obj);
 +		console.assert($container.length > 0, 'Couldn\'t find container for ' + $(obj));
 +		return $container.is('input.value')
 +			? $container.val()
 +			: (function() {
 +				var $elem = $container.find('textarea.value,input.value:not(:checkbox)');
 +				console.assert($elem.length > 0, 'Couldn\'t find value for ' + $container.data('element'));
 +				if($elem.length === 1) {
 +					return $elem.val();
 +				} else if($elem.length > 1) {
 +					var retval = [];
 +					$.each($elem, function(idx, e) {
 +						retval[parseInt($(e).attr('name').substr(6,1))] = $(e).val();
 +					});
 +					return retval;
 +				}
 +			})();
 +	};
 +
 +	Contact.prototype.parametersFor = function(obj, asText) {
 +		var parameters = {};
 +		$.each(this.propertyContainerFor(obj)
 +			.find('select.parameter,input:checkbox:checked.parameter'),
 +			   function(i, elem) {
 +			var $elem = $(elem);
 +			var paramname = $elem.data('parameter');
 +			if(!parameters[paramname]) {
 +				parameters[paramname] = [];
 +			}
 +			if($elem.is(':checkbox')) {
 +				if(asText) {
 +					parameters[paramname].push($elem.attr('title'));
 +				} else {
 +					parameters[paramname].push($elem.attr('value'));
 +				}
 +			} else if($elem.is('select')) {
 +				$.each($elem.find(':selected'), function(idx, e) {
 +					if(asText) {
 +						parameters[paramname].push($(e).text());
 +					} else {
 +						parameters[paramname].push($(e).val());
 +					}
 +				});
 +			}
 +		});
 +		return parameters;
 +	};
 +
 +	Contact.prototype.propertyTypeFor = function(obj) {
 +		var ptype = this.propertyContainerFor(obj).data('element');
 +		return ptype ? ptype.toUpperCase() : null;
 +	};
 +
 +	/**
 +	 * Render an element item to be shown during drag.
 +	 * @return A jquery object
 +	 */
 +	Contact.prototype.renderDragItem = function() {
 +		if(typeof this.$dragelem === 'undefined') {
 +			this.$dragelem = this.$dragTemplate.octemplate({
 +				id: this.id,
 +				name: this.getPreferredValue('FN', '')
 +			});
 +		}
 +		this.setThumbnail(this.$dragelem);
 +		return this.$dragelem;
 +	}
 +
 +	/**
 +	 * Render the list item
 +	 * @return A jquery object to be inserted in the DOM
 +	 */
 +	Contact.prototype.renderListItem = function(isnew) {
 +		this.displayNames.fn = this.getPreferredValue('FN')
- 			|| this.getPreferredValue('ORG')
++			|| this.getPreferredValue('ORG', []).pop()
 +			|| this.getPreferredValue('EMAIL')
 +			|| this.getPreferredValue('TEL');
 +
 +		this.displayNames.fl = this.getPreferredValue('N', [this.displayNames.fn])
 +			.slice(0, 2).reverse().join(' ');
 +
 +		this.displayNames.lf = this.getPreferredValue('N', [this.displayNames.fn])
 +			.slice(0, 2).join(', ');
 +
 +		this.$listelem = this.$listTemplate.octemplate({
 +			id: this.id,
 +			parent: this.metadata.parent,
 +			backend: this.metadata.backend,
 +			name: this.getDisplayName(),
 +			email: this.getPreferredValue('EMAIL', ''),
 +			tel: this.getPreferredValue('TEL', ''),
 +			adr: this.getPreferredValue('ADR', []).clean('').join(', '),
 +			categories: this.getPreferredValue('CATEGORIES', [])
 +				.clean('').join(' / ')
 +		});
 +		if(this.getOwner() !== OC.currentUser
 +				&& !(this.metadata.permissions & OC.PERMISSION_UPDATE
 +				|| this.metadata.permissions & OC.PERMISSION_DELETE)) {
 +			this.$listelem.find('input:checkbox').prop('disabled', true).css('opacity', '0');
 +		} else {
 +			var self = this;
 +			this.$listelem.find('td.name')
 +				.draggable({
 +					cursor: 'move',
 +					distance: 10,
 +					revert: 'invalid',
 +					helper: function (e,ui) {
 +						return self.renderDragItem().appendTo('body');
 +					},
 +					opacity: 1,
 +					scope: 'contacts'
 +				});
 +		}
 +		if(isnew) {
 +			this.setThumbnail();
 +		}
 +		this.$listelem.data('obj', this);
 +		return this.$listelem;
 +	};
 +
 +	/**
 +	 * Render the full contact
 +	 * @return A jquery object to be inserted in the DOM
 +	 */
 +	Contact.prototype.renderContact = function(groupprops) {
 +		var self = this;
 +		this.groupprops = groupprops;
 +		
 +		var buildGroupSelect = function(availableGroups) {
 +			//this.$groupSelect.find('option').remove();
 +			$.each(availableGroups, function(idx, group) {
 +				var $option = $('<option value="' + group.id + '">' + group.name + '</option>');
 +				if(self.inGroup(group.name)) {
 +					$option.attr('selected', 'selected');
 +				}
 +				self.$groupSelect.append($option);
 +			});
 +			self.$groupSelect.multiselect({
 +				header: false,
 +				selectedList: 3,
 +				noneSelectedText: self.$groupSelect.attr('title'),
 +				selectedText: t('contacts', '# groups')
 +			});
 +			self.$groupSelect.bind('multiselectclick', function(event, ui) {
 +				var action = ui.checked ? 'addtogroup' : 'removefromgroup';
 +				console.assert(typeof self.id === 'string', 'ID is not a string')
 +				$(document).trigger('request.contact.' + action, {
 +					id: self.id,
 +					groupid: parseInt(ui.value)
 +				});
 +				if(ui.checked) {
 +					self.addToGroup(ui.text);
 +				} else {
 +					self.removeFromGroup(ui.text);
 +				}
 +			});
 +			if(!self.id || !self.hasPermission(OC.PERMISSION_UPDATE)) {
 +				self.$groupSelect.multiselect('disable');
 +			}
 +		};
 +		
 +		var buildAddressBookSelect = function(availableAddressBooks) {
 +			console.log('address books', availableAddressBooks.length, availableAddressBooks);
 +			$.each(availableAddressBooks, function(idx, addressBook) {
 +				//console.log('addressBook', idx, addressBook);
 +				var $option = $('<option />')
 +					.val(addressBook.getId())
 +					.text(addressBook.getDisplayName() + '(' + addressBook.getBackend() + ')')
 +					.data('backend', addressBook.getBackend())
 +					.data('owner', addressBook.getOwner());
 +				if(self.metadata.parent === addressBook.getId()
 +					&& self.metadata.backend === addressBook.getBackend()) {
 +					$option.attr('selected', 'selected');
 +				}
 +				self.$addressBookSelect.append($option);
 +			});
 +			self.$addressBookSelect.multiselect({
 +				header: false,
 +				multiple: false,
 +				selectedList: 3,
 +				noneSelectedText: self.$addressBookSelect.attr('title')
 +			});
 +			self.$addressBookSelect.on('multiselectclick', function(event, ui) {
 +				console.log('AddressBook select', ui);
 +				self.$addressBookSelect.val(ui.value);
 +				var opt = self.$addressBookSelect.find(':selected');
 +				if(self.id) {
 +					console.log('AddressBook', opt);
 +					$(document).trigger('request.contact.move', {
 +						contact: self,
 +						from: {id:self.getParent(), backend:self.getBackend()},
 +						target: {id:opt.val(), backend:opt.data('backend')}
 +					});
 +				} else {
 +					self.setBackend(opt.data('backend'));
 +					self.setParent(opt.val());
 +					self.setOwner(opt.data('owner'));
 +				}
 +			});
 +			if(self.id) {
 +				//self.$addressBookSelect.multiselect('disable');
 +			}
 +		};
 +
 +		var values;
 +		if(this.data) {
 +			var n = this.getPreferredValue('N', ['', '', '', '', '']),
 +				bday = this.getPreferredValue('BDAY', '');
 +			if(bday.length >= 10) {
 +				try {
 +					bday = $.datepicker.parseDate('yy-mm-dd', bday.substring(0, 10));
 +					bday = $.datepicker.formatDate(datepickerFormatDate, bday);
 +				} catch (e) {
 +					var message = t('contacts', 'Error parsing birthday {bday}: {error}', {bday:bday, error: e});
 +					console.warn(message);
 +					bday = '';
 +					$(document).trigger('status.contacts.error', {
 +						status: 'error',
 +						message: message
 +					});
 +				}
 +			}
 +			values = {
 +				id: this.id,
 +				favorite:groupprops.favorite ? 'active' : '',
 +				name: this.getPreferredValue('FN', ''),
 +				n0: n[0]||'', n1: n[1]||'', n2: n[2]||'', n3: n[3]||'', n4: n[4]||'',
 +				nickname: this.getPreferredValue('NICKNAME', ''),
 +				title: this.getPreferredValue('TITLE', ''),
 +				org: this.getPreferredValue('ORG', []).clean('').join(', '), // TODO Add parts if more than one.
 +				bday: bday,
 +				note: this.getPreferredValue('NOTE', '')
 +			}
 +		} else {
 +			values = {id:'', favorite:'', name:'', nickname:'', title:'', org:'', bday:'', note:'', n0:'', n1:'', n2:'', n3:'', n4:''};
 +		}
 +		this.$fullelem = this.$fullTemplate.octemplate(values).data('contactobject', this);
 +
 +		this.$footer = this.$fullelem.find('footer');
 +
 +		this.$fullelem.find('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'});
 +		this.$fullelem.on('submit', function() {
 +			return false;
 +		});
 +		
 +		if(this.getOwner() === OC.currentUser) {
 +			this.$groupSelect = this.$fullelem.find('#contactgroups');
 +			buildGroupSelect(groupprops.groups);
 +		}
 +		
 +		var writeableAddressBooks = this.parent.addressBooks.selectByPermission(OC.PERMISSION_CREATE);
 +		if(writeableAddressBooks.length > 1 && this.hasPermission(OC.PERMISSION_DELETE)) {
 +			this.$addressBookSelect = this.$fullelem.find('#contactaddressbooks');
 +			buildAddressBookSelect(writeableAddressBooks);
 +		}
 +
 +		this.$addMenu = this.$fullelem.find('#addproperty');
 +		this.$addMenu.on('change', function(event) {
 +			//console.log('add', $(this).val());
 +			var $opt = $(this).find('option:selected');
 +			self.addProperty($opt, $(this).val());
 +			$(this).val('');
 +		});
 +		var $fullname = this.$fullelem.find('.fullname');
 +		this.$fullelem.find('.singleproperties').on('mouseenter', function() {
 +			$fullname.next('.edit').css('opacity', '1');
 +		}).on('mouseleave', function() {
 +			$fullname.next('.edit').css('opacity', '0');
 +		});
 +		$fullname.next('.edit').on('click keydown', function(event) {
 +			//console.log('edit name', event);
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			$(this).css('opacity', '0');
 +			var $editor = $(this).next('.n.editor').first();
 +			var bodyListener = function(e) {
 +				if($editor.find($(e.target)).length == 0) {
 +					$editor.toggle('blind');
 +					$('body').unbind('click', bodyListener);
 +				}
 +			};
 +			$editor.toggle('blind', function() {
 +				$('body').bind('click', bodyListener);
 +			});
 +		});
 +
 +		this.$fullelem.on('click keydown', '.delete', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			self.deleteProperty({obj:event.target});
 +		});
 +
 +		this.$fullelem.on('click keydown', '.globe,.mail', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			self.handleURL(event.target);
 +		});
 +
 +		this.$footer.on('click keydown', 'button', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			if($(this).is('.close') || $(this).is('.cancel')) {
 +				$(document).trigger('request.contact.close', {
 +					id: self.id
 +				});
 +			} else if($(this).is('.export')) {
 +				$(document).trigger('request.contact.export', self.metaData());
 +			} else if($(this).is('.delete')) {
 +				$(document).trigger('request.contact.delete', self.metaData());
 +			}
 +			return false;
 +		});
 +		this.$fullelem.on('keypress', '.value,.parameter', function(event) {
 +			if(event.keyCode === 13 && $(this).is('input')) {
 +				$(this).trigger('change');
 +				// Prevent a second save on blur.
 +				this.previousValue = this.defaultValue || '';
 +				this.defaultValue = this.value;
 +				return false;
 +			} else if(event.keyCode === 27) {
 +				$(document).trigger('request.contact.close', {
 +					id: self.id
 +				});
 +			}
 +		});
 +
 +		this.$fullelem.on('change', '.value,.parameter', function(event) {
 +			if($(this).hasClass('value') && this.value === this.defaultValue) {
 +				return;
 +			}
 +			//console.log('change', this.defaultValue, this.value);
 +			this.defaultValue = this.value;
 +			self.saveProperty({obj:event.target});
 +		});
 +
 +		var $bdayinput = this.$fullelem.find('[data-element="bday"]').find('input');
 +		$bdayinput.datepicker({
 +				dateFormat : datepickerFormatDate
 +		});
 +		$bdayinput.attr('placeholder', $.datepicker.formatDate(datepickerFormatDate, new Date()));
 +
 +		this.$fullelem.find('.favorite').on('click', function () {
 +			var state = $(this).hasClass('active');
 +			if(!self.data) {
 +				return;
 +			}
 +			if(state) {
 +				$(this).switchClass('active', 'inactive');
 +			} else {
 +				$(this).switchClass('inactive', 'active');
 +			}
 +			$(document).trigger('request.contact.setasfavorite', {
 +				id: self.id,
 +				state: !state
 +			});
 +		});
 +		this.loadPhoto();
 +		if(!this.data) {
 +			// A new contact
 +			this.setEnabled(true);
 +			this.showActions(['cancel']);
 +			return this.$fullelem;
 +		}
 +		// Loop thru all single occurrence values. If not set hide the
 +		// element, if set disable the add menu entry.
 +		$.each(values, function(name, value) {
 +			if(typeof value === 'undefined') {
 +				return true; //continue
 +			}
 +			value = value.toString();
 +			if(self.multi_properties.indexOf(value.toUpperCase()) === -1) {
 +				if(!value.length) {
 +					self.$fullelem.find('[data-element="' + name + '"]').hide();
 +				} else {
 +					self.$addMenu.find('option[value="' + name.toUpperCase() + '"]').prop('disabled', true);
 +				}
 +			}
 +		});
 +		$.each(this.multi_properties, function(idx, name) {
 +			if(self.data[name]) {
 +				var $list = self.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				for(var p in self.data[name]) {
 +					if(typeof self.data[name][p] === 'object') {
 +						var property = self.data[name][p];
 +						//console.log(name, p, property);
 +						var $property = null;
 +						switch(name) {
 +							case 'TEL':
 +							case 'URL':
 +							case 'EMAIL':
 +								$property = self.renderStandardProperty(name.toLowerCase(), property);
 +								if(self.data[name].length === 1) {
 +									$property.find('input:checkbox[value="PREF"]').hide();
 +								}
 +								break;
 +							case 'ADR':
 +								$property = self.renderAddressProperty(idx, property);
 +								break;
 +							case 'IMPP':
 +								$property = self.renderIMProperty(property);
 +								if(self.data[name].length === 1) {
 +									$property.find('input:checkbox[value="PREF"]').hide();
 +								}
 +								break;
 +						}
 +						if(!$property) {
 +							continue;
 +						}
 +						//console.log('$property', $property);
 +						var meta = [];
 +						if(property.label) {
 +							if(!property.parameters['TYPE']) {
 +								property.parameters['TYPE'] = [];
 +							}
 +							property.parameters['TYPE'].push(property.label);
 +							meta.push(property.label);
 +						}
 +						for(var param in property.parameters) {
 +							//console.log('param', param);
 +							if(param.toUpperCase() == 'PREF') {
 +								var $cb = $property.find('input[type="checkbox"]');
 +								$cb.attr('checked', 'checked');
 +								meta.push($cb.attr('title'));
 +							}
 +							else if(param.toUpperCase() == 'TYPE') {
 +								for(var etype in property.parameters[param]) {
 +									var found = false;
 +									var et = property.parameters[param][etype];
 +									if(typeof et !== 'string') {
 +										continue;
 +									}
 +									$property.find('select.type option').each(function() {
 +										if($(this).val().toUpperCase() === et.toUpperCase()) {
 +											$(this).attr('selected', 'selected');
 +											meta.push($(this).text());
 +											found = true;
 +										}
 +									});
 +									if(!found) {
 +										$property.find('select.type option:last-child').after('<option value="'+et+'" selected="selected">'+et+'</option>');
 +									}
 +								}
 +							}
 +							else if(param.toUpperCase() == 'X-SERVICE-TYPE') {
 +								//console.log('setting', $property.find('select.impp'), 'to', property.parameters[param].toLowerCase());
 +								$property.find('select.impp').val(property.parameters[param].toLowerCase());
 +							}
 +						}
 +						var $meta = $property.find('.meta');
 +						if($meta.length) {
 +							$meta.html(meta.join('/'));
 +						}
 +						if(self.metadata.owner === OC.currentUser
 +								|| self.metadata.permissions & OC.PERMISSION_UPDATE
 +								|| self.metadata.permissions & OC.PERMISSION_DELETE) {
 +							$property.find('select.type[name="parameters[TYPE][]"]')
 +								.combobox({
 +									singleclick: true,
 +									classes: ['propertytype', 'float', 'label']
 +								});
 +						}
 +						$list.append($property);
 +					}
 +				}
 +			}
 +		});
 +		if(this.metadata.owner !== OC.currentUser
 +			&& !(this.hasPermission(OC.PERMISSION_UPDATE)
 +				|| this.hasPermission(OC.PERMISSION_DELETE))) {
 +			this.setEnabled(false);
 +			this.showActions(['close', 'export']);
 +		} else {
 +			this.setEnabled(true);
 +			this.showActions(['close', 'add', 'export', 'delete']);
 +		}
 +		return this.$fullelem;
 +	};
 +
 +	Contact.prototype.isEditable = function() {
 +		return ((this.metadata.owner === OC.currentUser)
 +			|| (this.metadata.permissions & OC.PERMISSION_UPDATE
 +				|| this.metadata.permissions & OC.PERMISSION_DELETE));
 +	};
 +
 +	/**
 +	 * Render a simple property. Used for EMAIL and TEL.
 +	 * @return A jquery object to be injected in the DOM
 +	 */
 +	Contact.prototype.renderStandardProperty = function(name, property) {
 +		if(!this.detailTemplates[name]) {
 +			console.error('No template for', name);
 +			return;
 +		}
 +		var values = property
 +			? { value: property.value, checksum: property.checksum }
 +			: { value: '', checksum: 'new' };
 +		return this.detailTemplates[name].octemplate(values);
 +	};
 +
 +	/**
 +	 * Render an ADR (address) property.
 +	 * @return A jquery object to be injected in the DOM
 +	 */
 +	Contact.prototype.renderAddressProperty = function(idx, property) {
 +		if(!this.detailTemplates['adr']) {
 +			console.warn('No template for adr', this.detailTemplates);
 +			return;
 +		}
 +		if(typeof idx === 'undefined') {
 +			if(this.data && this.data.ADR && this.data.ADR.length > 0) {
 +				idx = this.data.ADR.length - 1;
 +			} else {
 +				idx = 0;
 +			}
 +		}
 +		var values = property ? {
 +				value: property.value.clean('').join(', '),
 +				checksum: property.checksum,
 +				adr0: property.value[0] || '',
 +				adr1: property.value[1] || '',
 +				adr2: property.value[2] || '',
 +				adr3: property.value[3] || '',
 +				adr4: property.value[4] || '',
 +				adr5: property.value[5] || '',
 +				adr6: property.value[6] || '',
 +				idx: idx
 +			}
 +			: {value:'', checksum:'new', adr0:'', adr1:'', adr2:'', adr3:'', adr4:'', adr5:'', adr6:'', idx: idx};
 +		var $elem = this.detailTemplates['adr'].octemplate(values);
 +		var self = this;
 +		$elem.find('.tooltipped.downwards:not(.onfocus)').tipsy({gravity: 'n'});
 +		$elem.find('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'});
 +		$elem.find('.display').on('click', function() {
 +			$(this).next('.listactions').hide();
 +			var $editor = $(this).siblings('.adr.editor').first();
 +			var $viewer = $(this);
 +			var bodyListener = function(e) {
 +				if($editor.find($(e.target)).length == 0) {
 +					$editor.toggle('blind');
 +					$viewer.slideDown(400, function() {
 +						var input = $editor.find('input').first();
 +						var val = self.valueFor(input);
 +						var params = self.parametersFor(input, true);
 +						$(this).find('.meta').html(params['TYPE'].join('/'));
 +						$(this).find('.adr').html(self.valueFor($editor.find('input').first()).clean('').join(', '));
 +						$(this).next('.listactions').css('display', 'inline-block');
 +						$('body').unbind('click', bodyListener);
 +					});
 +				}
 +			};
 +			$viewer.slideUp();
 +			$editor.toggle('blind', function() {
 +				$('body').bind('click', bodyListener);
 +			});
 +		});
 +		$elem.find('.value.city')
 +			.autocomplete({
 +				source: function( request, response ) {
 +					$.ajax({
 +						url: "http://ws.geonames.org/searchJSON",
 +						dataType: "jsonp",
 +						data: {
 +							featureClass: "P",
 +							style: "full",
 +							maxRows: 12,
 +							lang: $elem.data('lang'),
 +							name_startsWith: request.term
 +						},
 +						success: function( data ) {
 +							response( $.map( data.geonames, function( item ) {
 +								return {
 +									label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
 +									value: item.name,
 +									country: item.countryName
 +								};
 +							}));
 +						}
 +					});
 +				},
 +				minLength: 2,
 +				select: function( event, ui ) {
 +					if(ui.item && $.trim($elem.find('.value.country').val()).length == 0) {
 +						$elem.find('.value.country').val(ui.item.country);
 +					}
 +				}
 +			});
 +		$elem.find('.value.country')
 +			.autocomplete({
 +				source: function( request, response ) {
 +					$.ajax({
 +						url: "http://ws.geonames.org/searchJSON",
 +						dataType: "jsonp",
 +						data: {
 +							/*featureClass: "A",*/
 +							featureCode: "PCLI",
 +							/*countryBias: "true",*/
 +							/*style: "full",*/
 +							lang: lang,
 +							maxRows: 12,
 +							name_startsWith: request.term
 +						},
 +						success: function( data ) {
 +							response( $.map( data.geonames, function( item ) {
 +								return {
 +									label: item.name,
 +									value: item.name
 +								};
 +							}));
 +						}
 +					});
 +				},
 +				minLength: 2
 +			});
 +		return $elem;
 +	};
 +
 +	/**
 +	 * Render an IMPP (Instant Messaging) property.
 +	 * @return A jquery object to be injected in the DOM
 +	 */
 +	Contact.prototype.renderIMProperty = function(property) {
 +		if(!this.detailTemplates['impp']) {
 +			console.warn('No template for impp', this.detailTemplates);
 +			return;
 +		}
 +		var values = property ? {
 +			value: property.value,
 +			checksum: property.checksum
 +		} : {value: '', checksum: 'new'};
 +		return this.detailTemplates['impp'].octemplate(values);
 +	};
 +
 +	/**
 +	 * Set a thumbnail for the contact if a PHOTO property exists
 +	 */
 +	Contact.prototype.setThumbnail = function($elem, refresh) {
 +		if(!this.data.thumbnail && !refresh) {
 +			return;
 +		}
 +		if(!$elem) {
 +			$elem = this.getListItemElement().find('td.name');
 +		}
 +		if(!$elem.hasClass('thumbnail') && !refresh) {
 +			return;
 +		}
 +		if(this.data.thumbnail) {
 +			$elem.removeClass('thumbnail');
 +			$elem.css('background-image', 'url(data:image/png;base64,' + this.data.thumbnail + ')');
 +		} else {
 +			$elem.addClass('thumbnail');
 +			$elem.removeAttr('style');
 +		}
 +	}
 +
 +	/**
 +	 * Render the PHOTO property.
 +	 */
 +	Contact.prototype.loadPhoto = function() {
 +		var self = this;
 +		var id = this.id || 'new',
 +			backend = this.metadata.backend,
 +			parent = this.metadata.parent,
 +			src;
 +
 +		var $phototools = this.$fullelem.find('#phototools');
 +		if(!this.$photowrapper) {
 +			this.$photowrapper = this.$fullelem.find('#photowrapper');
 +		}
 +
 +		var finishLoad = function(image) {
 +			console.log('finishLoad', self.getDisplayName(), image.width, image.height);
 +			$(image).addClass('contactphoto');
 +			self.$photowrapper.removeClass('loading wait');
 +			self.$photowrapper.css({width: image.width + 10, height: image.height + 10});
 +			$(image).insertAfter($phototools).fadeIn();
 +		};
 +
 +		this.$photowrapper.addClass('loading').addClass('wait');
 +		if(this.getPreferredValue('PHOTO', null) === null) {
 +			$.when(this.storage.getDefaultPhoto())
 +				.then(function(image) {
 +					$('img.contactphoto').detach();
 +					finishLoad(image);
 +				});
 +		} else {
 +			$.when(this.storage.getContactPhoto(backend, parent, id))
 +				.then(function(image) {
 +					$('img.contactphoto').remove();
 +					finishLoad(image);
 +				})
 +				.fail(function() {
 +					console.log('Error getting photo, trying default image');
 +					$('img.contactphoto').remove();
 +					$.when(self.storage.getDefaultPhoto())
 +						.then(function(image) {
 +							$('img.contactphoto').detach();
 +							finishLoad(image);
 +						});
 +				});
 +		}
 +
 +		if(this.isEditable()) {
 +			this.$photowrapper.on('mouseenter', function(event) {
 +				if($(event.target).is('.favorite') || !self.data) {
 +					return;
 +				}
 +				$phototools.slideDown(200);
 +			}).on('mouseleave', function() {
 +				$phototools.slideUp(200);
 +			});
 +			$phototools.hover( function () {
 +				$(this).removeClass('transparent');
 +			}, function () {
 +				$(this).addClass('transparent');
 +			});
 +			$phototools.find('li a').tipsy();
 +
 +			$phototools.find('.action').off('click');
 +			$phototools.find('.edit').on('click', function() {
 +				$(document).trigger('request.edit.contactphoto', self.metaData());
 +			});
 +			$phototools.find('.cloud').on('click', function() {
 +				$(document).trigger('request.select.contactphoto.fromcloud', self.metaData());
 +			});
 +			$phototools.find('.upload').on('click', function() {
 +				$(document).trigger('request.select.contactphoto.fromlocal', self.metaData());
 +			});
 +			if(this.getPreferredValue('PHOTO', false)) {
 +				$phototools.find('.delete').show();
 +				$phototools.find('.edit').show();
 +			} else {
 +				$phototools.find('.delete').hide();
 +				$phototools.find('.edit').hide();
 +			}
 +			$(document).bind('status.contact.photoupdated', function(e, data) {
 +				console.log('status.contact.photoupdated', data);
 +				if(!self.data.PHOTO) {
 +					self.data.PHOTO = [];
 +				}
 +				if(data.thumbnail) {
 +					self.data.thumbnail = data.thumbnail;
 +					self.data.PHOTO[0] = {value:true};
 +				} else {
 +					self.data.thumbnail = null;
 +					self.data.PHOTO[0] = {value:false};
 +				}
 +				self.loadPhoto(true);
 +				self.setThumbnail(null, true);
 +			});
 +		}
 +	};
 +
 +	/**
 +	 * Get the jquery element associated with this object
 +	 */
 +	Contact.prototype.getListItemElement = function() {
 +		if(!this.$listelem) {
 +			this.renderListItem();
 +		}
 +		return this.$listelem;
 +	};
 +
 +	/**
 +	 * Get the preferred value for a property.
 +	 * If a preferred value is not found the first one will be returned.
 +	 * @param string name The name of the property like EMAIL, TEL or ADR.
 +	 * @param def A default value to return if nothing is found.
 +	 */
 +	Contact.prototype.getPreferredValue = function(name, def) {
 +		var pref = def, found = false;
 +		if(this.data && this.data[name]) {
 +			var props = this.data[name];
 +			//console.log('props', props);
 +			$.each(props, function( i, prop ) {
 +				//console.log('prop:', i, prop);
 +				if(i === 0) { // Choose first to start with
 +					pref = prop.value;
 +				}
 +				for(var param in prop.parameters) {
 +					if(param.toUpperCase() == 'PREF') {
 +						found = true; //
 +						break;
 +					}
 +				}
 +				if(found) {
 +					return false; // break out of loop
 +				}
 +			});
 +		}
 +		if(name === 'N' && pref.join('').trim() === '') {
 +			return def;
 +		}
 +		return pref;
 +	};
 +
 +	/**
 +	 * Returns true/false depending on the contact being in the
 +	 * specified group.
 +	 * @param String name The group name (not case-sensitive)
 +	 * @returns Boolean
 +	 */
 +	Contact.prototype.inGroup = function(name) {
 +		var categories = this.getPreferredValue('CATEGORIES', []);
 +		var found = false;
 +
 +		$.each(categories, function(idx, category) {
 +			if(name.toLowerCase() == $.trim(category).toLowerCase()) {
 +				found = true
 +				return false;
 +			}
 +		});
 +
 +		return found;
 +	};
 +
 +	/**
 +	 * Add this contact to a group
 +	 * @param String name The group name
 +	 */
 +	Contact.prototype.addToGroup = function(name) {
 +		console.log('addToGroup', name);
 +		if(!this.data.CATEGORIES) {
 +			this.data.CATEGORIES = [{value:[name]}];
 +		} else {
 +			if(this.inGroup(name)) {
 +				return;
 +			}
 +			this.data.CATEGORIES[0].value.push(name);
 +			if(this.$listelem) {
 +				this.$listelem.find('td.categories')
 +					.text(this.getPreferredValue('CATEGORIES', []).clean('').join(' / '));
 +			}
 +		}
 +	};
 +
 +	/**
 +	 * Remove this contact from a group
 +	 * @param String name The group name
 +	 */
 +	Contact.prototype.removeFromGroup = function(name) {
 +		name = name.trim();
 +		if(!this.data.CATEGORIES) {
 +			console.warn('removeFromGroup. No groups found');
 +			return;
 +		} else {
 +			var found = false;
 +			var categories = [];
 +			$.each(this.data.CATEGORIES[0].value, function(idx, category) {
 +				category = category.trim();
 +				if(name.toLowerCase() === category.toLowerCase()) {
 +					found = true;
 +				} else {
 +					categories.push(category);
 +				}
 +			});
 +			if(!found) {
 +				return;
 +			}
 +			this.data.CATEGORIES[0].value = categories;
 +			if(this.$listelem) {
 +				this.$listelem.find('td.categories')
 +					.text(categories.join(' / '));
 +			}
 +		}
 +	};
 +
 +	Contact.prototype.setCurrent = function(on) {
 +		if(on) {
 +			this.$listelem.addClass('active');
 +		} else {
 +			this.$listelem.removeClass('active');
 +		}
 +		$(document).trigger('status.contact.currentlistitem', {
 +			id: this.id,
 +			pos: Math.round(this.$listelem.position().top),
 +			height: Math.round(this.$listelem.height())
 +		});
 +	};
 +
 +	Contact.prototype.setSelected = function(state) {
 +		//console.log('Selecting', this.getId(), state);
 +		var $elem = this.getListItemElement();
 +		var $input = $elem.find('input:checkbox');
 +		$input.prop('checked', state).trigger('change');
 +	};
 +
 +	Contact.prototype.next = function() {
 +		// This used to work..?
 +		//var $next = this.$listelem.next('tr:visible');
 +		var $next = this.$listelem.nextAll('tr').filter(':visible').first();
 +		if($next.length > 0) {
 +			this.$listelem.removeClass('active');
 +			$next.addClass('active');
 +			$(document).trigger('status.contact.currentlistitem', {
 +				id: String($next.data('id')),
 +				pos: Math.round($next.position().top),
 +				height: Math.round($next.height())
 +			});
 +		}
 +	};
 +
 +	Contact.prototype.prev = function() {
 +		//var $prev = this.$listelem.prev('tr:visible');
 +		var $prev = this.$listelem.prevAll('tr').filter(':visible').first();
 +		if($prev.length > 0) {
 +			this.$listelem.removeClass('active');
 +			$prev.addClass('active');
 +			$(document).trigger('status.contact.currentlistitem', {
 +				id: String($prev.data('id')),
 +				pos: Math.round($prev.position().top),
 +				height: Math.round($prev.height())
 +			});
 +		}
 +	};
 +
 +	var ContactList = function(
 +			storage,
 +			addressBooks,
 +			contactlist,
 +			contactlistitemtemplate,
 +			contactdragitemtemplate,
 +			contactfulltemplate,
 +			contactdetailtemplates
 +		) {
 +		//console.log('ContactList', contactlist, contactlistitemtemplate, contactfulltemplate, contactdetailtemplates);
 +		var self = this;
 +		this.length = 0;
 +		this.contacts = {};
 +		this.addressBooks = addressBooks;
 +		this.deletionQueue = [];
 +		this.storage = storage;
 +		this.$contactList = contactlist;
 +		this.$contactDragItemTemplate = contactdragitemtemplate;
 +		this.$contactListItemTemplate = contactlistitemtemplate;
 +		this.$contactFullTemplate = contactfulltemplate;
 +		this.contactDetailTemplates = contactdetailtemplates;
 +		this.$contactList.scrollTop(0);
 +		//this.getAddressBooks();
 +		$(document).bind('status.contact.added', function(e, data) {
 +			self.length += 1;
 +			self.contacts[String(data.id)] = data.contact;
 +			//self.insertContact(data.contact.renderListItem(true));
 +		});
 +		$(document).bind('status.contact.moved', function(e, data) {
 +			var contact = data.contact;
 +			var oldid = contact.getId();
 +			contact.close();
 +			contact.reload(data.data);
 +			self.contacts[contact.getId()] = contact;
 +			$(document).trigger('request.contact.open', {
 +				id: contact.getId()
 +			});
 +			console.log('status.contact.moved', data);
 +		});
 +		$(document).bind('request.contact.close', function(e, data) {
 +			self.currentContact = null;
 +		});
 +		$(document).bind('status.contact.updated', function(e, data) {
 +			if(['FN', 'EMAIL', 'TEL', 'ADR', 'CATEGORIES'].indexOf(data.property) !== -1) {
 +				data.contact.getListItemElement().remove();
 +				self.insertContact(data.contact.renderListItem(true));
 +			} else if(data.property === 'PHOTO') {
 +				$(document).trigger('status.contact.photoupdated', {
 +					id: data.contact.getId()
 +				});
 +			}
 +		});
 +		$(document).bind('status.addressbook.removed', function(e, data) {
 +			var addressBook = data.addressbook;
 +			self.purgeFromAddressbook(addressBook);
 +			$(document).trigger('request.groups.reload');
 +			$(document).trigger('status.contacts.deleted', {
 +				numcontacts: self.length
 +			});
 +		});
 +		$(document).bind('status.addressbook.imported', function(e, data) {
 +			console.log('status.addressbook.imported', data);
 +			var addressBook = data.addressbook;
 +			self.purgeFromAddressbook(addressBook);
 +			$.when(self.loadContacts(addressBook.getBackend(), addressBook.getId(), true))
 +			.then(function() {
 +				self.setSortOrder();
 +				$(document).trigger('request.groups.reload');
 +			});
 +		});
 +		$(document).bind('status.addressbook.activated', function(e, data) {
 +			console.log('status.addressbook.activated', data);
 +			var addressBook = data.addressbook;
 +			if(!data.state) {
 +				self.purgeFromAddressbook(addressBook);
 +				$(document).trigger('status.contacts.deleted', {
 +					numcontacts: self.length
 +				});
 +			} else {
 +				$.when(self.loadContacts(addressBook.getBackend(), addressBook.getId(), true))
 +				.then(function() {
 +					self.setSortOrder();
 +					$(document).trigger('request.groups.reload');
 +				});
 +			}
 +		});
 +	};
 +
 +	/**
 +	 * Get the number of contacts in the list
 +	 * @return integer
 +	 */
 +	ContactList.prototype.count = function() {
 +		return Object.keys(this.contacts.contacts).length
 +	};
 +
 +	/**
 +	* Remove contacts from the internal list and the DOM
 +	*
 +	* @param AddressBook addressBook
 +	*/
 +	ContactList.prototype.purgeFromAddressbook = function(addressBook) {
 +		var self = this;
 +		$.each(this.contacts, function(idx, contact) {
 +			if(contact.getBackend() === addressBook.getBackend()
 +				&& contact.getParent() === addressBook.getId()) {
 +				//console.log('Removing', contact);
 +				delete self.contacts[contact.getId()];
 +				//var c = self.contacts.splice(self.contacts.indexOf(contact.getId()), 1);
 +				//console.log('Removed', c);
 +				contact.detach();
 +				contact = null;
 +				self.length -= 1;
 +			}
 +		});
 +		$(document).trigger('status.contacts.count', {
 +			count: self.length
 +		});
 +	}
 +
 +	/**
 +	* Show/hide contacts belonging to an addressbook.
 +	* @param int aid. Addressbook id.
 +	* @param boolean show. Whether to show or hide.
 +	* @param boolean hideothers. Used when showing shared addressbook as a group.
 +	*/
 +	ContactList.prototype.showFromAddressbook = function(aid, show, hideothers) {
 +		console.log('ContactList.showFromAddressbook', aid, show);
 +		aid = String(aid);
 +		for(var contact in this.contacts) {
 +			if(this.contacts[contact].getParent() === aid) {
 +				this.contacts[contact].getListItemElement().toggle(show);
 +			} else if(hideothers) {
 +				this.contacts[contact].getListItemElement().hide();
 +			}
 +		}
 +		this.setSortOrder();
 +	};
 +
 +	/**
 +	* Show only uncategorized contacts.
 +	* @param int aid. Addressbook id.
 +	* @param boolean show. Whether to show or hide.
 +	* @param boolean hideothers. Used when showing shared addressbook as a group.
 +	*/
 +	ContactList.prototype.showUncategorized = function() {
 +		console.log('ContactList.showUncategorized');
 +		for(var contact in this.contacts) {
 +			if(this.contacts[contact].getPreferredValue('CATEGORIES', []).length === 0) {
 +				this.contacts[contact].getListItemElement().show();
 +			} else {
 +				this.contacts[contact].getListItemElement().hide();
 +			}
 +		}
 +		this.setSortOrder();
 +	};
 +
 +	/**
 +	* Show/hide contacts belonging to shared addressbooks.
 +	* @param boolean show. Whether to show or hide.
 +	*/
 +	ContactList.prototype.showSharedAddressbooks = function(show) {
 +		console.log('ContactList.showSharedAddressbooks', show);
 +		for(var contact in this.contacts) {
 +			if(this.contacts[contact].metadata.owner !== OC.currentUser) {
 +				if(show) {
 +					this.contacts[contact].getListItemElement().show();
 +				} else {
 +					this.contacts[contact].getListItemElement().hide();
 +				}
 +			}
 +		}
 +		this.setSortOrder();
 +	};
 +
 +	/**
 +	* Show contacts in list
 +	* @param Array contacts. A list of contact ids.
 +	*/
 +	ContactList.prototype.showContacts = function(contacts) {
 +		console.log('showContacts', contacts);
 +		var self = this;
 +		if(contacts.length === 0) {
 +			// ~5 times faster
 +			$('tr:visible.contact').hide();
 +			return;
 +		}
 +		if(contacts === 'all') {
 +			// ~2 times faster
 +			var $elems = $('tr.contact:not(:visible)');
 +			$elems.show();
 +			$.each($elems, function(idx, elem) {
 +				try {
 +					var id = $(elem).data('id');
 +					self.contacts[id].setThumbnail();
 +				} catch(e) {
 +					console.warn('Failed getting id from', $elem, e);
 +				}
 +			});
 +			this.setSortOrder();
 +			return;
 +		}
 +		console.time('show');
 +		$('tr.contact').filter(':visible').hide();
 +		$.each(contacts, function(idx, id) {
 +			var contact =  self.findById(id);
 +			if(contact === null) {
 +				return true; // continue
 +			}
 +			contact.getListItemElement().show();
 +			contact.setThumbnail();
 +		});
 +		console.timeEnd('show');
 +
 +		// Amazingly this is slightly faster
 +		//console.time('show');
 +		for(var id in this.contacts) {
 +			var contact = this.findById(id);
 +			if(contact === null) {
 +				continue;
 +			}
 +			if(contacts.indexOf(String(id)) === -1) {
 +				contact.getListItemElement().hide();
 +			} else {
 +				contact.getListItemElement().show();
 +				contact.setThumbnail();
 +			}
 +		}
 +		//console.timeEnd('show');*/
 +
 +		this.setSortOrder();
 +	};
 +
 +	ContactList.prototype.contactPos = function(id) {
 +		var contact = this.findById(id);
 +		if(!contact) {
 +			return 0;
 +		}
 +		
 +		var $elem = contact.getListItemElement();
 +		var pos = Math.round($elem.offset().top - (this.$contactList.offset().top + this.$contactList.scrollTop()));
 +		console.log('contactPos', pos);
 +		return pos;
 +	};
 +
 +	ContactList.prototype.hideContact = function(id) {
 +		var contact = this.findById(id);
 +		if(contact === null) {
 +			return false;
 +		}
 +		contact.hide();
 +	};
 +
 +	ContactList.prototype.closeContact = function(id) {
 +		var contact = this.findById(id);
 +		if(contact === null) {
 +			return false;
 +		}
 +		contact.close();
 +	};
 +
 +	/**
 +	* Returns a Contact object by searching for its id
 +	* @param id the id of the node
 +	* @return the Contact object or undefined if not found.
 +	* FIXME: If continious loading is reintroduced this will have
 +	* to load the requested contact if not in list.
 +	*/
 +	ContactList.prototype.findById = function(id) {
 +		if(!id) {
 +			console.warn('ContactList.findById: id missing');
 +			return false;
 +		}
 +		id = String(id);
 +		if(typeof this.contacts[id] === 'undefined') {
 +			console.warn('Could not find contact with id', id);
 +			//console.trace();
 +			return null;
 +		}
 +		return this.contacts[String(id)];
 +	};
 +
 +	/**
 +	 * TODO: Instead of having a timeout the contacts should be moved to a "Trash" backend/address book
 +	 * https://github.com/owncloud/contacts/issues/107
 +	 * @param object|object[] data An object or array of objects containing contact identification
 +	 * {
 +	 * 	contactid: '1234',
 +	 * 	addressbookid: '4321',
 +	 * 	backend: 'local'
 +	 * }
 +	 */
 +	ContactList.prototype.delayedDelete = function(data) {
 +		console.log('delayedDelete, data:', typeof data, data);
 +		var self = this;
 +		if(!utils.isArray(data)) {
 +			this.currentContact = null;
 +			//self.$contactList.show();
 +			if(data instanceof Contact) {
 +				this.deletionQueue.push(data);
 +			} else {
 +				var contact = this.findById(data.contactId);
 +				if(contact instanceof Contact) {
 +					this.deletionQueue.push(contact);
 +				}
 +			}
 +		} else if(utils.isArray(data)) {
 +			$.each(data, function(idx, contact) {
 +				//console.log('delayedDelete, meta:', contact);
 +				if(contact instanceof Contact) {
 +					self.deletionQueue.push(contact);
 +				}
 +			});
 +			//$.extend(this.deletionQueue, data);
 +		} else {
 +			throw { name: 'WrongParameterType', message: 'ContactList.delayedDelete only accept objects or arrays.'};
 +		}
 +		//console.log('delayedDelete, deletionQueue', this.deletionQueue);
 +		$.each(this.deletionQueue, function(idx, contact) {
 +			//console.log('delayedDelete', contact);
 +			contact && contact.detach().setChecked(false);
 +		});
 +		//console.log('deletionQueue', this.deletionQueue);
 +		if(!window.onbeforeunload) {
 +			window.onbeforeunload = function(e) {
 +				e = e || window.event;
 +				var warn = t('contacts', 'Some contacts are marked for deletion, but not deleted yet. Please wait for them to be deleted.');
 +				if (e) {
 +					e.returnValue = String(warn);
 +				}
 +				return warn;
 +			};
 +		}
 +		if(this.$contactList.find('tr:visible').length === 0) {
 +			$(document).trigger('status.visiblecontacts');
 +		}
 +		OC.notify({
 +			message:t('contacts','Click to undo deletion of {num} contacts', {num: self.deletionQueue.length}),
 +			//timeout:5,
 +			timeouthandler:function() {
 +				//console.log('timeout');
 +				self.deleteContacts();
 +			},
 +			clickhandler:function() {
 +				//console.log('clickhandler');
 +				//OC.notify({cancel:true});
 +				OC.notify({cancel:true, message:t('contacts', 'Cancelled deletion of {num} contacts', {num: self.deletionQueue.length})});
 +				$.each(self.deletionQueue, function(idx, contact) {
 +					self.insertContact(contact.getListItemElement());
 +				});
 +				self.deletionQueue = [];
 +				window.onbeforeunload = null;
 +			}
 +		});
 +	};
 +
 +	/**
 +	* Delete contacts in the queue
 +	* TODO: Batch delete contacts instead of sending multiple requests.
 +	*/
 +	ContactList.prototype.deleteContacts = function() {
 +		var self = this,
 +			contact,
 +			contactMap = {};
 +		console.log('ContactList.deleteContacts, deletionQueue', this.deletionQueue);
 +
 +		if(this.deletionQueue.length === 1) {
 +			contact = this.deletionQueue.shift()
 +			// Let contact remove itself.
 +			var id = contact.getId();
 +			contact.destroy(function(response) {
 +				console.log('deleteContact', response, self.length);
 +				if(!response.error) {
 +					delete self.contacts[id];
 +					$(document).trigger('status.contact.deleted', {
 +						id: id
 +					});
 +					self.length -= 1;
 +					if(self.length === 0) {
 +						$(document).trigger('status.nomorecontacts');
 +					}
 +				} else {
 +					self.insertContact(contact.getListItemElement());
 +					OC.notify({message:response.message});
 +				}
 +			});
 +		} else {
 +
 +			// Make a map of backends, address books and contacts for easier processing.
 +			while(contact = this.deletionQueue.shift()) {
 +				if(!contactMap[contact.getBackend()]) {
 +					contactMap[contact.getBackend()] = {};
 +				}
 +				if(!contactMap[contact.getBackend()][contact.getParent()]) {
 +					contactMap[contact.getBackend()][contact.getParent()] = [];
 +				}
 +				contactMap[contact.getBackend()][contact.getParent()].push(contact.getId());
 +			}
 +			console.log('map', contactMap);
 +
 +			// Call each backend/addressBook to delete contacts.
 +			$.each(contactMap, function(backend, addressBooks) {
 +				console.log(backend, addressBooks);
 +				$.each(addressBooks, function(addressBook, contacts) {
 +					console.log(addressBook, contacts);
 +					var ab = self.addressBooks.find({backend:backend, id:addressBook});
 +					ab.deleteContacts(contacts, function(response) {
 +						console.log('response', response);
 +						if(!response.error) {
 +							// We get a result set back, so process all of them.
 +							$.each(response.data.result, function(idx, result) {
 +								console.log('deleting', idx, result.id);
 +								if(result.status === 'success') {
 +									delete self.contacts[result.id];
 +									$(document).trigger('status.contact.deleted', {
 +										id: result.id
 +									});
 +									self.length -= 1;
 +									if(self.length === 0) {
 +										$(document).trigger('status.nomorecontacts');
 +									}
 +								} else {
 +									// Error deleting, so re-insert element.
 +									// TODO: Collect errors and display them when done.
 +									self.insertContact(self.contacts[result.id].getListItemElement());
 +								}
 +							});
 +						}
 +					});
 +				});
 +			});
 +		}
 +
 +		window.onbeforeunload = null;
 +		return;
 +
 +	};
 +
 +	/**
 +	 * Insert a rendered contact list item into the list
 +	 * @param contact jQuery object.
 +	 */
 +	ContactList.prototype.insertContact = function($contact) {
 +		$contact.find('td.name').draggable({
 +			distance: 10,
 +			revert: 'invalid',
 +			//containment: '#content',
 +			helper: function (e,ui) {
 +				return $(this).clone().appendTo('body').css('zIndex', 5).show();
 +			},
 +			opacity: 0.8,
 +			scope: 'contacts'
 +		});
 +		var name = $contact.find('.nametext').text().toLowerCase();
 +		var added = false;
 +		this.$contactList.find('tr').each(function() {
 +			if ($(this).find('.nametext').text().toLowerCase().localeCompare(name) > 0) {
 +				$(this).before($contact);
 +				added = true;
 +				return false;
 +			}
 +		});
 +		if(!added) {
 +			this.$contactList.append($contact);
 +		}
 +		$contact.show();
 +		return $contact;
 +	};
 +
 +	/**
 +	* Add contact
 +	* @param object props
 +	*/
 +	ContactList.prototype.addContact = function(props) {
 +		// Get first address book
 +		var addressBooks = this.addressBooks.selectByPermission(OC.PERMISSION_UPDATE);
 +		var addressBook = addressBooks[0];
 +		var metadata = {
 +			parent: addressBook.getId(),
 +			backend: addressBook.getBackend(),
 +			permissions: addressBook.getPermissions(),
 +			owner: addressBook.getOwner()
 +		};
 +		var contact = new Contact(
 +			this,
 +			null,
 +			metadata,
 +			null,
 +			this.$contactListItemTemplate,
 +			this.$contactDragItemTemplate,
 +			this.$contactFullTemplate,
 +			this.contactDetailTemplates
 +		);
 +		if(this.currentContact) {
 +			this.contacts[this.currentContact].close();
 +		}
 +		return contact.renderContact(props);
 +	};
 +
 +	/**
 +	 * Get contacts selected in list
 +	 *
 +	 * @returns array of contact objects.
 +	 */
 +	ContactList.prototype.getSelectedContacts = function() {
 +		var contacts = [];
 +
 +		var self = this;
- 		$.each(this.$contactList.find('tr > td > input:checkbox:visible:checked'), function(idx, checkbox) {
++		$.each(this.$contactList.find('tbody > tr > td > input:checkbox:visible:checked'), function(idx, checkbox) {
 +			var id = String($(checkbox).val());
- 			contacts.push(self.contacts[id]);
++			var contact = self.contacts[id];
++			if(contact) {
++				contacts.push(contact);
++			}
 +		});
 +		return contacts;
 +	};
 +
 +	ContactList.prototype.setCurrent = function(id, deselect_other) {
 +		console.log('ContactList.setCurrent', id);
 +		if(!id) {
 +			return;
 +		}
 +		var self = this;
 +		if(deselect_other === true) {
 +			$.each(this.contacts, function(contact) {
 +				self.contacts[contact].setCurrent(false);
 +			});
 +		}
 +		this.contacts[String(id)].setCurrent(true);
 +	};
 +
 +	/**
 +	 * (De)-select a contact
 +	 *
 +	 * @param string id
 +	 * @param bool state
 +	 * @param bool reverseOthers
 +	 */
 +	ContactList.prototype.setSelected = function(id, state, reverseOthers) {
 +		console.log('ContactList.setSelected', id);
 +		if(!id) {
 +			return;
 +		}
 +		var self = this;
 +		if(reverseOthers === true) {
 +			var $rows = this.$contactList.find('tr:visible.contact');
 +			$.each($rows, function(idx, row) {
 +				self.contacts[$(row).data('id')].setSelected(!state);
 +			});
 +		}
 +		this.contacts[String(id)].setSelected(state);
 +	};
 +
 +	/**
 +	 * Select a range of contacts by their id.
 +	 *
 +	 * @param string from
 +	 * @param string to
 +	 */
 +	ContactList.prototype.selectRange = function(from, to) {
 +		var self = this;
 +		var $rows = this.$contactList.find('tr:visible.contact');
 +		var index1 = $rows.index(this.contacts[String(from)].getListItemElement());
 +		var index2 = $rows.index(this.contacts[String(to)].getListItemElement());
 +		from = Math.min(index1, index2);
 +		to = Math.max(index1, index2)+1;
 +		$rows = $rows.slice(from, to);
 +		$.each($rows, function(idx, row) {
 +			self.contacts[$(row).data('id')].setSelected(true);
 +		});
 +	};
 +
 +	ContactList.prototype.setSortOrder = function(order) {
 +		order = order || contacts_sortby;
 +		//console.time('set name');
 +		var $rows = this.$contactList.find('tr:visible.contact');
 +		var self = this;
 +		$.each($rows, function(idx, row) {
 +			self.contacts[$(row).data('id')].setDisplayMethod(order);
 +		});
 +		//console.timeEnd('set name');
 +		if($rows.length > 1) {
 +			//console.time('sort');
 +			var rows = $rows.get();
 +			if(rows[0].firstElementChild && rows[0].firstElementChild.textContent) {
 +				rows.sort(function(a, b) {
 +					// 10 (TEN!) times faster than using jQuery!
 +					return a.firstElementChild.textContent.trim().toUpperCase()
 +						.localeCompare(b.firstElementChild.textContent.trim().toUpperCase());
 +				});
 +			} else {
 +				// IE8 doesn't support firstElementChild or textContent
 +				rows.sort(function(a, b) {
 +					return $(a).find('.nametext').text().toUpperCase()
 +						.localeCompare($(b).find('td.name').text().toUpperCase());
 +				});
 +			}
 +			this.$contactList.prepend(rows);
 +			//console.timeEnd('sort');
 +		}
 +	};
 +
 +	ContactList.prototype.insertContacts = function(contacts) {
 +		var self = this, items = [];
 +		$.each(contacts, function(c, contact) {
 +			var id = String(contact.metadata.id);
 +			self.contacts[id]
 +				= new Contact(
 +					self,
 +					id,
 +					contact.metadata,
 +					contact.data,
 +					self.$contactListItemTemplate,
 +					self.$contactDragItemTemplate,
 +					self.$contactFullTemplate,
 +					self.contactDetailTemplates
 +				);
 +			self.length +=1;
 +			var $item = self.contacts[id].renderListItem();
 +			if(!$item) {
 +				console.warn('Contact', contact, 'could not be rendered!');
 +				return true; // continue
 +			}
 +			items.push($item.get(0));
 +		});
 +		if(items.length > 0) {
 +			self.$contactList.append(items);
 +		}
 +		$(document).trigger('status.contacts.count', {
 +			count: self.length
 +		});
 +	}
 +
 +	/**
 +	* Load contacts
 +	* @param string backend Name of the backend ('local', 'ldap' etc.)
 +	* @param string addressBookId
 +	*/
 +	ContactList.prototype.loadContacts = function(backend, addressBookId, isActive) {
 +		if(!isActive) {
 +			return;
 +		}
 +		var self = this,
 +			contacts;
 +
 +		return $.when(self.storage.getAddressBook(backend, addressBookId, false))
 +			.then(function(response) {
 +			console.log('ContactList.loadContacts - fetching', response);
 +			if(!response.error) {
 +				if(response.data) {
 +					self.insertContacts(response.data.contacts);
 +				}
 +			} else {
 +				console.warn('ContactList.loadContacts - no data!!');
 +			}
 +		})
 +		.fail(function(response) {
 +			console.warn('Request Failed:', response.message);
 +			defer.reject({error: true, message: response.message});
 +		});
 +
 +	};
 +
 +	OC.Contacts.ContactList = ContactList;
 +
 +})(window, jQuery, OC);
diff --cc apps/contacts/js/groups.js
index a0aa765,0000000..c498b81
mode 100644,000000..100644
--- a/apps/contacts/js/groups.js
+++ b/apps/contacts/js/groups.js
@@@ -1,787 -1,0 +1,788 @@@
 +OC.Contacts = OC.Contacts || {};
 +
 +
 +(function(window, $, OC) {
 +	'use strict';
 +
 +	/**
 +	 * GroupList object
 +	 * Currently all data but the categories array is saved in the jquery DOM elements.
 +	 * This may change in the future.
 +	 * Each group element has a data-id and a data-type attribute. data-type can be
 +	 * 'fav' for favorites, 'all' for all elements, 'category' for group and 'shared' for
 +	 * a shared addressbook.
 +	 * data-id can be 'fav', 'all' or a numeric group or addressbook id.
 +	 * In addition each elements holds data entries for:
 +	 *   'contacts': An array of contact ids belonging to that group
 +	 *   'obj': A reference to the groupList object.
 +	 */
 +	var GroupList = function(storage, groupList, listItemTmpl) {
 +		this.storage = storage;
 +		this.$groupList = groupList;
 +		var self = this;
 +		var numtypes = ['category', 'fav', 'all'];
 +		this.$groupList.on('click', 'li.group', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			console.log('group click', $(this));
 +			if($(event.target).is('.action.delete')) {
 +				$('.tipsy').remove();
 +				$(this).addClass('loading').removeClass('active');
 +				event.stopPropagation();
 +				event.preventDefault();
 +				var id = $(event.target).parents('li').first().data('id');
 +				self.deleteGroup(id, function(response) {
 +					if(response.error) {
 +						OC.notify({message:response.message});
 +					}
 +				});
 +			} else if($(event.target).is('.action.edit')) {
 +				event.stopPropagation();
 +				event.preventDefault();
 +				self.editGroup($(this));
 +			} else {
 +				if($(this).is(':not(.editing)')) {
 +					self.selectGroup({element:$(this)});
 +				}
 +			}
 +		});
 +		var $addInput = this.$groupList.find('.add-group');
 +		$addInput.addnew({
 +			addText: t('core', 'Add'),
 +			ok: function(event, name) {
 +				$addInput.addClass('loading');
++				name = escapeHTML(name);
 +				self.addGroup({name:name}, function(response) {
 +					if(response.error) {
 +						$(document).trigger('status.contacts.error', response);
 +					} else {
 +						$addInput.addnew('close');
 +					}
 +					$addInput.removeClass('loading');
 +				});
 +			}
 +		});
 +
 +		$(document).bind('status.contacts.count', function(e, data) {
 +			console.log('Num contacts:', data.count);
 +			self.findById('all').find('.numcontacts').text(data.count);
 +		});
 +
 +		this.$groupListItemTemplate = listItemTmpl;
 +		this.categories = [];
 +	};
 +
 +	/**
 +	 * Set a group as being currently selected
 +	 * 
 +	 * @param object params. A map containing either a group id
 +	 * or a jQuery group element.
 +	 * This triggers a 'status.group.selected' event unless if
 +	 * the group hasn't been saved/created yet.
 +	 */
 +	GroupList.prototype.selectGroup = function(params) {
 +		var self = this;
 +		/*if(!this.loaded) {
 +			console.log('Not loaded');
 +			setTimeout(function() {
 +				self.selectGroup(params);
 +			}, 100);
 +			return;
 +		}*/
 +		var id, $elem;
 +		if(typeof params.id !== 'undefined') {
 +			id = params.id;
 +			$elem = this.findById(id);
 +		} else if(typeof params.element !== 'undefined') {
 +			id = params.element.data('id');
 +			$elem = params.element;
 +		}
 +		if(!$elem.length) {
 +			self.selectGroup({id:'all'});
 +			return;
 +		}
 +		console.log('selectGroup', id, $elem);
 +		this.$groupList.find('li').removeClass('active');
 +		$elem.addClass('active');
 +		if(id === 'new') {
 +			return;
 +		}
 +		this.lastgroup = id;
 +		$(document).trigger('status.group.selected', {
 +			id: this.lastgroup,
 +			type: $elem.data('type'),
 +			contacts: $elem.data('contacts')
 +		});
 +	};
 +
 +	GroupList.prototype.triggerLastGroup = function() {
 +		this.selectGroup({id:this.lastgroup});
 +	}
 +
 +	/**
 +	 * Test if a group with this name exists (case-insensitive)
 +	 *
 +	 * @param string name
 +	 * @return bool
 +	 */
 +	GroupList.prototype.hasGroup = function(name) {
 +		return (this.findByName(name) !== null);
 +	}
 +
 +	/**
 +	 * Get the group name by id.
 +	 * 
 +	 * Kind of a hack. Need to get the immidiate text without the enclosed spans with number etc.
 +	 * Not sure this works in IE8 and maybe others.
 +	 * 
 +	 * @param integer id. The numeric group or addressbook id.
 +	 * @returns string The name of the group.
 +	 */
 +	GroupList.prototype.nameById = function(id) {
 +		return $.trim(this.findById(id).data('rawname'));
 +		//return $.trim(this.findById(id).clone().find("*").remove().end().text()); //.contents().filter(function(){ return(this.nodeType == 3); }).text().trim();
 +	};
 +
 +	/** Get the group element by name.
 +	 *
 +	 * @param string name. The name of the group to search for (case-insensitive).
 +	 * @returns object|null The jQuery object.
 +	 */
 +	GroupList.prototype.findByName = function(name) {
 +		var $elem = null;
 +		this.$groupList.find('li[data-type="category"]').each(function() {
 +			if ($(this).data('rawname').toLowerCase() === name.toLowerCase()) {
 +				$elem = $(this);
 +				return false; //break out of loop
 +			}
 +		});
 +		return $elem;
 +	};
 +
 +	/** Get the group element by id.
 +	 * 
 +	 * @param integer id. The numeric group or addressbook id.
 +	 * @returns object The jQuery object.
 +	 */
 +	GroupList.prototype.findById = function(id) {
 +		return this.$groupList.find('li[data-id="' + id + '"]');
 +	};
 +
 +	/**
 +	 * Check if a contact is favorited.
 +	 * @param integer contactid.
 +	 * @returns boolean.
 +	 */
 +	GroupList.prototype.isFavorite = function(contactid) {
 +		return this.inGroup(contactid, 'fav');
 +	};
 +
 +	/**
 +	 * Check if a contact is in a specfic group.
 +	 * @param integer contactid.
 +	 * @param integer groupid.
 +	 * @returns boolean.
 +	 */
 +	GroupList.prototype.inGroup = function(contactid, groupid) {
 +		var $groupelem = this.findById(groupid);
 +		var contacts = $groupelem.data('contacts');
 +		return (contacts.indexOf(contactid) !== -1);
 +	};
 +
 +	/**
 +	 * Mark/unmark a contact as favorite.
 +	 * 
 +	 * @param integer contactid.
 +	 * @param boolean state.
 +	 * @param function cb. Optional callback function.
 +	 */
 +	GroupList.prototype.setAsFavorite = function(contactid, state, cb) {
 +		var $groupelem = this.findById('fav');
 +		var contacts = $groupelem.data('contacts');
 +		if(state) {
 +			$.when(OC.Tags.addToFavorites(contactid, 'contact'))
 +			.then(function(response) {
 +				console.log(response);
 +				contacts.push(contactid);
 +				$groupelem.data('contacts', contacts);
 +				$groupelem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +				if(contacts.length > 0 && $groupelem.is(':hidden')) {
 +					$groupelem.show();
 +				}
 +				if(typeof cb === 'function') {
 +					cb(response);
 +				}
 +			})
 +			.fail(function(response) {
 +				console.warn(response);
 +			});
 +		} else {
 +			$.when(OC.Tags.removeFromFavorites(contactid, 'contact'))
 +			.then(function(response) {
 +				contacts.splice(contacts.indexOf(contactid), 1);
 +				//console.log('contacts', contacts, contacts.indexOf(id), contacts.indexOf(String(id)));
 +				$groupelem.data('contacts', contacts);
 +				$groupelem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +				if(contacts.length === 0 && $groupelem.is(':visible')) {
 +					$groupelem.hide();
 +				}
 +				if(typeof cb === 'function') {
 +					cb(response);
 +				}
 +			})
 +			.fail(function(response) {
 +				console.warn(response);
 +			});
 +		}
 +	};
 +
 +	/**
 +	* Add one or more contact ids to a group
 +	* @param integer|array contactid. An integer id or an array of integer ids.
 +	* @param integer groupid. The integer id of the group
 +	* @param function cb. Optional call-back function
 +	*/
 +	GroupList.prototype.addTo = function(contactid, groupid, cb) {
 +		console.log('GroupList.addTo', contactid, groupid);
 +		var $groupelem = this.findById(groupid);
 +		var contacts = $groupelem.data('contacts');
 +		var ids = [];
 +		if(!contacts) {
 +			console.log('Contacts not found, adding list!!!');
 +			contacts = [];
 +		}
 +		var self = this;
 +		var doPost = false;
 +		if(typeof contactid === 'string') {
 +			if(contacts.indexOf(contactid) === -1) {
 +				ids.push(contactid);
 +				doPost = true;
 +			} else {
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contact is already in this group.')});
 +				}
 +			}
 +		} else if(utils.isArray(contactid)) {
 +			$.each(contactid, function(i, id) {
 +				if(contacts.indexOf(id) === -1) {
 +					ids.push(id);
 +				}
 +			});
 +			if(ids.length > 0) {
 +				doPost = true;
 +			} else {
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contacts are already in this group.')});
 +				}
 +			}
 +		} else {
 +			console.warn('Invalid data type: ' + typeof contactid);
 +		}
 +		if(doPost) {
 +			var groupname = self.nameById(groupid);
 +			$.when(this.storage.addToGroup(ids, groupid, groupname)).then(function(response) {
 +				if(!response.error) {
 +					contacts = contacts.concat(ids).sort();
 +					$groupelem.data('contacts', contacts);
 +					var $numelem = $groupelem.find('.numcontacts');
 +					$numelem.text(contacts.length > 0 && contacts.length || '').switchClass('', 'active', 200);
 +					setTimeout(function() {
 +						$numelem.switchClass('active', '', 1000);
 +					}, 2000);
 +					if(typeof cb === 'function') {
 +						cb({ids:ids});
 +					}
 +					$.each(ids, function(idx, contactid) {
 +						$(document).trigger('status.group.contactadded', {
 +							contactid: contactid,
 +							groupid: groupid,
 +							groupname: groupname
 +						});
 +					});
 +				} else {
 +					if(typeof cb == 'function') {
 +						cb({error:true, message:response.message});
 +					}
 +				}
 +			});
 +		}
 +	};
 +
 +	/**
 +	* Removes one or more contact ids from a group
 +	* TODO: When deleting contacts this method should just remove the contact id
 +	* from its internal list without saving.
 +	* @param integer|array contactid. An integer id or an array of integer ids.
 +	* @param integer groupid. The integer id of the group
 +	* @param boolean onlyInternal If true don't save to backend
 +	* @param function cb. Optional call-back function
 +	*/
 +	GroupList.prototype.removeFrom = function(contactid, groupid, onlyInternal, cb) {
 +		console.log('GroupList.removeFrom', contactid, groupid);
 +		var $groupelem = this.findById(groupid);
 +		var groupname = this.nameById(groupid);
 +		var contacts = $groupelem.data('contacts');
 +		var ids = [];
 +
 +		// If it's the 'all' group simply decrement the number
 +		if(groupid === 'all') {
 +			var $numelem = $groupelem.find('.numcontacts');
 +			$numelem.text(parseInt($numelem.text()-1)).switchClass('', 'active', 200);
 +			setTimeout(function() {
 +				$numelem.switchClass('active', '', 1000);
 +			}, 2000);
 +			if(typeof cb === 'function') {
 +				cb({ids:[id]});
 +			}
 +		}
 +		// If the contact is in the category remove it from internal list.
 +		if(!contacts) {
 +			if(typeof cb === 'function') {
 +				cb({error:true, message:t('contacts', 'Couldn\'t get contact list.')});
 +			}
 +			return;
 +		}
 +		var doPost = false;
 +		if(typeof contactid === 'string') {
 +			if(contacts.indexOf(contactid) !== -1) {
 +				ids.push(contactid);
 +				doPost = true;
 +			} else {
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contact is not in this group.')});
 +				}
 +			}
 +		} else if(utils.isArray(contactid)) {
 +			$.each(contactid, function(i, id) {
 +				if(contacts.indexOf(id) !== -1) {
 +					ids.push(id);
 +				}
 +			});
 +			if(ids.length > 0) {
 +				doPost = true;
 +			} else {
 +				console.log(contactid, 'not in', contacts);
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contacts are not in this group.')});
 +				}
 +			}
 +		}
 +		$.each(ids, function(idx, id) {
 +			contacts.splice(contacts.indexOf(id), 1);
 +		});
 +		$groupelem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +		//console.log('contacts', contacts, contacts.indexOf(id), contacts.indexOf(String(id)));
 +		$groupelem.data('contacts', contacts);
 +		if(doPost) {
 +			// If a group is selected the contact has to be removed from the list
 +			$.each(ids, function(idx, contactid) {
 +				$(document).trigger('status.group.contactremoved', {
 +					contactid: contactid,
 +					groupid: parseInt(groupid),
 +					groupname: groupname
 +				});
 +			});
 +			if(!onlyInternal) {
 +				$.when(this.storage.removeFromGroup(ids, groupid, groupname)).then(function(response) {
 +					if(!response.error) {
 +						if(typeof cb === 'function') {
 +							cb({ids:ids});
 +						}
 +					} else {
 +						if(typeof cb == 'function') {
 +							cb({error:true, message:response.message});
 +						}
 +					}
 +				});
 +			}
 +		}
 +	};
 +
 +	/**
 +	 * Remove a contact from all groups. Used on contact deletion.
 +	 * 
 +	 * @param integer contactid.
 +	 * @param boolean alsoSpecial. Whether the contact should also be
 +	 *    removed from non 'category' groups.
 +	 * @param boolean onlyInternal If true don't save to backend
 +	 */
 +	GroupList.prototype.removeFromAll = function(contactid, alsoSpecial, onlyInternal) {
 +		var self = this;
 +		var selector = alsoSpecial ? 'li' : 'li[data-type="category"]';
 +		$.each(this.$groupList.find(selector), function(i, group) {
 +			self.removeFrom(contactid, $(this).data('id'), onlyInternal);
 +		});
 +	};
 +
 +	/**
 +	 * Handler that will be called by OCCategories if any groups have changed.
 +	 * This is called when categories are edited by the generic categories edit
 +	 * dialog, and will probably not be used in this app.
 +	 */
 +	GroupList.prototype.categoriesChanged = function(newcategories) {
 +		console.log('GroupList.categoriesChanged, I should do something');
 +	};
 +
 +	/**
 +	 * Drop handler for for adding contact to group/favorites.
 +	 * FIXME: The drag helper object goes below the group elements
 +	 * during drag, and the drop target is hard to hit.
 +	 */
 +	GroupList.prototype.contactDropped = function(event, ui) {
 +		var dragitem = ui.draggable, droptarget = $(this);
 +		console.log('dropped', dragitem);
 +		if(dragitem.is('.name')) {
 +			var id = String(dragitem.parent().data('id'));
 +			console.log('contact dropped', id, 'on', $(this).data('id'));
 +			if($(this).data('type') === 'fav') {
 +				$(this).data('obj').setAsFavorite(id, true);
 +			} else {
 +				$(this).data('obj').addTo(id, $(this).data('id'));
 +			}
 +		}
 +	};
 +
 +	/**
 +	 * Remove a group from backend.
 +	 * 
 +	 * On success this triggers a 'status.group.groupremoved' event with an object
 +	 * containing the properties:
 +	 * 
 +	 *   groupid: The numeric id of the removed group
 +	 *   groupname: The string value of the group.
 +	 *   newgroupid: The id of the group that is selected after deletion.
 +	 *   contacts: An array of integer ids of contacts that must updated.
 +	 * 
 +	 * The handler for that event must take care of updating all contact objects
 +	 * internal CATEGORIES value and saving them to backend.
 +	 * 
 +	 * @param integer groupid.
 +	 * @param function cb. Optional callback function.
 +	 */
 +	GroupList.prototype.deleteGroup = function(groupid, cb) {
 +		var $elem = this.findById(groupid);
 +		var $newelem = $elem.prev('li');
 +		var name = this.nameById(groupid);
 +		var contacts = $elem.data('contacts');
 +		var self = this;
 +		console.log('delete group', $elem, groupid, contacts);
 +		$.when(this.storage.deleteGroup(name)).then(function(response) {
 +			if (!response.error) {
 +				$.each(self.categories, function(idx, category) {
 +					if(category.id === groupid) {
 +						self.categories.splice(self.categories.indexOf(category), 1);
 +						return false; // Break loop
 +					}
 +				});
 +				$(document).trigger('status.group.groupremoved', {
 +					groupid: groupid,
 +					newgroupid: parseInt($newelem.data('id')),
 +					groupname: name,
 +					contacts: contacts
 +				});
 +				$elem.remove();
 +				self.selectGroup({element:$newelem});
 +			} else {
 +				console.log('Error', response);
 +			}
 +			if(typeof cb === 'function') {
 +				cb(response);
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed: " + response.message);
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	/**
 +	 * Edit a groups name.
 +	 * 
 +	 * @param object $element jQuery element
 +	 */
 +	GroupList.prototype.editGroup = function($element) {
 +		console.log('editGroup', $element);
 +		var self = this;
 +		var oldname = $element.data('rawname');
 +		var id = $element.data('id');
 +
 +		var $editInput = $('<input type="text" />').val(oldname);
 +		$element.hide();
 +		$editInput.insertBefore($element).wrap('<li class="group editing" />');
 +		var $tmpelem = $editInput.parent('li');
 +		console.log('tmpelem', $tmpelem);
 +
 +		$editInput.addnew({
 +			autoOpen: true,
 +			addText: t('contacts', 'Save'),
 +			ok: function(event, newname) {
 +				console.log('New name', newname);
 +				$editInput.addClass('loading');
 +				self.renameGroup(oldname, newname, function(response) {
 +					if(response.error) {
 +						$(document).trigger('status.contacts.error', response);
 +					} else {
 +						$editInput.addnew('close');
 +						$(document).trigger('status.group.grouprenamed', {
 +							groupid: id,
 +							from: oldname,
 +							to: newname,
 +							contacts: $element.data('contacts')
 +						});
 +						$element.data('rawname', newname);
 +						$element.find('.name').text(escapeHTML(newname));
 +					}
 +					$editInput.removeClass('loading');
 +				});
 +			},
 +			cancel: function(event) {
 +				console.log('cancel');
 +				$editInput.removeClass('loading');
 +			},
 +			close: function() {
 +				console.log('close');
 +				$tmpelem.remove();
 +				$element.show();
 +			}
 +		});
 +
 +	};
 +
 +	/**
 +	 * Rename a group.
 +	 *
 +	 * @param string from
 +	 * @param string to
 +	 * @param function cb
 +	 */
 +	GroupList.prototype.renameGroup = function(from, to, cb) {
 +		$.when(this.storage.renameGroup(from, to)).then(function(response) {
 +			cb({error:false});
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed: " + response);
 +			cb({error:true});
 +			response.message = t('contacts', 'Failed renaming group: {error}', {error:response.message});
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	/**
 +	 * Add a new group.
 +	 * 
 +	 * After the addition a group element will be inserted in the list of group
 +	 * elements with data-type="category".
 +	 * NOTE: The element is inserted (semi) alphabetically, but since group elements
 +	 * can now be rearranged by dragging them it should probably be dropped.
 +	 * 
 +	 * @param object params. Map that can have the following properties:
 +	 *   'name': Mandatory. If a group with the same name already exists
 +	 *       (not case sensitive) the callback will be called with its 'status'
 +	 *       set to 'error' and the function returns.
 +	 *   'element': A jQuery group element. If this property isn't present
 +	 *       a new element will be created.
 +	 * @param function cb. On success the only parameter is an object with
 +	 *    'status': 'success', id: new id from the backend and 'name' the group name.
 +	 *     On error 'status' will be 'error' and 'message' will hold any error message
 +	 *     from the backend.
 +	 */
 +	GroupList.prototype.addGroup = function(params, cb) {
 +		//console.log('GroupList.addGroup', params);
 +		var name = params.name;
 +		var contacts = []; // $.map(contacts, function(c) {return parseInt(c)});
 +		var self = this;
 +		if(this.hasGroup(name)) {
 +			if(typeof cb === 'function') {
 +				cb({error:true, message:t('contacts', 'A group named {group} already exists', {group: escapeHTML(name)})});
 +			}
 +			return;
 +		}
 +		$.when(this.storage.addGroup(name)).then(function(response) {
 +			if (!response.error) {
 +				name = response.data.name;
 +				var id = response.data.id;
 +				var tmpl = self.$groupListItemTemplate;
 +				var $elem = (tmpl).octemplate({
 +						id: id,
 +						type: 'category',
 +						num: (contacts.length > 0 && contacts.length || ''),
 +						name: escapeHTML(name)
 +					});
 +				self.categories.push({id: id, name: name});
 +				$elem.data('obj', self);
 +				$elem.data('contacts', contacts);
 +				$elem.data('rawname', name);
 +				$elem.data('id', id);
 +				var added = false;
 +				self.$groupList.find('li.group[data-type="category"]').each(function() {
 +					if ($(this).data('rawname').toLowerCase().localeCompare(name.toLowerCase()) > 0) {
 +						$(this).before($elem);
 +						added = true;
 +						return false;
 +					}
 +				});
 +				if(!added) {
 +					var $insertAfter = self.$groupList.find('li.group[data-type="category"]').last()
 +						|| self.$groupList.find('li.group[data-id="fav"]')
 +						|| self.$groupList.find('li.group[data-id="all"]');
 +					$elem.insertAfter($insertAfter);
 +				}
 +				self.selectGroup({element:$elem});
 +				$elem.tipsy({trigger:'manual', gravity:'w', fallback: t('contacts', 'You can drag groups to\narrange them as you like.')});
 +				$elem.tipsy('show');
 +				if(typeof cb === 'function') {
 +					cb({id:parseInt(id), name:name});
 +				}
 +			} else {
 +				if(typeof cb === 'function') {
 +					cb({error:true, message:response.data.message});
 +				}
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed: " + response);
 +			response.message = t('contacts', 'Failed adding group: {error}', {error:response.message})
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	GroupList.prototype.loadGroups = function(cb) {
 +		var self = this;
 +		var acceptdrop = '.dragContact';
 +		var $groupList = this.$groupList;
 +		var tmpl = this.$groupListItemTemplate;
 +
 +		if(!this.findById('all').length) {
 +			tmpl.octemplate({id: 'all', type: 'all', num: '', name: t('contacts', 'All')}).appendTo($groupList);
 +		}
 +		return $.when(this.storage.getGroupsForUser()).then(function(response) {
 +			if (response && !response.error) {
 +				self.lastgroup = response.data.lastgroup;
 +				self.sortorder = contacts_groups_sortorder;
 +				console.log('sortorder', self.sortorder);
 +				// Favorites
 +				// Map to strings to easier lookup in contacts list.
 +				var contacts = $.map(response.data.favorites, function(c) {return String(c);});
 +				var $elem = self.findById('fav');
 +				$elem = $elem.length ? $elem : tmpl.octemplate({
 +					id: 'fav',
 +					type: 'fav',
 +					num: contacts.length > 0 && contacts.length || '',
 +					name: t('contacts', 'Favorites')
 +				}).appendTo($groupList);
 +				$elem.data('obj', self);
 +				$elem.data('rawname', t('contacts', 'Favorites'));
 +				if(!$elem.find('.starred').length) {
 +					$elem.data('contacts', contacts).find('.numcontacts').before('<span class="starred action" />');
 +				}
 +				$elem.droppable({
 +							drop: self.contactDropped,
 +							over: function( event, ui ) {
 +								console.log('over favorites', ui.draggable);
 +							},
 +							activeClass: 'ui-state-active',
 +							hoverClass: 'ui-state-hover',
 +							scope: 'contacts'
 +						});
 +				if(contacts.length === 0) {
 +					$elem.hide();
 +				}
 +				console.log('favorites', $elem.data('contacts'));
 +				// Normal groups
 +				$.each(response.data.categories, function(c, category) {
 +					var contacts = $.map(category.contacts, function(c) {return String(c);});
 +					var $elem = self.findById(category.id);
 +					if($elem.length) {
 +						$elem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +					} else {
 +						$elem = $elem.length ? $elem : (tmpl).octemplate({
 +							id: category.id,
 +							type: 'category',
 +							num: contacts.length > 0 && contacts.length || '',
 +							name: category.name
 +						});
 +						self.categories.push({id: category.id, name: category.name});
 +						$elem.data('obj', self);
 +						$elem.data('rawname', category.name);
 +						$elem.data('id', category.id);
 +						$elem.droppable({
 +										drop: self.contactDropped,
 +										over: function( event, ui ) {
 +											console.log('over group', ui.draggable);
 +										},
 +										activeClass: 'ui-state-active',
 +										hoverClass: 'ui-state-hover',
 +										scope: 'contacts'
 +									});
 +						$elem.appendTo($groupList);
 +					}
 +					$elem.data('contacts', contacts);
 +				});
 +
 +				var elems = $groupList.find('li[data-type="category"]').get();
 +
 +				elems.sort(function(a, b) {
 +					return self.sortorder.indexOf(parseInt($(a).data('id'))) > self.sortorder.indexOf(parseInt($(b).data('id')));
 +				});
 +
 +				$.each(elems, function(index, elem) {
 +					$groupList.append(elem);
 +				});
 +
 +				// Shared addressbook
 +				$.each(response.data.shared, function(c, shared) {
 +					var sharedindicator = '<img class="shared svg" src="' + OC.imagePath('core', 'actions/shared') + '"'
 +						+ 'title="' + t('contacts', 'Shared by {owner}', {owner:shared.owner}) + '" />';
 +					var $elem = self.findById(shared.id);
 +					$elem = $elem.length ? $elem : (tmpl).octemplate({
 +						id: shared.id,
 +						type: 'shared',
 +						num: response.data.shared.length,
 +						name: shared.displayname
 +					});
 +					$elem.find('.numcontacts').after(sharedindicator);
 +					$elem.data('obj', self);
 +					$elem.data('rawname', shared.displayname);
 +					$elem.data('id', shared.id);
 +					$elem.appendTo($groupList);
 +				});
 +				if(!self.findById('uncategorized').length) {
 +					tmpl.octemplate({id: 'uncategorized', type: 'uncategorized', num: '', name: t('contacts', 'Not grouped')}).appendTo($groupList);
 +				}
 +				$groupList.sortable({
 +					items: 'li[data-type="category"]',
 +					stop: function() {
 +						console.log('stop sorting', $(this));
 +						var ids = [];
 +						$.each($(this).children('li[data-type="category"]'), function(i, elem) {
 +							var id = $(elem).data('id');
 +							if(typeof id === 'number' && id % 1 == 0) {
 +								ids.push(id);
 +							}
 +						});
 +						self.sortorder = ids;
 +						$(document).trigger('status.groups.sorted', {
 +							sortorder: self.sortorder.join(',')
 +						});
 +					}
 +				});
 +				var $elem = self.findById(self.lastgroup);
 +				$elem.addClass('active');
 +				self.loaded = true;
 +			} // TODO: else
 +			if(typeof cb === 'function') {
 +				cb();
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed:", response);
 +			response.message = t('contacts', 'Failed loading groups: {error}', {error:response.message});
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	OC.Contacts.GroupList = GroupList;
 +
 +})(window, jQuery, OC);
diff --cc apps/contacts/lib/contact.php
index 414df4b,0000000..d659a05
mode 100644,000000..100644
--- a/apps/contacts/lib/contact.php
+++ b/apps/contacts/lib/contact.php
@@@ -1,779 -1,0 +1,779 @@@
 +<?php
 +/**
 + * ownCloud - Contact object
 + *
 + * @author Thomas Tanghus
 + * @copyright 2012 Thomas Tanghus (thomas at tanghus.net)
 + *
 + * 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\Contacts;
 +
 +use Sabre\VObject\Property,
 +	OCA\Contacts\Utils\Properties;
 +
 +/**
 + * Subclass this class or implement IPIMObject interface for PIM objects
 + */
 +
 +class Contact extends VObject\VCard implements IPIMObject {
 +
 +	/**
 +	 * The name of the object type in this case VCARD.
 +	 *
 +	 * This is used when serializing the object.
 +	 *
 +	 * @var string
 +	 */
 +	public $name = 'VCARD';
 +
 +	/**
 +	 * @brief language object
 +	 *
 +	 * @var OC_L10N
 +	 */
 +	public static $l10n;
 +
 +	protected $props = array();
 +
 +	/**
 +	 * Create a new Contact object
 +	 *
 +	 * @param AddressBook $parent
 +	 * @param AbstractBackend $backend
 +	 * @param mixed $data
 +	 */
 +	public function __construct($parent, $backend, $data = null) {
 +		self::$l10n = $parent::$l10n;
 +		//\OCP\Util::writeLog('contacts', __METHOD__ . ' parent: ' . print_r($parent, true) . ', backend: ' . print_r($backend, true) . ', data: ' . print_r($data, true), \OCP\Util::DEBUG);
 +		//\OCP\Util::writeLog('contacts', __METHOD__, \OCP\Util::DEBUG);
 +		$this->props['parent'] = $parent;
 +		$this->props['backend'] = $backend;
 +		$this->props['retrieved'] = false;
 +		$this->props['saved'] = false;
 +
 +		if(!is_null($data)) {
 +			if($data instanceof VObject\VCard) {
 +				foreach($data->children as $child) {
 +					$this->add($child);
 +				}
 +				$this->setRetrieved(true);
 +			} elseif(is_array($data)) {
 +				foreach($data as $key => $value) {
 +					switch($key) {
 +						case 'id':
 +							$this->props['id'] = $value;
 +							break;
 +						case 'lastmodified':
 +							$this->props['lastmodified'] = $value;
 +							break;
 +						case 'uri':
 +							$this->props['uri'] = $value;
 +							break;
 +						case 'carddata':
 +							$this->props['carddata'] = $value;
 +							$this->retrieve();
 +							break;
 +						case 'vcard':
 +							$this->props['vcard'] = $value;
 +							$this->retrieve();
 +							break;
 +						case 'displayname':
 +						case 'fullname':
- 							if($value) {
++							if(is_string($value)) {
 +								$this->props['displayname'] = $value;
 +								$this->FN = $value;
 +								// Set it to saved again as we're not actually changing anything
 +								$this->setSaved();
 +							}
 +							break;
 +					}
 +				}
 +			}
 +		}
 +	}
 +
 +	/**
 +	 * @return array|null
 +	 */
 +	public function getMetaData() {
 +		if(!$this->hasPermission(\OCP\PERMISSION_READ)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to see this contact'), 403);
 +		}
 +		if(!isset($this->props['displayname'])) {
 +			if(!$this->retrieve()) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.' error reading: '.print_r($this->props, true), \OCP\Util::ERROR);
 +				return null;
 +			}
 +		}
 +		return array(
 +			'id' => $this->getId(),
 +			'displayname' => $this->getDisplayName(),
 +			'permissions' => $this->getPermissions(),
 +			'lastmodified' => $this->lastModified(),
 +			'owner' => $this->getOwner(),
 +			'parent' => $this->getParent()->getId(),
 +			'backend' => $this->getBackend()->name,
 +		);
 +	}
 +
 +	/**
 +	 * Get a unique key combined of backend name, address book id and contact id.
 +	 *
 +	 * @return string
 +	 */
 +	public function combinedKey() {
 +		return $this->getBackend()->name . '::' . $this->getParent()->getId() . '::' . $this->getId();
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	public function getOwner() {
 +		return $this->props['parent']->getOwner();
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	public function getId() {
 +		return isset($this->props['id']) ? $this->props['id'] : null;
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	function getDisplayName() {
 +		if(!$this->hasPermission(\OCP\PERMISSION_READ)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to see this contact'), 403);
 +		}
 +		return isset($this->props['displayname'])
 +			? $this->props['displayname']
 +			: (isset($this->FN) ? $this->FN : null);
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	public function getURI() {
 +		return isset($this->props['uri']) ? $this->props['uri'] : null;
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 * TODO: Cache result.
 +	 */
 +	public function getETag() {
 +		$this->retrieve();
 +		return md5($this->serialize());
 +	}
 +
 +	/**
 +	 * If this object is part of a collection return a reference
 +	 * to the parent object, otherwise return null.
 +	 * @return IPIMObject|null
 +	 */
 +	public function getParent() {
 +		return $this->props['parent'];
 +	}
 +
 +	public function getBackend() {
 +		return $this->props['backend'];
 +	}
 +
 +	/** CRUDS permissions (Create, Read, Update, Delete, Share)
 +	 *
 +	 * @return integer
 +	 */
 +	public function getPermissions() {
 +		return $this->props['parent']->getPermissions();
 +	}
 +
 +	/**
 +	 * @param integer $permission
 +	 * @return bool
 +	 */
 +	public function hasPermission($permission) {
 +		return $this->getPermissions() & $permission;
 +	}
 +
 +	/**
 +	 * Save the address book data to backend
 +	 * FIXME
 +	 *
 +	 * @param array $data
 +	 * @return bool
 +	 */
 +/*	public function update(array $data) {
 +
 +		foreach($data as $key => $value) {
 +			switch($key) {
 +				case 'displayname':
 +					$this->addressBookInfo['displayname'] = $value;
 +					break;
 +				case 'description':
 +					$this->addressBookInfo['description'] = $value;
 +					break;
 +			}
 +		}
 +		return $this->props['backend']->updateContact(
 +			$this->getParent()->getId(),
 +			$this->getId(),
 +			$this
 +		);
 +	}
 +*/
 +	/**
 +	 * Delete the data from backend
 +	 *
 +	 * FIXME: Should be removed as it could leave the parent with a dataless object.
 +	 *
 +	 * @return bool
 +	 */
 +	public function delete() {
 +		if(!$this->hasPermission(\OCP\PERMISSION_DELETE)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to delete this contact'), 403);
 +		}
 +		return $this->props['backend']->deleteContact(
 +			$this->getParent()->getId(),
 +			$this->getId()
 +		);
 +	}
 +
 +	/**
 +	 * Save the contact data to backend
 +	 *
 +	 * @return bool
 +	 */
 +	public function save($force = false) {
 +		if(!$this->hasPermission(\OCP\PERMISSION_UPDATE)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to update this contact'), 403);
 +		}
 +		if($this->isSaved() && !$force) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.' Already saved: ' . print_r($this->props, true), \OCP\Util::DEBUG);
 +			return true;
 +		}
 +		if(isset($this->FN)) {
 +			$this->props['displayname'] = (string)$this->FN;
 +		}
 +		if($this->getId()) {
 +			if(!$this->getBackend()->hasContactMethodFor(\OCP\PERMISSION_UPDATE)) {
 +				throw new \Exception(self::$l10n->t('The backend for this contact does not support updating it'), 501);
 +			}
 +			if($this->getBackend()
 +				->updateContact(
 +					$this->getParent()->getId(),
 +					$this->getId(),
 +					$this
 +				)
 +			) {
 +				$this->props['lastmodified'] = time();
 +				$this->setSaved(true);
 +				return true;
 +			} else {
 +				return false;
 +			}
 +		} else {
 +			//print(__METHOD__.' ' . print_r($this->getParent(), true));
 +			if(!$this->getBackend()->hasContactMethodFor(\OCP\PERMISSION_CREATE)) {
 +				throw new \Exception(self::$l10n->t('This backend not support adding contacts'), 501);
 +			}
 +			$this->props['id'] = $this->getBackend()->createContact(
 +				$this->getParent()->getId(), $this
 +			);
 +			$this->setSaved(true);
 +			return $this->getId() !== false;
 +		}
 +	}
 +
 +	/**
 +	 * Get the data from the backend
 +	 * FIXME: Clean this up and make sure the logic is OK.
 +	 */
 +	public function retrieve() {
 +		if($this->isRetrieved() || count($this->children) > 1) {
 +			//\OCP\Util::writeLog('contacts', __METHOD__. ' children', \OCP\Util::DEBUG);
 +			return true;
 +		} else {
 +			$data = null;
 +			if(isset($this->props['vcard'])
 +				&& $this->props['vcard'] instanceof VObject\VCard) {
 +				foreach($this->props['vcard']->children() as $child) {
 +					$this->add($child);
 +					if($child->name === 'FN') {
 +						$this->props['displayname']
 +							= strtr($child->value, array('\,' => ',', '\;' => ';', '\\\\' => '\\'));
 +					}
 +				}
 +				$this->setRetrieved(true);
 +				$this->setSaved(true);
 +				//$this->children = $this->props['vcard']->children();
 +				unset($this->props['vcard']);
 +				return true;
 +			} elseif(!isset($this->props['carddata'])) {
 +				$result = $this->props['backend']->getContact(
 +					$this->getParent()->getId(),
 +					$this->getId()
 +				);
 +				if($result) {
 +					if(isset($result['vcard'])
 +						&& $result['vcard'] instanceof VObject\VCard) {
 +						foreach($result['vcard']->children() as $child) {
 +							$this->add($child);
 +						}
 +						$this->setRetrieved(true);
 +						return true;
 +					} elseif(isset($result['carddata'])) {
 +						// Save internal values
 +						$data = $result['carddata'];
 +						$this->props['carddata'] = $result['carddata'];
 +						$this->props['lastmodified'] = isset($result['lastmodified'])
 +							? $result['lastmodified']
 +							: null;
 +						$this->props['displayname'] = $result['displayname'];
 +						$this->props['permissions'] = $result['permissions'];
 +					} else {
 +						\OCP\Util::writeLog('contacts', __METHOD__
 +							. ' Could not get vcard or carddata: '
 +							. $this->getId()
 +							. print_r($result, true), \OCP\Util::DEBUG);
 +						return false;
 +					}
 +				} else {
 +					\OCP\Util::writeLog('contacts', __METHOD__.' Error getting contact: ' . $this->getId(), \OCP\Util::DEBUG);
 +				}
 +			} elseif(isset($this->props['carddata'])) {
 +				$data = $this->props['carddata'];
 +			}
 +			try {
 +				$obj = \Sabre\VObject\Reader::read(
 +					$data,
 +					\Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES
 +				);
 +				if($obj) {
 +					foreach($obj->children as $child) {
 +						$this->add($child);
 +					}
 +					$this->setRetrieved(true);
 +					$this->setSaved(true);
 +				} else {
 +					\OCP\Util::writeLog('contacts', __METHOD__.' Error reading: ' . print_r($data, true), \OCP\Util::DEBUG);
 +					return false;
 +				}
 +			} catch (\Exception $e) {
 +				\OCP\Util::writeLog('contacts', __METHOD__ .
 +					' Error parsing carddata  for: ' . $this->getId() . ' ' . $e->getMessage(),
 +						\OCP\Util::ERROR);
 +				return false;
 +			}
 +		}
 +		return true;
 +	}
 +
 +	/**
 +	* Get a property index in the contact by the checksum of its serialized value
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @return \Sabre\VObject\Property Property by reference
 +	* @throws An exception with error code 404 if the property is not found.
 +	*/
 +	public function getPropertyIndexByChecksum($checksum) {
 +		$this->retrieve();
 +		$idx = 0;
 +		foreach($this->children as $i => &$property) {
 +			if(substr(md5($property->serialize()), 0, 8) == $checksum ) {
 +				return $idx;
 +			}
 +			$idx += 1;
 +		}
 +		throw new \Exception(self::$l10n->t('Property not found'), 404);
 +	}
 +
 +	/**
 +	* Get a property by the checksum of its serialized value
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @return \Sabre\VObject\Property Property by reference
 +	* @throws An exception with error code 404 if the property is not found.
 +	*/
 +	public function getPropertyByChecksum($checksum) {
 +		$this->retrieve();
 +		foreach($this->children as $i => &$property) {
 +			if(substr(md5($property->serialize()), 0, 8) == $checksum ) {
 +				return $property;
 +			}
 +		}
 +		throw new \Exception(self::$l10n->t('Property not found'), 404);
 +	}
 +
 +	/**
 +	* Delete a property by the checksum of its serialized value
 +	* It is up to the caller to call ->save()
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @throws @see getPropertyByChecksum
 +	*/
 +	public function unsetPropertyByChecksum($checksum) {
 +		$idx = $this->getPropertyIndexByChecksum($checksum);
 +		unset($this->children[$idx]);
 +		$this->setSaved(false);
 +	}
 +
 +	/**
 +	* Set a property by the checksum of its serialized value
 +	* It is up to the caller to call ->save()
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @param string $name Property name
 +	* @param mixed $value
 +	* @param array $parameters
 +	* @throws @see getPropertyByChecksum
 +	* @return string new checksum
 +	*/
 +	public function setPropertyByChecksum($checksum, $name, $value, $parameters=array()) {
 +		if($checksum === 'new') {
 +			$property = Property::create($name);
 +			$this->add($property);
 +		} else {
 +			$property = $this->getPropertyByChecksum($checksum);
 +		}
 +		switch($name) {
 +			case 'EMAIL':
 +				$value = strtolower($value);
 +				$property->setValue($value);
 +				break;
 +			case 'ADR':
 +				if(is_array($value)) {
 +					$property->setParts($value);
 +				} else {
 +					$property->setValue($value);
 +				}
 +				break;
 +			case 'IMPP':
 +				if(is_null($parameters) || !isset($parameters['X-SERVICE-TYPE'])) {
 +					throw new \InvalidArgumentException(self::$l10n->t(' Missing IM parameter for: ') . $name. ' ' . $value, 412);
 +				}
 +				$serviceType = $parameters['X-SERVICE-TYPE'];
 +				if(is_array($serviceType)) {
 +					$serviceType = $serviceType[0];
 +				}
 +				$impp = Utils\Properties::getIMOptions($serviceType);
 +				if(is_null($impp)) {
 +					throw new \UnexpectedValueException(self::$l10n->t('Unknown IM: ') . $serviceType, 415);
 +				}
 +				$value = $impp['protocol'] . ':' . $value;
 +				$property->setValue($value);
 +				break;
 +			default:
 +				\OCP\Util::writeLog('contacts', __METHOD__.' adding: '.$name. ' ' . $value, \OCP\Util::DEBUG);
 +				$property->setValue($value);
 +				break;
 +		}
 +		$this->setParameters($property, $parameters, true);
 +		$this->setSaved(false);
 +		return substr(md5($property->serialize()), 0, 8);
 +	}
 +
 +	/**
 +	* Set a property by the property name.
 +	* It is up to the caller to call ->save()
 +	*
 +	* @param string $name Property name
 +	* @param mixed $value
 +	* @param array $parameters
 +	* @return bool
 +	*/
 +	public function setPropertyByName($name, $value, $parameters=array()) {
 +		// TODO: parameters are ignored for now.
 +		switch($name) {
 +			case 'BDAY':
 +				try {
 +					$date = New \DateTime($value);
 +				} catch(\Exception $e) {
 +					\OCP\Util::writeLog('contacts',
 +						__METHOD__.' DateTime exception: ' . $e->getMessage(),
 +						\OCP\Util::ERROR
 +					);
 +					return false;
 +				}
 +				$value = $date->format('Y-m-d');
 +				$this->BDAY = $value;
 +				$this->BDAY->add('VALUE', 'DATE');
 +				//\OCP\Util::writeLog('contacts', __METHOD__.' BDAY: '.$this->BDAY->serialize(), \OCP\Util::DEBUG);
 +				break;
 +			case 'CATEGORIES':
 +			case 'N':
 +			case 'ORG':
 +				$property = $this->select($name);
 +				if(count($property) === 0) {
 +					$property = \Sabre\VObject\Property::create($name);
 +					$this->add($property);
 +				} else {
 +					// Actually no idea why this works
 +					$property = array_shift($property);
 +				}
 +				if(is_array($value)) {
 +					$property->setParts($value);
 +				} else {
 +					$this->{$name} = $value;
 +				}
 +				break;
 +			default:
 +				\OCP\Util::writeLog('contacts', __METHOD__.' adding: '.$name. ' ' . $value, \OCP\Util::DEBUG);
 +				$this->{$name} = $value;
 +				break;
 +		}
 +		$this->setSaved(false);
 +		return true;
 +	}
 +
 +	protected function setParameters($property, $parameters, $reset = false) {
 +		if(!$parameters) {
 +			return;
 +		}
 +
 +		if($reset) {
 +			$property->parameters = array();
 +		}
 +		//debug('Setting parameters: ' . print_r($parameters, true));
 +		foreach($parameters as $key => $parameter) {
 +			//debug('Adding parameter: ' . $key);
 +			if(is_array($parameter)) {
 +				foreach($parameter as $val) {
 +					if(is_array($val)) {
 +						foreach($val as $val2) {
 +							if(trim($key) && trim($val2)) {
 +								//debug('Adding parameter: '.$key.'=>'.print_r($val2, true));
 +								$property->add($key, strip_tags($val2));
 +							}
 +						}
 +					} else {
 +						if(trim($key) && trim($val)) {
 +							//debug('Adding parameter: '.$key.'=>'.print_r($val, true));
 +							$property->add($key, strip_tags($val));
 +						}
 +					}
 +				}
 +			} else {
 +				if(trim($key) && trim($parameter)) {
 +					//debug('Adding parameter: '.$key.'=>'.print_r($parameter, true));
 +					$property->add($key, strip_tags($parameter));
 +				}
 +			}
 +		}
 +	}
 +
 +	public function lastModified() {
 +		if(!isset($this->props['lastmodified']) && !$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +		return isset($this->props['lastmodified'])
 +			? $this->props['lastmodified']
 +			: null;
 +	}
 +
 +	/**
 +	 * Merge in data from a multi-dimentional array
 +	 *
 +	 * NOTE: The data has actually already been merged client side!
 +	 * NOTE: The only properties coming from the web client are the ones
 +	 * defined in \OCA\Contacts\Utils\Properties::$index_properties and
 +	 * UID is skipped for obvious reasons, and PHOTO is currently not updated.
 +	 * The data array has this structure:
 +	 *
 +	 * array(
 +	 * 	'EMAIL' => array(array('value' => 'johndoe at example.com', 'parameters' = array('TYPE' => array('HOME','VOICE'))))
 +	 * );
 +	 * @param array $data
 +	 * @return bool
 +	 */
 +	public function mergeFromArray(array $data) {
 +		foreach($data as $name => $properties) {
 +			if(in_array($name, array('PHOTO', 'UID'))) {
 +				continue;
 +			}
 +			if(!is_array($properties)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.' not an array?: ' .$name. ' '.print_r($properties, true), \OCP\Util::DEBUG);
 +			}
 +			if(in_array($name, Utils\Properties::$multi_properties)) {
 +				unset($this->{$name});
 +			}
 +			foreach($properties as $parray) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.' adding: ' .$name. ' '.print_r($parray['value'], true) . ' ' . print_r($parray['parameters'], true), \OCP\Util::DEBUG);
 +				if(in_array($name, Utils\Properties::$multi_properties)) {
 +					// TODO: wrap in try/catch, check return value
 +					$this->setPropertyByChecksum('new', $name, $parray['value'], $parray['parameters']);
 +				} else {
 +					// TODO: Check return value
 +					if(!isset($this->{$name})) {
 +						$this->setPropertyByName($name, $parray['value'], $parray['parameters']);
 +					}
 +				}
 +			}
 +		}
 +		$this->setSaved(false);
 +		return true;
 +	}
 +
 +	/**
 +	 * Merge in data from another VCard
 +	 * Used on import if a matching UID is found. Returns true if any updates
 +	 * take place, otherwise false.
 +	 *
 +	 * @param VCard $vcard
 +	 * @return bool
 +	 */
 +	public function mergeFromVCard(VCard $vcard) {
 +		$updated = false;
 +		foreach($vcard->children as $property) {
 +			if(in_array($property->name, array('REV', 'UID'))) {
 +				continue;
 +			}
 +			\OCP\Util::writeLog('contacts', __METHOD__.' merging: ' .$property->name, \OCP\Util::DEBUG);
 +			if(in_array($property->name, Utils\Properties::$multi_properties)) {
 +				$ownproperties = $this->select($property->name);
 +				if(count($ownproperties) === 0) {
 +					// We don't have any instances of this property, so just add it.
 +					$this->add($property);
 +					$updated = true;
 +					continue;
 +				} else {
 +					foreach($ownproperties as $ownproperty) {
 +						if(strtolower($property->value) === strtolower($ownproperty->value)) {
 +							// We already have this property, so skip both loops
 +							continue 2;
 +						}
 +					}
 +					$this->add($property);
 +					$updated = true;
 +				}
 +			} else {
 +				if(!isset($this->{$name})) {
 +					$this->add($property);
 +					$updated = true;
 +				} else {
 +					$this->setPropertyByName($property->name, $property->value, $property->parameters);
 +				}
 +			}
 +		}
 +
 +		$this->setSaved(!$updated);
 +
 +		return $updated;
 +	}
 +
 +    public function __get($key) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +
 +		return parent::__get($key);
 +	}
 +
 +    public function __isset($key) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +
 +		return parent::__isset($key);
 +	}
 +
 +	public function __set($key, $value) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +		parent::__set($key, $value);
 +		if($key === 'FN') {
 +			$this->props['displayname'] = $value;
 +		}
 +		$this->setSaved(false);
 +	}
 +
 +	public function __unset($key) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +		parent::__unset($key);
 +		if($key === 'PHOTO') {
 +			Properties::cacheThumbnail(
 +				$this->getBackend()->name,
 +				$this->getParent()->getId(),
 +				$this->getId(),
 +				null,
 +				null,
 +				array('remove' => true)
 +			);
 +		}
 +		$this->setSaved(false);
 +	}
 +
 +	public function setRetrieved($state) {
 +		$this->props['retrieved'] = $state;
 +	}
 +
 +	public function isRetrieved() {
 +		return $this->props['retrieved'];
 +	}
 +
 +	public function setSaved($state = true) {
 +		$this->props['saved'] = $state;
 +	}
 +
 +	public function isSaved() {
 +		return $this->props['saved'];
 +	}
 +
 +	/**
 +	 * Generate an event to show in the calendar
 +	 *
 +	 * @return \Sabre\VObject\Component\VCalendar|null
 +	 */
 +	public function getBirthdayEvent() {
 +		if(!isset($this->BDAY)) {
 +			return;
 +		}
 +		$birthday = $this->BDAY;
 +		if ((string)$birthday) {
 +			$title = str_replace('{name}',
 +				strtr((string)$this->FN, array('\,' => ',', '\;' => ';')),
 +				App::$l10n->t('{name}\'s Birthday')
 +			);
 +			try {
 +				$date = new \DateTime($birthday);
 +			} catch(\Exception $e) {
- 				continue;
++				return;
 +			}
 +			$vevent = \Sabre\VObject\Component::create('VEVENT');
 +			$vevent->add('DTSTART');
 +			$vevent->DTSTART->setDateTime(
 +				$date,
 +				\Sabre\VObject\Property\DateTime::DATE
 +			);
 +			$vevent->add('DURATION', 'P1D');
 +			$vevent->{'UID'} = $this->UID;
 +			$vevent->{'RRULE'} = 'FREQ=YEARLY';
 +			$vevent->{'SUMMARY'} = $title;
 +			$vcal = \Sabre\VObject\Component::create('VCALENDAR');
 +			$vcal->VERSION = '2.0';
 +			$appinfo = \OCP\App::getAppInfo('contacts');
 +			$appversion = \OCP\App::getAppVersion('contacts');
 +			$vcal->PRODID = '-//ownCloud//NONSGML '.$appinfo['name'].' '.$appversion.'//EN';
 +			$vcal->add($vevent);
 +			return $vcal;
 +		}
 +	}
 +
 +}
diff --cc apps/contacts/lib/controller/exportcontroller.php
index 355b9c0,0000000..728a971
mode 100644,000000..100644
--- a/apps/contacts/lib/controller/exportcontroller.php
+++ b/apps/contacts/lib/controller/exportcontroller.php
@@@ -1,111 -1,0 +1,98 @@@
 +<?php
 +/**
 + * @author Thomas Tanghus
 + * Copyright (c) 2013 Thomas Tanghus (thomas at tanghus.net)
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + * See the COPYING-README file.
 + */
 +
 +namespace OCA\Contacts\Controller;
 +
 +use OCA\Contacts\App,
 +	OCA\Contacts\JSONResponse,
 +	OCA\Contacts\Controller,
 +	OCA\Contacts\TextDownloadResponse,
 +	Sabre\VObject;
 +
 +/**
 + * Controller importing contacts
 + */
 +class ExportController extends Controller {
 +
 +	/**
 +	 * Export an entire address book.
 +	 *
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function exportAddressBook() {
 +		\OCP\Util::writeLog('contacts', __METHOD__, \OCP\Util::DEBUG);
 +		$params = $this->request->urlParams;
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +		$lastModified = $addressBook->lastModified();
 +
 +		$contacts = '';
 +		foreach($addressBook->getChildren() as $i => $contact) {
 +			$contacts .= $contact->serialize() . "\r\n";
 +		}
 +		$name = str_replace(' ', '_', $addressBook->getDisplayName()) . '.vcf';
 +		$response = new TextDownloadResponse($contacts, $name, 'text/directory');
 +		if(!is_null($lastModified)) {
 +			$response->addHeader('Cache-Control', 'private, must-revalidate');
 +			$response->setLastModified(\DateTime::createFromFormat('U', $lastModified) ?: null);
 +			$response->setETag(md5($lastModified));
 +		}
 +
 +		return $response;
 +	}
 +
 +	/**
 +	 * Export a single contact.
 +	 *
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function exportContact() {
 +
 +		$params = $this->request->urlParams;
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +		$contact = $addressBook->getChild($params['contactId']);
 +
 +		if(!$contact) {
 +			$response = new JSONResponse();
 +			$response->bailOut(App::$l10n->t('Couldn\'t find contact.'));
 +			return $response;
 +		}
 +
 +		$name = str_replace(' ', '_', $contact->getDisplayName()) . '.vcf';
 +		return new TextDownloadResponse($contact->serialize(), $name, 'text/vcard');
 +	}
 +
 +	/**
 +	 * Export a selected range of contacts potentially from different backends and address books.
 +	 *
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function exportSelected() {
- 		$contacts = $this->request['contacts'];
- 
- 		// First sort the contacts by backend and address book.
- 		$targets = array();
- 
- 		foreach($contacts as $contact) {
- 			if(!isset($targets[$contact['backend']])) {
- 				$targets[$contact['backend']] = array();
- 			}
- 			if(!isset($targets[$contact['backend']][$contact['addressBookId']])) {
- 				$targets[$contact['backend']][$contact['addressBookId']] = array();
- 			}
- 			$targets[$contact['backend']][$contact['addressBookId']][] = $contact['contactId'];
- 		}
++		$targets = $this->request['t'];
 +
 +		$exports = '';
 +		foreach($targets as $backend => $addressBooks) {
 +			foreach($addressBooks as $addressBookId => $contacts) {
 +				$addressBook = $this->app->getAddressBook($backend, $addressBookId);
 +				foreach($contacts as $contactId) {
 +					$contact = $addressBook->getChild($contactId);
 +					$exports .= $contact->serialize() . "\r\n";
 +				}
 +			}
 +		}
 +
 +		$name = 'Selected_contacts' . '.vcf';
 +		return new TextDownloadResponse($exports, $name, 'text/vcard');
 +	}
 +
 +}
diff --cc apps/contacts/lib/utils/properties.php
index cdf42d5,0000000..91429bf
mode 100644,000000..100644
--- a/apps/contacts/lib/utils/properties.php
+++ b/apps/contacts/lib/utils/properties.php
@@@ -1,334 -1,0 +1,334 @@@
 +<?php
 +/**
 + * ownCloud - Interface for PIM object
 + *
 + * @author Thomas Tanghus
 + * @copyright 2013 Thomas Tanghus (thomas at tanghus.net)
 + *
 + * 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\Contacts\Utils;
 +
 +use OCA\Contacts\App;
 +
 +Properties::$l10n = \OCP\Util::getL10N('contacts');
 +
 +Class Properties {
 +
 +	const THUMBNAIL_PREFIX = 'contact-thumbnail-';
 +	const THUMBNAIL_SIZE = 28;
 +
 +	private static $deleteindexstmt;
 +	private static $updateindexstmt;
 +	protected static $cardsTableName = '*PREFIX*contacts_cards';
 +	protected static $indexTableName = '*PREFIX*contacts_cards_properties';
 +
 +	/**
 +	 * @brief language object for calendar app
 +	 *
 +	 * @var OC_L10N
 +	 */
 +	public static $l10n;
 +
 +	/**
 +	 * Properties there can be more than one of.
 +	 *
 +	 * @var array
 +	 */
 +	public static $multi_properties = array('EMAIL', 'TEL', 'IMPP', 'ADR', 'URL');
 +
 +	/**
 +	 * Properties to index.
 +	 *
 +	 * @var array
 +	 */
 +	public static $index_properties = array(
 +		'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME',
- 		'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'PHOTO');
++		'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO');
 +
 +	/**
 +	 * Get options for IMPP properties
 +	 * @param string $im
 +	 * @return array of vcard prop => label
 +	 */
 +	public static function getIMOptions($im = null) {
 +		$l10n = self::$l10n;
 +		$ims = array(
 +				'jabber' => array(
 +					'displayname' => (string)$l10n->t('Jabber'),
 +					'xname' => 'X-JABBER',
 +					'protocol' => 'xmpp',
 +				),
 +				'sip' => array(
 +					'displayname' => (string)$l10n->t('Internet call'),
 +					'xname' => 'X-SIP',
 +					'protocol' => 'sip',
 +				),
 +				'aim' => array(
 +					'displayname' => (string)$l10n->t('AIM'),
 +					'xname' => 'X-AIM',
 +					'protocol' => 'aim',
 +				),
 +				'msn' => array(
 +					'displayname' => (string)$l10n->t('MSN'),
 +					'xname' => 'X-MSN',
 +					'protocol' => 'msn',
 +				),
 +				'twitter' => array(
 +					'displayname' => (string)$l10n->t('Twitter'),
 +					'xname' => 'X-TWITTER',
 +					'protocol' => 'twitter',
 +				),
 +				'googletalk' => array(
 +					'displayname' => (string)$l10n->t('GoogleTalk'),
 +					'xname' => null,
 +					'protocol' => 'xmpp',
 +				),
 +				'facebook' => array(
 +					'displayname' => (string)$l10n->t('Facebook'),
 +					'xname' => null,
 +					'protocol' => 'xmpp',
 +				),
 +				'xmpp' => array(
 +					'displayname' => (string)$l10n->t('XMPP'),
 +					'xname' => null,
 +					'protocol' => 'xmpp',
 +				),
 +				'icq' => array(
 +					'displayname' => (string)$l10n->t('ICQ'),
 +					'xname' => 'X-ICQ',
 +					'protocol' => 'icq',
 +				),
 +				'yahoo' => array(
 +					'displayname' => (string)$l10n->t('Yahoo'),
 +					'xname' => 'X-YAHOO',
 +					'protocol' => 'ymsgr',
 +				),
 +				'skype' => array(
 +					'displayname' => (string)$l10n->t('Skype'),
 +					'xname' => 'X-SKYPE',
 +					'protocol' => 'skype',
 +				),
 +				'qq' => array(
 +					'displayname' => (string)$l10n->t('QQ'),
 +					'xname' => 'X-SKYPE',
 +					'protocol' => 'x-apple',
 +				),
 +				'gadugadu' => array(
 +					'displayname' => (string)$l10n->t('GaduGadu'),
 +					'xname' => 'X-SKYPE',
 +					'protocol' => 'x-apple',
 +				),
 +		);
 +		if(is_null($im)) {
 +			return $ims;
 +		} else {
 +			$ims['ymsgr'] = $ims['yahoo'];
 +			$ims['gtalk'] = $ims['googletalk'];
 +			return isset($ims[$im]) ? $ims[$im] : null;
 +		}
 +	}
 +
 +	/**
 +	 * Get standard set of TYPE values for different properties.
 +	 *
 +	 * @param string $prop
 +	 * @return array Type values for property $prop
 +	 */
 +	public static function getTypesForProperty($prop) {
 +		$l = self::$l10n;
 +		switch($prop) {
 +			case 'LABEL':
 +			case 'ADR':
 +			case 'IMPP':
 +				return array(
 +					'WORK' => (string)$l->t('Work'),
 +					'HOME' => (string)$l->t('Home'),
 +					'OTHER' => (string)$l->t('Other'),
 +				);
 +			case 'TEL':
 +				return array(
 +					'HOME'  =>  (string)$l->t('Home'),
 +					'CELL'  =>  (string)$l->t('Mobile'),
 +					'WORK'  =>  (string)$l->t('Work'),
 +					'TEXT'  =>  (string)$l->t('Text'),
 +					'VOICE' =>  (string)$l->t('Voice'),
 +					'MSG'   =>  (string)$l->t('Message'),
 +					'FAX'   =>  (string)$l->t('Fax'),
 +					'VIDEO' =>  (string)$l->t('Video'),
 +					'PAGER' =>  (string)$l->t('Pager'),
 +					'OTHER' =>  (string)$l->t('Other'),
 +				);
 +			case 'EMAIL':
 +				return array(
 +					'WORK' => (string)$l->t('Work'),
 +					'HOME' => (string)$l->t('Home'),
 +					'INTERNET' => (string)$l->t('Internet'),
 +					'OTHER' =>  (string)$l->t('Other'),
 +				);
 +		}
 +	}
 +
 +	/**
 +	 * @brief returns the default categories of ownCloud
 +	 * @return (array) $categories
 +	 */
 +	public static function getDefaultCategories() {
 +		$l10n = self::$l10n;
 +		return array(
 +			(string)$l10n->t('Friends'),
 +			(string)$l10n->t('Family'),
 +			(string)$l10n->t('Work'),
 +			(string)$l10n->t('Other'),
 +		);
 +	}
 +
 +	public static function generateUID($app = 'contacts') {
 +		return date('Ymd\\THis') . '.' . substr(md5(rand().time()), 0, 10). '@' . \OCP\Util::getServerHostName();
 +	}
 +
 +	/**
 +	 * Purge indexed properties.
 +	 *
 +	 * @param string[] $ids
 +	 * @param \OCA\VObject\VCard|null $vcard
 +	 */
 +	public static function purgeIndexes($ids) {
 +		\OCP\Util::writeLog('contacts', __METHOD__.', ids: ' . print_r($ids, true), \OCP\Util::DEBUG);
 +		if(!is_array($ids) || count($ids) === 0) {
 +			throw new \Exception(__METHOD__ . ' takes only arrays with at least one value.');
 +		}
 +		\OCP\Util::writeLog('contacts', __METHOD__.', ids: ' . print_r($ids, true), \OCP\Util::DEBUG);
 +		if(!isset(self::$deleteindexstmt)) {
 +			self::$deleteindexstmt
 +				= \OCP\DB::prepare('DELETE FROM `' . self::$indexTableName . '`'
 +					. ' WHERE `contactid` IN (' . str_repeat('?,', count($ids)-1) . '?) ');
 +		}
 +		try {
 +			self::$deleteindexstmt->execute($ids);
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.
 +				', exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			\OCP\Util::writeLog('contacts', __METHOD__.', ids: '
 +				. $ids, \OCP\Util::DEBUG);
 +			return false;
 +		}
 +	}
 +
 +	/**
 +	 * Update the contact property index.
 +	 *
 +	 * If vcard is null the properties for that contact will be purged.
 +	 * If it is a valid object the old properties will first be purged
 +	 * and the current properties indexed.
 +	 *
 +	 * @param string $contactid
 +	 * @param \OCA\VObject\VCard|null $vcard
 +	 */
 +	public static function updateIndex($contactid, $vcard = null) {
 +		self::purgeIndexes(array($contactid));
 +
 +		if(is_null($vcard)) {
 +			return;
 +		}
 +
 +		if(!isset(self::$updateindexstmt)) {
 +			self::$updateindexstmt = \OCP\DB::prepare( 'INSERT INTO `' . self::$indexTableName . '` '
 +				. '(`userid`, `contactid`,`name`,`value`,`preferred`) VALUES(?,?,?,?,?)' );
 +		}
 +		foreach($vcard->children as $property) {
 +			if(!in_array($property->name, self::$index_properties)) {
 +				continue;
 +			}
 +			$preferred = 0;
 +			foreach($property->parameters as $parameter) {
 +				if($parameter->name == 'TYPE' && strtoupper($parameter->value) == 'PREF') {
 +					$preferred = 1;
 +					break;
 +				}
 +			}
 +			try {
 +				$result = self::$updateindexstmt->execute(
 +					array(
 +						\OCP\User::getUser(),
 +						$contactid,
 +						$property->name,
- 						$property->value,
++						substr($property->value, 0, 254),
 +						$preferred,
 +					)
 +				);
 +				if (\OCP\DB::isError($result)) {
 +					\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: '
 +						. \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +					return false;
 +				}
 +			} catch(\Exception $e) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.', exception: '.$e->getMessage(), \OCP\Util::ERROR);
 +				return false;
 +			}
 +		}
 +	}
 +
 +	public static function cacheThumbnail($backendName, $addressBookId, $contactId,
 +		\OCP\Image $image = null, $vcard = null, $options = array()) {
 +		$cache = \OC::$server->getCache();
 +		$key = self::THUMBNAIL_PREFIX . $backendName . '::' . $addressBookId . '::' . $contactId;
 +		//$cache->remove($key);
 +		if($cache->hasKey($key) && $image === null
 +			&& (isset($options['remove']) && $options['remove'] === false)
 +			&& (isset($options['update']) && $options['update'] === false)) {
 +			return $cache->get($key);
 +		}
 +		if(isset($options['remove']) && $options['remove']) {
 +			$cache->remove($key);
 +			if(!isset($options['update']) || !$options['update']) {
 +				return false;
 +			}
 +		}
 +		if(is_null($image)) {
 +			if(is_null($vcard)) {
 +				$app = new App();
 +				$vcard = $app->getContact($backendName, $addressBookId, $contactId);
 +			}
 +			$image = new \OCP\Image();
 +			if(!isset($vcard->PHOTO) && !isset($vcard->LOGO)) {
 +				return false;
 +			}
 +			if(!$image->loadFromBase64((string)$vcard->PHOTO)) {
 +				if(!$image->loadFromBase64((string)$vcard->LOGO)) {
 +					return false;
 +				}
 +			}
 +		}
 +		if(!$image->centerCrop()) {
 +			\OCP\Util::writeLog('contacts',
 +				__METHOD__ .'. Couldn\'t crop thumbnail for ID ' . $key,
 +				\OCP\Util::ERROR);
 +			return false;
 +		}
 +		if(!$image->resize(self::THUMBNAIL_SIZE)) {
 +			\OCP\Util::writeLog('contacts',
 +				__METHOD__ . '. Couldn\'t resize thumbnail for ID ' . $key,
 +				\OCP\Util::ERROR);
 +			return false;
 +		}
 +		 // Cache as base64 for around a month
 +		$cache->set($key, strval($image), 3000000);
 +		\OCP\Util::writeLog('contacts', 'Caching ' . $key, \OCP\Util::DEBUG);
 +		return $cache->get($key);
 +	}
 +
 +}
diff --cc apps/documents/ajax/documentController.php
index ae18661,0000000..af64a37
mode 100644,000000..100644
--- a/apps/documents/ajax/documentController.php
+++ b/apps/documents/ajax/documentController.php
@@@ -1,92 -1,0 +1,111 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +class DocumentController extends Controller{
 +	const ODT_TEMPLATE = 'UEsDBBQAAAgAAC6aLENexjIMJwAAACcAAAAIAAAAbWltZXR5cGVhcHBsaWNhdGlvbi92bmQub2FzaXMub3BlbmRvY3VtZW50LnRleHRQSwMEFAAACAAALposQ9dwh9LYAgAA2AIAABgAAABUaHVtYm5haWxzL3RodW1ibmFpbC5wbmeJUE5HDQoaCgAAAA1JSERSAAAAxgAAAQAIAgAAAGc/nhcAAAKfSURBVHic7dKxCQAwDMCwDvn/5fQJQ6FIF3jw7O6BzrwO4DeWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJm [...]
 +	
 +	public static function create($args){
 +		$uid = self::preDispatch();
 +		
 +		$view = new \OC\Files\View('/' . $uid . '/files');
 +		
 +		$dir = \OCP\Config::getUserValue(\OCP\User::getUser(), 'documents', 'save_path', '/');
 +		$path = Helper::getNewFileName($view, $dir . '/New Document.odt');
 +		
 +		$content = base64_decode(self::ODT_TEMPLATE);
 +		if (class_exists('\OC\Files\Type\TemplateManager')){
 +			$manager = \OC_Helper::getFileTemplateManager();
- 			$templateContent = $manager->getTemplate('application/vnd.oasis.opendocument.text');
++			$templateContent = $manager->getTemplate(Storage::MIMETYPE_LIBREOFFICE_WORDPROCESSOR);
 +			if ($templateContent){
 +				$content = $templateContent;
 +			}
 +		}
 +		
 +		$view->file_put_contents($path, $content);
 +	}
 +
 +
 +/**
 +	 * Process partial/complete file download
 +	 * @param array $args - array containing session id as an element with a key es_id 
 +	 */
 +	public static function serve($args){
 +		$session = new Db_Session();
 +		$sessionData = $session->load(@$args['es_id'])->getData();
 +			
 +		$file = new File(@$sessionData['file_id']);
 +		if (!$file->isPublicShare()){
 +			self::preDispatch(false);
 +		} else {
 +			self::preDispatchGuest(false);
 +		}
 +		
 +		$filename = isset($sessionData['genesis_url']) ? $sessionData['genesis_url'] : '';
 +		$download = new Download($sessionData['owner'], $filename);
 +		$download->sendResponse();
 +	}
++	
++
++	public static function rename($args){
++		$fileId = intval(@$args['file_id']);
++		$name = @$_POST['name'];
++		$file = new File($fileId);
++		$l = new \OC_L10n('documents');
++
++		if (isset($name) && $file->getPermissions() & \OCP\PERMISSION_UPDATE) {
++			if ($file->renameTo($name)) {
++				// TODO: propagate to other clients
++				\OCP\JSON::success();
++				return;
++			}
++		}
++		\OCP\JSON::error(array(
++			'message' => $l->t('You don\'t have permission to rename this document')
++		));
++	}
 +
 +	/**
 +	 * lists the documents the user has access to (including shared files, once the code in core has been fixed)
 +	 * also adds session and member info for these files
 +	 */
 +	public static function listAll(){
 +		self::preDispatch();
 +		
 +		$documents = Storage::getDocuments();
 +
 +		$fileIds = array();
 +		
 +		//$previewAvailable = \OCP\Preview::show($file);
 +		foreach ($documents as $key=>$document) {
 +			//\OCP\Preview::show($document['path']);
 +			$documents[$key]['icon'] = preg_replace('/\.png$/', '.svg', \OC_Helper::mimetypeIcon($document['mimetype']));
 +			$fileIds[] = $document['fileid'];
 +		}
 +
 +		usort($documents, function($a, $b){
 +			return @$b['mtime']-@$a['mtime'];
 +		});
 +		
 +		$session = new Db_Session();
 +		$sessions = $session->getCollectionBy('file_id', $fileIds);
 +
 +		$members = array();
 +		$member = new Db_Member();
 +		foreach ($sessions as $session) {			
 +			$members[$session['es_id']] = $member->getActiveCollection($session['es_id']);
 +		}
 +
 +		\OCP\JSON::success(array('documents' => $documents,'sessions' => $sessions,'members' => $members));
 +	}
 +}
diff --cc apps/documents/ajax/download.php
index 0000000,0000000..de01323
new file mode 100644
--- /dev/null
+++ b/apps/documents/ajax/download.php
@@@ -1,0 -1,0 +1,18 @@@
++<?php
++
++/**
++ * ownCloud - Documents App
++ *
++ * @author Victor Dubiniuk
++ * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
++ *
++ * This file is licensed under the Affero General Public License version 3 or
++ * later.
++ */
++
++namespace OCA\Documents;
++
++\OCP\JSON::checkLoggedIn();
++
++$download = new Download(\OCP\User::getUser(), '/files' . @$_GET['path']);
++$download->sendResponse();
diff --cc apps/documents/ajax/sessionController.php
index df2ba10,0000000..0f458c3
mode 100644,000000..100644
--- a/apps/documents/ajax/sessionController.php
+++ b/apps/documents/ajax/sessionController.php
@@@ -1,217 -1,0 +1,210 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +class SessionController extends Controller{
 +	
 +	public static function joinAsGuest($args){
 +		$uid = self::preDispatchGuest();
 +		$uid = substr(@$_POST['name'], 0, 16) .' '. $uid;
 +		$token = @$args['token'];
- 		$file = File::getByShareToken($token);
- 		self::join($uid, $file);
- 	}
- 
- 	public static function renameDocument($args){
- 		$fileId = intval(@$args['file_id']);
- 		$name = @$_POST['name'];
- 		$file = new File($fileId);
- 		$l = new \OC_L10n('documents');
- 
- 		if (isset($name) && $file->getPermissions() & \OCP\PERMISSION_UPDATE) {
- 			if ($file->renameTo($name)) {
- 				// TODO: propagate to other clients
- 				\OCP\JSON::success();
- 				return;
- 			}
++		try {
++			$file = File::getByShareToken($token);
++			self::join($uid, $file);
++		} catch (\Exception $e){
++			Helper::warnLog('Starting a session failed. Reason: ' . $e->getMessage());
++			\OCP\JSON::error();
++			exit();
 +		}
- 		\OCP\JSON::error(array(
- 			'message' => $l->t('You don\'t have permission to rename this document')
- 		));
 +	}
 +
 +	public static function joinAsUser($args){
 +		$uid = self::preDispatch();
 +		$fileId = intval(@$args['file_id']);
- 		$file = new File($fileId);
 +		
- 		if ($file->getPermissions() & \OCP\PERMISSION_UPDATE) {
- 			self::join($uid, $file);	
- 		} else {
- 			\OCP\JSON::success(array(
- 				'permissions' => $file->getPermissions(),
- 				'id' => $fileId
- 			));
- 		}
++		try {
++			$file = new File($fileId);
 +		
- 		exit();
- 	}
- 	
- 	protected static function join($uid, $file){
- 		try{
- 			$session = Db_Session::start($uid, $file);
- 			\OCP\JSON::success($session);
++			if ($file->getPermissions() & \OCP\PERMISSION_UPDATE) {
++				self::join($uid, $file);	
++			} else {
++				\OCP\JSON::success(array(
++					'permissions' => $file->getPermissions(),
++					'id' => $fileId
++				));
++			}
 +			exit();
 +		} catch (\Exception $e){
 +			Helper::warnLog('Starting a session failed. Reason: ' . $e->getMessage());
 +			\OCP\JSON::error();
 +			exit();
 +		}
 +	}
++	
++	protected static function join($uid, $file){
++			$session = Db_Session::start($uid, $file);
++			\OCP\JSON::success($session);
++			exit();
++	}
 +
 +	/**
 +	 * Store the document content to its origin
 +	 */
 +	public static function save(){
 +		try {
 +			$esId = @$_SERVER['HTTP_WEBODF_SESSION_ID'];
 +			if (!$esId){
 +				throw new \Exception('Session id can not be empty');
 +			}
 +			
 +			$memberId = @$_SERVER['HTTP_WEBODF_MEMBER_ID'];
 +			$sessionRevision = @$_SERVER['HTTP_WEBODF_SESSION_REVISION'];
 +			
 +			$stream = fopen('php://input','r');
 +			if (!$stream){
 +				throw new \Exception('New content missing');
 +			}
 +			$content = stream_get_contents($stream);
 +
 +			$session = new Db_Session();
 +			$session->load($esId);
 +			
 +			if (!$session->hasData()){
 +				throw new \Exception('Session does not exist');
 +			}
 +			$sessionData = $session->getData();
 +			$file = new File($sessionData['file_id']);
 +			if (!$file->isPublicShare()){
 +				self::preDispatch();
 +			} else {
 +				self::preDispatchGuest();
 +			}
 +			
- 			
 +			list($view, $path) = $file->getOwnerViewAndPath();
 +
 +			$isWritable = ($view->file_exists($path) && $view->isUpdatable($path)) || $view->isCreatable($path);
 +			if (!$isWritable){
 +				throw new \Exception($path . ' does not exist or is not writable for user ' . $uid);
 +			}
 +			
 +			$member = new Db_Member();
 +			$members = $member->getActiveCollection($esId);
 +			$memberIds = array_map(
 +				function($x){
 +					return ($x['member_id']);
 +				},
 +				$members
 +			);
 +				
 +			//check if member belongs to the session
 +			if (!in_array($memberId, $memberIds)){
 +				throw new \Exception($memberId . ' does not belong to session ' . $esId);
 +			}
 +			
 +			// Active users except current user
 +			$memberCount = count($memberIds) - 1;
 +			
- 			if ($view->file_exists($path)){
- 				
++			if ($view->file_exists($path)){		
 +				
 +				$proxyStatus = \OC_FileProxy::$enabled;
 +				\OC_FileProxy::$enabled = false;	
 +				$currentHash = sha1($view->file_get_contents($path));
 +				\OC_FileProxy::$enabled = $proxyStatus;
 +				
 +				if (!Helper::isVersionsEnabled() && $currentHash !== $sessionData['genesis_hash']){
 +					// Original file was modified externally. Save to a new one
 +					$path = Helper::getNewFileName($view, $path, '-conflict');
 +				}
++				
++				$mimetype = $view->getMimeType($path);
++			} else {
++				$mimetype = Storage::MIMETYPE_LIBREOFFICE_WORDPROCESSOR;
 +			}
 +			
- 			if ($view->file_put_contents($path, $content)){
++			$data = Filter::write($content, $mimetype);
++			
++			if ($view->file_put_contents($path, $data['content'])){
 +				// Not a last user
 +				if ($memberCount>0){
 +					// Update genesis hash to prevent conflicts
 +					Helper::debugLog('Update hash');
- 					$session->updateGenesisHash($esId, sha1($content));
++					
++					$session->updateGenesisHash($esId, sha1($data['content']));
 +				} else {
 +					// Last user. Kill session data
 +					Db_Session::cleanUp($esId);
 +				}
 +				
 +				$view->touch($path);
 +			}
 +			\OCP\JSON::success();
 +			exit();
 +		} catch (\Exception $e){
 +			Helper::warnLog('Saving failed. Reason:' . $e->getMessage());
 +			\OCP\JSON::error(array('message'=>$e->getMessage()));
 +			exit();
 +		}
 +	}
 +	
 +	public static function info(){
 +		self::preDispatch();
 +		$items = @$_POST['items'];
 +		$info = array();
 +
 +		if (is_array($items)){
 +			$session = new Db_Session();
 +			$info = $session->getInfoByFileId($items);
 +		}
 +
 +		\OCP\JSON::success(array(
 +			"info" => $info
 +		));
 +	}
 +	
 +	public static function listAll(){
 +		self::preDispatch();
 +		$session = new Db_Session();
 +		$sessions = $session->getCollection();
 +
 +		$preparedSessions = array_map(
 +				function($x){
 +					return ($x['es_id']);
 +				}, $sessions
 +		);
 +		\OCP\JSON::success(array(
 +			"session_list" => $preparedSessions
 +		));
 +	}
 +
 +	public static function listAllHtml(){
 +		self::preDispatch();
 +		$session = new Db_Session();
 +		$sessions = $session->getCollection();
 +
 +		$preparedSessions = array_map(
 +				function($x){
 +					return ($x['es_id']);
 +				}, $sessions
 +		);
 +
 +		$invites = Invite::getAllInvites();
 +		if (!is_array($invites)){
 +			$invites = array();
 +		}
 +
 +		$tmpl = new \OCP\Template('documents', 'part.sessions', '');
 +		$tmpl->assign('invites', $invites);
 +		$tmpl->assign('sessions', $sessions);
 +		echo $tmpl->fetchPage();
 +	}
 +}
diff --cc apps/documents/appinfo/routes.php
index 8c4c2d5,0000000..6c57cd7
mode 100644,000000..100644
--- a/apps/documents/appinfo/routes.php
+++ b/apps/documents/appinfo/routes.php
@@@ -1,107 -1,0 +1,107 @@@
 +<?php
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +/**
 + * Document routes
 + */
 +
 +$this->create('documents_documents_create', 'ajax/documents/create')
 +	->post()
 +	->action('\OCA\Documents\DocumentController', 'create')
 +;
 +$this->create('documents_genesis', 'ajax/genesis/{es_id}')
 +	->post()
 +	->action('\OCA\Documents\DocumentController', 'serve')
 +;
++$this->create('documents_rename', 'ajax/documents/rename/{file_id}')
++	->post()
++	->action('\OCA\Documents\DocumentController', 'rename')
++;
 +$this->create('documents_genesis', 'ajax/genesis/{es_id}')
 +	->get()
 +	->action('\OCA\Documents\DocumentController', 'serve')
 +;
 +
 +$this->create('documents_documents_list', 'ajax/documents/list')
 +	->get()
 +	->action('\OCA\Documents\DocumentController', 'listAll')
 +;
 +
 +/**
 + * Session routes
 + */
 +$this->create('documents_session_list', 'ajax/session/list')
 +	->get()
 +	->action('\OCA\Documents\SessionController', 'listAll')
 +;
 +$this->create('documents_session_list', 'ajax/session/list')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'listAll')
 +;
 +
 +$this->create('documents_session_info', 'ajax/session/info')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'info')
 +;
 +
 +$this->create('documents_session_listhtml', 'ajax/session/listHtml')
 +	->get()
 +	->action('\OCA\Documents\SessionController', 'listAllHtml')
 +;
 +$this->create('documents_session_listhtml', 'ajax/session/listHtml')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'listAllHtml')
 +;
 +
 +$this->create('documents_session_joinasuser', 'ajax/session/joinasuser/{file_id}')
 +	->get()
 +	->action('\OCA\Documents\SessionController', 'joinAsUser')
 +;
 +$this->create('documents_session_joinasuser', 'ajax/session/joinasuser/{file_id}')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'joinAsUser')
 +;
 +$this->create('documents_session_joinasguest', 'ajax/session/joinasguest/{token}')
 +	->get()
 +	->action('\OCA\Documents\SessionController', 'joinAsGuest')
 +;
 +$this->create('documents_session_joinasguest', 'ajax/session/joinasguest/{token}')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'joinAsGuest')
 +;
- $this->create('documents_session_renamedocument', 'ajax/session/renamedocument/{file_id}')
- 	->post()
- 	->action('\OCA\Documents\SessionController', 'renameDocument')
- ;
 +
 +$this->create('documents_session_save', 'ajax/session/save')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'save')
 +;
 +
 +/**
 + * User routes
 + */
 +$this->create('documents_user_avatar', 'ajax/user/avatar')
 +	->get()
 +	->action('\OCA\Documents\UserController', 'sendAvatar')
 +;
 +
 +$this->create('documents_user_disconnect', 'ajax/user/disconnect/{member_id}')
 +	->post()
 +	->action('\OCA\Documents\UserController', 'disconnectUser')
 +;
 +
 +$this->create('documents_user_disconnectGuest', 'ajax/user/disconnectGuest/{member_id}')
 +	->post()
 +	->action('\OCA\Documents\UserController', 'disconnectGuest')
 +;
 +
 +$this->create('documents_user_invite', 'ajax/user/invite')
 +	->post()
 +	->action('\OCA\Documents\UserController', 'invite')
 +;
diff --cc apps/documents/css/style.css
index 4eec772,0000000..41a5760
mode 100644,000000..100644
--- a/apps/documents/css/style.css
+++ b/apps/documents/css/style.css
@@@ -1,300 -1,0 +1,304 @@@
 +#editor ::-webkit-scrollbar-thumb {
 +	background-color: #fff;
 +}
 +
 +.documentslist { padding:5px; }
 +
 +.documentslist .document, 
 +.documentslist .progress,
 +.documentslist .add-document{
 +	display: inline-block;
 +	height: 200px;
 +	width: 200px;
 +	float: left;
 +	background-color: #e8e8e8;
 +	margin: 14px;
 +	vertical-align: top;
 +	border-radius: 5px;
 +}
 +
 +.add-document a {
 +	display: inline-block;
 +	position: relative;
 +	height: 100px;
 +	width: 200px;
 +	background-repeat: no-repeat;
 +	background-size: 32px;
 +	background-position: 50%;
 +}
 +.add-document .add {
 +	background-image: url('%webroot%/core/img/actions/add.svg');
 +}
 +.add-document .upload {
 +	background-image: url('%webroot%/core/img/actions/upload.svg');
 +}
 +
 +.add-document a.add {
 +	border-bottom: 1px solid #fff;
 +}
 +.add-document .add,
 +.add-document .upload {
 +	opacity: .7;
 +}
 +.add-document .add:hover,
 +.add-document .add:focus,
 +.add-document #upload:hover .upload,
 +.add-document .upload:focus {
 +	opacity: 1;
 +}
 +
 +.add-document label {
 +	position: absolute;
 +	bottom: 10px;
 +	width: 100%;
 +	font-weight: normal;
 +	text-align: center;
 +}
 +
 +.documentslist .progress{
 +	position:absolute;
 +	left:232px;
 +	z-index:5;
 +	background: #e8e8e8 url('%webroot%/core/img/loading.gif') 50% 50% no-repeat;
 +}
 +
 +.documentslist .progress div{
 +	margin-top: 144px;
 +	text-align: center;
 +}
 +
 +.documentslist .document:hover,
 +.documentslist .document a:focus {
 +	background-color: #ddd;
 +}
 +
 +.documentslist .session-active {
 +	position: relative;
 +	margin-left: 128px;
 +	margin-top: 128px;
 +	width: 32px;
 +}
 +.document a {
 +	display: block;
 +	position: relative;
 +	height: 200px;
 +	width: 200px;
 +	background-repeat: no-repeat;
 +	background-size: 64px;
 +	background-position: 68px;
 +}
 +.document label {
 +	position: absolute;
 +	bottom: 5px;
 +	width: 100%;
 +	font-weight: normal;
 +	text-overflow: ellipsis;
 +	overflow: hidden;
 +	text-align: center;
 +	padding: 0 8px;
 +	-webkit-box-sizing: border-box;
 +	-moz-box-sizing: border-box;
 +	box-sizing: border-box;
 +	white-space: nowrap;
 +}
 +
 +#odf-toolbar{
 +	text-align: left;
 +	position: absolute;
 +	width: 100%;
 +	padding:0;
 +	z-index: 500;
 +}
 +
 +#odf-toolbar #dropdown{
 +	right:auto;
 +}
 +
 +#document-title{
 +/*	position: absolute;
 +	top: 9px;
 +	left:50%;
 +	margin:0; */
 +	padding: 4px 0 5px;
 +	border-bottom: 1px solid #E9E9E9;
 +
 +	text-align: center;
 +	font-weight: bold;
 +}
 +#document-title div{
 +	position: relative;
 +	/*margin-left:-50%;*/
 +}
 +#document-title>input {
 +	height:9px;
 +	margin: 0;
 +	padding-top:4px;
 +	width: 300px;
 +}
 +
 +#odf-close{
 +	float: right;
 +}
 +
 +#odf-invite{
 +	float: left;
 +}
 +
 +#invite-block{
 +	position: absolute;
 +	top:3em;
 +	margin-top:-3px;
 +	left:0;
 +	padding: 10px;
 +	background-color: #bbb;
 +}
 +
 +#invitee-list li{
 +	padding: 5px 0 5px 20px;
 +	background: url('%webroot%/core/img/actions/delete.svg') 0 50% no-repeat;
 +}
 +
 +#mainContainer{
 +	position:absolute;
 +	z-index:500;
 +}
 +
 +#documents-overlay,  #documents-overlay-below{
 +    position: fixed;
 +    top: 0;
 +    left: 0;
 +    width: 100%;
 +    height: 100%;
 +    filter:alpha(opacity=30);
 +    opacity: .3;
 +    z-index: 1000;
 +	background: #111 url('%webroot%/core/img/loading-dark.gif') 50% 50% no-repeat;
 +}
 +
 +#documents-overlay-below{
 +	left:0;
 +	top:0;
 +    filter:alpha(opacity=100);
 +    opacity: 1;
 +	background:#f0f0f0;
 +	z-index: 999;
 +}
 +
 +#file_upload_start{
 +	display: block;
 +	position:relative;
 +	left:0; top:0; width:200px; height:100px; 
 +	margin-bottom: -110px;padding:0;
 +	cursor:pointer; overflow:hidden;
 +	font-size:1em;
 +	-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0;
 +	z-index:20; 
 +}
 +
 +#warning-connection-lost{
 +	padding: 6px 0;
 +	text-align: center;
 +	color: #ffffff;
 +	background-color: #CE7070;
 +	font-size: 16px;
 +	font-weight: bold;
 +}
 +
 +#warning-connection-lost img {
 +	margin-right: 4px;
 +	float: right;
 +	height: 20px;
 +}
 +
 +#connection-lost{
 +	right: 5px;
 +	background: #fff;
 +	width: 95%;
 +	position: absolute;
 +	top: 87px;
 +}
 +
 +
 +/* override WebODF styling here */
 +
 +#mainContainer #collaboration{
 +	float:right;position: relative;z-index: 1;
 +	width: 70px;padding:5px;
 +}
 +
 +#members{
 +	padding-top: 69px !important;
 +}
 +
 +.memberListButton span{
 +	display: block;
 +    box-shadow: 0px 0px 5px rgb(90, 90, 90) inset;
 +    background-color: rgb(200, 200, 200);
 +    border-radius: 5px;
 +    border: 2px solid;
 +    display: block;
 +    margin: auto;
 +}
 +
 +.memberListButton img{
 +    border: 0 none !important;
 +}
 +
 +#toolbar {
 +	border-bottom: none !important;
 +	padding: 5px 0 0 !important;
 +}
 +
 +#toolbar > .dijit{
 +	margin-left:3px;
 +}
 +#toolbar > span.dijit{
 +	margin-left: 0;
 +}
 +
 +#container {
 +	top: 38px !important;
 +}
 +
 +cursor > div {
 +	padding-bottom: 0 !important;
 +}
 +
 +editinfo > div.editInfoMarker {
 +	width: 4px;
 +	border-radius: 0;
 +	box-shadow: 0 0 0 #fff;
 +	background-clip:content-box;
 +	padding: 0 5px;
 +}
 +
 +editinfo > div.editInfoMarker:hover {
 +}
 +
 +.dijitToolbar .dijitDropDownButton {
 +	padding-top: 2px;
 +}
 +
 +.dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {
 +margin-top:-1px;
 +}
 +
 +.claro .dijitTextBox .dijitInputInner,
 +.claro .dijitSpinner .dijitSpinnerButtonInner {
 +	margin: 0;
 +}
 +
 +/* part of dojo.css */
 +.dojoTabular {border-collapse: collapse; border-spacing: 0; border: 1px solid #ccc; margin: 0 1.5em;}
 +.dojoTabular th {text-align: center; font-weight: bold;}
 +.dojoTabular thead,.dojoTabular tfoot {background-color: #efefef; border: 1px solid #ccc; border-width: 1px 0;}
 +.dojoTabular th,.dojoTabular td {padding: 0.25em 0.5em;}
 +
 +/* raise notification z-index above the documents app */
 +#odf-toolbar + #notification-container {
 +	z-index: 501;
 +}
++
++document p{
++	cursor:auto;
++}
diff --cc apps/documents/js/documents.js
index 612b0fe,0000000..75adaa0
mode 100644,000000..100644
--- a/apps/documents/js/documents.js
+++ b/apps/documents/js/documents.js
@@@ -1,557 -1,0 +1,557 @@@
 +/*globals $,OC,fileDownloadPath,t,document,odf,webodfEditor,alert,require,dojo,runtime */
 +var documentsMain = {
 +	_documents: [],
 +	_sessions: [],
 +	_members: [],
 +	isEditormode : false,
 +	useUnstable : false,
 +	isGuest : false,
 +	memberId : false,
 +	esId : false,
 +	ready :false,
 +	fileName: null,
 +	
 +	UI : {
 +		/* Overlay HTML */
 +		overlay : '<div id="documents-overlay"></div> <div id="documents-overlay-below"></div>',
 +				
 +		/* Toolbar HTML */
 +		toolbar : '<div id="odf-toolbar" class="dijitToolbar">' +
 +					'  <div id="document-title"><div>' +
 +					'%title%' +
 +			        '  </div></div>' +
 +					'  <button id="odf-close">' +
 +						t('documents', 'Close') +
 +					'  </button>' +
 +					'  <button id="odf-invite" class="drop">' +
 +						  t('documents', 'Share') +
 +					'  </button>' +
 +					'  <span id="toolbar" class="claro"></span>' +
 +					'</div>',
 +					
 +		/* Editor wrapper HTML */
 +		container : '<div id = "mainContainer" class="claro" style="">' +
 +					'  <div id = "editor">' +
 +					'    <div id = "container">' +
 +					'      <div id="canvas"></div>' +
 +					'    </div>' +
 +					'  </div>' +
 +					'  <div id = "collaboration">' +
 +					'    <div id = "collabContainer">' +
 +					'      <div id = "members">' +
 +					'        <div id = "inviteButton"></div>' +
 +					'        <div id = "memberList"></div>' +
 +					'      </div>' +
 +					'    </div>' +
 +					'  </div>' +
 +					'</div>',
 +					
 +		/* Previous window title */
 +		mainTitle : '',
 +				
 +		init : function(){
 +			$(documentsMain.UI.overlay).hide().appendTo(document.body);
 +			documentsMain.UI.mainTitle = $('title').text();
 +		},
 +		
 +		showOverlay : function(){
 +			$('#documents-overlay,#documents-overlay-below').fadeIn('fast');
 +		},
 +		
 +		hideOverlay : function(){
 +			$('#documents-overlay,#documents-overlay-below').fadeOut('fast');
 +		},
 +		
 +		showEditor : function(title, canShare){
 +			$(document.body).prepend(documentsMain.UI.toolbar.replace(/%title%/g, title));
 +			if (!canShare){
 +				$('#odf-invite').remove();
 +			} else {
 +				//TODO: fill in with users
 +			}
 +			$(document.body).addClass("claro");
 +			$(document.body).prepend(documentsMain.UI.container);
 +			// in case we are on the public sharing page we shall display the odf into the preview tag
 +			$('#preview').html(container);
 +			$('title').text(documentsMain.UI.mainTitle + '| ' + title);
 +		},
 +		
 +		hideEditor : function(){
 +				// Fade out toolbar
 +				$('#odf-toolbar').fadeOut('fast');
 +				// Fade out editor
 +				$('#mainContainer').fadeOut('fast', function() {
 +					$('#mainContainer').remove();
 +					$('#odf-toolbar').remove();
 +					$('#content').fadeIn('fast');
 +					$(document.body).removeClass('claro');
 +					$('title').text(documentsMain.UI.mainTitle);
 +				});
 +		},
 +		showProgress : function(message){
 +			if (!message){
 +				message = ' ';
 +			}
 +			$('.documentslist .progress div').text(message);
 +			$('.documentslist .progress').show();
 +		},
 +		
 +		hideProgress : function(){
 +			$('.documentslist .progress').hide();
 +		},
 +		
 +		showLostConnection : function(){
 +			$('#memberList .memberListButton').css({opacity : 0.3});
 +			$('#odf-toolbar').children(':not(#document-title)').hide();
 +			$('<div id="connection-lost"></div>').prependTo('#memberList');
 +			$('<div id="warning-connection-lost">' + t('documents', 'No connection to server. Trying to reconnect.') +'<img src="'+ OC.imagePath('core', 'loading-dark.gif') +'" alt="" /></div>').appendTo('#odf-toolbar');
 +		},
 +		
 +		hideLostConnection : function() {
 +			$('#connection-lost,#warning-connection-lost').remove();
 +			$('#odf-toolbar').children(':not(#document-title)').show();
 +			$('#memberList .memberListButton').css({opacity : 1});
 +		}
 +	},
 +	
 +	onStartup: function() {
 +		var fileId;
 +		"use strict";
 +		documentsMain.useUnstable = $('#webodf-unstable').val()==='true';
 +		documentsMain.UI.init();
 +		
 +		if (!OC.currentUser){
 +			documentsMain.isGuest = true;
 +			
 +		} else {
 +			// Does anything indicate that we need to autostart a session?
 +			fileId = parent.location.hash.replace(/\W*/g, '');
 +		}
 +		
 +		documentsMain.show();
 +		if (fileId){
 +			documentsMain.UI.showOverlay();
 +		}
 +		
 +		var webodfSource = (oc_debug === true) ? 'webodf-debug' : 'webodf';
 +		OC.addScript('documents', '3rdparty/webodf/' + webodfSource).done(function() {
 +			// preload stuff in the background
 +			require({}, ["dojo/ready"], function(ready) {
 +				ready(function() {
 +					require({}, ["webodf/editor/Editor"], function(Editor) {
 +						runtime.setTranslator(function(s){return t('documents', s);});
 +						documentsMain.ready = true;
 +						if (fileId){
 +							documentsMain.prepareSession();
 +							documentsMain.joinSession(fileId);
 +						}
 +					});
 +				});
 +			});
 +		});
 +	},
 +	
 +	prepareSession : function(){
 +		documentsMain.isEditorMode = true;
 +		documentsMain.UI.showOverlay();
 +		$(window).on('beforeunload', function(){
 +			return t('documents', "Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead."); 
 +		});
 +	},
 +	
 +	prepareGrid : function(){
 +		documentsMain.isEditorMode = false;
 +		documentsMain.UI.hideOverlay();
 +	},
 +	
 +	initSession: function(response) {
 +		"use strict";
 +
 +		if(response && (response.id && !response.es_id)){
 +			return documentsMain.view(response.id);
 +		} 
 +
 +		if (!response || !response.status || response.status==='error'){
 +			OC.Notification.show(t('documents', 'Failed to load this document. Please check if it can be opened with an external odt editor. This might also mean it has been unshared or deleted recently.'));
 +			documentsMain.prepareGrid();
 +			documentsMain.show();
 +			$(window).off('beforeunload');
 +			setTimeout(OC.Notification.hide, 7000);
 +			return;
 +		}
 +		
 +		//Wait for 3 sec if editor is still loading 
 +		if (!documentsMain.ready){
 +			setTimeout(function(){ documentsMain.initSession(response); }, 3000);
 +			console.log('Waiting for the editor to start...');
 +			return;
 +		}
 +
 +		require({ }, ["webodf/editor/server/owncloud/ServerFactory", "webodf/editor/Editor"], function (ServerFactory, Editor) {
 +			// fade out file list and show WebODF canvas
 +			$('#content').fadeOut('fast').promise().done(function() {
 +				
 +				documentsMain.fileId = response.file_id;
 +				documentsMain.fileName = documentsMain.getNameByFileid(response.file_id);
 +				documentsMain.UI.showEditor(
 +						documentsMain.fileName,
 +						response.permissions & OC.PERMISSION_SHARE && !documentsMain.isGuest
 +				);
 +				var serverFactory = new ServerFactory();
 +				documentsMain.esId = response.es_id;
 +				documentsMain.memberId = response.member_id;
 +
 +				// TODO: set webodf translation system, by passing a proper function translate(!string):!string in "runtime.setTranslator(translate);"
 +
 +				documentsMain.webodfServerInstance = serverFactory.createServer();
 +				documentsMain.webodfServerInstance.setToken(oc_requesttoken);
 +				documentsMain.webodfEditorInstance = new Editor({unstableFeaturesEnabled: documentsMain.useUnstable}, documentsMain.webodfServerInstance, serverFactory);
 +				
 +				// load the document and get called back when it's live
 +				documentsMain.webodfEditorInstance.openSession(documentsMain.esId, documentsMain.memberId, function() {
 +					documentsMain.webodfEditorInstance.startEditing();
 +					documentsMain.UI.hideOverlay();
 +					parent.location.hash = response.file_id;
 +				});
 +			});
 +		});
 +	},
 +	
 +
 +	joinSession: function(fileId) {
 +		console.log('joining session '+fileId);
 +		var url;
 +		if (documentsMain.isGuest){
 +			url = OC.Router.generate('documents_session_joinasguest') + '/' + fileId;
 +		} else {
 +			url = OC.Router.generate('documents_session_joinasuser') + '/' + fileId;
 +		}
 +		$.post(
 +			url,
 +			{ name : $("[name='memberName']").val() },
 +			documentsMain.initSession
 +		);
 +	},
 +	
 +	view : function(id){
 +		OC.addScript('documents', 'viewer/viewer', function() {
 +			documentsMain.prepareGrid();
 +			$(window).off('beforeunload');
 +			var path = $('li[data-id='+ id +']>a').attr('href');
 +			odfViewer.isDocuments = true;
 +			odfViewer.onView(path);
 +		});
 +	},
 +			
 +	onCreate: function(event){
 +		event.preventDefault();
 +		var docElem = $('.documentslist .template').clone();
 +		docElem.removeClass('template');
 +		docElem.addClass('document');
 +		docElem.insertAfter('.documentslist .template');
 +		docElem.show();
 +		$.post(
 +			OC.Router.generate('documents_documents_create'),
 +			{},
 +			documentsMain.show
 +		);
 +	},
 +
 +	onInvite: function(event) {
 +		event.preventDefault();
 +		if (OC.Share.droppedDown) {
 +			OC.Share.hideDropDown();
 +		} else {
 +			(function() {
 +				var target = OC.Share.showLink;
 +				OC.Share.showLink = function() {
 +					var r = target.apply( this, arguments );
 +					$('#linkText').val( $('#linkText').val().replace('service=files', 'service=documents') );
 +					return r;
 +				};
 +			})();
 +
 +			OC.Share.showDropDown(
 +				'file', 
 +				parent.location.hash.replace(/\W*/g, ''),
 +				$("#odf-toolbar"),
 +				true, 
 +				OC.PERMISSION_READ | OC.PERMISSION_SHARE | OC.PERMISSION_UPDATE
 +			);
 +		}
 +	},
 +	
 +	sendInvite: function() {
 +		var users = [];
 +		$('input[name=invitee\\[\\]]').each(function(i, e) {
 +			users.push($(e).val());
 +		});
 +		$.post(OC.Router.generate('documents_user_invite'), {users: users});
 +	},
 +
 +	renameDocument: function(name) {
- 		var url = OC.Router.generate('documents_session_renamedocument') + '/' + documentsMain.fileId;
++		var url = OC.Router.generate('documents_rename') + '/' + documentsMain.fileId;
 +		$.post(
 +			url,
 +			{ name : name },
 +			function(result) {
 +				if (result && result.status === 'error') {
 +					if (result.message){
 +						OC.Notification.show(result.message);
 +						setTimeout(function() {
 +							OC.Notification.hide();
 +						}, 10000);
 +					}
 +					return;
 +				}
 +				documentsMain.fileName = name;
 +				$('title').text(documentsMain.UI.mainTitle + '| ' + name);
 +				$('#document-title>div').text(name);
 +			}
 +		);
 +	},
 +
 +	// FIXME: copy/pasted from Files.isFileNameValid, needs refactor into core
 +	isFileNameValid:function (name) {
 +		if (name === '.') {
 +			throw t('files', '\'.\' is an invalid file name.');
 +		} else if (name.length === 0) {
 +			throw t('files', 'File name cannot be empty.');
 +		}
 +
 +		// check for invalid characters
 +		var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*'];
 +		for (var i = 0; i < invalid_characters.length; i++) {
 +			if (name.indexOf(invalid_characters[i]) !== -1) {
 +				throw t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.");
 +			}
 +		}
 +		return true;
 +	},
 +
 +	onRenamePrompt: function() {
 +		var name = documentsMain.fileName;
 +		var lastPos = name.lastIndexOf('.');
 +		var extension = name.substr(lastPos + 1);
 +		name = name.substr(0, lastPos);
 +		var input = $('<input type="text" class="filename"/>').val(name);
 +		$('#document-title').append(input);
 +		$('#document-title>div').hide();
 +
 +		input.on('blur', function(){
 +			var newName = input.val();
 +			if (!newName || newName === name) {
 +				input.tipsy('hide');
 +				input.remove();
 +				$('#document-title>div').show();
 +				return;
 +			}
 +			else {
 +				newName = newName + '.' + extension;
 +				try {
 +					input.tipsy('hide');
 +					input.removeClass('error');
 +					if (documentsMain.isFileNameValid(newName)) {
 +						input.tipsy('hide');
 +						input.remove();
 +						$('#document-title>div').show();
 +						documentsMain.renameDocument(newName);
 +					}
 +				}
 +				catch (error) {
 +					input.attr('title', error);
 +					input.tipsy({gravity: 'n', trigger: 'manual'});
 +					input.tipsy('show');
 +					input.addClass('error');
 +				}
 +			}
 +		});
 +		input.on('keyup', function(event){
 +			if (event.keyCode === 27) {
 +				// cancel by putting in an empty value
 +				$(this).val('');
 +				$(this).blur();
 +				event.preventDefault();
 +			}
 +			if (event.keyCode === 13) {
 +				$(this).blur();
 +				event.preventDefault();
 +			}
 +		});
 +		input.focus();
 +		input.selectRange(0, name.length);
 +	},
 +
 +	onClose: function() {
 +		"use strict";
 +		
 +		if (!documentsMain.isEditorMode){
 +			return;
 +		}
 +		documentsMain.isEditorMode = false;
 +		$(window).off('beforeunload');
 +		parent.location.hash = "";
 +
 +		documentsMain.webodfEditorInstance.endEditing();
 +		documentsMain.webodfEditorInstance.closeSession(function() {
 +			// successfull shutdown - all is good.
 +			// TODO: proper session leaving call to server, either by webodfServerInstance or custom
 +// 			documentsMain.webodfServerInstance.leaveSession(sessionId, memberId, function() {
 +			if (documentsMain.isGuest){
 +				$(document.body).attr('id', 'body-login');
 +				$('header,footer').show();
 +			}
 +			documentsMain.webodfEditorInstance.destroy(documentsMain.UI.hideEditor);
 +			
 +			if (documentsMain.isGuest){
 +				var url = OC.Router.generate('documents_user_disconnectGuest');
 +			} else {
 +				var url = OC.Router.generate('documents_user_disconnect');
 +			}
 +			
 +			$.post(url + '/' + documentsMain.memberId, {esId: documentsMain.esId});
 +			
 +			documentsMain.show();
 +// 			});
 +		});
 +	},
 +	
 +	getNameByFileid : function(fileid){
 +		return $('.documentslist li[data-id='+ fileid + ']').find('label').text();
 +	},
 +	
 +	show: function(){
 +		if (documentsMain.isGuest){
 +			return;
 +		}
 +		documentsMain.UI.showProgress(t('documents', 'Loading documents...'));
 +		jQuery.when(documentsMain.loadDocuments())
 +			.then(function(){
 +				documentsMain.renderDocuments();
 +				documentsMain.UI.hideProgress();
 +			});
 +	},
 +	
 +	loadDocuments: function () {
 +		var self = this;
 +		var def = new $.Deferred();
 +		OC.Router.registerLoadedCallback(function () {
 +			jQuery.getJSON(OC.Router.generate('documents_documents_list'))
 +				.done(function (data) {
 +					self._documents = data.documents;
 +					self._sessions = data.sessions;
 +					self._members = data.members;
 +					def.resolve();
 +				})
 +				.fail(function(data){
 +					console.log(t('documents','Failed to load documents.'));
 +				});
 +		});
 +		return def;
 +	},
 +	
 +	renderDocuments: function () {
 +		var self = this,
 +		hasDocuments = false;
 +
 +		//remove all but template
 +		$('.documentslist .document:not(.template,.progress)').remove();
 +
 +		jQuery.each(this._documents, function(i,document){
 +			var docElem = $('.documentslist .template').clone();
 +			docElem.removeClass('template');
 +			docElem.addClass('document');
 +			docElem.attr('data-id', document.fileid);
 +
 +			var a = docElem.find('a');
 +			a.attr('href', OC.Router.generate('download',{file:document.path}));
 +			a.find('label').text(document.name);
 +			a.css('background-image', 'url("'+document.icon+'")');
 +
 +			$('.documentslist').append(docElem);
 +			docElem.show();
 +			hasDocuments = true;
 +		});
 +		jQuery.each(this._sessions, function(i,session){
 +			if (self._members[session.es_id].length > 0) {
 +				var docElem = $('.documentslist .document[data-id="'+session.file_id+'"]');
 +				if (docElem.length > 0) {
 +					docElem.attr('data-esid', session.es_id);
 +					docElem.find('label').after('<img class="svg session-active" src="'+OC.imagePath('core','places/contacts-dark')+'">');
 +					docElem.addClass('session');
 +				} else {
 +					console.log('Could not find file '+session.file_id+' for session '+session.es_id);
 +				}
 +			}
 +		});
 +		
 +		if (!hasDocuments){
 +			$('#documents-content').append('<div id="emptycontent">'
 +				+ t('documents', 'No documents are found. Please upload or create a document!')
 +				+ '</div>'
 +			);
 +		} else {
 +			$('#emptycontent').remove();
 +		}
 +	}
 +};
 +
 +
 +//web odf bootstrap code. Added here to reduce number of requests
 +/*globals navigator,dojoConfig */
 +var usedLocale = "C";
 +
 +if (navigator && navigator.language.match(/^(de)/)) {
 +	usedLocale = navigator.language.substr(0,2);
 +}
 +
 +dojoConfig = {
 +	locale: usedLocale,
 +	paths: {
 +		"webodf/editor": OC.appswebroots.documents + "/js/3rdparty/webodf/editor",
 +		"dijit": OC.appswebroots.documents + "/js/3rdparty/resources/dijit",
 +		"dojox": OC.appswebroots.documents + "/js/3rdparty/resources/dojox",
 +		"dojo": OC.appswebroots.documents + "/js/3rdparty/resources/dojo",
 +		"resources": OC.appswebroots.documents + "/js/3rdparty/resources"
 +	}
 +};
 +
 +//init
 +$(document).ready(function() {
 +	"use strict";
 +	
 +	$('.documentslist').on('click', 'li:not(.add-document)', function(event) {
 +		event.preventDefault();
 +
 +		if (documentsMain.isEditorMode){
 +			return;
 +		}
 +		
 +		documentsMain.prepareSession();
 +		if ($(this).attr('data-id')){
 +			documentsMain.joinSession($(this).attr('data-id'));
 +		}
 +	});
 +	
 +	$(document.body).on('click', '#document-title>div', documentsMain.onRenamePrompt);
 +	$(document.body).on('click', '#odf-close', documentsMain.onClose);
 +	$(document.body).on('click', '#odf-invite', documentsMain.onInvite);
 +	$(document.body).on('click', '#odf-join', function(event){
 +		event.preventDefault();
 +
 +		// !Login page mess wih WebODF toolbars
 +		$(document.body).attr('id', 'body-user');
 +		$('header,footer').hide();
 +		documentsMain.prepareSession();
 +		documentsMain.joinSession(
 +				$("[name='document']").val()
 +		);
 +	});
 +	$('.add-document').on('click', '.add', documentsMain.onCreate);
 +
 +	var file_upload_start = $('#file_upload_start');
 +	file_upload_start.on('fileuploaddone', documentsMain.show);
 +	//TODO when ending a session as the last user close session?
 +	
 +	OC.addScript('documents', '3rdparty/webodf/dojo-amalgamation', documentsMain.onStartup);
 +});
diff --cc apps/documents/js/viewer/viewer.js
index 398a409,0000000..e202155
mode 100644,000000..100644
--- a/apps/documents/js/viewer/viewer.js
+++ b/apps/documents/js/viewer/viewer.js
@@@ -1,112 -1,0 +1,112 @@@
 +var odfViewer = {
 +	isDocuments : false,
 +	supportedMimesRead: [
 +		'application/vnd.oasis.opendocument.text',
 +		'application/vnd.oasis.opendocument.spreadsheet',
 +		'application/vnd.oasis.opendocument.graphics',
 +		'application/vnd.oasis.opendocument.presentation'
 +	],
 +			
 +	supportedMimesUpdate: [
 +		'application/vnd.oasis.opendocument.text'
 +	],
 +			
 +	register : function(){
 +		for (var i = 0; i < odfViewer.supportedMimesRead.length; ++i) {
 +			var mime = odfViewer.supportedMimesRead[i];
 +			FileActions.register(mime, 'View', OC.PERMISSION_READ, '', odfViewer.onView);
 +			FileActions.setDefault(mime, 'View');
 +		}
 +		for (var i = 0; i < odfViewer.supportedMimesUpdate.length; ++i) {
 +			var mime = odfViewer.supportedMimesUpdate[i];
 +			FileActions.register(
 +					mime, 
 +					t('documents', 'Edit'), 
 +					OC.PERMISSION_UPDATE, 
 +					OC.imagePath('core', 'actions/rename'), 
 +					odfViewer.onEdit
 +			);
 +		}
 +	},
 +	
 +	dispatch : function(filename){
 +		if (odfViewer.supportedMimesUpdate.indexOf(FileActions.getCurrentMimeType()) !== -1
 +		 && FileActions.getCurrentPermissions() & OC.PERMISSION_UPDATE
 +		){
 +			odfViewer.onEdit(filename);
 +		} else {
 +			odfViewer.onView(filename);
 +		}
 +	},
 +	
 +	onEdit : function(){
 +		var fileId = FileActions.currentFile.parent().attr('data-id');
 +		window.open(OC.linkTo('documents', 'index.php') + '#' + fileId);
 +	},
 +			
 +	onView: function(filename) {
 +		var webodfSource = (oc_debug === true) ? 'webodf-debug' : 'webodf',
 +		attachTo = odfViewer.isDocuments ? '#documents-content' : 'table',
 +		attachToolbarTo = odfViewer.isDocuments ? '#content-wrapper' : '#controls';
 +
 +		if (odfViewer.isDocuments){
 +			//Documents view
 +			var location = filename;
 +		} else {
 +			//Public page, files app, etc
- 			var location = fileDownloadPath($('#dir').val(), filename);
++			var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + $('#dir').val() + encodeURIComponent(filename);
 +			OC.addStyle('documents', '3rdparty/webodf/editor');
 +		}
 +		
 +		OC.addStyle('documents', 'viewer/odfviewer');
 +		
 +		OC.addScript('documents', '3rdparty/webodf/' + webodfSource, function() {
 +			// fade out files menu and add odf menu
 +			$('#controls div').fadeOut('slow').promise().done(function() {
 +				// odf action toolbar
 +				var odfToolbarHtml =
 +						'<div id="odf-toolbar">' +
 +						'<button id="odf_close">' + t('documents', 'Close') +
 +						'</button></div>';
 +				if (odfViewer.isDocuments){
 +					$(attachToolbarTo).prepend(odfToolbarHtml);
 +					$('#odf-toolbar').css({position:'fixed'});
 +				} else {
 +					$(attachToolbarTo).append(odfToolbarHtml);
 +				}
 +			});
 +
 +			// fade out file list and show pdf canvas
 +			$('table, #documents-content').fadeOut('slow').promise().done(function() {
 +				var canvashtml = '<div id="odf-canvas"></div>';
 +				$(attachTo).after(canvashtml);
 +				// in case we are on the public sharing page we shall display the odf into the preview tag
 +				$('#preview').html(canvashtml);
 +
 +				var odfelement = document.getElementById("odf-canvas");
 +				var odfcanvas = new odf.OdfCanvas(odfelement);
 +				odfcanvas.load(location);
 +			});
 +		});
 +	},
 +	
 +	onClose: function() {
 +		// Fade out odf-toolbar
 +		$('#odf-toolbar').fadeOut('slow');
 +		// Fade out editor
 +		$('#odf-canvas').fadeOut('slow', function() {
 +			$('#odf-toolbar').remove();
 +			$('#odf-canvas').remove();
 +			$('#controls div').not('.hidden').fadeIn('slow');
 +			$('table, #documents-content').fadeIn('slow');
 +		});
 +	}
 +};
 +
 +$(document).ready(function() {
 +	if (typeof FileActions !== 'undefined') {
 +		odfViewer.register();
 +	}
 +
 +	$('#odf_close').live('click', odfViewer.onClose);
 +});
diff --cc apps/documents/lib/download/range.php
index d7ab37e,0000000..5aabb2a
mode 100644,000000..100644
--- a/apps/documents/lib/download/range.php
+++ b/apps/documents/lib/download/range.php
@@@ -1,79 -1,0 +1,83 @@@
 +<?php
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +/**
 + * Class processing range HTTP request (partial download)
 + */
 +class Download_Range extends \OCA\Documents\Download {
 +
 +	// Start of the range
 +	protected $start;
 +	// End of the range
 +	protected $end;
 +
 +	/**
 +	 * Build download model to serve HTTP_RANGE
 +	 * @param type $view - filesystem view
 +	 * @param type $filepath - path to the file relative to this view root
 +	 */
 +	public function __construct($owner, $filepath){
 +		$this->view = $this->getView($owner);
 +		$this->filepath = $filepath;
 +	}
 +
 +	/**
 +	 * Send the requested parts of the file
 +	 */
 +	public function sendResponse(){
 +		if (!preg_match('/^bytes=\d*-\d*(,\d*-\d*)*$/', $_SERVER['HTTP_RANGE'])){
 +			$this->sendNotSatisfiable();
 +		}
++	
++		$mimetype = $this->getMimeType();
++		$content = $this->view->file_get_contents($this->filepath);
++		$data = Filter::read($content, $mimetype);
++		$size = strlen($data['content']);
++		
 +		$ranges = explode(',', substr($_SERVER['HTTP_RANGE'], 6));
 +		foreach ($ranges as $range){
 +			$parts = explode('-', $range);
 +
 +			$start = isset($parts[0]) ? $parts[0] : 0;
- 			$end = isset($parts[1]) ? $parts[1] : $this->getFilesize() - 1;
++			$end = isset($parts[1]) ? $parts[1] : $size - 1;
 +
 +			if ($start > $end){
 +				$this->sendNotSatisfiable();
 +			}
 +
- 			$handle = $this->view->fopen($this->filepath, 'rb');
- 			\fseek($handle, $start);
- 			$buffer = \fread($handle, $end - $start);
++			$buffer = substr($data['content'], $start,  $end - $start);
 +			$md5Sum = md5($buffer);
- 			\fclose($handle);
++
 +			// send the headers and data 
 +			header("Content-Length: " . $end - $start);
 +			header("Content-md5: " . $md5Sum);
 +			header("Accept-Ranges: bytes");
- 			header('Content-Range: bytes ' . $start . '-' . ($end) . '/' . $this->getFilesize());
++			header('Content-Range: bytes ' . $start . '-' . ($end) . '/' . $size);
 +			header("Connection: close");
- 			header("Content-type: " . $this->getMimeType());
++			header("Content-type: " . $data['mimetype']);
 +			header('Content-Disposition: attachment; filename=' . $this->getFilename());
 +			\OC_Util::obEnd();
 +			echo $buffer;
 +			flush();
 +		}
 +	}
 +
 +	/**
 +	 * Send 416 if we can't satisfy the requested ranges
 +	 */
 +	protected function sendNotSatisfiable(){
 +		header('HTTP/1.1 416 Requested Range Not Satisfiable');
 +		header('Content-Range: bytes */' . $this->getFilesize()); // Required in 416.
 +		exit;
 +	}
 +}
diff --cc apps/documents/lib/download/simple.php
index 61255e1,0000000..db955ec
mode 100644,000000..100644
--- a/apps/documents/lib/download/simple.php
+++ b/apps/documents/lib/download/simple.php
@@@ -1,45 -1,0 +1,50 @@@
 +<?php
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +/**
 + * Class processing complete download
 + */
 +class Download_Simple extends \OCA\Documents\Download {
 +
 +	public function __construct($owner, $filepath){
 +		$this->view = $this->getView($owner);
 +		$this->filepath = $filepath;
 +	}
 +	
 +	/**
 +	 * Send the whole file content as a response
 +	 */
 +	public function sendResponse(){
- 		header( 'Content-Type:' . $this->getMimeType() );
++		$mimetype = $this->getMimeType();
++		$content = $this->view->file_get_contents($this->filepath);
++		$data = Filter::read($content, $mimetype);
++		
++		header( 'Content-Type:' . $data['mimetype'] );
 +		
 +		$encodedName = rawurlencode($this->getFilename());
 +		if (preg_match("/MSIE/", $_SERVER["HTTP_USER_AGENT"])){
 +			header(
 +					'Content-Disposition: attachment; filepath="' . $encodedName . '"'
 +					);
 +		} else {
 +			header('Content-Disposition: attachment; filepath*=UTF-8\'\'' . $encodedName
 +					. '; filepath="' . $encodedName . '"');
 +		}
 +		
- 		header('Content-Length: ' . $this->view->filesize($this->filepath));
++		header('Content-Length: ' . strlen($data['content']));
 +
 +		\OC_Util::obEnd();
- 		 $this->view->readfile($this->filepath);
++		
++		echo $data['content'];
 +	}
 +}
diff --cc apps/documents/lib/file.php
index af6fc28,0000000..4520dcd
mode 100644,000000..100644
--- a/apps/documents/lib/file.php
+++ b/apps/documents/lib/file.php
@@@ -1,275 -1,0 +1,274 @@@
 +<?php
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.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 Lesser General Public 
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + * 
 + */
 +
 +
 +namespace OCA\Documents;
 +
 +class File {
 +	protected $fileId;
 +	protected $owner;
 +	protected $path;
 +	protected $sharing;
 +	protected $passwordProtected = false;
 +
 +
 +	public function __construct($fileId, $shareOps = null){
 +		if (!$fileId){
 +			throw new \Exception('No valid file has been passed');
 +		}
 +
 +		$this->fileId = $fileId;
 +		
 +		//if you know how to get sharing info by fileId via API, 
 +		//please send me a link to video tutorial :/
 +		if (!is_null($shareOps)){
 +			$this->sharing = $shareOps;
 +		} else {
 +			$this->sharing = $this->getSharingOps();
 +		}
 +	}
 +	
 +	public static function getByShareToken($token){
 +		$linkItem = \OCP\Share::getShareByToken($token);
 +		if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +			// seems to be a valid share
 +			$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 +			$fileOwner = $rootLinkItem['uid_owner'];
 +		} else {
 +			throw new \Exception('This file was probably unshared');
 +		}
 +		
 +		if (!isset($rootLinkItem['path']) && isset($rootLinkItem['file_target'])){
- 			$rootLinkItem['path'] = 'files/' . $rootLinkItem['file_target'];
++			$rootLinkItem['path'] = $rootLinkItem['file_target'];
 +		}
 +		$file = new File($rootLinkItem['file_source'], array($rootLinkItem));
 +		
 +
 +		if (isset($rootLinkItem['uid_owner'])){
 +			\OC_Util::tearDownFS();
 +			\OC_Util::setupFS($rootLinkItem['uid_owner']);
 +			$file->setOwner($rootLinkItem['uid_owner']);
- 			$file->setPath('/files' . \OC\Files\Filesystem::getPath($linkItem['file_source']));
++			$file->setPath(\OC\Files\Filesystem::getPath($linkItem['file_source']));
 +		}
 +		
 +		if (isset($linkItem['share_with']) && !empty($linkItem['share_with'])){
 +			$file->setPasswordProtected(true);
 +		}
 +		
 +		return $file;
 +	}
 +
 +	public function getFileId(){
 +		return $this->fileId;
 +	}
 +	
 +	public function setOwner($owner){
 +		$this->owner = $owner;
 +	}
 +	
 +	public function setPath($path){
 +		$this->path = $path;
 +	}
 +	
 +	public function isPublicShare(){
 +		foreach ($this->sharing as $share){
 +			if (
 +					$share['share_type'] == \OCP\Share::SHARE_TYPE_LINK 
 +					|| $share['share_type'] == \OCP\Share::SHARE_TYPE_EMAIL
 +				){
 +				return true;
 +			}
 +		}
 +		return false;
 +	}
 +	
 +	public function isPasswordProtected(){
 +		return $this->passwordProtected;
 +	}
 +	
 +	public function checkPassword($password){
 +		$shareId  = $this->getShareId();
 +		if (!$this->isPasswordProtected()
 +			|| (\OC::$session->exists('public_link_authenticated')
 +				&& \OC::$session->get('public_link_authenticated') === $shareId)	
 +			){
 +				return true;
 +		}
 +		
 +		// Check Password
 +		$forcePortable = (CRYPT_BLOWFISH != 1);
 +		$hasher = new \PasswordHash(8, $forcePortable);
 +		if ($hasher->CheckPassword($password.\OC_Config::getValue('passwordsalt', ''),
 +									 $this->getPassword())) {
 +			// Save item id in session for future request
 +			\OC::$session->set('public_link_authenticated', $shareId);
 +			return true;
 +		}
 +		return false;
 +	}
 +	
 +	public function setPasswordProtected($value){
 +		$this->passwordProtected = $value;
 +	}
 +	
 +	public function getPermissions(){
 +		if (count($this->sharing)){
 +			if ($this->isPublicShare()){
 +				$permissions = \OCP\PERMISSION_READ | \OCP\PERMISSION_UPDATE;
 +			} else {
 +				$permissions = $this->sharing[0]['permissions'];
 +			}
 +		} else {
 +			list($owner, $path) = $this->getOwnerViewAndPath();
 +			$permissions = 0;
 +			if (\OC\Files\Filesystem::isReadable($path)){
 +				$permissions |= \OCP\PERMISSION_READ;
 +			}
 +			if (\OC\Files\Filesystem::isUpdatable($path)){
 +				$permissions |= \OCP\PERMISSION_UPDATE;
 +			}
 +				
 +		}
 +		return $permissions;
 +	}
 +
 +	/**
 +	 * Rename this file to the given name
 +	 * @param string $newName name to give (without path)
 +	 * @return boolean true if rename succeeded, false otherwise
 +	 */
 +	public function renameTo($newName) {
 +		list($owner, $path) = $this->getOwnerViewAndPath();
 +		$newPath = dirname($path) . '/' . $newName;
 +		return \OC\Files\Filesystem::rename($path, $newPath);
 +	}
 +
 +	/**
 +	 * 
 +	 * @return string owner of the current file item
 +	 * @throws \Exception
 +	 */
 +	public function getOwnerViewAndPath(){
- 		if (!$this->owner || !$this->path){			
- 			$info = $this->getSharedFileOwnerAndPath();
- 			if (is_array($info) && count($info)){
- 				$owner = $info[0];
- 				$path = $info[1];
++		if (!$this->owner || !$this->path){
++			if ($this->isPublicShare()){
++				list($owner, $path) = $this->getSharedFileOwnerAndPath();
 +			} else {
- 				list($owner, $path) = $this->getLocalFileOwnerAndPath();
- 			}
- 
- 			if (!$path){
- 				throw new \Exception($this->fileId . ' can not be resolved');
++				$owner = \OCP\User::getUser();
++				$path = Storage::resolvePath($this->fileId);
++				if (!$path){
++					throw new \Exception($this->fileId . ' can not be resolved');
++				}
 +			}
 +			
 +			$this->path = $path;
 +			$this->owner = $owner;
 +		}
 +		
- 		/* to emit hooks properly, view root should contain /user/files */
- 		
- 		if (strpos($this->path, 'files') === 0){
- 			$path = preg_replace('|^files|', '', $this->path);
- 			$view = new View('/' . $this->owner . '/files');
- 		} else {
- 			$path = $this->path;
- 			$view = new View('/' . $this->owner);
- 		}
- 		
- 		if (!$view->file_exists($path)){
++		$view = new View('/' . $this->owner . '/files');
++		if (!$view->file_exists($this->path)){
 +			throw new \Exception($this->path . ' doesn\'t exist');
 +		}
- 		
- 		return array($view, $path);
++
++		return array($view, $this->path);
 +	}
 +
 +	public function getOwner(){
 +		if (!$this->owner){
 +			$this->getOwnerViewAndPath();
 +		}
 +		return $this->owner;
 +	}
 +	
++	/**
++	 * public links only
++	 * @return array
++	 */
 +	protected function getSharedFileOwnerAndPath(){
- 		$result = array();
 +		foreach ($this->sharing as $share){
++			$rootLinkItem = \OCP\Share::resolveReShare($share);
++			if (isset($rootLinkItem['uid_owner'])){
++				$owner = $rootLinkItem['uid_owner'];
++			} else {
++				$owner = false;
++			}
++			\OC_Util::tearDownFS();
++			\OC_Util::setupFS($owner);
 +			return array(
- 				$share['uid_owner'],
- 				$share['path']
- 			);
++					$owner,
++					\OC\Files\Filesystem::getPath($rootLinkItem['file_source'])
++                );
 +		}
- 		
++
 +		return $result;
 +	}
- 	
- 	
++
 +	protected function getLocalFileOwnerAndPath(){
 +		$fileInfo = \OC\Files\Cache\Cache::getById($this->fileId);
 +		$owner = \OCP\User::getUser();
 +		if (!$owner){
 +			throw new Exception('Guest users can\'t access local files. This one was probably unshared recently.');
 +		}
 +
 +		return array ($owner, @$fileInfo[1]);
 +	}
 +	
 +	protected function getPassword(){
 +		return $this->sharing[0]['share_with'];
 +	}
 +	
 +	protected function getShareId(){
 +		return $this->sharing[0]['id'];
 +	}
 +
 +	protected function getSharingOps(){
 +		
 +		$where  = 'AND `file_source`=?';
 +		$values = array($this->fileId);
 +		
 +		if (\OCP\User::isLoggedIn()){
 +			$where .= ' AND ((`share_type`=' . \OCP\Share::SHARE_TYPE_USER . ' AND `share_with`=?) OR  `share_type`=' . \OCP\Share::SHARE_TYPE_LINK . ')';
 +			$values[] = \OCP\User::getUser();
 +		} else {
 +			$where .= ' AND (`share_type`=' . \OCP\Share::SHARE_TYPE_LINK . ')';
 +		}
 +		
 +		$query = \OC_DB::prepare('SELECT `*PREFIX*share`.`id`, `item_type`, `*PREFIX*share`.`parent`, `uid_owner`, '
 +							.'`share_type`, `share_with`, `file_source`, `path`, `file_target`, '
 +							.'`permissions`, `expiration`, `storage`, `*PREFIX*filecache`.`parent` as `file_parent`, '
 +							.'`name`, `mtime`, `mimetype`, `mimepart`, `size`, `encrypted`, `etag`' 
 +							.'FROM `*PREFIX*share` INNER JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `item_type` = \'file\' ' . $where);
 +		$result = $query->execute($values);
 +		$shares = $result->fetchAll();
 +		
 +		$origins = array();
 +		if (is_array($shares)){
 +			foreach ($shares as $share){
 +				$origin = \OCP\Share::resolveReShare($share);
 +				if (!isset($origin['path']) && isset($origin['file_target'])){
 +					$origin['path'] = 'files/' . $origin['file_target'];
 +				}
 +				$origins[] = $origin;
 +			}
 +		}
 +		return $origins;
 +	}
 +}
diff --cc apps/documents/lib/filter.php
index 0000000,0000000..e7ef483
new file mode 100644
--- /dev/null
+++ b/apps/documents/lib/filter.php
@@@ -1,0 -1,0 +1,65 @@@
++<?php
++
++/**
++ * ownCloud - Documents App
++ *
++ * @author Victor Dubiniuk
++ * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
++ *
++ * This file is licensed under the Affero General Public License version 3 or
++ * later.
++ */
++
++namespace OCA\Documents;
++
++ class Filter {
++	 protected static $filters = array();
++	 
++	 public static function add($mimetype, $class){
++		 self::$filters[$mimetype] = $class;
++	}
++
++	public static function read($content, $mimetype){
++		$data = array(
++			'mimetype' => $mimetype,
++			'content' => $content
++		);
++
++		if (isset(self::$filters[$mimetype])){
++			$data = call_user_func(
++					array(
++						self::$filters[$mimetype],
++						'read'
++					),
++					$data
++			);
++		}
++		
++		return $data;
++	 }
++	 
++	 public static function write($content, $mimetype){
++		$data = array(
++			'mimetype' => $mimetype,
++			'content' => $content
++		);
++		
++		if (isset(self::$filters[$mimetype])){
++			$data = call_user_func(
++					array(
++						self::$filters[$mimetype],
++						'write'
++					),
++					$data
++			);
++		}
++		
++		return $data;
++	 }
++	 
++	 public static function getAll(){
++		 return array_keys(self::$filters);
++	 }
++	 
++ }
++ 
diff --cc apps/documents/lib/genesis.php
index bb61d70,0000000..c038d69
mode 100644,000000..100644
--- a/apps/documents/lib/genesis.php
+++ b/apps/documents/lib/genesis.php
@@@ -1,109 -1,0 +1,112 @@@
 +<?php
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.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 Lesser General Public 
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + * 
 + */
 +
 +namespace OCA\Documents;
 +
 +class Genesis {
 +	
 +	const DOCUMENTS_DIRNAME='/documents';
 +	
 +	protected $view;
 +	
 +	protected $path;
 +	
 +	protected $hash;
 +	
 +	
 +	/**
 +	 * Create new genesis document
 +	 * @param OCA\Documents\View $view Filesystem view with root '/user/files'
 +	 * @param string $path relative path
 +	 * @param string $owner file owner
 +	 * */	
 +	public function __construct(\OCA\Documents\View $view, $path, $owner){
 +		$this->view = new View('/' . $owner);
 +		
 +		if (!$this->view->file_exists(self::DOCUMENTS_DIRNAME)){
 +			$this->view->mkdir(self::DOCUMENTS_DIRNAME );
 +		}
 +		
 +		$this->hash = $this->getDocumentHash($view, $path);
 +		$this->path = self::DOCUMENTS_DIRNAME . '/' . $this->hash . '.odt';
 +		if (!$this->view->file_exists($this->path)){
 +			//copy new genesis to /user/documents/{hash}.odt
 +			// get decrypted content
 +			$content = $view->file_get_contents($path);
- 					
++			$mimetype = $view->getMimeType($path);
++			
++			$data = Filter::read($content, $mimetype);
++			
 +			$proxyStatus = \OC_FileProxy::$enabled;
 +			\OC_FileProxy::$enabled = false;	
 +			
- 			$this->view->file_put_contents($this->path, $content);
++			$this->view->file_put_contents($this->path, $data['content']);
 +			\OC_FileProxy::$enabled = $proxyStatus;
 +		}
 +		
 +		try {
 +			$this->validate($this->view, $this->path);
 +		} catch (\Exception $e){
 +			throw new \Exception('Failed to copy genesis');
 +		}
 +	}
 +	
 +	public function getPath(){
 +		return $this->path;
 +	}
 +	
 +	public function getHash(){
 +		return $this->hash;
 +	}
 +	
 +	public static function getHashByPath($path){
 +		return preg_replace('|([a-zA-Z0-9])*\..*$|', '\1', $path);
 +	}
 +	
 +	protected function getDocumentHash($view, $path){
 +		$this->validate($view, $path);
 +		$proxyStatus = \OC_FileProxy::$enabled;
 +		\OC_FileProxy::$enabled = false;
 +		
 +		$hash = sha1($view->file_get_contents($path));
 +		
 +		\OC_FileProxy::$enabled = $proxyStatus;
 +		return $hash;
 +	}
 +	
 +	/**
 +	 * Check if genesis is valid
 +	 * @param OCA\Documents\View $view 
 +	 * @param string $path relative to the view
 +	 * @throws \Exception
 +	 */
 +	protected function validate($view, $path){
 +		if (!$view->file_exists($path)){
 +			throw new \Exception('Document not found ' . $path);
 +		}
 +		if (!$view->is_file($path)){
 +			throw new \Exception('Object ' . $path . ' is not a file.');
 +		}
 +		//TODO check if it is a valid odt
 +	}
 +
 +}
diff --cc apps/documents/lib/storage.php
index d16ad6a,0000000..e8f8f16
mode 100644,000000..100644
--- a/apps/documents/lib/storage.php
+++ b/apps/documents/lib/storage.php
@@@ -1,71 -1,0 +1,101 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Frank Karlitschek
 + * @copyright 2012 Frank Karlitschek frank at owncloud.org
 + * 
 + * 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 Lesser General Public 
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + * 
 + */
 +
 +
 +namespace OCA\Documents;
 +
 +class Storage {
++	const MIMETYPE_LIBREOFFICE_WORDPROCESSOR = 'application/vnd.oasis.opendocument.text';
 +
 +	public static function getDocuments() {
 +		$list = array_filter(
- 				\OCP\Files::searchByMime('application/vnd.oasis.opendocument.text'),
++				self::searchDocuments(),
 +				function($item){
 +					//filter Deleted
 +					if (strpos($item['path'], '_trashbin')===0){
 +						return false;
 +					}
 +					return true;
 +				}
 +		);
 +		
 +		return $list;
 +	}
 +	
++	public static function resolvePath($fileId){
++		$list = array_filter(
++				self::searchDocuments(),
++				function($item) use ($fileId){
++					return intval($item['fileid'])==$fileId;
++				}
++		);
++		if (count($list)>0){
++			$item = current($list);
++			return $item['path'];
++		}
++		return false;
++	}
++	
 +	/**
 +	 * @brief Cleanup session data on removing the document
 +	 * @param array
 +	 *
 +	 * This function is connected to the delete signal of OC_Filesystem
 +	 * to delete the related info from database
 +	 */
 +	public static function onDelete($params) {
 +		$info = \OC\Files\Filesystem::getFileInfo($params['path']);
 +		
 +		$fileId = @$info['fileid'];
 +		if (!$fileId){
 +			return;
 +		}
 +		
 +		$sessionObj = new Db_Session();
 +		$session = $sessionObj
 +					->loadBy('file_id', $fileId)
 +					->getData()
 +				;
 +
 +		if (!is_array($session) || !isset($session['es_id'])){
 +			return;
 +		}
 +		
 +		Db_Session::cleanUp($session['es_id']);
 +	}
++	
++	protected static function searchDocuments(){
++		$documents = array();
++		foreach (self::getSupportedMimetypes() as $mime){
++			$documents = array_merge($documents, \OCP\Files::searchByMime($mime));
++		}
++		return $documents;
++	}
++	
++	protected static function getSupportedMimetypes(){
++		return array_merge(
++			array(self::MIMETYPE_LIBREOFFICE_WORDPROCESSOR),
++			Filter::getAll()	
++		);
++	}
 +}
diff --cc apps/files/js/filelist.js
index 473bcf2,c02ab70..30aea9c
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@@ -292,8 -299,9 +299,12 @@@ var FileList=
  		$('#filestable').toggleClass('hidden', show);
  	},
  	remove:function(name){
- 		$('tr').filterAttr('data-file',name).find('td.filename').draggable('destroy');
- 		$('tr').filterAttr('data-file',name).remove();
+ 		var fileEl = FileList.findFileEl(name);
 -		fileEl.find('td.filename').draggable('destroy');
++		if (fileEl.data('permissions') & OC.PERMISSION_DELETE) {
++			// file is only draggable when delete permissions are set
++			fileEl.find('td.filename').draggable('destroy');
++		}
+ 		fileEl.remove();
  		FileList.updateFileSummary();
  		if ( ! $('tr[data-file]').exists() ) {
  			$('#emptycontent').removeClass('hidden');
diff --cc apps/files_encryption/lib/helper.php
index 17bcac5,67facb7..67facb7
mode 100644,100755..100644
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
diff --cc apps/files_encryption/tests/share.php
index 6a29d24,e554276..e554276
mode 100644,100755..100644
--- a/apps/files_encryption/tests/share.php
+++ b/apps/files_encryption/tests/share.php
diff --cc apps/files_encryption/tests/util.php
index e8dfb74,c83c383..c83c383
mode 100644,100755..100644
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
diff --cc apps/files_external/lib/config.php
index 12836c7,373246a..373246a
mode 100644,100755..100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
diff --cc apps/files_texteditor/js/editor.js
index 7bdd6bf,0000000..b3df55b
mode 100644,000000..100644
--- a/apps/files_texteditor/js/editor.js
+++ b/apps/files_texteditor/js/editor.js
@@@ -1,406 -1,0 +1,399 @@@
 +function getFileExtension(file) {
 +	var parts = file.split('.');
 +	return parts[parts.length - 1];
 +}
 +
 +function setSyntaxMode(ext) {
 +	// Loads the syntax mode files and tells the editor
 +	var filetype = new Array();
 +	// add file extensions like this: filetype["extension"] = "filetype":
 +	filetype["h"] = "c_cpp";
 +	filetype["c"] = "c_cpp";
 +	filetype["clj"] = "clojure";
 +	filetype["coffee"] = "coffee"; // coffescript can be compiled to javascript
 +	filetype["coldfusion"] = "cfc";
 +	filetype["cpp"] = "c_cpp";
 +	filetype["cs"] = "csharp";
 +	filetype["css"] = "css";
 +	filetype["groovy"] = "groovy";
 +	filetype["haxe"] = "hx";
 +	filetype["htm"] = "html";
 +	filetype["html"] = "html";
 +	filetype["java"] = "java";
 +	filetype["js"] = "javascript";
 +	filetype["jsm"] = "javascript";
 +	filetype["json"] = "json";
 +	filetype["latex"] = "latex";
 +	filetype["less"] = "less";
 +	filetype["ly"] = "latex";
 +	filetype["ily"] = "latex";
 +	filetype["lua"] = "lua";
 +	filetype["markdown"] = "markdown";
 +	filetype["md"] = "markdown";
 +	filetype["mdown"] = "markdown";
 +	filetype["mdwn"] = "markdown";
 +	filetype["mkd"] = "markdown";
 +	filetype["ml"] = "ocaml";
 +	filetype["mli"] = "ocaml";
 +	filetype["pl"] = "perl";
 +	filetype["php"] = "php";
 +	filetype["powershell"] = "ps1";
 +	filetype["py"] = "python";
 +	filetype["rb"] = "ruby";
 +	filetype["scad"] = "scad"; // seems to be something like 3d model files printed with e.g. reprap
 +	filetype["scala"] = "scala";
 +	filetype["scss"] = "scss"; // "sassy css"
 +	filetype["sh"] = "sh";
 +	filetype["sql"] = "sql";
 +	filetype["svg"] = "svg";
 +	filetype["textile"] = "textile"; // related to markdown
 +	filetype["xml"] = "xml";
 +
 +	if (filetype[ext] != null) {
 +		// Then it must be in the array, so load the custom syntax mode
 +		// Set the syntax mode
 +		OC.addScript('files_texteditor', 'vendor/ace/src-noconflict/mode-' + filetype[ext], function () {
 +			var SyntaxMode = ace.require("ace/mode/" + filetype[ext]).Mode;
 +			window.aceEditor.getSession().setMode(new SyntaxMode());
 +		});
 +	}
 +}
 +
 +function showControls(dir, filename, writeable) {
 +	// Loads the control bar at the top.
 +	OC.Breadcrumb.show(dir, filename, '#');
 +	// Load the new toolbar.
 +	var editorbarhtml = '<div id="editorcontrols" style="display: none;">';
 +	if (writeable) {
 +		editorbarhtml += '<button id="editor_save">' + t('files_texteditor', 'Save') + '</button>';
 +	}
 +	editorbarhtml += '<label for="editorseachval">' + t('files_texteditor', 'Search');
 +	editorbarhtml += '</label><input type="text" name="editorsearchval" id="editorsearchval">';
 +	editorbarhtml += '<button id="editor_close">';
 +	editorbarhtml += t('files_texteditor', 'Close') + '</button></div>';
 +
 +	$('#controls').append(editorbarhtml);
 +	$('#editorcontrols').show();
 +}
 +
 +function bindControlEvents() {
 +	$('#content').on('click', '#editor_save', doFileSave);
 +	$('#content').on('click', '#editor_close', hideFileEditor);
 +	$('#content').on('keyup', '#editorsearchval', doSearch);
 +	$('#content').on('click', '#clearsearchbtn', resetSearch);
 +	$('#content').on('click', '#nextsearchbtn', nextSearchResult);
 +}
 +
 +// returns true or false if the editor is in view or not
 +function editorIsShown() {
 +	return is_editor_shown;
 +}
 +
 +//resets the search
 +function resetSearch() {
 +	$('#editorsearchval').val('');
 +	$('#nextsearchbtn').remove();
 +	$('#clearsearchbtn').remove();
 +	window.aceEditor.gotoLine(0);
 +}
 +
 +// moves the cursor to the next search resukt
 +function nextSearchResult() {
 +	window.aceEditor.findNext();
 +}
 +// Performs the initial search
 +function doSearch() {
 +	// check if search box empty?
 +	if ($('#editorsearchval').val() == '') {
 +		// Hide clear button
 +		window.aceEditor.gotoLine(0);
 +		$('#nextsearchbtn').remove();
 +		$('#clearsearchbtn').remove();
 +	} else {
 +		// New search
 +		// Reset cursor
 +		window.aceEditor.gotoLine(0);
 +		// Do search
 +		window.aceEditor.find($('#editorsearchval').val(), {
 +			backwards: false,
 +			wrap: false,
 +			caseSensitive: false,
 +			wholeWord: false,
 +			regExp: false
 +		});
 +		// Show next and clear buttons
 +		// check if already there
 +		if ($('#nextsearchbtn').length == 0) {
 +			var nextbtnhtml = '<button id="nextsearchbtn">' + t('files_texteditor', 'Next') + '</button>';
 +			var clearbtnhtml = '<button id="clearsearchbtn">' + t('files_texteditor', 'Clear') + '</button>';
 +			$('#editorsearchval').after(nextbtnhtml).after(clearbtnhtml);
 +		}
 +	}
 +}
 +
 +// Tries to save the file.
 +function doFileSave() {
 +	if (editorIsShown()) {
 +		// Changed contents?
 +		if ($('#editor').attr('data-edited') == 'true') {
 +			// Get file path
 +			var path = $('#editor').attr('data-dir') + '/' + $('#editor').attr('data-filename');
 +			// Get original mtime
 +			var mtime = $('#editor').attr('data-mtime');
 +			// Show saving spinner
 +			$("#editor_save").die('click', doFileSave);
 +			$('#save_result').remove();
 +			$('#editor_save').text(t('files_texteditor', 'Saving...'));
 +			// Get the data
 +			var filecontents = window.aceEditor.getSession().getValue();
 +			// Send the data
 +			$.post(OC.filePath('files_texteditor', 'ajax', 'savefile.php'), { filecontents: filecontents, path: path, mtime: mtime }, function (jsondata) {
 +				if (jsondata.status != 'success') {
 +					// Save failed
 +					$('#editor_save').text(t('files_texteditor', 'Save'));
 +					$('#notification').html(t('files_texteditor', 'Failed to save file'));
 +					$('#notification').fadeIn();
 +					$('#editor_save').live('click', doFileSave);
 +				} else {
 +					// Save OK
 +					// Update mtime
 +					$('#editor').attr('data-mtime', jsondata.data.mtime);
 +					$('#editor_save').text(t('files_texteditor', 'Save'));
 +					$("#editor_save").live('click', doFileSave);
- 					// Update size
- 					if ($('#dir').val() === $('#editor').attr('data-dir')) {
- 						var tr = $('tr[data-file="'+$('#editor').attr('data-filename')+'"]');
- 						tr.attr('data-size', jsondata.data.size);
- 						tr.find('.filesize').text(humanFileSize(jsondata.data.size));
- 						// TODO change opacity according to filesize
- 					}
 +					// Update titles
 +					$('#editor').attr('data-edited', 'false');
 +					$('.crumb.last a').text($('#editor').attr('data-filename'));
 +					document.title = $('#editor').attr('data-filename') + ' - ownCloud';
 +				}
 +			}, 'json');
 +		}
 +	}
 +	giveEditorFocus();
 +};
 +
 +// Gives the editor focus
 +function giveEditorFocus() {
 +	window.aceEditor.focus();
 +};
 +
 +// Loads the file editor. Accepts two parameters, dir and filename.
 +function showFileEditor(dir, filename) {
 +	// Check if unsupported file format
 +	if(FileActions.getCurrentMimeType() === 'text/rtf') {
 +		// Download the file instead.
 +		window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val());
 +	} else {
 +		if (!editorIsShown()) {
 +			is_editor_shown = true;
 +			// Delete any old editors
 +			if ($('#notification').data('reopeneditor')) {
 +				OC.Notification.hide();
 +			}
 +			$('#editor').remove();
 +			// Loads the file editor and display it.
 +			$('#content').append('<div id="editor_container"><div id="editor"></div></div>');
 +			var data = $.getJSON(
 +				OC.filePath('files_texteditor', 'ajax', 'loadfile.php'),
 +				{file: filename, dir: dir},
 +				function (result) {
 +					if (result.status === 'success') {
 +						// Save mtime
 +						$('#editor').attr('data-mtime', result.data.mtime);
 +						// Initialise the editor
 +						if (window.FileList){
 +							FileList.setViewerMode(true);
 +							enableEditorUnsavedWarning(true);
 +							$('#fileList').on('changeDirectory.texteditor', textEditorOnChangeDirectory);
 +						}
 +						// Show the control bar
 +						showControls(dir, filename, result.data.writeable);
 +						// Update document title
 +						$('body').attr('old_title', document.title);
 +						document.title = filename + ' - ownCloud';
 +						$('#editor').text(result.data.filecontents);
 +						$('#editor').attr('data-dir', dir);
 +						$('#editor').attr('data-filename', filename);
 +						$('#editor').attr('data-edited', 'false');
 +						window.aceEditor = ace.edit("editor");
 +						aceEditor.setShowPrintMargin(false);
 +						aceEditor.getSession().setUseWrapMode(true);
 +						if ( ! result.data.writeable ) {
 +							aceEditor.setReadOnly(true);
 +						}
 +						if (result.data.mime && result.data.mime === 'text/html') {
 +							setSyntaxMode('html');
 +						} else {
 +							setSyntaxMode(getFileExtension(filename));
 +						}
 +						OC.addScript('files_texteditor', 'vendor/ace/src-noconflict/theme-clouds', function () {
 +							window.aceEditor.setTheme("ace/theme/clouds");
 +						});
 +						window.aceEditor.getSession().on('change', function () {
 +							if ($('#editor').attr('data-edited') != 'true') {
 +								$('#editor').attr('data-edited', 'true');
 +								$('.crumb.last a').text($('.crumb.last a').text() + ' *');
 +								document.title = $('#editor').attr('data-filename') + ' * - ownCloud';
 +							}
 +						});
 +						// Add the ctrl+s event
 +						window.aceEditor.commands.addCommand({
 +							name: "save",
 +							bindKey: {
 +								win: "Ctrl-S",
 +								mac: "Command-S",
 +								sender: "editor"
 +							},
 +							exec: function () {
 +								doFileSave();
 +							}
 +						});
 +						giveEditorFocus();
 +					} else {
 +						// Failed to get the file.
 +						OC.dialogs.alert(result.data.message, t('files_texteditor', 'An error occurred!'));
 +					}
 +					// End success
 +				}
 +				// End ajax
 +			);
 +			return data;
 +		}
 +	}
 +}
 +
 +function enableEditorUnsavedWarning(enable) {
 +	$(window).unbind('beforeunload.texteditor');
 +	if (enable) {
 +		$(window).bind('beforeunload.texteditor', function () {
 +			if ($('#editor').attr('data-edited') == 'true') {
 +				return t('files_texteditor', 'There are unsaved changes in the text editor');
 +			}
 +		});
 +	}
 +}
 +
 +function textEditorOnChangeDirectory(ev){
 +	// if the directory is changed, it is usually due to browser back
 +	// navigation. In this case, simply close the editor
 +	hideFileEditor();
 +}
 +
 +// Fades out the editor.
 +function hideFileEditor() {
 +	$('#fileList').off('changeDirectory.texteditor');
 +	enableEditorUnsavedWarning(false);
 +	if (window.FileList){
 +		// reload the directory content with the updated file size + thumbnail
 +		// and also the breadcrumb
 +		window.FileList.reload();
 +	}
 +	if ($('#editor').attr('data-edited') == 'true') {
 +		// Hide, not remove
 +		$('#editorcontrols,#editor_container').hide();
 +		// Fade out editor
 +		// Reset document title
 +		document.title = $('body').attr('old_title');
 +		FileList.setViewerMode(false);
 +		$('#content table').show();
 +		OC.Notification.show(t('files_texteditor', 'There were unsaved changes, click here to go back'));
 +		$('#notification').data('reopeneditor', true);
 +		is_editor_shown = false;
 +	} else {
 +		// Fade out editor
 +		$('#editor_container, #editorcontrols').remove();
 +		// Reset document title
 +		document.title = $('body').attr('old_title');
 +		FileList.setViewerMode(false);
 +		$('#content table').show();
 +		is_editor_shown = false;
 +	}
 +}
 +
 +// Reopens the last document
 +function reopenEditor() {
 +	FileList.setViewerMode(true);
 +	enableEditorUnsavedWarning(true);
 +	$('#fileList').on('changeDirectory.texteditor', textEditorOnChangeDirectory);
 +	$('#controls .last').not('#breadcrumb_file').removeClass('last');
 +	$('#editor_container').show();
 +	$('#editorcontrols').show();
 +	OC.Breadcrumb.show($('#editor').attr('data-dir'), $('#editor').attr('data-filename') + ' *', '#');
 +	document.title = $('#editor').attr('data-filename') + ' * - ownCloud';
 +	is_editor_shown = true;
 +	giveEditorFocus();
 +}
 +
 +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);
 +		});
 +		FileActions.setDefault('text', 'Edit');
 +		FileActions.register('application/xml', 'Edit', OC.PERMISSION_READ, '', function (filename) {
 +			showFileEditor($('#dir').val(), filename);
 +		});
 +		FileActions.setDefault('application/xml', 'Edit');
 +		FileActions.register('application/x-empty', 'Edit', OC.PERMISSION_READ, '', function (filename) {
 +			showFileEditor($('#dir').val(), filename);
 +		});
 +		FileActions.setDefault('application/x-empty', 'Edit');
 +		FileActions.register('inode/x-empty', 'Edit', OC.PERMISSION_READ, '', function (filename) {
 +			showFileEditor($('#dir').val(), filename);
 +		});
 +		FileActions.setDefault('inode/x-empty', 'Edit');
 +		FileActions.register('application/x-php', 'Edit', OC.PERMISSION_READ, '', function (filename) {
 +			showFileEditor($('#dir').val(), filename);
 +		});
 +		FileActions.setDefault('application/x-php', 'Edit');
 +		FileActions.register('application/javascript', 'Edit', OC.PERMISSION_READ, '', function (filename) {
 +			showFileEditor($('#dir').val(), filename);
 +		});
 +		FileActions.setDefault('application/javascript', 'Edit');
 +		FileActions.register('application/x-pearl', 'Edit', OC.PERMISSION_READ, '', function (filename) {
 +			showFileEditor($('#dir').val(), filename);
 +		});
 +		FileActions.setDefault('application/x-pearl', 'Edit');
 +
 +	}
 +	
 +	//legacy search result customization
 +	OC.search.customResults.Text = function (row, item) {
 +		var text = item.link.substr(item.link.indexOf('download') + 8);
 +		var a = row.find('td.result a');
 +		a.data('file', text);
 +		a.attr('href', '#');
 +		a.click(function () {
 +			text = decodeURIComponent(text);
 +			var pos = text.lastIndexOf('/');
 +			var file = text.substr(pos + 1);
 +			var dir = text.substr(0, pos);
 +			showFileEditor(dir, file);
 +		});
 +	};
 +	// customize file results when we can edit them
 +	OC.search.customResults.file = function (row, item) {
 +		var validFile = /(text\/*|application\/xml)/;
 +		if (validFile.test(item.mime_type)) {
 +			var a = row.find('td.result a');
 +			a.data('file', item.name);
 +			a.attr('href', '#');
 +			a.click(function () {
 +				showFileEditor(OC.dirname(item.path), item.name);
 +			});
 +		}
 +	};
 +	// Binds the file save and close editor events, and gotoline button
 +	bindControlEvents();
 +	$('#editor_container').remove();
 +	$('#notification').click(function () {
 +		if ($('#notification').data('reopeneditor')) {
 +			reopenEditor();
 +			OC.Notification.hide();
 +		}
 +	});
 +});
diff --cc apps/gallery/ajax/getimages.php
index 345caf9,0000000..0179063
mode 100644,000000..100644
--- a/apps/gallery/ajax/getimages.php
+++ b/apps/gallery/ajax/getimages.php
@@@ -1,90 -1,0 +1,91 @@@
 +<?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.
 + */
 +
 +OCP\JSON::checkAppEnabled('gallery');
 +
 +if (isset($_GET['token'])) {
 +	$token = $_GET['token'];
 +	$linkItem = \OCP\Share::getShareByToken($token);
 +	if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +		// seems to be a valid share
 +		$type = $linkItem['item_type'];
 +		$fileSource = $linkItem['file_source'];
 +		$shareOwner = $linkItem['uid_owner'];
 +		$path = null;
 +		$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 +		$fileOwner = $rootLinkItem['uid_owner'];
 +
 +		// Setup FS with owner
 +		OC_Util::tearDownFS();
 +		OC_Util::setupFS($fileOwner);
 +
 +		// The token defines the target directory (security reasons)
 +		$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
 +
 +		$view = new \OC\Files\View(\OC\Files\Filesystem::getView()->getAbsolutePath($path));
 +		$images = $view->searchByMime('image');
 +
 +		foreach ($images as &$image) {
 +			$image['path'] = $token . $image['path'];
 +		}
 +
 +		OCP\JSON::setContentTypeHeader();
 +		echo json_encode(array('images' => $images, 'users' => array(), 'displayNames' => array()));
 +
 +		exit;
 +	}
 +}
 +
 +OCP\JSON::checkLoggedIn();
 +OCP\JSON::checkAppEnabled('gallery');
 +
 +$images = \OCP\Files::searchByMime('image');
 +$user = \OCP\User::getUser();
 +
 +foreach ($images as &$image) {
 +	$path = $user . $image['path'];
 +	if (strpos($path, DIRECTORY_SEPARATOR . ".")) {
 +		continue;
 +	}
 +	$image['path'] = $user . $image['path'];
 +}
 +
 +$shared = array();
 +$sharedSources = OCP\Share::getItemsSharedWith('file');
 +$users = array();
 +foreach ($sharedSources as $sharedSource) {
 +	$owner = $sharedSource['uid_owner'];
 +	if (array_search($owner, $users) === false) {
 +		$users[] = $owner;
 +	}
 +	\OC\Files\Filesystem::initMountPoints($owner);
 +	$ownerView = new \OC\Files\View('/' . $owner . '/files');
 +	$path = $ownerView->getPath($sharedSource['item_source']);
 +	if ($path) {
 +		$shareName = basename($path);
 +		$shareView = new \OC\Files\View('/' . $owner . '/files' . $path);
 +		$sharedImages = $shareView->searchByMime('image');
 +		foreach ($sharedImages as $sharedImage) {
- 			$sharedImage['path'] = $owner . $sharedSource['file_target'] . '/' . $shareName . $sharedImage['path'];
++			// set the file_source in the path so we can get the original shared folder later
++			$sharedImage['path'] = $owner . '/' . $sharedSource['file_source'] . '/' . $shareName . $sharedImage['path'];
 +			$images[] = $sharedImage;
 +		}
 +	}
 +}
 +
 +$displayNames = array();
 +foreach ($users as $user) {
 +	$displayNames[$user] = \OCP\User::getDisplayName($user);
 +}
 +
 +function startsWith($haystack, $needle) {
 +	return !strncmp($haystack, $needle, strlen($needle));
 +}
 +
 +OCP\JSON::setContentTypeHeader();
 +echo json_encode(array('images' => $images, 'users' => $users, 'displayNames' => $displayNames));
diff --cc apps/gallery/ajax/image.php
index 1d48353,0000000..af098fd
mode 100644,000000..100644
--- a/apps/gallery/ajax/image.php
+++ b/apps/gallery/ajax/image.php
@@@ -1,58 -1,0 +1,63 @@@
 +<?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.
 + */
 +
 +OCP\JSON::checkAppEnabled('gallery');
 +
 +list($token, $img) = explode('/', $_GET['file'], 2);
 +$linkItem = \OCP\Share::getShareByToken($token);
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// seems to be a valid share
 +	$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 +	$owner = $rootLinkItem['uid_owner'];
 +	OC_Util::tearDownFS();
 +	OC_Util::setupFS($owner);
 +	\OC_User::setIncognitoMode(true);
 +} else {
 +	OCP\JSON::checkLoggedIn();
 +
 +	list($owner, $img) = explode('/', $_GET['file'], 2);
 +	if ($owner !== OCP\User::getUser()) {
- 		list(, $img) = explode('/', $img, 2);
++		OC_Util::setupFS($owner);
++		$view = new \OC\Files\View('/' . $owner . '/files');
++		// second part is the (duplicated) share name
++		list($folderId, , $img) = explode('/', $img, 3);
++		$sharedFolder = $view->getPath($folderId);
++		$img = $sharedFolder . '/' . $img;
 +	}
 +}
 +
 +session_write_close();
 +
 +$ownerView = new \OC\Files\View('/' . $owner . '/files');
 +
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// prepend path to share
 +	$path = $ownerView->getPath($linkItem['file_source']);
 +	$img = $path.'/'.$img;
 +}
 +
 +$mime = $ownerView->getMimeType($img);
 +list($mimePart,) = explode('/', $mime);
 +if ($mimePart === 'image') {
 +	$local = $ownerView->getLocalFile($img);
 +	$rotate = false;
 +	if (is_callable('exif_read_data')) { //don't use OCP\Image here, using OCP\Image will always cause parsing the image file
 +		$exif = @exif_read_data($local, 'IFD0');
 +		if (isset($exif['Orientation'])) {
 +			$rotate = ($exif['Orientation'] > 1);
 +		}
 +	}
 +	if ($rotate) {
 +		$image = new OCP\Image($local);
 +		$image->fixOrientation();
 +		$image->show();
 +	} else { //use the original file if we dont need to rotate, saves having to re-encode the image
 +		header('Content-Type: ' . $mime);
 +		$ownerView->readfile($img);
 +	}
 +}
diff --cc apps/gallery/ajax/thumbnail.php
index fe42f2e,0000000..7c885dc
mode 100644,000000..100644
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@@ -1,40 -1,0 +1,45 @@@
 +<?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.
 + */
 +
 +OCP\JSON::checkAppEnabled('gallery');
 +
 +list($token, $img) = explode('/', $_GET['file'], 2);
 +$linkItem = \OCP\Share::getShareByToken($token);
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// seems to be a valid share
 +	$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 +	$owner = $rootLinkItem['uid_owner'];
 +	OC_Util::tearDownFS();
 +	OC_Util::setupFS($owner);
 +} else {
 +	OCP\JSON::checkLoggedIn();
 +
 +	list($owner, $img) = explode('/', $_GET['file'], 2);
 +	if ($owner !== OCP\User::getUser()) {
- 		list(, $img) = explode('/', $img, 2);
++		OC_Util::setupFS($owner);
++		$view = new \OC\Files\View('/' . $owner . '/files');
++		// second part is the (duplicated) share name
++		list($folderId,, $img) = explode('/', $img, 3);
++		$sharedFolder = $view->getPath($folderId);
++		$img = $sharedFolder . '/' . $img;
 +	}
 +}
 +
 +session_write_close();
 +
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// prepend path to share
 +	$ownerView = new \OC\Files\View('/' . $owner . '/files');
 +	$path = $ownerView->getPath($linkItem['file_source']);
- 	$img = $path.'/'.$img;
++	$img = $path . '/' . $img;
 +}
 +
 +$square = isset($_GET['square']) ? (bool)$_GET['square'] : false;
 +
 +$image = new \OCA\Gallery\Thumbnail('/' . $img, $owner, $square);
 +$image->show();
diff --cc apps/gallery/js/gallery.js
index 9a10a36,0000000..1434160
mode 100644,000000..100644
--- a/apps/gallery/js/gallery.js
+++ b/apps/gallery/js/gallery.js
@@@ -1,357 -1,0 +1,361 @@@
 +var Gallery = {};
 +Gallery.albums = {};
 +Gallery.images = [];
 +Gallery.currentAlbum = '';
 +Gallery.subAlbums = {};
 +Gallery.users = [];
 +Gallery.displayNames = [];
 +
 +Gallery.sortFunction = function (a, b) {
 +	return a.toLowerCase().localeCompare(b.toLowerCase());
 +};
 +
 +// fill the albums from Gallery.images
 +Gallery.fillAlbums = function () {
 +	var def = new $.Deferred();
 +	var token = $('#gallery').data('token');
 +	$.getJSON(OC.filePath('gallery', 'ajax', 'getimages.php'), {token: token}).then(function (data) {
 +		var albumPath, i, imagePath, parent, path;
 +		Gallery.users = data.users;
 +		Gallery.displayNames = data.displayNames;
 +		for (i = 0; i < data.images.length; i++) {
 +			Gallery.images.push(data.images[i].path);
 +		}
 +		Gallery.fillAlbums.fill(Gallery.albums, Gallery.images);
 +		Gallery.fillAlbums.fillSubAlbums(Gallery.subAlbums, Gallery.albums);
 +
 +		Gallery.fillAlbums.sortAlbums(Gallery.subAlbums);
 +		def.resolve();
 +	});
 +	return def;
 +};
 +Gallery.fillAlbums.fill = function (albums, images) {
 +	var imagePath, albumPath, parent;
 +	images.sort();
 +	for (i = 0; i < images.length; i++) {
 +		imagePath = images[i];
 +		albumPath = OC.dirname(imagePath);
 +		if (!albums[albumPath]) {
 +			albums[albumPath] = [];
 +		}
 +		parent = OC.dirname(albumPath);
 +		while (parent && !albums[parent] && parent !== albumPath) {
 +			albums[parent] = [];
 +			parent = OC.dirname(parent);
 +		}
 +		albums[albumPath].push(imagePath);
 +	}
 +};
 +Gallery.fillAlbums.fillSubAlbums = function (subAlbums, albums) {
 +	var albumPath, parent;
 +	for (albumPath in albums) {
 +		if (albums.hasOwnProperty(albumPath)) {
 +			if (albumPath !== '') {
 +				parent = OC.dirname(albumPath);
 +				if (albumPath !== parent) {
 +					if (!subAlbums[parent]) {
 +						subAlbums[parent] = [];
 +					}
 +					subAlbums[parent].push(albumPath);
 +				}
 +			}
 +		}
 +	}
 +};
 +Gallery.fillAlbums.sortAlbums = function (albums) {
 +	var path;
 +	for (path in albums) {
 +		if (albums.hasOwnProperty(path)) {
 +			albums[path].sort(Gallery.sortFunction);
 +		}
 +	}
 +};
 +
 +Gallery.getAlbumInfo = function (album) {
 +	if (album === $('#gallery').data('token')) {
 +		return [];
 +	}
 +	if (!Gallery.getAlbumInfo.cache[album]) {
 +		var def = new $.Deferred();
 +		Gallery.getAlbumInfo.cache[album] = def;
 +		$.getJSON(OC.filePath('gallery', 'ajax', 'gallery.php'), {gallery: album}, function (data) {
 +			def.resolve(data);
 +		});
 +	}
 +	return Gallery.getAlbumInfo.cache[album];
 +};
 +Gallery.getAlbumInfo.cache = {};
 +Gallery.getImage = function (image) {
 +	return OC.filePath('gallery', 'ajax', 'image.php') + '?file=' + encodeURIComponent(image);
 +};
 +Gallery.getAlbumThumbnailPaths = function (album) {
 +	var paths = [];
 +	if (Gallery.albums[album].length) {
 +		paths = Gallery.albums[album].slice(0, 10);
 +	}
 +	if (Gallery.subAlbums[album]) {
 +		for (var i = 0; i < Gallery.subAlbums[album].length; i++) {
 +			if (paths.length < 10) {
 +				paths = paths.concat(Gallery.getAlbumThumbnailPaths(Gallery.subAlbums[album][i]));
 +			}
 +		}
 +	}
 +	return paths;
 +};
 +Gallery.share = function (event) {
 +	if (!OC.Share.droppedDown) {
 +		event.preventDefault();
 +		event.stopPropagation();
 +
- 		(function() {
++		(function () {
 +			var target = OC.Share.showLink;
- 			OC.Share.showLink = function() {
- 				var r = target.apply( this, arguments );
- 				$('#linkText').val( $('#linkText').val().replace('service=files', 'service=gallery') );
++			OC.Share.showLink = function () {
++				var r = target.apply(this, arguments);
++				$('#linkText').val($('#linkText').val().replace('service=files', 'service=gallery'));
 +				return r;
 +			};
 +		})();
 +
 +		Gallery.getAlbumInfo(Gallery.currentAlbum).then(function (info) {
 +			$('a.share').data('item', info.fileid).data('link', true)
 +				.data('possible-permissions', info.permissions).
 +				click();
 +			if (!$('#linkCheckbox').is(':checked')) {
 +				$('#linkText').hide();
 +			}
 +		});
 +	}
 +};
 +Gallery.view = {};
 +Gallery.view.element = null;
 +Gallery.view.clear = function () {
 +	Gallery.view.element.empty();
 +};
 +Gallery.view.cache = {};
 +
 +Gallery.view.addImage = function (image) {
 +	var link , thumb;
 +	if (Gallery.view.cache[image]) {
 +		Gallery.view.element.append(Gallery.view.cache[image]);
 +		thumb = Thumbnail.get(image);
 +		thumb.queue();
 +	} else {
 +		link = $('<a/>');
 +		link.addClass('image loading');
 +		link.attr('data-path', image);
 +		link.attr('href', Gallery.getImage(image)).attr('rel', 'album').attr('alt', OC.basename(image)).attr('title', OC.basename(image));
 +
 +		thumb = Thumbnail.get(image);
 +		thumb.queue().then(function (thumb) {
 +			link.removeClass('loading');
 +			link.append(thumb);
 +		});
 +
 +		Gallery.view.element.append(link);
 +		Gallery.view.cache[image] = link;
 +	}
 +};
 +
 +Gallery.view.addAlbum = function (path, name) {
 +	var link, image, label, thumbs, thumb;
 +	name = name || OC.basename(path);
 +	if (Gallery.view.cache[path]) {
 +		thumbs = Gallery.view.addAlbum.thumbs[path];
 +		Gallery.view.element.append(Gallery.view.cache[path]);
 +		//event handlers are removed when using clear()
 +		Gallery.view.cache[path].click(function () {
 +			Gallery.view.viewAlbum(path);
 +		});
 +		Gallery.view.cache[path].mousemove(function (event) {
 +			Gallery.view.addAlbum.mouseEvent.call(Gallery.view.cache[path], thumbs, event);
 +		});
 +		thumb = Thumbnail.get(thumbs[0], true);
 +		thumb.queue();
 +	} else {
 +		thumbs = Gallery.getAlbumThumbnailPaths(path);
 +		Gallery.view.addAlbum.thumbs[path] = thumbs;
 +		link = $('<a/>');
 +		label = $('<label/>');
 +		link.attr('href', '#' + path);
 +		link.addClass('album loading');
 +		link.click(function () {
 +			Gallery.view.viewAlbum(path);
 +		});
 +		link.data('path', path);
 +		link.data('offset', 0);
 +		link.attr('title', OC.basename(path));
 +		label.text(name);
 +		link.append(label);
 +		thumb = Thumbnail.get(thumbs[0], true);
 +		thumb.queue().then(function (image) {
 +			link.removeClass('loading');
 +			link.append(image);
 +		});
 +
 +		link.mousemove(function (event) {
 +			Gallery.view.addAlbum.mouseEvent.call(link, thumbs, event);
 +		});
 +
 +		Gallery.view.element.append(link);
 +		Gallery.view.cache[path] = link;
 +	}
 +};
 +Gallery.view.addAlbum.thumbs = {};
 +
 +Gallery.view.addAlbum.mouseEvent = function (thumbs, event) {
 +	var mousePos = event.pageX - $(this).offset().left,
 +		offset = ((Math.floor((mousePos / 200) * thumbs.length - 1) % thumbs.length) + thumbs.length) % thumbs.length, //workaround js modulo "feature" with negative numbers
 +		link = this,
 +		oldOffset = $(this).data('offset');
 +	if (offset !== oldOffset && !link.data('loading')) {
 +		if (!thumbs[offset]) {
 +			console.log(offset);
 +		}
 +		var thumb = Thumbnail.get(thumbs[offset], true);
 +		link.data('loading', true);
 +		thumb.load().then(function (image) {
 +			link.data('loading', false);
 +			$('img', link).remove();
 +			link.append(image);
 +		});
 +		$(this).data('offset', offset);
 +	}
 +};
 +Gallery.view.addAlbum.thumbs = {};
 +
 +Gallery.view.viewAlbum = function (albumPath) {
 +	if (!albumPath) {
 +		albumPath = $('#gallery').data('token');
 +	}
 +	Thumbnail.queue = [];
 +	Gallery.view.clear();
 +	Gallery.currentAlbum = albumPath;
 +
 +	var i, album, subAlbums, crumbs, path;
 +	subAlbums = Gallery.subAlbums[albumPath];
 +	if (subAlbums) {
 +		for (i = 0; i < subAlbums.length; i++) {
 +			Gallery.view.addAlbum(subAlbums[i]);
 +			Gallery.view.element.append(' '); //add a space for justify
 +		}
 +	}
 +
 +	album = Gallery.albums[albumPath];
 +	if (album) {
 +		for (i = 0; i < album.length; i++) {
 +			Gallery.view.addImage(album[i]);
 +			Gallery.view.element.append(' '); //add a space for justify
 +		}
 +	}
 +
 +	if (albumPath === OC.currentUser) {
 +		$('button.share').hide();
 +	} else {
 +		$('button.share').show();
 +	}
 +
 +	OC.Breadcrumb.clear();
- 	OC.Breadcrumb.push('Pictures', '#').click(function () {
++	var albumName = $('#content').data('albumname');
++	if (!albumName) {
++		albumName = t('gallery', 'Pictures');
++	}
++	OC.Breadcrumb.push(albumName, '#').click(function () {
 +		Gallery.view.viewAlbum(OC.currentUser);
 +	});
 +	crumbs = albumPath.split('/');
 +	//first entry is username
 +	path = crumbs.splice(0, 1);
 +	//remove shareid
 +	if (path[0] !== OC.currentUser && path[0] !== $('#gallery').data('token')) {
 +		path += '/' + crumbs.splice(0, 1);
 +	}
 +	for (i = 0; i < crumbs.length; i++) {
 +		if (crumbs[i]) {
 +			path += '/' + crumbs[i];
 +			Gallery.view.pushBreadCrumb(crumbs[i], path);
 +		}
 +	}
 +
 +	if (albumPath === OC.currentUser) {
 +		Gallery.view.showUsers();
 +	}
 +
 +	Gallery.getAlbumInfo(Gallery.currentAlbum); //preload album info
 +};
 +
 +Gallery.view.pushBreadCrumb = function (text, path) {
 +	OC.Breadcrumb.push(text, '#' + path).click(function () {
 +		Gallery.view.viewAlbum(path);
 +	});
 +};
 +
 +Gallery.view.showUsers = function () {
 +	var i, j, user, head, subAlbums, album;
 +	for (i = 0; i < Gallery.users.length; i++) {
 +		user = Gallery.users[i];
 +		subAlbums = Gallery.subAlbums[user];
 +		if (subAlbums) {
 +			if (subAlbums.length > 0) {
 +				head = $('<h2/>');
 +				head.text(t('gallery', 'Shared by') + ' ' + Gallery.displayNames[user]);
 +				$('#gallery').append(head);
 +				for (j = 0; j < subAlbums.length; j++) {
 +					album = subAlbums[j];
 +					album = Gallery.subAlbums[album][0];//first level sub albums is share source id
 +					Gallery.view.addAlbum(album);
 +					Gallery.view.element.append(' '); //add a space for justify
 +				}
 +			}
 +		}
 +	}
 +};
 +
 +$(document).ready(function () {
 +	Gallery.fillAlbums().then(function () {
 +		Gallery.view.element = $('#gallery');
 +		OC.Breadcrumb.container = $('#breadcrumbs');
 +		window.onhashchange();
 +		$('button.share').click(Gallery.share);
 +	});
 +
 +	$('#gallery').on('click', 'a.image', function (event) {
 +		var images = $('#gallery').children('a.image');
 +		var i = images.index(this),
 +			image = $(this).data('path');
 +		event.preventDefault();
 +		if (location.hash !== image) {
 +			location.hash = image;
 +			Thumbnail.paused = true;
 +			Slideshow.start(images, i);
 +		}
 +	});
 +
- 	$('#openAsFileListButton').click( function (event) {
++	$('#openAsFileListButton').click(function (event) {
 +		window.location.href = window.location.href.replace('service=gallery', 'service=files');
 +	});
 +
 +	jQuery.fn.slideShow.onstop = function () {
 +		$('#content').show();
 +		Thumbnail.paused = false;
 +		$(window).scrollTop(Gallery.scrollLocation);
 +		location.hash = Gallery.currentAlbum;
 +		Thumbnail.concurrent = 3;
 +	};
 +});
 +
 +window.onhashchange = function () {
 +	var album = location.hash.substr(1);
 +	if (!album) {
 +		album = OC.currentUser;
 +	}
 +	if (!album) {
 +		album = $('#gallery').data('token');
 +	}
 +	if (Gallery.images.indexOf(album) === -1) {
 +		Slideshow.end();
 +		Gallery.view.viewAlbum(decodeURIComponent(album));
 +	} else {
 +		Gallery.view.viewAlbum(OC.dirname(album));
 +		$('#gallery').find('a.image[data-path="' + album + '"]').click();
 +	}
 +};
diff --cc apps/gallery/js/thumbnail.js
index a2aa8e9,0000000..8952f56
mode 100644,000000..100644
--- a/apps/gallery/js/thumbnail.js
+++ b/apps/gallery/js/thumbnail.js
@@@ -1,62 -1,0 +1,66 @@@
 +function Thumbnail (path, square) {
 +	this.square = square;
 +	this.path = path;
 +	this.url = Thumbnail.getUrl(path, square);
 +	this.image = null;
 +	this.loadingDeferred = new $.Deferred();
 +}
 +
 +Thumbnail.map = {};
 +Thumbnail.squareMap = {};
 +
 +Thumbnail.get = function (path, square) {
 +	var map = (square) ? Thumbnail.squareMap : Thumbnail.map;
 +	if (!map[path]) {
 +		map[path] = new Thumbnail(path, square);
 +	}
 +	return map[path];
 +};
 +
 +Thumbnail.getUrl = function (path, square) {
 +	if (square) {
 +		return OC.filePath('gallery', 'ajax', 'thumbnail.php') + '?file=' + encodeURIComponent(path) + '&square=1';
 +	} else {
 +		return OC.filePath('gallery', 'ajax', 'thumbnail.php') + '?file=' + encodeURIComponent(path);
 +	}
 +};
 +
 +Thumbnail.prototype.load = function () {
 +	var that = this;
 +	if (!this.image) {
 +		this.image = new Image();
 +		this.image.onload = function () {
 +			Thumbnail.loadingCount--;
 +			that.loadingDeferred.resolve(that.image);
 +			Thumbnail.processQueue();
 +		};
++		this.image.onerror = function () {
++			Thumbnail.loadingCount--;
++			Thumbnail.processQueue();
++		};
 +		Thumbnail.loadingCount++;
 +		this.image.src = this.url;
 +	}
 +	return this.loadingDeferred;
 +};
 +
 +Thumbnail.queue = [];
 +Thumbnail.loadingCount = 0;
 +Thumbnail.concurrent = 3;
 +Thumbnail.paused = false;
 +
 +Thumbnail.processQueue = function () {
 +	if (!Thumbnail.paused && Thumbnail.queue.length && Thumbnail.loadingCount < Thumbnail.concurrent) {
 +		var next = Thumbnail.queue.shift();
 +		next.load();
 +		Thumbnail.processQueue();
 +	}
 +};
 +
 +Thumbnail.prototype.queue = function () {
 +	if (!this.image) {
 +		Thumbnail.queue.push(this);
 +	}
 +	Thumbnail.processQueue();
 +	return this.loadingDeferred;
 +};
diff --cc apps/gallery/lib/thumbnail.php
index 89bd2d5,0000000..ff3cad3
mode 100644,000000..100644
--- a/apps/gallery/lib/thumbnail.php
+++ b/apps/gallery/lib/thumbnail.php
@@@ -1,198 -1,0 +1,198 @@@
 +<?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 OCA\Gallery;
 +
 +use OC\Files\Filesystem;
++use OC\Files\View;
 +
 +class Thumbnail {
 +	static private $writeHookCount;
 +
 +	protected $image;
 +	protected $path;
 +	protected $user;
 +	protected $useOriginal = false;
 +
 +	/**
 +	 * @var \OC\Files\View $view
 +	 */
 +	protected $view;
 +
 +	public function __construct($imagePath, $user = null, $square = false) {
- 		if (!\OC\Files\Filesystem::isValidPath($imagePath)) {
++		if (!Filesystem::isValidPath($imagePath)) {
 +			return;
 +		}
 +		if (is_null($user)) {
- 			$this->view = \OC\Files\Filesystem::getView();
- 			$this->user = \OCP\USER::getUser();
++			$this->view = Filesystem::getView();
++			$this->user = \OCP\User::getUser();
 +		} else {
- 			$this->view = new \OC\Files\View('/' . $user . '/files');
++			$this->view = new View('/' . $user . '/files');
 +			$this->user = $user;
 +		}
 +		$this->useOriginal = (substr($imagePath, -4) === '.svg' or substr($imagePath, -5) === '.svgz');
 +		if ($this->useOriginal) {
 +			$this->path = $imagePath;
 +		} else {
 +			$galleryDir = \OC_User::getHome($this->user) . '/gallery/' . $this->user . '/';
 +			if (strrpos($imagePath, '.')) {
 +				$extension = substr($imagePath, strrpos($imagePath, '.') + 1);
 +				$image = substr($imagePath, 0, strrpos($imagePath, '.'));
 +			} else {
 +				$extension = '';
 +				$image = $imagePath;
 +			}
 +			if ($square) {
 +				$extension = 'square.' . $extension;
 +			}
 +			$this->path = $galleryDir . $image . '.' . $extension;
 +			if (!file_exists($this->path)) {
 +				$this->create($imagePath, $square);
 +			}
 +		}
 +	}
 +
 +	private function create($imagePath, $square) {
 +		$galleryDir = \OC_User::getHome($this->user) . '/gallery/' . $this->user . '/';
 +		$dir = dirname($imagePath);
 +		if (!is_dir($galleryDir . $dir)) {
 +			mkdir($galleryDir . $dir, 0755, true);
 +		}
 +		if (!$this->view->file_exists($imagePath)) {
 +			return;
 +		}
- 		$handle = $this->view->fopen($imagePath, 'r');
- 		$this->image = new \OCP\Image($handle);
- 		fclose($handle);
++		$absolutePath = $this->view->getAbsolutePath($imagePath);
++		$this->image = new \OCP\Image('oc://' . $absolutePath);
 +		if ($this->image->valid()) {
 +			$this->image->fixOrientation();
 +			if ($square) {
 +				$this->image->centerCrop(200);
 +			} else {
 +				$this->image->fitIn(400, 200);
 +			}
 +			$this->image->save($this->path);
 +		}
 +	}
 +
 +	public function get() {
 +		if (is_null($this->image)) {
 +			$this->image = new \OCP\Image($this->path);
 +		}
 +		return $this->image;
 +	}
 +
 +	public function show() {
 +		if ($this->useOriginal) {
 +			$fp = @$this->view->fopen($this->path, 'rb');
 +			$mtime = $this->view->filemtime($this->path);
 +			$size = $this->view->filesize($this->path);
 +			$mime = $this->view->getMimetype($this->path);
 +		} else {
 +			$fp = @fopen($this->path, 'rb');
 +			$mtime = filemtime($this->path);
 +			$size = filesize($this->path);
 +			$mime = \OC_Helper::getMimetype($this->path);
 +		}
 +		if ($fp) {
 +			\OCP\Response::enableCaching();
 +			\OCP\Response::setLastModifiedHeader($mtime);
 +			header('Content-Length: ' . $size);
 +			header('Content-Type: ' . $mime);
 +
 +			fpassthru($fp);
 +		} else {
 +			\OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
 +		}
 +	}
 +
 +	static public function removeHook($params) {
 +		$path = $params['path'];
 +		$user = \OCP\USER::getUser();
 +		$galleryDir = \OC_User::getHome($user) . '/gallery/';
 +		$thumbPath = $galleryDir . $path;
 +		if (is_dir($thumbPath)) {
 +			if (file_exists($thumbPath . '.png')) {
 +				unlink($thumbPath . '.png');
 +			}
 +		} else {
 +			if (file_exists($thumbPath)) {
 +				unlink($thumbPath);
 +			}
 +
 +			if (strrpos($path, '.')) {
 +				$extension = substr($path, strrpos($path, '.') + 1);
 +				$image = substr($path, 0, strrpos($path, '.'));
 +			} else {
 +				$extension = '';
 +				$image = $path;
 +			}
 +			$squareThumbPath = $galleryDir . $image . '.square.' . $extension;
 +			if (file_exists($squareThumbPath)) {
 +				unlink($squareThumbPath);
 +			}
 +		}
 +
 +		$parent = dirname($path);
 +		if ($parent !== DIRECTORY_SEPARATOR and $parent !== '' and $parent !== $path) {
 +			self::removeHook(array('path' => $parent));
 +		}
 +	}
 +
 +	static public function writeHook($params) {
 +		self::removeHook($params);
 +		//only create 5 thumbnails max in one request to prevent locking up the request
 +		if (self::$writeHookCount < 5) {
 +			$path = $params['path'];
 +			$mime = \OC\Files\Filesystem::getMimetype($path);
 +			if (substr($mime, 0, 6) === 'image/') {
 +				self::$writeHookCount++;
 +				new Thumbnail($path);
 +			}
 +		}
 +	}
 +}
 +
 +class AlbumThumbnail extends Thumbnail {
 +
 +	public function __construct($imagePath, $user = null, $square = false) {
 +		if (!\OC\Files\Filesystem::isValidPath($imagePath)) {
 +			return;
 +		}
 +		if (is_null($user)) {
 +			$this->view = \OC\Files\Filesystem::getView();
 +			$this->user = \OCP\USER::getUser();
 +		} else {
 +			$this->view = new \OC\Files\View('/' . $user . '/files');
 +			$this->user = $user;
 +		}
 +		$galleryDir = \OC_User::getHome($this->user) . '/gallery/' . $this->user . '/';
 +		$this->path = $galleryDir . $imagePath . '.png';
 +		if (!file_exists($this->path)) {
 +			self::create($imagePath, $square);
 +		}
 +	}
 +
 +	public function create($albumPath, $square = false) {
 +		$albumView = new \OC\Files\View($this->view->getRoot() . $albumPath);
 +		$images = $albumView->searchByMime('image', 10);
 +
 +		$count = min(count($images), 10);
 +		$thumbnail = imagecreatetruecolor($count * 200, 200);
 +		for ($i = 0; $i < $count; $i++) {
 +			$thumb = new Thumbnail($albumPath . $images[$i]['path'], $this->user, true);
 +			$image = $thumb->get();
 +			if ($image && $image->valid()) {
 +				imagecopy($thumbnail, $image->resource(), $i * 200, 0, 0, 0, 200, 200);
 +				$image->destroy();
 +			}
 +		}
 +
 +		imagepng($thumbnail, $this->path);
 +		imagedestroy($thumbnail);
 +	}
 +}
diff --cc apps/gallery/templates/public.php
index 294b099,0000000..50130f3
mode 100644,000000..100644
--- a/apps/gallery/templates/public.php
+++ b/apps/gallery/templates/public.php
@@@ -1,29 -1,0 +1,29 @@@
 +<div class="wrapper"><!-- for sticky footer -->
 +
 +<header>
 +	<div id="header">
 +		<a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud">
 +			<img class="svg" src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
 +		<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
 +		<div class="header-right">
 +			<span id="details"><?php print_unescaped($l->t('%s shared <strong>%s</strong> with you', array($_['displayName'], $_['albumName']))) ?></span>
 +		</div>
 +	</div>
 +</header>
- <div id="content">
++<div id="content" data-albumname="<?php p($_['albumName'])?>">
 +	<div id="controls">
 +		<div id='breadcrumbs'></div>
 +		<div id='openAsFileListButton' class="button"><?php p($l->t('File list')) ?></div>
 +	</div>
 +
 +	<div id='gallery' class="hascontrols" data-token="<?php isset($_['token']) ? p($_['token']) : p(false) ?>"></div>
 +</div>
 +
 +	<div class="push"></div><!-- for sticky footer -->
 +</div>
 +
 +<footer>
 +	<p class="info">
 +		<?php print_unescaped($theme->getLongFooter()); ?>
 +	</p>
 +</footer>
diff --cc apps/updater/ajax/update.php
index 53bbc3f,0000000..f371fa5
mode 100644,000000..100644
--- a/apps/updater/ajax/update.php
+++ b/apps/updater/ajax/update.php
@@@ -1,152 -1,0 +1,147 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Updater;
 +
 +\OCP\JSON::checkAdminUser();
 +\OCP\JSON::callCheck();
 +
 +set_time_limit(0);
 +
 +$updateEventSource = new \OC_EventSource();
 +$watcher = new UpdateWatcher($updateEventSource);
 +\OCP\Util::connectHook('update', 'success', $watcher, 'success');
 +\OCP\Util::connectHook('update', 'failure', $watcher, 'failure');
 +
 +$watcher->success((string) App::$l10n->t('Checking your installation...'));
 +// Check if we have enough permissions
 +$installed = Helper::getDirectories();
 +$thirdPartyUpdater = new Location_3rdparty($installed[Helper::THIRDPARTY_DIRNAME], '');
 +$coreUpdater = new Location_Core($installed[Helper::CORE_DIRNAME], '');
 +$appsUpdater = new Location_Apps('', '');
 +
 +$errors = array_merge(
- 		$thirdPartyUpdater->check(), $coreUpdater->check(), $appsUpdater->check()
++	$thirdPartyUpdater->check(), $coreUpdater->check(), $appsUpdater->check()
 +);
 +
 +if (count($errors)) {
 +	$message = App::$l10n->t('Upgrade is not possible. Make sure that your webserver has write access to the following files and directories:');
 +	$message .= '<br /><br />' . implode('<br />', $errors);
- 	$watcher->error($message);
- 	$watcher->done();
- 	die();
++	$watcher->failure($message);
 +}
 +
 +// Download package
 +// Url to download package e.g. http://download.owncloud.org/releases/owncloud-4.0.5.tar.bz2
 +$packageUrl = 'https://download.owncloud.com/download/community/owncloud-latest.zip';
 +
 +//Package version e.g. 4.0.4
 +$packageVersion = '';
 +$updateData = \OC_Updater::check();
 +
 +if (isset($updateData['version'])) {
 +	$packageVersion = $updateData['version'];
 +}
 +if (isset($updateData['url']) && extension_loaded('bz2')) {
 +	$packageUrl = $updateData['url'];
 +}
 +if (!strlen($packageVersion) || !strlen($packageUrl)) {
 +	App::log('Invalid response from update feed.');
 +	$watcher->failure((string) App::$l10n->t('Version not found'));
 +}
 +
 +
 +//Some cleanup first
 +Downloader::cleanUp($packageVersion);
 +if (!Downloader::isClean($packageVersion)){
 +	$message = App::$l10n->t('Upgrade is not possible. Your webserver has not enough permissions to remove the following directory:');
 +	$message .= '<br />' . Downloader::getPackageDir($packageVersion);
 +	$message .= '<br />' . App::$l10n->t('Update permissions on this directory and its content or remove it manually first.');
- 	$watcher->error($message);
- 	$watcher->done();
++	$watcher->failure($message);
 +}
 +
 +Updater::cleanUp();
 +if (!Updater::isClean()){
 +	$message = App::$l10n->t('Upgrade is not possible. Your webserver has not enough permissions to remove the following directory:');
 +	$message .= '<br />' . Updater::getTempDir();
 +	$message .= '<br />' . App::$l10n->t('Update permissions on this directory and its content or remove it manually first.');
- 	$watcher->error($message);
- 	$watcher->done();
++	$watcher->failure($message);
 +}
 +
 +// Downloading new version
 +try {
 +	$watcher->success((string)  App::$l10n->t('Downloading package...'));
 +	Downloader::getPackage($packageUrl, $packageVersion);
 +} catch (\Exception $e) {
 +	App::log($e->getMessage());
 +	$watcher->failure((string) App::$l10n->t('Unable to fetch package'));
 +}
 +
 +// Create Backup 
 +try {
 +	$watcher->success((string) App::$l10n->t('Creating backup...'));
 +	$backupPath = Backup::create();
 +	$watcher->success((string) App::$l10n->t('Here is your backup: ') . $backupPath . '.zip');
 +} catch (\Exception $e){
 +	App::log($e->getMessage());
 +	$watcher->failure((string) App::$l10n->t('Failed to create backup'));
 +}
 +
 +try {
 +	$watcher->success((string) App::$l10n->t('Moving files...'));
 +	Updater::update($packageVersion, $backupPath);
 +	
 +	// 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();
 +} catch (\Exception $e){
 +	App::log($e->getMessage());
 +	$watcher->failure((string) App::$l10n->t('Update failed'));
 +}
 +
- $watcher->done();
- 
 +class UpdateWatcher {
 +
 +	/**
 +	 * @var \OC_EventSource $eventSource;
 +	 */
 +	private $eventSource;
 +
 +	public function __construct($eventSource) {
 +		$this->eventSource = $eventSource;
 +	}
 +	
 +	public function error($message) {
 +		\OC_Util::obEnd();
 +		$this->eventSource->send('error', $message);
 +		ob_start();
 +	}
 +
 +	public function success($message) {
 +		\OC_Util::obEnd();
 +		$this->eventSource->send('success', $message);
 +		ob_start();
 +	}
 +
 +	public function failure($message) {
 +		\OC_Util::obEnd();
 +		$this->eventSource->send('failure', $message);
 +		$this->eventSource->close();
 +		die();
 +	}
 +
 +	public function done() {
 +		\OC_Util::obEnd();
 +		$this->eventSource->send('done', '');
 +		$this->eventSource->close();
 +	}
 +}
diff --cc apps/updater/js/controllers.js
index ae39099,0000000..485e507
mode 100644,000000..100644
--- a/apps/updater/js/controllers.js
+++ b/apps/updater/js/controllers.js
@@@ -1,59 -1,0 +1,64 @@@
 +function indexCtrl($scope) {
 +
 +}
 +;
 +
 +function updateCtrl($scope, $routeParams) {
 +	$scope.update = function() {
 +		$('#upd-progress').show();
 +		$('#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'));
++			$('<span></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'));
- 			updateEventSource.close();
++			$('<span></span>').addClass('error').append(message).append('<br />').appendTo($('#upd-progress'));
 +		});
 +		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>.'))
++					.append(t('updater', 'The update was unsuccessful. Please check logs at admin page and report this issue to the <a href="https://github.com/owncloud/apps/issues" target="_blank">ownCloud community</a>.'))
 +					.appendTo($('#upd-progress'));
++			updateEventSource.close();
 +		});
 +		updateEventSource.listen('done', function(message) {
- 			$('<span>').addClass('bold').append('<br />').append('<a href="' + OC.webroot + '">' + OC.webroot + '</a>').appendTo($('#upd-progress'));
++			var href = '/',
++			title = t('Updater', 'Proceed');
++			if (OC.webroot!=''){
++				href = OC.webroot;
++			}
++			$('<span></span>').addClass('bold').append('<br />').append('<a href="' + href + '">' + title + '</a>').appendTo($('#upd-progress'));
 +		});
 +	};
 +}
 +;
 +
 +function backupCtrl($scope, $http) {
 +	$http.get(OC.filePath('updater', 'ajax', 'backup/list.php'), {headers: {'requesttoken': oc_requesttoken}})
 +			.success(function(data) {
 +		$scope.entries = data.data;
 +	});
 +
 +	$scope.doDelete = function(name) {
 +		$http.get(OC.filePath('updater', 'ajax', 'backup/delete.php'), {
 +			headers: {'requesttoken': oc_requesttoken},
 +			params: {'filename': name}
 +		}).success(function(data) {
 +			$http.get(OC.filePath('updater', 'ajax', 'backup/list.php'), {headers: {'requesttoken': oc_requesttoken}})
 +					.success(function(data) {
 +				$scope.entries = data.data;
 +			});
 +		});
 +	}
 +	$scope.doDownload = function(name) {
 +		window.open(OC.filePath('updater', 'ajax', 'backup/download.php')
 +				+ '?requesttoken=' + oc_requesttoken
 +				+ '&filename=' + name
 +				);
 +	}
 +}
 +;
diff --cc apps/updater/lib/downloader.php
index 78dd0d6,0000000..c6eb3f9
mode 100644,000000..100644
--- a/apps/updater/lib/downloader.php
+++ b/apps/updater/lib/downloader.php
@@@ -1,104 -1,0 +1,104 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2012-2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Updater;
 +
 +class Downloader {
 +
 +	const PACKAGE_ROOT = 'owncloud';
 +
 +	protected static $package = false;
 +
 +	public static function getPackage($url, $version) {
 +		self::$package = \OCP\Files::tmpFile();
 +		if (!self::$package){
 +			throw new \Exception('Unable to create a temporary file');
 +		}
 +		try {
 +			if (file_put_contents(self::$package, self::fetch($url))===false) {
 +				throw new \Exception("Error storing package content");
 +			}
 +			if (preg_match('/\.zip$/i', $url)) {
 +				rename(self::$package, self::$package . '.zip');
 +				self::$package .= '.zip';
 +			} elseif (preg_match('/(\.tgz|\.tar\.gz)$/i', $url)) {
 +				rename(self::$package, self::$package . '.tgz');
 +				self::$package .= '.tgz';
 +			} elseif (preg_match('/\.tar\.bz2$/i', $url)) {
 +				rename(self::$package, self::$package . '.tar.bz2');
 +				self::$package .= '.tar.bz2';
 +			} else {
 +				throw new \Exception('Unable to extract package');
 +			}
 +
 +			$extractDir = self::getPackageDir($version);
 +			Helper::mkdir($extractDir, true);
 +
 +			$archive = \OC_Archive::open(self::$package);
 +			if (!$archive || !$archive->extract($extractDir)) {
 +				throw new \Exception(self::$package . " extraction error");
 +			}
 +			
 +		} catch (\Exception $e){
 +			App::log('Retrieving ' . $url);
 +			self::cleanUp($version);
 +			throw $e;
 +		}
 +		Helper::removeIfExists(self::$package);
 +		
 +		//  Prepare extracted data
 +		//  to have '3rdparty', 'apps' and 'core' subdirectories
 +		$sources = Helper::getSources($version);
 +		$baseDir = $extractDir. '/' . self::PACKAGE_ROOT;
- 		@rename($baseDir . '/' . Helper::THIRDPARTY_DIRNAME, $sources[Helper::THIRDPARTY_DIRNAME]);
- 		@rename($baseDir . '/' . Helper::APP_DIRNAME, $sources[Helper::APP_DIRNAME]);
- 		@rename($baseDir, $sources[Helper::CORE_DIRNAME]);
++		rename($baseDir . '/' . Helper::THIRDPARTY_DIRNAME, $sources[Helper::THIRDPARTY_DIRNAME]);
++		rename($baseDir . '/' . Helper::APP_DIRNAME, $sources[Helper::APP_DIRNAME]);
++		rename($baseDir, $sources[Helper::CORE_DIRNAME]);
 +	}
 +	
 +	/* To be replaced with OC_Util::getUrlContent for 5.x */
 +	public static function fetch($url){
 +		if  (function_exists('curl_init')) {
 +			$curl = curl_init();
 +			curl_setopt($curl, CURLOPT_HEADER, 0);
 +			curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 +			curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
 +			curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
 +			curl_setopt($curl, CURLOPT_URL, $url);
 +			curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler");
 +			$data = curl_exec($curl);
 +			curl_close($curl);
 +		} else {
 +			$ctx = stream_context_create(
 +				array(
 +					'http' => array('timeout' => 32000)
 +				     )
 +				);
 +			$data = @file_get_contents($url, 0, $ctx);
 +		}
 +		return $data;
 +	}
 +
 +	public static function cleanUp($version){
 +		if (self::$package) {
 +			Helper::removeIfExists(self::$package);
 +		}
 +		Helper::removeIfExists(self::getPackageDir($version));
 +	}
 +	
 +	public static function isClean($version){
 +		return !@file_exists(self::getPackageDir($version));
 +	}
 +	
 +	public static function getPackageDir($version) {
 +		return App::getBackupBase() . $version;
 +	}
 +}
diff --cc apps/updater/lib/helper.php
index f7d7e01,0000000..235b5b4
mode 100644,000000..100644
--- a/apps/updater/lib/helper.php
+++ b/apps/updater/lib/helper.php
@@@ -1,222 -1,0 +1,222 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2012-2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Updater;
 +
 +class Helper {
 +	const APP_DIRNAME = 'apps';
 +	const THIRDPARTY_DIRNAME = '3rdparty';
 +	const CORE_DIRNAME = 'core';
 +	
 +	/**
 +	 * Moves file/directory
 +	 * @param string $src  - source path
 +	 * @param string $dest - destination path
 +	 * @throws \Exception on error
 +	 */
 +	public static function move($src, $dest) {
- 		if (!@rename($src, $dest)) {
++		if (!rename($src, $dest)) {
 +			throw new \Exception("Unable to move $src to $dest");
 +		}
 +	}
 +	
 +	/**
 +	 * Copy recoursive 
 +	 * @param string $src  - source path
 +	 * @param string $dest - destination path
 +	 * @throws \Exception on error
 +	 */
 +	public static function copyr($src, $dest, $stopOnError = true) {
 +		if(is_dir($src)) {
 +			if(!is_dir($dest)) {
 +				try {
 +					self::mkdir($dest);
 +				} catch (\Exception $e){
 +					if ($stopOnError){
 +						throw $e;
 +					}
 +				}
 +			}
 +			$files = scandir($src);
 +			foreach ($files as $file) {
 +				if ($file != "." && $file != "..") {
 +					self::copyr("$src/$file", "$dest/$file", $stopOnError);
 +				}
 +			}
 +		}elseif(file_exists($src)) {
- 			if (!@copy($src, $dest) && $stopOnError) {
++			if (!copy($src, $dest) && $stopOnError) {
 +				throw new \Exception("Unable copy $src to $dest");
 +			}
 +		}
 +	}
 +
 +	/**
 +	 * Wrapper for mkdir
 +	 * @param string $path
 +	 * @param bool $isRecoursive
 +	 * @throws \Exception on error
 +	 */
 +	public static function mkdir($path, $isRecoursive = false) {
- 		if (!@mkdir($path, 0755, $isRecoursive)) {
++		if (!mkdir($path, 0755, $isRecoursive)) {
 +			throw new \Exception("Unable to create $path");
 +		}
 +	}
 +	
 +	/**
 +	 * Get directory content as array
 +	 * @param string $path
 +	 * @return array 
 +	 * @throws \Exception on error
 +	 */
 +	public static function scandir($path) {
- 		$content = @scandir($path);
++		$content = scandir($path);
 +		if (!is_array($content)) {
 +			throw new \Exception("Unable to list $path content");
 +		}
 +		return $content;
 +	}
 +
 +	/**
 +	 * Silently remove the filesystem item
 +	 * Used for cleanup
 +	 * @param string $path
 +	 */
 +	public static function removeIfExists($path) {
 +		if (!file_exists($path)) {
 +			return;
 +		}
 +
 +		if (is_dir($path)) {
 +			self::rmdirr($path);
 +		} else {
 +			@unlink($path);
 +		}
 +	}
 +	
 +	protected static function rmdirr($dir) {
 +		if(is_dir($dir)) {
- 			$files = @scandir($dir);
++			$files = scandir($dir);
 +			foreach($files as $file) {
 +				if ($file != "." && $file != "..") {
 +					self::rmdirr("$dir/$file");
 +				}
 +			}
 +			@rmdir($dir);
 +		}elseif(file_exists($dir)) {
 +			@unlink($dir);
 +		}
 +		if(file_exists($dir)) {
 +			return false;
 +		}else{
 +			return true;
 +		}
 +	}
 +
 +	/**
 +	 * Get the final list of files/directories to be replaced
 +	 * e.g. ['core']['lib'] = '/path/to/lib'
 +	 * @return array
 +	 */
 +	public static function getPreparedLocations() {
 +		$preparedLocations  = array();
 +		foreach (self::getDirectories() as $type => $path) {
 +			$preparedLocations[$type] = self::getFilteredContent($path);
 +		}
 +		return $preparedLocations;
 +	}
 +	
 +	/**
 +	 * Lists directory content as an array
 +	 * ['basename']=>'full path' 
 +	 * e.g.['lib'] = '/path/to/lib'
 +	 * @param string $path
 +	 * @return array
 +	 */
 +	public static function getFilteredContent($path){
 +		$result = array();
 +		$filtered =  self::filterLocations(self::scandir($path), $path);
 +		foreach ($filtered as $dirName){
 +			$result [$dirName] = $path . '/' . $dirName;
 +		}
 +		return $result;
 +	}
 +
 +	public static function filterLocations($locations, $basePath) {
 +		$fullPath = array_values(self::getDirectories());
 +		$fullPath[] = rtrim(App::getBackupBase(), '/');
 +		$fullPath[] = \OCP\Config::getSystemValue( "datadirectory", \OC::$SERVERROOT."/data" );
 +		$fullPath[] = \OC::$SERVERROOT."/themes";
 +		
 +		$exclusions = array(
 +			'full' => $fullPath,
 +			'relative' => array('.', '..')
 +		);
 +		
 +		foreach ($locations as $key => $location) {
 +			$fullPath = $basePath . '/' .$location;
 +			if (!is_dir($fullPath)) {
 +				continue;
 +			}
 +			if (in_array($fullPath, $exclusions['full'])
 +				|| in_array($location, $exclusions['relative'])
 +			) {
 +				unset($locations[$key]);
 +			}
 +		}
 +		return $locations;
 +	}
 +	
 +	/**
 +	 * Get the list of directories to be replaced on update
 +	 * @return array
 +	 */
 +	public static function getDirectories() {
 +		$dirs = array();
 +		$dirs[self::THIRDPARTY_DIRNAME] = \OC::$THIRDPARTYROOT . '/' . self::THIRDPARTY_DIRNAME;
 +		
 +		//Long, long ago we had single app location
 +		if (isset(\OC::$APPSROOTS)) {
 +			foreach (\OC::$APPSROOTS as $i => $approot){
 +				$index = $i ? $i : '';
 +				$dirs[self::APP_DIRNAME . $index] = $approot['path'];
 +			}
 +		} else {
 +			$dirs[self::APP_DIRNAME] = \OC::$APPSROOT . '/' . self::APP_DIRNAME;
 +		}
 +		
 +	    $dirs[self::CORE_DIRNAME] = \OC::$SERVERROOT;
 +		return $dirs;
 +	}
 +	
 +	public static function getSources($version) {
 +		$base = Downloader::getPackageDir($version);
 +		return array (
 +			self::APP_DIRNAME => $base . '/' . self::APP_DIRNAME,
 +			self::THIRDPARTY_DIRNAME => $base . '/' . self::THIRDPARTY_DIRNAME,
 +			self::CORE_DIRNAME => $base . '/' . self::CORE_DIRNAME,	
 +		);
 +	}
 +	
 +	public static function addDirectoryToZip($zip, $dir, $base) {
 +		$newFolder = str_replace($base, '', $dir);
 +		$zip->addEmptyDir($newFolder);
 +		foreach(glob($dir . '/*') as $file) {
 +			if(is_dir($file)) {
 +				$zip = self::addDirectoryToZip($zip, $file, $base);
 +			} else {
 +				$newFile = str_replace($base, '', $file);
 +				$zip->addFile($file, $newFile);
 +			}
 +		}
 +		return $zip;
 +	}
 +}
diff --cc apps/updater/lib/location/apps.php
index cdbbd48,0000000..9169c76
mode 100644,000000..100644
--- a/apps/updater/lib/location/apps.php
+++ b/apps/updater/lib/location/apps.php
@@@ -1,91 -1,0 +1,95 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Updater;
 +
 +class Location_Apps extends Location {
 +
 +	protected $type = 'apps';
 +	protected $appsToDisable = array();
 +	protected $appsToUpdate = array();
 +
 +	protected function filterOld($pathArray) {
 +		return $pathArray;
 +	}
 +	
 +	public function check() {
 +		$errors = array();
 +		if ($this->oldBase && !is_writable($this->oldBase)) {
 +			$errors[] = $this->oldBase;
 +		}
 +		
 +		$this->collect(true);
 +		foreach ($this->appsToUpdate as $item) {
 +			$path = \OC_App::getAppPath($item);
 +			if (!is_writable($path)) {
 +				$errors[] = $path;
 +			}
 +		}
 +
 +		return $errors;
 +	}
 +
 +	public function update($tmpDir = '') {
 +		Helper::mkdir($tmpDir, true);
 +		$this->collect(true);
 +		try {
 +			foreach ($this->appsToUpdate as $appId) {
 +				$path = \OC_App::getAppPath($appId);
 +				if ($path) {
- 					Helper::move($path, $tmpDir . '/' . $appId);
++					if (!@file_exists($this->newBase . '/' . $appId)){
++						$this->appsToDisable[$appId] = $appId;
++					} else {
++						Helper::move($path, $tmpDir . '/' . $appId);
 +					
- 					// ! reverted intentionally
- 					$this->done [] = array(
- 						'dst' => $path,
- 						'src' => $tmpDir . '/' . $appId
- 					);
++						// ! reverted intentionally
++						$this->done [] = array(
++							'dst' => $path,
++							'src' => $tmpDir . '/' . $appId
++						);
 +					
- 					Helper::move($this->newBase . '/' . $appId, $path);
++						Helper::move($this->newBase . '/' . $appId, $path);
++					}
 +				}
 +			}
 +			$this->finalize();
 +		} catch (\Exception $e) {
 +			$this->rollback(true);
 +			throw $e;
 +		}
 +	}
 +
 +	protected function finalize() {
 +		foreach ($this->appsToDisable as $appId) {
 +			\OC_App::disable($appId);
 +		}
 +	}
 +
 +	protected function filterNew($pathArray) {
 +		return $pathArray;
 +	}
 +
 +	public function collect($dryRun = false) {
 +		foreach (\OC_App::getAllApps() as $appId) {
 +			if (\OC_App::isShipped($appId)) {
 +				if ($dryRun || @file_exists($this->newBase . '/' . $appId)) {
 +					$this->appsToUpdate[$appId] = $appId;
 +				} else {
 +					$this->appsToDisable[$appId] = $appId;
 +				}
 +			} else {
 +				$this->appsToDisable[$appId] = $appId;
 +			}
 +		}
 +	}
 +
 +}
diff --cc apps/updater/update.php
index 914cace,0000000..f1cab9b
mode 100644,000000..100644
--- a/apps/updater/update.php
+++ b/apps/updater/update.php
@@@ -1,30 -1,0 +1,32 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Updater;
 +
 +\OCP\User::checkAdminUser();
 +
 +\OCP\Util::addScript(App::APP_ID, '3rdparty/angular');
 +\OCP\Util::addScript(App::APP_ID, 'app');
 +\OCP\Util::addScript(App::APP_ID, 'controllers');
 +
 +\OCP\Util::addStyle(App::APP_ID, 'updater');
 +
 +if (@file_exists(App::getLegacyBackupBase())) {
 +	try {
 +		Helper::move(App::getLegacyBackupBase(), App::getBackupBase());
 +	} catch (Exception $e){}
++} else if (!@file_exists(App::getBackupBase())){
++	Helper::mkdir(App::getBackupBase());
 +}
 +
 +$tmpl = new \OCP\Template(App::APP_ID, 'update', 'guest');
 +$tmpl->printPage();
diff --cc core/doc/admin/_images/oc_admin_app_page.png
index 0000000,0000000..1f857f2
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/oc_admin_user_manage.png
index 0000000,0000000..5393f5f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_sources/configuration/configuration_apps.txt
index cdd157d,0000000..09c1649
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_apps.txt
+++ b/core/doc/admin/_sources/configuration/configuration_apps.txt
@@@ -1,67 -1,0 +1,81 @@@
 +Apps Configuration
 +==================
- After you have installed ownCloud you might realize that it would be nice to
++After you have installed ownCloud, you might realize that it would be nice to
 +provide an additional function on top of the core functionality in your ownCloud installation.
 +
- The first step should be to check out the `ownCloud apps store <http://apps.owncloud.com/>`_. There you will find a
- lot of ready-to-use apps provided by the ownCloud community.
++With ownCloud installation, you will find some apps enabled by default. To see which applications
++are enabled, click on Apps button on the web interface navigation to go into applications page:
++
++.. figure:: ../images/oc_admin_app_page.png
++Administrator application page
++
++In this page, you can enable or disable applications simply by clicking on their names.
++Enabled applications will be shown in **bold** while disabled ones will be shown in normal font.
++If the app is not developed by ownCloud, it will have the *3rd party* notice next to it. To see what an
++application does, clicking on its name will show a description on the right side of the same page.
++
++To install new apps, you can use *More apps* button or check out the `ownCloud apps store <http://apps.owncloud.com/>`_.
++There you will find a lot of ready-to-use apps provided by the ownCloud community.
++
++If you would like to add your own app, please use *Add your App...* button on the same page. This will redirect you to
++our `Developer Center <http://owncloud.org/dev>`_.
 +
 +Parameters
 +----------
 +Parameters are set in the :file:`config/config.php` inside the **$CONFIG** array.
 +
 +Use custom app directories
 +~~~~~~~~~~~~~~~~~~~~~~~~~~
 +Use the **apps_paths** array to set the apps folders which should be scanned
 +for available apps and/or where user specific apps should be installed.The key
 +**path** defines the absolute file system path to the app folder. The key
 +**url** defines the http web path to that folder, starting at the ownCloud 
 +web root. The key **writable** indicates if a user can install apps in that
 +folder.
 +
 +.. note:: If you want to make sure that the default **/apps/** folder only contains apps shipped with ownCloud, you
 + should follow the example and set-up a **/apps2/** folder which will be used to store all apps downloaded by users
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "apps_paths" => array (
 +        0 => array (
 +                "path"     => OC::$SERVERROOT."/apps",
 +                "url"      => "/apps",
 +                "writable" => false,
 +        ),
 +        1 => array (
 +                "path"     => OC::$SERVERROOT."/apps2",
 +                "url"      => "/apps2",
 +                "writable" => true,
 +        ),
 +    ),
 +
 +
 +Use your own appstore
 +~~~~~~~~~~~~~~~~~~~~~
 +If you want to allow the installation of apps from the apps store you have to
 +set **appstoreenabled** parameter, but this can only be done if at least one
 +of the configured apps directories is writable.
 +
 +The **appstoreurl** is used to set the http path to the ownCloud apps store. The appstore server has to use :abbr:`OCS (Open Collaboration Services)`.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "appstoreenabled" => true,
 +    "appstoreurl" => "http://api.apps.owncloud.com/v1",
 +
 +Guard against malicious 3rdparty code
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +Finally you can enable checks for malicious code fragments of 3rd-party apps
 +by setting the **appcodechecker** parameter.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "appcodechecker" => false,
diff --cc core/doc/admin/_sources/configuration/configuration_users.txt
index 0000000,0000000..a6078b5
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/configuration/configuration_users.txt
@@@ -1,0 -1,0 +1,224 @@@
++User Management
++===============
++
++ownCloud administrators can easily manage users via the web interface. To go into
++user management page, click your username on the web interface and select *Users*.
++A page similar to the image below will be shown:
++
++.. figure:: ../images/oc_admin_user_manage.png
++Users management page
++
++A fictive use case will help you understand the concept of users, user groups
++and group admins.
++
++Think of a small, 25-member staff company, named "Cloud Lovers", that is lead
++by its founder Richard. In this company Bob acts as IT operator and recently
++set up ownCloud. Being the installing user, Bob is member of the so called
++"admin" user group of ownCloud. His colleague Tom, who provides support if Bob
++is on holiday, is member of the "admin" user group as well. All employees,
++including Bob and Tom, are members of the user group "Internal", that is used
++to share data across the company. Mostly for operational data, that should not
++be accessible to all employees, Bob created the "Administration" user group
++having two members: Richard and his assistant Susan. Richard is group admin of
++this user group, so he can manage the members of the "Administration" user
++group on his own.
++
++
++Users
++-----
++
++A user represents an account of the ownCloud installation. In this section the
++core properties are listed.
++
++*Login name (Username)*
++  This is the unique ID of a ownCloud user (e.g. test, jon.doe).
++
++*Full Name*
++  This is the name that is used all over the user interface to identify the
++  user i.e. when sharing data or sending mails. If no display name is set, it
++  defaults to the login name.
++
++*Password*
++  This is the password the user uses to login to ownCloud.
++
++*Groups*
++  This is a list of security groups the user is assigned to. By default the
++  user is not member of any user group.
++
++*Group Admin*
++  This is a list of security groups the user has administration privileges for.
++  By default the user is not registered as group admin for any user group.
++
++*Storage*
++  This is the maximum disk space that may be used by the user. If the user
++  reaches this limit he/she is not able to upload or sync further data. The
++  storage quota is specified in the format *Number Unit* (e.g. 100 B (byte),
++  50 KB (kilobyte), 20 MB (megabyte), 5 GB (gigabyte)). If no unit is given,
++  the number is interpreted as bytes.
++
++Each user is able to change its display name and password.
++
++
++Create a user
++~~~~~~~~~~~~~
++
++Before users can sign in and share data, they need ownCloud user accounts.
++
++To create a user account:
++
++#. Enter the new user's **Login Name** and its initial **Password** in the
++   appropriate fields.
++#. (Optional) Select the **Groups** to which you want to assign the new user.
++#. Click **Create**.
++#. (Optional) Edit additional user settings.
++
++   To set other user settings, such as setting a display name or limiting the
++   user's storage, see instructions as follows.
++
++Created users will have the storage specified on *Default Storage* setting
++on the same page.
++
++Login names may contain letters (a-z, A-Z), numbers (0-9), dashes (-),
++underscores (_), periods (.) and at signs (@).
++
++
++
++Reset a user's password
++~~~~~~~~~~~~~~~~~~~~~~~
++
++To reset a user's password:
++
++#. Hover the line of the user.
++#. Click on the **pencil icon** next to the password field.
++#. Enter the user's new password in the password field and then hit the
++   **Enter** key of your keyboard.
++
++Remember to provide the user with the new login information after you have
++reset the password.
++
++
++Rename a user
++~~~~~~~~~~~~~
++
++Each ownCloud user has two names: an unique *login name* used for
++authentication, and a *display name* (e.g. the user's first name and last name)
++used in the user interface. You can edit the display name of a user, but you
++cannot change the login name of any user.
++
++To set a user's display name:
++
++#. Hover the line of the user.
++#. Click on the **pencil icon** next to the display name field.
++#. Enter the user's new display name in the corresponding field and then hit
++   the **Enter** key of your keyboard.
++
++
++Grant administrator privileges to a user
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++
++If a user has administrator privileges, the user has the right to manage other
++users. Within ownCloud there are two types of administrators: *Super
++Administrators* and *Group Administrators*.
++
++Group administrators have the management rights to:
++
++* Create new users and assign them to the group of the group administrator
++* Edit and delete users that are assigned to the group of the group
++  administrator
++
++Group administrators cannot access system settings or modify installation-wide
++configuration like the default storage.
++
++To assign the *super administrator* role to a user:
++
++#. Use the drop-down list in *Groups* column of the user
++#. Assign the user to the "admin" user group
++
++To assign the *group administrator* role to a user:
++
++Find the user and select the user groups from the **Group Admin** drop-down
++list you want the user become group administrator for.
++
++
++Assign a user to a user group
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++
++To assign a user to a user group:
++
++Find the user and select the user groups from the **Groups** drop-down list
++you want to assign the user to. You can use *add group* link to create a new
++group to assign the user to. You can assign the user more than one group by checking
++multiple groups.
++
++
++.. note:: If a file/folder is shared with a group, newly created users will immediately
++          have access to the share.
++
++.. note:: If you assign a user to the *admin* user group, the user will become a
++          *Super Administrator* with unlimited privileges.
++
++
++Limit a user's storage
++~~~~~~~~~~~~~~~~~~~~~~
++
++To limit a user's storage quota:
++
++Find the user and select an item from the **Storage** drop-down list.
++
++   * If you select *Default*, the default storage limit, specified in the
++     action bar at the top, is applied.
++   * If you select *Unlimited*, the user is not limited until the total disk
++     space is consumed.
++   * If you want to enter a custom limit, select *Other...*, enter the storage
++     quota of your choice and hit the **Enter** key of your keyboard.
++
++If you edit the value of the **Default Storage** field in the action bar, all
++users with storage *Default* are affected by this change, i.e. changing the
++default storage from *Unlimited* to *1 GB* will cause all users with *Default*
++storage being limited to 1 GB storage each.
++
++Delete User
++~~~~~~~~~~~
++
++**Important considerations before deleting a user:**
++
++* The user will no longer be able to sign in to your ownCloud installation.
++* You cannot revert the deletion or restore a deleted account.
++
++.. note:: If this user had a share with a group or user, the share also will
++          be deleted permanently.
++
++To delete a user account:
++
++#. Hover the line of the user you want to delete.
++#. Click the **cross icon** at the end of the line.
++
++.. note:: If you accidentally delete a user, you can use undo button shown on
++          notification bar at the top of the page.
++
++
++User Groups
++-----------
++
++Create Group
++~~~~~~~~~~~~
++
++To create a user group:
++
++#. Open the **Groups** drop-down list in the action bar.
++#. Click **add group**.
++#. Enter the name of the new group and then hit the **Enter** key of your
++   keyboard.
++
++You can *assign users* to the newly created user groups anytime by using users'
++group drop-down list.
++
++
++Edit/Delete Group
++~~~~~~~~~~~~~~~~~
++
++Currently, groups cannot be edited (e.g. renamed) or removed. This feature
++will be available in a future version of ownCloud.
++
++.. note:: If you have direct access to the database, you can manually delete the group
++          from database tables oc_groups and oc_group_user.
diff --cc core/doc/admin/_sources/configuration/index.txt
index 4862dfc,0000000..7b0e00f
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/index.txt
+++ b/core/doc/admin/_sources/configuration/index.txt
@@@ -1,27 -1,0 +1,28 @@@
 +=============
 +Configuration
 +=============
 +
 +.. toctree::
 +   :maxdepth: 1
 +
++   configuration_apps
++   configuration_users
 +   auth_ldap
 +   background_jobs
 +   configuration_3rdparty
-    configuration_apps
 +   configuration_automation
 +   configuration_custom_clients
 +   configuration_database
 +   configuration_encryption
 +   configuration_knowledgebase
 +   configuration_language
 +   configuration_logging
 +   configuration_mail
 +   configuration_maintenance
 +   configuration_preview
 +   configuration_reverseproxy
 +   configuring_big_file_upload
 +   custom_mount_config_gui
 +   custom_mount_config
 +   custom_user_backend
 +   xsendfile
diff --cc core/doc/admin/_sources/index.txt
index 0207aa2,0000000..2a04202
mode 100644,000000..100644
--- a/core/doc/admin/_sources/index.txt
+++ b/core/doc/admin/_sources/index.txt
@@@ -1,80 -1,0 +1,81 @@@
 +===================
 +Admin Documentation
 +===================
 +
 +Introduction
 +============
 +
 +This is the administrators manual for ownCloud, a flexible, open source file
 +sync and share solution. It comprises of the ownCloud server, as well as client
 +applications for Microsoft Windows, Mac OS X and Linux (Desktop Client) and
 +mobile clients for the Android and Apple iOS operating system.
 +
 +Target audience
 +---------------
 +
 +This guide is targeted towards people who want to install, administer and
 +optimize ownCloud Server. If you want to learn how to use the Web UI, or how to
 +install clients on the server, please refer to the `User Manual`_ or the `Desktop
 +Client Manual`_ respectively.
 +
 +.. _`User Manual`: http://doc.owncloud.com/
 +.. _`Desktop Client Manual`: http://doc.owncloud.com/
 +
 +Structure of this document
 +--------------------------
 +
 +The next chapters describes how to set up ownCloud Server on different platforms
 +and operating systems, as well as how to update existing installations.
 +
 +Further chapters will then detail on integrating ownCloud into your existing
 +environment, e.g. how to setup LDAP or how to mount your storage.
 +
 +
 +Installation
 +============
 +This chapter will introduce you to the installation of ownCloud in different scenarios.
 +
 +If you want to just try ownCloud in a virtual machine without any configuration, check the section
 +:doc:`installation/installation_appliance`, where you will find ready-to-use images.
 +
 +* :doc:`installation/installation_linux` (recommended)
 +* :doc:`installation/installation_windows`
 +* :doc:`installation/installation_source`
 +* :doc:`installation/installation_others`
 +* :doc:`installation/installation_ucs`
 +* :doc:`installation/installation_macos` (not supported)
 +* :doc:`installation/installation_appliance`
 +
 +Configuration
 +=============
 +This chapter covers ownCloud and web server configuration.
 +
++* :doc:`configuration/configuration_apps`
++* :doc:`configuration/configuration_users`
 +* :doc:`configuration/configuration_database`
 +* :doc:`configuration/auth_ldap`
 +* :doc:`configuration/custom_mount_config_gui`
 +* :doc:`configuration/custom_mount_config`
 +* :doc:`configuration/background_jobs`
 +* :doc:`configuration/configuration_mail`
 +* :doc:`configuration/configuration_automation`
 +* :doc:`configuration/configuration_encryption`
 +* :doc:`configuration/configuring_big_file_upload`
- * :doc:`configuration/configuration_apps`
 +* :doc:`configuration/configuration_reverseproxy`
 +* :doc:`configuration/xsendfile`
 +* :doc:`configuration/configuration_3rdparty`
 +* :doc:`configuration/custom_user_backend`
 +* :doc:`configuration/configuration_custom_clients`
 +* :doc:`configuration/configuration_maintenance`
 +* :doc:`configuration/configuration_knowledgebase`
 +* :doc:`configuration/configuration_logging`
 +* :doc:`configuration/configuration_language`
 +
 +Maintenance
 +===========
 +This chapter covers maintenance tasks such as updating or migrating to a new version.
 +
 +* :doc:`maintenance/migrating`
 +* :doc:`maintenance/update`
 +
 +
diff --cc core/doc/admin/_sources/installation/installation_source.txt
index 5fe4fb0,0000000..f3d2105
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_source.txt
+++ b/core/doc/admin/_sources/installation/installation_source.txt
@@@ -1,334 -1,0 +1,340 @@@
 +Manual Installation
 +-------------------
 +
 +If you do not want to use packages, here is how you setup ownCloud on from scratch
 +using a classic :abbr:`LAMP (Linux, Apache, MySQL, PHP)` setup:
 +
 +Prerequisites
 +~~~~~~~~~~~~~
 +
 +To run ownCloud, your web server must have the following installed:
 +
 +* php5 (>= 5.3.3, minimum recommended 5.4)
- * PHP module zip
- * PHP module dom
- * PHP module libxml
- * PHP module mb multibyte
 +* PHP module ctype
- * PHP module JSON
++* PHP module dom
 +* PHP module GD
- * PHP module zlib
 +* PHP module iconv
++* PHP module JSON
++* PHP module libxml
++* PHP module mb multibyte
 +* PHP module SimpleXML
++* PHP module zip
++* PHP module zlib
 +
- And as *optional* dependencies:
++Database connectors (pick at least one):
 +
- * PHP module intl
- * PHP module mcrypt
- * PHP module bz2
- * PHP module openssl
 +* PHP module sqlite (>= 3)
 +* PHP module mysql
- * PHP module pgsql
++* PHP module pgsql (requires PostgreSQL >= 9.0)
++
++And as *optional* dependencies:
++
++* PHP module bz2
++* PHP module curl
 +* PHP module exif (for image rotation in pictures app)
++* PHP module intl
 +* PHP module ldap (for ldap integration)
- * PHP module curl
++* PHP module mcrypt
++* PHP module openssl
 +* curl
 +* libcurl3
 +
 +For performance increase (*optional* / select one of the following):
 +
 +* PHP module apc
 +* PHP module apcu
 +* PHP module xcache
 +
 +For preview generation (*optional*):
 +
 +* PHP module imagick
 +* avconv or ffmpeg
 +* OpenOffice or libreOffice
 +
 +For external storage (*optional*):
 +
 +* smbclient (for SMB storage)
 +* php5-ftp (for FTP storage)
 +
 +Please check your distribution, operating system or hosting partner documentation on how to install/enable
 +these modules.
 +
 +The curl packages are needed for some apps (e.g. http user authentication)
 +
 +If you are running Ubuntu 10.04 LTS you will need to update your PHP from
 +this `PHP PPA`_:
 +
 +::
 +
 +  sudo add-apt-repository ppa:ondrej/php5
 +  sudo apt-get update
 +  sudo apt-get install php5
 +
 +
 +You don’t need any WebDAV support of your web server (i.e. apache’s mod_webdav)
 +to access your ownCloud data via WebDAV, ownCloud has a WebDAV server built in.
 +In fact, you should make sure that any built-in WebDAV module of your web server
 +is disabled (at least for the ownCloud directory), as it can interfere with
 +ownCloud's built-in WebDAV support.
 +
 +Extract ownCloud and Copy to Your Web Server
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +::
 +
 +  tar -xjf path/to/downloaded/owncloud-x.x.x.tar.bz2
 +  cp -r owncloud /path/to/your/webserver
 +
 +Set the Directory Permissions
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +The owner of your web server must own the apps/, data/ and config/ directories
 +in your ownCloud install. You can do this by running the following command for
 +the apps, data and config directories.
 +
 +For Debian based distributions like Ubuntu, Debian or Linux Mint and Gentoo use::
 +
 +  chown -R www-data:www-data /path/to/your/owncloud/install/data
 +
 +For ArchLinux use::
 +
 +  chown -R http:http /path/to/your/owncloud/install/data
 +
 +Fedora users should use::
 +
 +  chown -R apache:apache /path/to/your/owncloud/install/data
 +
 +.. note:: The **data/** directory will only be created after setup has run (see below) and is not present by default in the tarballs.
 +
 +Web Server Configuration
 +~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Apache is the recommended web server.
 +
 +Apache Configuration
 +********************
 +
 +Example Apache 2.2:
 +
 +.. code-block:: xml
 +
 +    <Directory /path/to/your/owncloud/install>
 +        Options Indexes FollowSymLinks MultiViews
 +        AllowOverride All
 +        Order allow,deny
 +        allow from all
 +    </Directory>
 +
 +
 +Example Apache 2.4:
 +
 +.. code-block:: xml
 +
 +    <Directory /path/to/your/owncloud/install>
 +        Options Indexes FollowSymLinks MultiViews
 +        AllowOverride All
-         Order allow,deny
 +        Require all granted
 +    </Directory>
 +
 +
 +Enable mod_rewrite::
 +
 +	a2enmod rewrite
 +
 +In distributions that do not come with a2enmod the :file:`/etc/httpd/httpd.conf` needs to be changed to enable **mod_rewrite**
 +
 +Then restart apache. For Ubuntu systems (or distributions using upstartd) use::
 +
 +	service apache2 restart
 +
 +For systemd systems (Fedora, ArchLinux, OpenSUSE) use::
 +
 +	systemctl restart httpd.service
 +
 +In order for the maximum upload size to be configurable, the .htaccess file in the ownCloud folder needs to be made writable by the server.
 +
 +
 +
 +Nginx Configuration
 +*******************
 +
 +-  You need to insert the following code into **your nginx config file.**
 +-  Adjust **server_name**, **root**, **ssl_certificate** and **ssl_certificate_key** to suit your needs.
 +-  Make sure your SSL certificates are readable by the server (see `http://wiki.nginx.org/HttpSslModule`_).
 +
 +.. code-block:: python
 +
++    upstream php-handler {
++            server 127.0.0.1:9000; 
++            #server unix:/var/run/php5-fpm.sock;
++    }
++
 +    server {
 +            listen 80;
 +            server_name cloud.example.com;
 +            return 301 https://$server_name$request_uri;  # enforce https
 +    }
 +
 +    server {
 +            listen 443 ssl;
 +            server_name cloud.example.com;
 +
 +            ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
 +            ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
 +
 +            # Path to the root of your installation
 +            root /var/www/;
 +
 +            client_max_body_size 10G; # set max upload size
 +            fastcgi_buffers 64 4K;
 +
 +            rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
 +            rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
 +            rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
 +
 +            index index.php;
 +            error_page 403 /core/templates/403.php;
 +            error_page 404 /core/templates/404.php;
 +
 +            location = /robots.txt {
 +                allow all;
 +                log_not_found off;
 +                access_log off;
 +            }
 +
 +            location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
 +                    deny all;
 +            }
 +
 +            location / {
 +                    # The following 2 rules are only needed with webfinger
 +                    rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
 +                    rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
 +
 +                    rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
 +                    rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
 +
 +                    rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
 +
 +                    try_files $uri $uri/ index.php;
 +            }
 +
 +            location ~ ^(.+?\.php)(/.*)?$ {
 +                    try_files $1 = 404;
 +
 +                    include fastcgi_params;
 +                    fastcgi_param SCRIPT_FILENAME $document_root$1;
 +                    fastcgi_param PATH_INFO $2;
 +                    fastcgi_param HTTPS on;
-                     fastcgi_pass 127.0.0.1:9000;
-                     # Or use unix-socket with 'fastcgi_pass unix:/var/run/php5-fpm.sock;'
++                    fastcgi_pass php-handler;
 +            }
 +
 +            # Optional: set long EXPIRES header on static assets
 +            location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
 +                    expires 30d;
 +                    # Optional: Don't log access to assets
 +                    access_log off;
 +            }
 +
 +    }
 +
 +.. note:: You can use ownCloud without SSL/TLS support, but we strongly encourage you not to do that:
 +
 +-  Remove the server block containing the redirect
 +-  Change **listen 443 ssl** to **listen 80;**
 +-  Remove **ssl_certificate** and **ssl_certificate_key**.
 +-  Remove **fastcgi_params HTTPS on;**
 +
 +.. note:: If you want to effectively increase maximum upload size you will also have to modify your **php-fpm configuration** (**usually at
 +          /etc/php5/fpm/php.ini**) and increase **upload_max_filesize** and
 +          **post_max_size** values. You’ll need to restart php5-fpm and nginx
 +	  services in order these changes to be applied.
 +
 +Lighttpd Configuration
 +**********************
 +
 +This assumes that you are familiar with installing PHP application on
 +lighttpd.
 +
 +It is important to note that the **.htaccess** files used by ownCloud to protect the **data** folder are ignored by
 +lighttpd, so you have to secure it by yourself, otherwise your **owncloud.db** database and user data are publicly
 +readable even if directory listing is off. You need to add two snippets to your lighttpd configuration file:
 +
 +Disable access to data folder::
 +
 +    $HTTP["url"] =~ "^/owncloud/data/" {
 +         url.access-deny = ("")
 +       }
 +
 +Disable directory listing::
 +
 +    $HTTP["url"] =~ "^/owncloud($|/)" {
 +         dir-listing.activate = "disable"
 +       }
 +
 +Yaws Configuration
 +******************
 +
 +This should be in your **yaws_server.conf**. In the configuration file, the
 +**dir_listings = false** is important and also the redirect from **/data**
 +to somewhere else, because files will be saved in this directory and it
 +should not be accessible from the outside. A configuration file would look
 +like this
 +
 +.. code-block:: xml
 +
 +    <server owncloud.myserver.com/>
 +            port = 80
 +            listen = 0.0.0.0
 +            docroot = /var/www/owncloud/src
 +            allowed_scripts = php
 +            php_handler = <cgi, /usr/local/bin/php-cgi>
 +            errormod_404 = yaws_404_to_index_php
 +            access_log = false
 +            dir_listings = false
 +            <redirect>
 +                    /data == /
 +            </redirect>
 +    </server>
 +
 +
 +The apache **.htaccess** file that comes with ownCloud is configured to
 +redirect requests to nonexistent pages. To emulate that behaviour, you
 +need a custom error handler for yaws. See this `github gist for further instructions`_ on how to create and compile that error handler.
 +
 +Hiawatha Configuration
 +**********************
 +
 +Add **WebDAVapp = yes** to the ownCloud virtual host. Users accessing
 +WebDAV from MacOS will also need to add **AllowDotFiles = yes**.
 +
 +Disable access to data folder::
 +
 +    UrlToolkit {
 +        ToolkitID = denyData
 +        Match ^/data DenyAccess
 +    }
 +
 +
 +
 +Microsoft Internet Information Server (IIS)
 +*******************************************
 +
 +See :doc:`installation_windows` for further instructions.
 +
 +Follow the Install Wizard
 +~~~~~~~~~~~~~~~~~~~~~~~~~
 +Open your web browser and navigate to your ownCloud instance. If you are
 +installing ownCloud on the same machine as you will access the install wizard
 +from, the url will be: http://localhost/ (or http://localhost/owncloud).
 +
 +For basic installs we recommend SQLite as it is easy to setup (ownCloud will do it for you). For larger installs you
 +should use MySQL or PostgreSQL. Click on the Advanced options to show the configuration options. You may enter admin
 +credentials and let ownCloud create its own database user, or enter a preconfigured user.  If you are not using apache
 +as the web server, please set the data directory to a location outside of the document root. See the advanced
 +install settings.
 +
 +
 +.. _PHP PPA: https://launchpad.net/~ondrej/+archive/php5
 +.. _github gist for further instructions: https://gist.github.com/2200407
 +.. _`http://wiki.nginx.org/HttpSslModule`: http://wiki.nginx.org/HttpSslModule
diff --cc core/doc/admin/_sources/maintenance/backup.txt
index 674e243,0000000..77b1762
mode 100644,000000..100644
--- a/core/doc/admin/_sources/maintenance/backup.txt
+++ b/core/doc/admin/_sources/maintenance/backup.txt
@@@ -1,39 -1,0 +1,39 @@@
- Backing Up ownCloud
++Backing up ownCloud
 +===================
 +
 +To backup an ownCloud installation there are three main things you need to retain:
 +
 +#. The config folder
 +#. The data folder
 +#. The database
 +
 +Backup Folders
 +--------------
 +
 +Simply copy your config and data folder (or even your whole ownCloud install and data folder) to a place outside of
 +your ownCloud environment. You could use this command::
 +
 +    rsync -Aax owncloud/ owncloud-dirbkp_`date +"%Y%m%d"`/
 +
 +Backup Database
 +---------------
 +
 +MySQL
 +^^^^^
 +
 +MySQL is the recommended database engine. To backup MySQL::
 +
 +    mysqldump --lock-tables -h [server] -u [username] -p[password] > owncloud-sqlbkp_`date +"%Y%m%d"`.bak
 +
 +SQLite
 +^^^^^^
 +::
 +
 +    sqlite3 data/owncloud.db .dump > owncloud-sqlbkp_`date +"%Y%m%d"`.bak
 +
 +PostgreSQL
 +^^^^^^^^^^
 +::
 +
 +    PGPASSWORD="password" pg_dump owncloud -h [server] -U [username] -f owncloud-sqlbkp_`date +"%Y%m%d"`.bak
 +
diff --cc core/doc/admin/_sources/maintenance/update.txt
index 9be291c,0000000..d6c434b
mode 100644,000000..100644
--- a/core/doc/admin/_sources/maintenance/update.txt
+++ b/core/doc/admin/_sources/maintenance/update.txt
@@@ -1,52 -1,0 +1,52 @@@
 +Updating ownCloud
 +=================
 +
 +.. note:: If you have installed ownCloud from a repository, your package management should take care of it. Probably
 +   you will need to look for compatible third party applications yourself. **Always do backups anyway.**
 +
 +Update
 +------
 +Updating means updating ownCloud to the latest *point release*, e.g. ownCloud 4.0.6 → 4.0.7. This procedure uses the
 +ownCloud updater plugin called "Updater": it's an internal application already present in your ownCloud installation.
 +
 +To update ownCloud, follow those steps:
 +
 +#. Make a backup of the ownCloud folder and the database.
 +#. Make sure that updater plugin is enabled.
 +#. Navigate to the 'Admin' page.
 +#. Click 'Update'.
 +#. Refresh the page with Ctrl+F5.
 +
 +If this procedure doesn't work (for example, ownCloud 5.0.10 doesn't show new any new version) you could try to perform
 +a full upgrade to update to the latest point release (see below).
 +
 +Upgrade
 +-------
 +Upgrade is to bring an ownCloud instance to a new *major release*, e.g.
 +ownCloud 4.0.7 → 4.5.0. Always do backups anyway.
 +
 +To upgrade ownCloud, follow those steps:
 +
 +#. Make sure that you ran the latest point release of the major ownCloud
 +   version, e.g. 4.0.7 in the 4.0 series. If not, update to that version first
 +   (see above).
 +#. Make a backup of the ownCloud folder and the database.
- #. Download the latest version to the working directory:
++#. Download the latest version to the working directory::
 +    
 +    wget http://download.owncloud.org/community/owncloud-latest.tar.bz2
 +
 +#. Deactivate all third party applications.
 +#. Delete everything from your ownCloud installation directory, except data and
-    config. Assuming that it's your working directory, you could execute this command:
++   config. Assuming that it's your working directory, you could execute this command::
 +    
-     ls | grep -v 'data\\|config' | xargs rm -r
++    ls | grep -v 'data\|config' | xargs rm -r
 +
 +#. Unpack the release tarball in the ownCloud directory (or copy the
 +   files thereto). Assuming that your installation directory is called 'owncloud' and that it's inside your working
-    directory, you could execute this command:
++   directory, you could execute this command::
 +   
 +    tar xfj owncloud-latest.tar.bz2
 +   
 +#. With the next page request the update procedures will run.
 +#. If you had 3rd party applications, check if they provide versions compatible
 +   with the new release. If so, install and enable them, update procedures will run if needed. 
diff --cc core/doc/admin/configuration/auth_ldap.html
index de1d298,0000000..014a98a
mode 100644,000000..100644
--- a/core/doc/admin/configuration/auth_ldap.html
+++ b/core/doc/admin/configuration/auth_ldap.html
@@@ -1,774 -1,0 +1,775 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
++    <link rel="prev" title="User Management" href="configuration_users.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">User Authentication with LDAP</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#configuration">Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#advanced-settings">Advanced Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#expert-settings">Expert Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#testing-the-configuration">Testing the configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#owncloud-avatar-integration">ownCloud Avatar integration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#troubleshooting-tips-and-tricks">Troubleshooting, Tips and Tricks</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#ssl-certificate-verification-ldaps-tls">SSL Certificate Verification (LDAPS, TLS)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#microsoft-active-directory">Microsoft Active Directory</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#duplicating-server-configurations">Duplicating Server Configurations</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#owncloud-ldap-internals">ownCloud LDAP Internals</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#user-and-group-mapping">User and Group Mapping</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#caching">Caching</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#handling-with-backup-server">Handling with Backup Server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="user-authentication-with-ldap">
 +<h1>User Authentication with LDAP<a class="headerlink" href="#user-authentication-with-ldap" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud ships an LDAP backend, which allows full use of ownCloud for user
 +logging in with LDAP credentials including:</p>
 +<ul class="simple">
 +<li>LDAP group support</li>
 +<li>File sharing with users and groups</li>
 +<li>Access via WebDAV and of course ownCloud Desktop Client</li>
 +<li>Versioning, external Storages and all other ownCloud goodies</li>
 +</ul>
 +<p>To connect to an LDAP server the configuration needs to be set up properly.
 +Once the LDAP backend is activated (Apps Sidebar→Apps, choose <strong>LDAP user and
 +group backend</strong>, click on <strong>Enable</strong>) the configuration can be found on
 +Settings→Admin. Read on for a detailed description of the configuration fields.</p>
 +<div class="section" id="configuration">
 +<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
 +<p>The LDAP backend follows a wizard-like approach, splitted into four tabs. A
 +correctly completed first tab (“Server”) is mandatory to access the other tabs.
 +Also, the other tabs need to be reviewed by the admin, however the necessary
 +settings are detected automatically. An indicator will show whether the
 +configuration is incomplete, incorrect or OK.</p>
 +<p>The settings are changed automatically, as soon as a input element looses the
 +focus, i.e. the cursor is taken away by clicking somewhere else or pressing the
 +tabulator key.</p>
 +<p>The other tabs can be navigated by clicking the tabs or by using the <em>Continue</em>
 +and <em>Back</em> buttons. They are located on the lower right, next to the status
 +indicator.</p>
 +<div class="section" id="server">
 +<h3>Server<a class="headerlink" href="#server" title="Permalink to this headline">¶</a></h3>
 +<p>The server tab contains the basic information on the LDAP server. They make sure
 +that ownCloud will be able to connect to LDAP and be able to read data from
 +there. The admin at least needs to provide a hostname. If anonymous access is
 +not possible he will need to provide an account DN and a password, too. ownCloud
 +attempts to auto-detect the port and the base DN.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-1-server.png" src="../_images/ldap-wizard-1-server.png" />
 +</div>
 +<dl class="docutils">
 +<dt>Server configuration:</dt>
 +<dd>ownCloud can be configured to connect to multiple LDAP servers. Using this
 +control you can pick a configuration you want to edit or add a new one. The
 +button <strong>Delete Configuration</strong> deletes the current configuration.</dd>
 +<dt>Host:</dt>
 +<dd><p class="first">The host name of the LDAP server. It can also be a <strong>ldaps://</strong> URI, for
 +instance.</p>
 +<p>It is also possible to pass a port number, which speeds up port detection. It
 +is especially useful, if a custom port is used. ownCloud will move the value
 +to the port field subsequently.</p>
 +<p>Examples:</p>
 +<ul class="last simple">
 +<li><em>directory.my-company.com</em></li>
 +<li><em>ldaps://directory.my-company.com</em></li>
 +<li><em>directory.my-company.com:9876</em></li>
 +</ul>
 +</dd>
 +<dt>Port:</dt>
 +<dd><p class="first">The port on which to connect to the LDAP server. The field is disabled in the
 +beginning of a new configuration. The port will be detected automatically,
 +if the LDAP server is running on a standard port. After ownCloud attempted to
 +determine the port, the field will be enabled for user input. A successfully
 +found port will be inserted by ownCloud, of course.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>389</em></li>
 +</ul>
 +</dd>
 +<dt>User DN:</dt>
 +<dd><p class="first">The name as DN of a user who is able to do searches in the LDAP
 +directory. Leave it empty for anonymous access. It is recommended to have a
 +special system user for ownCloud.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>uid=owncloudsystemuser,cn=sysusers,dc=my-company,dc=com</em></li>
 +</ul>
 +</dd>
 +<dt>Password:</dt>
 +<dd>The password for the user given above. Empty for anonymous access.</dd>
 +<dt>Base DN:</dt>
 +<dd><p class="first">The base DN of LDAP, from where all users and groups can be reached. Separated
 +Base DNs for users and groups can be set in the Advanced tab. Nevertheless,
 +this field is mandatory. ownCloud attempts to determine the Base DN according
 +to the provided User DN or the provided Host.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>dc=my-company,dc=com</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="user-filter">
 +<h3>User Filter<a class="headerlink" href="#user-filter" title="Permalink to this headline">¶</a></h3>
 +<p>The settings in the user filter tab determine which LDAP users will appear and
 +are allowed to log in into ownCloud. It is also possible to enter a raw LDAP
 +filter.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-2-user.png" src="../_images/ldap-wizard-2-user.png" />
 +</div>
 +<dl class="docutils">
 +<dt>only those object classes:</dt>
 +<dd>ownCloud will determine the object classes that are typically availalble for
 +(ideally only) user objects in your LDAP. ownCloud will automatically select
 +the object class that returns the highest amount of users. You can select
 +multiple object classes.</dd>
 +<dt>only from those groups:</dt>
 +<dd><p class="first">If your LDAP server supports the member-of-overlay in LDAP filters, you can
 +define that only users from one or more certain groups are allowed to
 +appear and log in into ownCloud. By default, no value will be selected. You
 +can select multiple groups.</p>
 +<p class="last">If your LDAP server does not support the member-of-overlay in LDAP filters,
 +the input field is disabled. Please contact your LDAP administrator.</p>
 +</dd>
 +<dt>Edit raw filter instead:</dt>
 +<dd><p class="first">Clicking on this text will toggle the filter mode. Instead of the assisted
 +approach, you can enter the raw LDAP filter directly in the appearing field.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>objectClass=inetOrgPerson</em></li>
 +</ul>
 +</dd>
 +<dt>x users found:</dt>
 +<dd>This is an indicator that tells you approximately how many users will be
 +allowed to access ownCloud. The number will update after any change you do.</dd>
 +</dl>
 +</div>
 +<div class="section" id="login-filter">
 +<h3>Login Filter<a class="headerlink" href="#login-filter" title="Permalink to this headline">¶</a></h3>
 +<p>The settings in the login filter tab determine which user detail will be
 +compared to the login value entered by the user. It is possible to allow
 +multiple user details. It is also possible to enter a raw LDAP filter.</p>
 +<p>The user limitation as set up in the previous tab is in effect, unless you
 +manually configure the filter in raw mode.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-3-login.png" src="../_images/ldap-wizard-3-login.png" />
 +</div>
 +<dl class="docutils">
 +<dt>LDAP Username:</dt>
 +<dd>If this value is checked, the login value will be compared to the username in
 +the LDAP directory. The corresponding attribute, usually <em>uid</em> or
 +<em>samaccountname</em> will be detected automatically by ownCloud.</dd>
 +<dt>LDAP Email Address:</dt>
 +<dd>If this value is checked, the login value will be compared to an email address
 +in the LDAP directory. The email address will be looked for in the
 +<em>mailPrimaryAddress</em> and <em>mail</em> attributes.</dd>
 +<dt>Other Attributes:</dt>
 +<dd>This multiselect box allows you to select other attributes for the comparison.
 +The list is generated automatically based on the attributes that a user object
 +contains in your LDAP server.</dd>
 +<dt>Edit raw filter instead:</dt>
 +<dd><p class="first">Clicking on this text will toggle the filter mode. Instead of the assisted
 +approach, you can enter the raw LDAP filter directly in the appearing field.</p>
 +<p>The <strong>%uid</strong> placeholder will be replaced with the login name entered by the user
 +upon login. When you enter the filter manually.</p>
 +<p>Examples:</p>
 +<ul class="last simple">
 +<li>only username: <em>uid=%uid</em></li>
 +<li>username or email address: <em>(|(uid=%uid)(mail=$uid))</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="group-filter">
 +<h3>Group Filter<a class="headerlink" href="#group-filter" title="Permalink to this headline">¶</a></h3>
 +<p>The settings in the group filter tab determine which groups will be availalble
 +in ownCloud. It does not have any restrictions on logins, this has been dealed
 +with in the prior tabs.  It is also possible to enter a raw LDAP
 +filter.</p>
 +<p>By default, no groups will be availalble in ownCloud. You actively need to
 +enable groups.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-4-group.png" src="../_images/ldap-wizard-4-group.png" />
 +</div>
 +<dl class="docutils">
 +<dt>only those object classes:</dt>
 +<dd>ownCloud will determine the object classes that are typically availalble for
 +(ideally only) group objects in your LDAP. ownCloud will only list object
 +classes that return at least one group object. You can select multiple
 +object classes. A typical object class is “group”, or “posixGroup”.</dd>
 +<dt>only from those groups:</dt>
 +<dd>This setting lets you pick certain groups that shall be availalble in
 +ownCloud. This field follows a whitelist approach. ownCloud will generate a
 +list of available groups found in your LDAP server. You can select multiple
 +groups.</dd>
 +<dt>Edit raw filter instead:</dt>
 +<dd><p class="first">Clicking on this text will toggle the filter mode. Instead of the assisted
 +approach, you can enter the raw LDAP filter directly in the appearing field.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>objectClass=group</em></li>
 +<li><em>objectClass=posixGroup</em></li>
 +</ul>
 +</dd>
 +<dt>y groups found:</dt>
 +<dd>This is an indicator that tells you approximately how many groups will be
 +available in  ownCloud. The number will update after any change you do.</dd>
 +</dl>
 +</div>
 +</div>
 +<div class="section" id="advanced-settings">
 +<h2>Advanced Settings<a class="headerlink" href="#advanced-settings" title="Permalink to this headline">¶</a></h2>
 +<p>In the LDAP Advanced settings section you can define options, that are less
 +common to set. They are not needed for a working connection. It can also have a
 +positive effect on the performance to specify distinguished bases for user and
 +group searches.</p>
 +<p>The Advanced Settings are structured into three parts:</p>
 +<ul class="simple">
 +<li>Connection Settings</li>
 +<li>Directory Settings</li>
 +<li>Special Attributes</li>
 +</ul>
 +<div class="section" id="connection-settings">
 +<h3>Connection Settings<a class="headerlink" href="#connection-settings" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
 +<img alt="../_images/ldap-advanced-1-connection.png" src="../_images/ldap-advanced-1-connection.png" />
 +<p class="caption">LDAP Advanced Settings, section Connection Settings</p>
 +</div>
 +<dl class="docutils">
 +<dt>Configuration Active:</dt>
 +<dd><p class="first">Enables or Disables the current configuration. Disabled configuration will not
 +connect to the LDAP server.</p>
 +<p class="last">By default, it is turned off. It will be automatically turned on, when using
 +the wizard and the configuration is OK and a test connection successful.</p>
 +</dd>
 +<dt>Backup (Replica) Host:</dt>
 +<dd><p class="first">A backup server can be defined here. ownCloud tries to connect to the backup
 +server automatically, when the main host (as specified in basic settings)
 +cannot be reached. It is import that the backup server is a replica of the
 +main server, because the object UUIDs must match.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>directory2.my-company.com</em></li>
 +</ul>
 +</dd>
 +<dt>Backup (Replica) Port:</dt>
 +<dd><p class="first">The port on which to connect to the backup LDAP server. If no port is given,
 +but a host, then the main port (as specified above) will be used.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>389</em></li>
 +</ul>
 +</dd>
 +<dt>Disable Main Server:</dt>
 +<dd>You can manually override the main server and make ownCloud only connect to
 +the backup server. It may be handy for planned downtimes.</dd>
 +<dt>Case insensitive LDAP server (Windows):</dt>
 +<dd>Whether the LDAP server is running on a Windows Host. Usually, it is not
 +necessary to check it, however.</dd>
 +<dt>Turn off SSL certificate validation:</dt>
 +<dd>Turns of check of valid SSL certificates. Use it – if needed –
 +for testing, only!</dd>
 +<dt>Cache Time-To-Live:</dt>
 +<dd><p class="first">A cache is introduced to avoid unnecessary LDAP traffic,
 +for example lookups check whether the users exists on every page request or
 +WebDAV interaction. It is also supposed to speed up the Admin → User page or
 +list of users to share with, once it is populated. Saving the configuration
 +empties the cache (changes are not necessary). The time is given in seconds.</p>
 +<p>Note that almost every PHP request would require to build up a new connection
 +to the LDAP server. If you require a most up-to-dateness it is recommended not
 +to totally switch off the cache, but define a minimum life time of 15s.</p>
 +<p>Examples:</p>
 +<ul class="last simple">
 +<li>ten minutes: <em>600</em></li>
 +<li>one hour: <em>3600</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="directory-settings">
 +<h3>Directory Settings<a class="headerlink" href="#directory-settings" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
 +<img alt="../_images/ldap-advanced-2-directory.png" src="../_images/ldap-advanced-2-directory.png" />
 +<p class="caption">LDAP Advanced Settings, section Directory Settings</p>
 +</div>
 +<dl class="docutils">
 +<dt>User Display Name Field:</dt>
 +<dd><p class="first">The attribute that should be used as display name in ownCloud.</p>
 +<ul class="last simple">
 +<li>Example: <em>displayName</em></li>
 +</ul>
 +</dd>
 +<dt>Base User Tree:</dt>
 +<dd><p class="first">The base DN of LDAP, from where all users can be reached. It needs to be given
 +completely despite to the Base DN from the Basic settings. You can specify
 +multiple base trees, one in each line.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>cn=programmers,dc=my-company,dc=com</em></div>
 +<div class="line"><em>cn=designers,dc=my-company,dc=com</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>User Search Attributes:</dt>
 +<dd><p class="first">These attributes are used when a search for users is done. This happens, for
 +instance, in the share dialogue. By default the user display name attribute as
 +specified above is being used. Multiple attributes can be given, one in each
 +line.</p>
 +<p>Beware that if an attribute is not available on a user object, the user will
 +neither be listed (e.g. in the share dialogue) nor be able to login. This also
 +affects the display name attribute as specified above. If you override the
 +default, the display name attribute will not be taken into account, unless you
 +specify it as well.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>displayName</em></div>
 +<div class="line"><em>mail</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>Group Display Name Field:</dt>
 +<dd><p class="first">The attribute that should be used as ownCloud group name. ownCloud allows a
 +limited set of characters (a-zA-Z0-9.-_@), every other character will be
 +replaced in ownCloud. Once a group name is assigned, it will not be changed,
 +i.e. changing this value will only have effect to new LDAP groups.</p>
 +<ul class="last simple">
 +<li>Example: <em>cn</em></li>
 +</ul>
 +</dd>
 +<dt>Base Group Tree:</dt>
 +<dd><p class="first">The base DN of LDAP, from where all groups can be reached.
 +It needs to be given completely despite to the Base DN from the Basic
 +settings. You can specify multiple base trees, one in each line.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>cn=barcelona,dc=my-company,dc=com</em></div>
 +<div class="line"><em>cn=madrid,dc=my-company,dc=com</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>Group Search Attributes:</dt>
 +<dd><p class="first">These attributes are used when a search for groups is done. This happens, for
 +instance, in the share dialogue. By default the group display name attribute
 +as specified above is being used. Multiple attributes can be given, one in
 +each line.</p>
 +<p>If you override the default, the group display name attribute will not be
 +taken into account, unless you specify it as well.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>cn</em></div>
 +<div class="line"><em>description</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>Group Member association:</dt>
 +<dd><p class="first">The attribute that is used to indicate group memberships, i.e. the attribute
 +used by LDAP groups to refer to their users.</p>
 +<p>ownCloud detects the value automatically, you should only change it, if you
 +have a very valid reason and know what you are doing.</p>
 +<ul class="last simple">
 +<li>Example: <em>uniquemember</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="special-attributes">
 +<h3>Special Attributes<a class="headerlink" href="#special-attributes" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
 +<img alt="../_images/ldap-advanced-3-attributes.png" src="../_images/ldap-advanced-3-attributes.png" />
 +<p class="caption">LDAP Advanced Settings, section Special Attributes</p>
 +</div>
 +<dl class="docutils">
 +<dt>Quota Field:</dt>
 +<dd><p class="first">ownCloud can read an LDAP attribute and set the user quota according to its
 +value. Specify the attribute here, otherwise keep it empty. The attribute
 +shall return human readable values, e.g. “2 GB”.</p>
 +<ul class="last simple">
 +<li>Example: <em>ownCloudQuota</em></li>
 +</ul>
 +</dd>
 +<dt>Quota Default:</dt>
 +<dd><p class="first">Override ownCloud default quota for LDAP users who do not
 +have a quota set in the attribute given above.</p>
 +<ul class="last simple">
 +<li>Example: <em>15 GB</em></li>
 +</ul>
 +</dd>
 +<dt>Email Field:</dt>
 +<dd><p class="first">ownCloud can read an LDAP attribute and set the user email
 +there from. Specify the attribute here, otherwise keep it empty.</p>
 +<p>Although the wizard offers you to check login by email, the correct email
 +attribute is not detected and you need to specify it manually.</p>
 +<ul class="last simple">
 +<li>Example: <em>mail</em></li>
 +</ul>
 +</dd>
 +<dt>User Home Folder Naming Rule:</dt>
 +<dd><p class="first">By default, the ownCloud creates the user
 +directory, where all files and meta data are kept, according to the ownCloud
 +user name. You may want to override this setting and name it after an
 +attribute value. The attribute given can also return an absolute path, e.g.
 +<tt class="docutils literal"><span class="pre">/mnt/storage43/alice</span></tt>. Leave it empty for default behavior.</p>
 +<ul class="last simple">
 +<li>Example: <em>cn</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +</div>
 +<div class="section" id="expert-settings">
 +<h2>Expert Settings<a class="headerlink" href="#expert-settings" title="Permalink to this headline">¶</a></h2>
 +<div class="figure">
 +<img alt="../_images/ldap-expert.png" src="../_images/ldap-expert.png" />
 +</div>
 +<p>In the Expert Settings fundamental behavior can be adjusted to your needs. The
 +configuration should be done before starting production use or when testing the
 +installation.</p>
 +<dl class="docutils">
 +<dt>Internal Username:</dt>
 +<dd><p class="first">The internal username is the identifier in ownCloud for LDAP users. By default
 +it will be created from the UUID attribute. By using the UUID attribute it is
 +made sure that the username is unique and characters do not need to be
 +converted. The internal username has the restriction that only these
 +characters are allowed: [a-zA-Z0-9_.@-]. Other characters are replaced with
 +their ASCII correspondence or are simply omitted.</p>
 +<p>The LDAP backend ensures that there are no duplicate internal usernames in
 +ownCloud, i.e. that it is checking all other activated user backends
 +(including local ownCloud users). On collisions a random number (between 1000
 +and 9999) will be attached to the retrieved value. For example, if “alice”
 +exists, the next username may be “alice_1337”.</p>
 +<p>The internal username is also the default name for the user home folder in
 +ownCloud. It is also a part of remote URLs, for instance for all *DAV services.
 +With this setting the default behaviour can be overridden.</p>
 +<p>Leave it empty for default behaviour. Changes will have effect only on newly
 +mapped (added) LDAP users.</p>
 +<ul class="last simple">
 +<li>Example: <em>uid</em></li>
 +</ul>
 +</dd>
 +<dt>Override UUID detection</dt>
 +<dd><p class="first">By default, ownCloud auto-detects the UUID attribute. The UUID attribute is
 +used to doubtlessly identify LDAP users and groups. Also, the internal
 +username will be created based on the UUID, if not specified otherwise above.</p>
 +<p>You can override the setting and pass an attribute of your choice. You must
 +make sure that the attribute of your choice can be fetched for both users and
 +groups and it is unique. Leave it empty for default behaviour. Changes will
 +have effect only on newly mapped (added) LDAP users and groups. It also will
 +have effect when a user’s or group’s DN changes and an old UUID was cached: It
 +will result in a new user. Because of this, the setting should be applied
 +before putting ownCloud in production use and cleaning the bindings
 +(see below).</p>
 +<ul class="last simple">
 +<li>Example: <em>cn</em></li>
 +</ul>
 +</dd>
 +<dt>Username-LDAP User Mapping</dt>
 +<dd><p class="first">ownCloud uses the usernames as key to store and assign data. In order to
 +precisely identify and recognize users, each LDAP user will have a internal
 +username in ownCloud. This requires a mapping from ownCloud username to LDAP
 +user. The created username is mapped to the UUID of the LDAP user.
 +Additionally the DN is cached as well to reduce LDAP interaction, but it is
 +not used for identification. If the DN changes, the change will be detected by
 +ownCloud by checking the UUID value.</p>
 +<p>The same is valid for groups.</p>
 +<p>The internal ownCloud name is used all over in ownCloud. Clearing the Mappings
 +will have leftovers everywhere. Do never clear the mappings
 +in a production environment. Only clear mappings in a testing or experimental
 +stage.</p>
 +<p class="last"><strong>Clearing the Mappings is not configuration sensitive, it affects all LDAP
 +configurations!</strong></p>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="testing-the-configuration">
 +<h2>Testing the configuration<a class="headerlink" href="#testing-the-configuration" title="Permalink to this headline">¶</a></h2>
 +<p>In this version we introduced the <strong>Test Configuration</strong> button on the bottom
 +of the LDAP settings section. It will always check the values as currently
 +given in the input fields. You do not need to save before testing. By clicking
 +on the button, ownCloud will try to bind to the ownCloud server with the
 +settings currently given in the input fields. The response will look like this:</p>
 +<div class="figure">
 +<img alt="../_images/ldap-settings-invalid-oc45.png" src="../_images/ldap-settings-invalid-oc45.png" />
 +<p class="caption">Failure</p>
 +</div>
 +<p>In case the configuration fails, you can see details in ownCloud’s log, which
 +is in the data directory and called <strong>owncloud.log</strong> or on the bottom the
 +<strong>Settings →  Admin page</strong>. Unfortunately it requires a reload – sorry for the
 +inconvenience.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-settings-valid-oc45.png" src="../_images/ldap-settings-valid-oc45.png" />
 +<p class="caption">Success</p>
 +</div>
 +<p>In this case, Save the settings. You can check if the users and groups are
 +fetched correctly on the Settings → Users page.</p>
 +</div>
 +<div class="section" id="owncloud-avatar-integration">
 +<h2>ownCloud Avatar integration<a class="headerlink" href="#owncloud-avatar-integration" title="Permalink to this headline">¶</a></h2>
 +<p>ownCloud 6 incorporates a user profile picture feature, called Avatar. If a user
 +has a photo stored in the <em>jpegPhoto</em> attribute, it will be used as Avatar. The
 +user then is not able to change his avatar in the personal settings. It must be
 +done within LDAP.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-fetched-avatar.png" src="../_images/ldap-fetched-avatar.png" />
 +<p class="caption">Profile picture fetched from LDAP, Personal Settings</p>
 +</div>
 +<p>If the <em>jpegPhoto</em> attribute is not set or empty, the default ownCloud behaviour
 +is active, i.e. the user will be able to set and change his profile picture in
 +the personal settings. If the user sets a profile picture within ownCloud it
 +will _not_ be stored in LDAP.</p>
 +<p>The <em>jpegPhoto</em> attribute will be fetched once a day to make sure the current
 +photo from LDAP is used in ownCloud. If a picture is added later, a possibly set
 +profile picture will be overridden with the LDAP one. If a photo stored in the
 +<em>jpegPhoto</em> attribute is deleted later, the last profile picture in ownCloud
 +will still be used.</p>
 +<p>The photo taken from LDAP will be adjusted to the requirements of the ownCloud
 +avatar automatically. I.e. it will be transformed into a square. If the photo
 +needs to be cut, it will be done equally from both affected sides. The original
 +photo stored in LDAP will stay the same, of course.</p>
 +</div>
 +<div class="section" id="troubleshooting-tips-and-tricks">
 +<h2>Troubleshooting, Tips and Tricks<a class="headerlink" href="#troubleshooting-tips-and-tricks" title="Permalink to this headline">¶</a></h2>
 +</div>
 +<div class="section" id="ssl-certificate-verification-ldaps-tls">
 +<h2>SSL Certificate Verification (LDAPS, TLS)<a class="headerlink" href="#ssl-certificate-verification-ldaps-tls" title="Permalink to this headline">¶</a></h2>
 +<p>A common mistake with SSL certificates is that they may not be known to PHP.
 +If you have trouble with certificate validation make sure that</p>
 +<ul class="simple">
 +<li>you have the certificate of the server installed on the ownCloud server</li>
 +<li>the certificate is announced in the system’s LDAP configuration file (usually
 +<em>/etc/ldap/ldap.conf</em> on Linux, <em>C:\openldap\sysconf\ldap.conf</em> or
 +<em>C:\ldap.conf</em> on Windows) using a <strong>TLS_CACERT /path/to/cert</strong> line.</li>
 +<li>Using LDAPS, also make sure that the port is correctly configured (by default
 +686)</li>
 +</ul>
 +</div>
 +<div class="section" id="microsoft-active-directory">
 +<h2>Microsoft Active Directory<a class="headerlink" href="#microsoft-active-directory" title="Permalink to this headline">¶</a></h2>
 +<p>Compared to earlier ownCloud versions, no further tweaks need to be done to
 +make ownCloud work with Active Directory. ownCloud will automatically find the
 +correct configuration in the wizard-like set up process.</p>
 +</div>
 +<div class="section" id="duplicating-server-configurations">
 +<h2>Duplicating Server Configurations<a class="headerlink" href="#duplicating-server-configurations" title="Permalink to this headline">¶</a></h2>
 +<p>In case you have a working configuration and want to create a similar one or
 +“snapshot” configurations before modifying them you can do the following:</p>
 +<ol class="arabic simple">
 +<li>Go to the <strong>Server</strong> tab</li>
 +<li>On <strong>Server Configuration</strong> choose <em>Add Server Configuration</em></li>
 +<li>Answer the question <em>Take over settings from recent server configuration?</em>
 +with <em>yes</em>.</li>
 +<li>(optional) Switch to <strong>Advanced</strong> tab and uncheck <strong>Configuration Active</strong>
 +in the <em>Connection Settings</em>, so the new configuration is not used on Save</li>
 +<li>Click on <strong>Save</strong></li>
 +</ol>
 +<p>Now you can modify the configuration and enable it if you wish.</p>
 +</div>
 +<div class="section" id="owncloud-ldap-internals">
 +<h2>ownCloud LDAP Internals<a class="headerlink" href="#owncloud-ldap-internals" title="Permalink to this headline">¶</a></h2>
 +<p>Some parts of how the LDAP backend works are described here. May it be helpful.</p>
 +</div>
 +<div class="section" id="user-and-group-mapping">
 +<h2>User and Group Mapping<a class="headerlink" href="#user-and-group-mapping" title="Permalink to this headline">¶</a></h2>
 +<p>In ownCloud the user or group name is used to have all relevant information in
 +the database assigned. To work reliably a permanent internal user name and
 +group name is created and mapped to the LDAP DN and UUID. If the DN changes in
 +LDAP it will be detected, there will be no conflicts.</p>
 +<p>Those mappings are done in the database table ldap_user_mapping and
 +ldap_group_mapping. The user name is also used for the user’s folder (except
 +something else is specified in <em>User Home Folder Naming Rule</em>), which
 +contains files and meta data.</p>
 +<p>As of ownCloud 5 internal user name and a visible display name are separated.
 +This is not the case for group names, yet, i.e. group cannot be altered.</p>
 +<p>That means that your LDAP configuration should be good and ready before putting
 +it into production. The mapping tables are filled early, but as long as you are
 +testing, you can empty the tables any time. Do not do this in production. If you
 +want to rename a group, be very careful. Do not rename the user’s internal name.</p>
 +</div>
 +<div class="section" id="caching">
 +<h2>Caching<a class="headerlink" href="#caching" title="Permalink to this headline">¶</a></h2>
 +<p>For performance reasons a cache has been introduced to ownCloud. He we store
 +all users and groups, group memberships or internal userExists-requests. Since
 +ownCloud is written in PHP and each and every page request (also done by Ajax)
 +loads ownCloud and would execute one or more LDAP queries again, you do want to
 +have some of those queries cached and save those requests and traffic. It is
 +highly recommended to have the cache filled for a small amount of time, which
 +comes also very handy when using the sync client, as it is yet another request
 +for PHP.</p>
 +</div>
 +<div class="section" id="handling-with-backup-server">
 +<h2>Handling with Backup Server<a class="headerlink" href="#handling-with-backup-server" title="Permalink to this headline">¶</a></h2>
 +<p>When ownCloud is not able to contact the main server, he will be treated as
 +offline and no connection attempts will be done for the time specified in
 +<strong>Cache Time-To-Live</strong>. If a backup server is configured, it will be connected
 +instead. If you plan a maintained downtime, check <strong>Disable Main Server</strong> for
 +the time being to avoid unnecessary connection attempts every now and then.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/background_jobs.html
index d9504f2,0000000..7b131d0
mode 100644,000000..100644
--- a/core/doc/admin/configuration/background_jobs.html
+++ b/core/doc/admin/configuration/background_jobs.html
@@@ -1,226 -1,0 +1,227 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Background Jobs</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#cron-jobs">Cron-Jobs</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="background-jobs">
 +<h1>Background Jobs<a class="headerlink" href="#background-jobs" title="Permalink to this headline">¶</a></h1>
 +<p>A system like ownCloud sometimes requires tasks to be done on a regular
 +base without blocking the user interface. For that purpose you, as a system
 +administrator, can define background jobs which make it possible to execute
 +tasks without any need of user interaction, e.g. database clean-ups etc.
 +For the sake of completeness it is worth to know that additionally background
 +jobs can also be defined by installed apps.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>In the admin settings menu you can configure how cron-jobs should be executed.
 +You can choose between the following options:</p>
 +<ul class="simple">
 +<li>AJAX</li>
 +<li>Webcron</li>
 +<li>Cron</li>
 +</ul>
 +</div>
 +<div class="section" id="cron-jobs">
 +<h2>Cron-Jobs<a class="headerlink" href="#cron-jobs" title="Permalink to this headline">¶</a></h2>
 +<p>OwnCloud requires various automated background jobs to be run. There are three methods to achieve this.
 +The default way is AJAX and the recommended way is cron.</p>
 +<div class="section" id="ajax">
 +<h3>AJAX<a class="headerlink" href="#ajax" title="Permalink to this headline">¶</a></h3>
 +<p>This option is the default option, although it is the least reliable. Every
 +time a user visits the ownCloud page a single background job will be executed.
 +The advantage of this mechanism is, that is does not require access to the
 +system nor registration at a third party service.
 +The disadvantage of this solution compared to the Webcron service is, that it
 +requires regular visits of the page to get triggered.</p>
 +</div>
 +<div class="section" id="webcron">
 +<h3>Webcron<a class="headerlink" href="#webcron" title="Permalink to this headline">¶</a></h3>
 +<p>By registering your ownCloud <tt class="docutils literal"><span class="pre">cron.php</span></tt> script address at an external webcron
 +service, like e.g. <a class="reference external" href="http://www.easycron.com/">easyCron</a>, you ensure that background jobs will be executed
 +regularly. To use such a service your server need to be reachable via the Internet.</p>
 +<p><strong>Example</strong></p>
 +<div class="highlight-python"><pre>URL to call: http[s]://<domain-of-your-server>/owncloud/cron.php</pre>
 +</div>
 +</div>
 +<div class="section" id="cron">
 +<h3>Cron<a class="headerlink" href="#cron" title="Permalink to this headline">¶</a></h3>
 +<p>Using the systems cron feature is the preferred way to run regular tasks,
 +because it allows to execute jobs without the limitations which a web server
 +may have.</p>
 +<p><strong>Example</strong></p>
 +<p>To run a cron job on a <em>nix system, e.g. every 15min, under the default web server
 +user, e.g. **www-data*</em>, you need to set-up the following cron job to call the
 +<strong>cron.php</strong> script. Please check the crontab man page for the exact command syntax.</p>
 +<div class="highlight-python"><pre># crontab -u www-data -e
 +*/15  *  *  *  * php -f /var/www/owncloud/cron.php</pre>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_3rdparty.html
index 15696f6,0000000..cd12690
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_3rdparty.html
+++ b/core/doc/admin/configuration/configuration_3rdparty.html
@@@ -1,188 -1,0 +1,189 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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="next" title="Automatic Configuration" href="configuration_automation.html" />
 +    <link rel="prev" title="Background Jobs" href="background_jobs.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">3rd-Party Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="rd-party-configuration">
 +<h1>3rd-Party Configuration<a class="headerlink" href="#rd-party-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud resorts to some 3rd-party PHP components to provide its functionality.
 +These components are part of the software package and are usually shipped in
 +the <strong>/3rdparty</strong> folder.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>If you want to change the default location of the 3rd-party folder you can use the <strong>3rdpartyroot</strong> parameter to define
 +the absolute file system path to the folder. The <strong>3rdpartyurl</strong> parameter is used to define the http web path to that
 +folder, starting at the ownCloud web root.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +<span class="s2">"3rdpartyroot"</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">"/3rdparty"</span><span class="p">,</span>
 +<span class="s2">"3rdpartyurl"</span>  <span class="o">=></span> <span class="s2">"/3rdparty"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_apps.html
index b6b4bb2,0000000..aa19336
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_apps.html
+++ b/core/doc/admin/configuration/configuration_apps.html
@@@ -1,234 -1,0 +1,247 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
++    <link rel="next" title="User Management" href="configuration_users.html" />
++    <link rel="prev" title="Configuration" href="index.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
- <li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Apps Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
++<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
++<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="apps-configuration">
 +<h1>Apps Configuration<a class="headerlink" href="#apps-configuration" title="Permalink to this headline">¶</a></h1>
- <p>After you have installed ownCloud you might realize that it would be nice to
++<p>After you have installed ownCloud, you might realize that it would be nice to
 +provide an additional function on top of the core functionality in your ownCloud installation.</p>
- <p>The first step should be to check out the <a class="reference external" href="http://apps.owncloud.com/">ownCloud apps store</a>. There you will find a
- lot of ready-to-use apps provided by the ownCloud community.</p>
++<p>With ownCloud installation, you will find some apps enabled by default. To see which applications
++are enabled, click on Apps button on the web interface navigation to go into applications page:</p>
++<div class="figure">
++<img alt="../_images/oc_admin_app_page.png" src="../_images/oc_admin_app_page.png" />
++</div>
++<p>Administrator application page</p>
++<p>In this page, you can enable or disable applications simply by clicking on their names.
++Enabled applications will be shown in <strong>bold</strong> while disabled ones will be shown in normal font.
++If the app is not developed by ownCloud, it will have the <em>3rd party</em> notice next to it. To see what an
++application does, clicking on its name will show a description on the right side of the same page.</p>
++<p>To install new apps, you can use <em>More apps</em> button or check out the <a class="reference external" href="http://apps.owncloud.com/">ownCloud apps store</a>.
++There you will find a lot of ready-to-use apps provided by the ownCloud community.</p>
++<p>If you would like to add your own app, please use <em>Add your App...</em> button on the same page. This will redirect you to
++our <a class="reference external" href="http://owncloud.org/dev">Developer Center</a>.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>Parameters are set in the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt> inside the <strong>$CONFIG</strong> array.</p>
 +<div class="section" id="use-custom-app-directories">
 +<h3>Use custom app directories<a class="headerlink" href="#use-custom-app-directories" title="Permalink to this headline">¶</a></h3>
 +<p>Use the <strong>apps_paths</strong> array to set the apps folders which should be scanned
 +for available apps and/or where user specific apps should be installed.The key
 +<strong>path</strong> defines the absolute file system path to the app folder. The key
 +<strong>url</strong> defines the http web path to that folder, starting at the ownCloud
 +web root. The key <strong>writable</strong> indicates if a user can install apps in that
 +folder.</p>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">If you want to make sure that the default <strong>/apps/</strong> folder only contains apps shipped with ownCloud, you
 +should follow the example and set-up a <strong>/apps2/</strong> folder which will be used to store all apps downloaded by users</p>
 +</div>
 +<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="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="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>
 +      <span class="p">),</span>
 +  <span class="p">),</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="use-your-own-appstore">
 +<h3>Use your own appstore<a class="headerlink" href="#use-your-own-appstore" title="Permalink to this headline">¶</a></h3>
 +<p>If you want to allow the installation of apps from the apps store you have to
 +set <strong>appstoreenabled</strong> parameter, but this can only be done if at least one
 +of the configured apps directories is writable.</p>
 +<p>The <strong>appstoreurl</strong> is used to set the http path to the ownCloud apps store. The appstore server has to use <abbr title="Open Collaboration Services">OCS</abbr>.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"appstoreenabled"</span> <span class="o">=></span> <span class="k">true</span><span class="p">,</span>
 +  <span class="s2">"appstoreurl"</span> <span class="o">=></span> <span class="s2">"http://api.apps.owncloud.com/v1"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="guard-against-malicious-3rdparty-code">
 +<h3>Guard against malicious 3rdparty code<a class="headerlink" href="#guard-against-malicious-3rdparty-code" title="Permalink to this headline">¶</a></h3>
 +<p>Finally you can enable checks for malicious code fragments of 3rd-party apps
 +by setting the <strong>appcodechecker</strong> parameter.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"appcodechecker"</span> <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_automation.html
index 6f36fcb,0000000..7df175b
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_automation.html
+++ b/core/doc/admin/configuration/configuration_automation.html
@@@ -1,285 -1,0 +1,286 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
++    <link rel="prev" title="3rd-Party Configuration" href="configuration_3rdparty.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <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>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="automatic-configuration">
 +<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.
 +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
 +configuration file compared to the normal <tt class="file docutils literal"><span class="pre">config.php</span></tt>.</p>
 +<table border="1" class="docutils">
 +<colgroup>
 +<col width="52%" />
 +<col width="48%" />
 +</colgroup>
 +<thead valign="bottom">
 +<tr class="row-odd"><th class="head">autoconfig.php</th>
 +<th class="head">config.php</th>
 +</tr>
 +</thead>
 +<tbody valign="top">
 +<tr class="row-even"><td>directory</td>
 +<td>datadirectory</td>
 +</tr>
 +<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="p">);</span>
 +</pre></div>
 +</div>
 +</div>
 +<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>
 +  <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="p">);</span>
 +</pre></div>
 +</div>
 +</div>
 +<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>
 +  <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="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>
 +<span class="p">);</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_custom_clients.html
index fc92bcd,0000000..a7a0162
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_custom_clients.html
+++ b/core/doc/admin/configuration/configuration_custom_clients.html
@@@ -1,195 -1,0 +1,196 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Custom Client Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="custom-client-configuration">
 +<h1>Custom Client Configuration<a class="headerlink" href="#custom-client-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>If you want to access your ownCloud, you can choose between the standard Web-GUI
 +and different client sync applications. Download links which point to these
 +applications are shown at the top of the personal menu. The following sync
 +applications are currently available out of the box:</p>
 +<ul class="simple">
 +<li>Desktop sync clients for Windows, Max and Linux OS</li>
 +<li>Mobile sync client for Android devices</li>
 +<li>Mobile sync client for iOS devices</li>
 +</ul>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>If you want to customize the download links for the sync clients the following
 +parameters need to be modified to fulfil your requirements:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"customclient_desktop"</span> <span class="o">=></span> <span class="s2">"http://owncloud.org/sync-clients/"</span><span class="p">,</span>
 +  <span class="s2">"customclient_android"</span> <span class="o">=></span> <span class="s2">"https://play.google.com/store/apps/details?id=com.owncloud.android"</span><span class="p">,</span>
 +  <span class="s2">"customclient_ios"</span>     <span class="o">=></span> <span class="s2">"https://itunes.apple.com/us/app/owncloud/id543672169?mt=8"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>This parameters can be set in the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_database.html
index 11e60d6,0000000..9f1404a
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_database.html
+++ b/core/doc/admin/configuration/configuration_database.html
@@@ -1,485 -1,0 +1,486 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Database Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#requirements">Requirements</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#trouble-shooting">Trouble Shooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="database-configuration">
 +<h1>Database Configuration<a class="headerlink" href="#database-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud requires a database where administrative data will be held. Four different database types are currently
 +supported, <a class="reference external" href="http://www.mysql.com/">MySQL</a>, <a class="reference external" href="https://mariadb.org/">MariaDB</a>, <a class="reference external" href="http://www.sqlite.org/">SQLite</a>,
 +and <a class="reference external" href="http://www.postgresql.org/">PostgreSQL</a>. MySQL or MariaDB are the recommended database engines. By default
 +SQLite is chosen because it is a file based database with the least administrative overhead.</p>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">Because SQLite handles multiple users very badly SQLite is only recommended for single user ownCloud installations</p>
 +</div>
 +<div class="section" id="requirements">
 +<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
 +<p>If you decide to use MySQL, MariaDB, or PostgreSQL you need to install and set-up the
 +database first. These steps will not be covered by this description as they are easy to find elsewhere.</p>
 +</div>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="mysql-mariadb-database">
 +<h3>MySQL/MariaDB Database<a class="headerlink" href="#mysql-mariadb-database" title="Permalink to this headline">¶</a></h3>
 +<p>If you decide to use a MySQL or MariaDB database make sure that you have installed and
 +enabled the MySQL extension in PHP and that the <strong>mysql.default_socket</strong>
 +points to the correct socket (if the database runs on same server as ownCloud).</p>
 +<p>Please note that MariaDB is backwards compatible with MySQL, so all instructions will work for both.
 +You will not need to replace mysql with anything.</p>
 +<p>The PHP configuration in <tt class="file docutils literal"><span class="pre">/etc/php5/conf.d/mysql.ini</span></tt> could look like this:</p>
 +<div class="highlight-ini"><div class="highlight"><pre><span class="c"># configuration for PHP MySQL module</span>
 +<span class="na">extension</span><span class="o">=</span><span class="s">pdo_mysql.so</span>
 +<span class="na">extension</span><span class="o">=</span><span class="s">mysql.so</span>
 +
 +<span class="k">[mysql]</span>
 +<span class="na">mysql.allow_local_infile</span><span class="o">=</span><span class="s">On</span>
 +<span class="na">mysql.allow_persistent</span><span class="o">=</span><span class="s">On</span>
 +<span class="na">mysql.cache_size</span><span class="o">=</span><span class="s">2000</span>
 +<span class="na">mysql.max_persistent</span><span class="o">=</span><span class="s">-1</span>
 +<span class="na">mysql.max_links</span><span class="o">=</span><span class="s">-1</span>
 +<span class="na">mysql.default_port</span><span class="o">=</span>
 +<span class="na">mysql.default_socket</span><span class="o">=</span><span class="s">/var/lib/mysql/mysql.sock  # Debian squeeze: /var/run/mysqld/mysqld.sock</span>
 +<span class="na">mysql.default_host</span><span class="o">=</span>
 +<span class="na">mysql.default_user</span><span class="o">=</span>
 +<span class="na">mysql.default_password</span><span class="o">=</span>
 +<span class="na">mysql.connect_timeout</span><span class="o">=</span><span class="s">60</span>
 +<span class="na">mysql.trace_mode</span><span class="o">=</span><span class="s">Off</span>
 +</pre></div>
 +</div>
 +<p>Now you need to create a database user and the database itself by using the
 +MySQL command line interface. The database tables will be created by ownCloud
 +when you login for the first time.</p>
 +<p>To start the MySQL command line mode use:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">mysql</span> <span class="o">-</span><span class="n">uroot</span> <span class="o">-</span><span class="n">p</span>
 +</pre></div>
 +</div>
 +<p>Then a <strong>mysql></strong> or <strong>MariaDB [root]></strong> prompt will appear. Now enter the following lines and confirm them with the enter key:</p>
 +<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">USER</span> <span class="s1">'username'</span><span class="o">@</span><span class="s1">'localhost'</span> <span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">'password'</span><span class="p">;</span>
 +<span class="k">CREATE</span> <span class="k">DATABASE</span> <span class="n">IF</span> <span class="k">NOT</span> <span class="k">EXISTS</span> <span class="n">owncloud</span><span class="p">;</span>
 +<span class="k">GRANT</span> <span class="k">ALL</span> <span class="k">PRIVILEGES</span> <span class="k">ON</span> <span class="n">owncloud</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">'username'</span><span class="o">@</span><span class="s1">'localhost'</span> <span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">'password'</span><span class="p">;</span>
 +</pre></div>
 +</div>
 +<p>You can quit the prompt by entering:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">quit</span>
 +</pre></div>
 +</div>
 +<p>In the ownCloud configuration you need to set the hostname on which the
 +database is running and a valid username and password to access it.</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">"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">"dbpassword"</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>
 +</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>If you decide to use a SQLite database make sure that you have installed and
 +enabled the SQLite extension in PHP. The PHP configuration in <tt class="file docutils literal"><span class="pre">/etc/php5/conf.d/sqlite3.ini</span></tt> could look like this:</p>
 +<div class="highlight-ini"><div class="highlight"><pre><span class="c"># configuration for PHP SQLite3 module</span>
 +<span class="na">extension</span><span class="o">=</span><span class="s">pdo_sqlite.so</span>
 +<span class="na">extension</span><span class="o">=</span><span class="s">sqlite3.so</span>
 +</pre></div>
 +</div>
 +<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 configuration 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>
 +  <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">""</span><span class="p">,</span>
 +  <span class="s2">"dbpassword"</span>    <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +  <span class="s2">"dbhost"</span>        <span class="o">=></span> <span class="s2">""</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">"datadirectory"</span> <span class="o">=></span> <span class="s2">"/www/htdocs/owncloud/data"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="postgresql-database">
 +<h3>PostgreSQL Database<a class="headerlink" href="#postgresql-database" title="Permalink to this headline">¶</a></h3>
 +<p>If you decide to use a PostgreSQL database make sure that you have installed
 +and enabled the PostgreSQL extension in PHP. The PHP configuration in <tt class="file docutils literal"><span class="pre">/etc/php5/conf.d/pgsql.ini</span></tt> could look
 +like this:</p>
 +<div class="highlight-ini"><div class="highlight"><pre><span class="c"># configuration for PHP PostgreSQL module</span>
 +<span class="na">extension</span><span class="o">=</span><span class="s">pdo_pgsql.so</span>
 +<span class="na">extension</span><span class="o">=</span><span class="s">pgsql.so</span>
 +
 +<span class="k">[PostgresSQL]</span>
 +<span class="na">pgsql.allow_persistent</span> <span class="o">=</span> <span class="s">On</span>
 +<span class="na">pgsql.auto_reset_persistent</span> <span class="o">=</span> <span class="s">Off</span>
 +<span class="na">pgsql.max_persistent</span> <span class="o">=</span> <span class="s">-1</span>
 +<span class="na">pgsql.max_links</span> <span class="o">=</span> <span class="s">-1</span>
 +<span class="na">pgsql.ignore_notice</span> <span class="o">=</span> <span class="s">0</span>
 +<span class="na">pgsql.log_notice</span> <span class="o">=</span> <span class="s">0</span>
 +</pre></div>
 +</div>
 +<p>Now you need to create a database user and the database itself by using the
 +PostgreSQL command line interface. The database tables will be created by
 +ownCloud when you login for the first time.</p>
 +<p>To start the postgres command line mode use:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">psql</span> <span class="o">-</span><span class="n">hlocalhost</span> <span class="o">-</span><span class="n">Upostgres</span>
 +</pre></div>
 +</div>
 +<p>Then a <strong>postgres=#</strong> prompt will appear. Now enter the following lines and confirm them with the enter key:</p>
 +<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">USER</span> <span class="n">username</span> <span class="k">WITH</span> <span class="n">PASSWORD</span> <span class="s1">'password'</span><span class="p">;</span>
 +<span class="k">CREATE</span> <span class="k">DATABASE</span> <span class="n">owncloud</span> <span class="k">TEMPLATE</span> <span class="n">template0</span> <span class="k">ENCODING</span> <span class="s1">'UNICODE'</span><span class="p">;</span>
 +<span class="k">ALTER</span> <span class="k">DATABASE</span> <span class="n">owncloud</span> <span class="k">OWNER</span> <span class="k">TO</span> <span class="n">username</span><span class="p">;</span>
 +<span class="k">GRANT</span> <span class="k">ALL</span> <span class="k">PRIVILEGES</span> <span class="k">ON</span> <span class="k">DATABASE</span> <span class="n">owncloud</span> <span class="k">TO</span> <span class="n">username</span><span class="p">;</span>
 +</pre></div>
 +</div>
 +<p>You can quit the prompt by entering:</p>
 +<div class="highlight-python"><pre>\q</pre>
 +</div>
 +<p>In the ownCloud configuration you need to set the hostname on which the
 +database is running and a valid username (and sometimes a password) to
 +access it. If the database has been installed on the same server as
 +ownCloud a password is very often not required to access the database.</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">"pgsql"</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">"dbpassword"</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>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="oracle-database">
 +<h3>Oracle Database<a class="headerlink" href="#oracle-database" title="Permalink to this headline">¶</a></h3>
 +<p>If you are deploying to an Oracle database make sure that you have installed
 +and enabled the <a class="reference external" href="http://php.net/manual/en/book.oci8.php">Oracle extension</a> in PHP. The PHP configuration in
 +<tt class="file docutils literal"><span class="pre">/etc/php5/conf.d/oci8.ini</span></tt> could look like this:</p>
 +<div class="highlight-ini"><div class="highlight"><pre><span class="c"># configuration for PHP Oracle extension</span>
 +<span class="na">extension</span><span class="o">=</span><span class="s">oci8.so</span>
 +</pre></div>
 +</div>
 +<p>Make sure that the Oracle environment has been set up for the process trying to use the Oracle extension.
 +For a local Oracle XE installation this can be done by exporting the following environment variables
 +(eg. in <tt class="file docutils literal"><span class="pre">/etc/apache2/envvars</span></tt> for Apache)</p>
 +<div class="highlight-bash"><div class="highlight"><pre><span class="nb">export </span><span class="nv">ORACLE_HOME</span><span class="o">=</span>/u01/app/oracle/product/11.2.0/xe
 +<span class="nb">export </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$LD_LIBRARY_PATH</span>:<span class="nv">$ORACLE_HOME</span>/lib
 +</pre></div>
 +</div>
 +<p>Installing and configuring Oracle support for PHP is way out of scope for this document.
 +The official Oracle documentation called <a class="reference external" href="http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html">The Underground PHP and Oracle Manual</a>
 +should help you through the process.</p>
 +<p>Creating a database user for ownCloud can be done by using the sqlplus command line interface
 +or the Oracle Application Express web interface.
 +The database tables will be created by ownCloud when you login for the first time.</p>
 +<p>To start the Oracle command line mode with a DBA account use:</p>
 +<div class="highlight-python"><pre>sqlplus system AS SYSDBA</pre>
 +</div>
 +<p>After entering the password a <strong>SQL></strong> prompt will appear. Now enter the following lines and confirm them with the enter key:</p>
 +<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">USER</span> <span class="n">owncloud</span> <span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="n">password</span><span class="p">;</span>
 +<span class="k">ALTER</span> <span class="k">USER</span> <span class="n">owncloud</span> <span class="k">DEFAULT</span> <span class="n">TABLESPACE</span> <span class="n">users</span>
 +                    <span class="k">TEMPORARY</span> <span class="n">TABLESPACE</span> <span class="n">temp</span>
 +                    <span class="n">QUOTA</span> <span class="n">unlimited</span> <span class="k">ON</span> <span class="n">users</span><span class="p">;</span>
 +<span class="k">GRANT</span> <span class="k">create</span> <span class="k">session</span>
 +    <span class="p">,</span> <span class="k">create</span> <span class="k">table</span>
 +    <span class="p">,</span> <span class="k">create</span> <span class="k">procedure</span>
 +    <span class="p">,</span> <span class="k">create</span> <span class="n">sequence</span>
 +    <span class="p">,</span> <span class="k">create</span> <span class="k">trigger</span>
 +    <span class="p">,</span> <span class="k">create</span> <span class="k">view</span>
 +    <span class="p">,</span> <span class="k">create</span> <span class="n">synonym</span>
 +    <span class="p">,</span> <span class="k">alter</span> <span class="k">session</span>
 +   <span class="k">TO</span> <span class="n">owncloud</span><span class="p">;</span>
 +</pre></div>
 +</div>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">In Oracle creating a user is the same as creating a database in other RDBMs, so no <tt class="docutils literal"><span class="pre">CREATE</span> <span class="pre">DATABASE</span></tt> statement is necessary.</p>
 +</div>
 +<p>You can quit the prompt by entering:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="nb">exit</span>
 +</pre></div>
 +</div>
 +<p>In the ownCloud configuration you need to set the hostname on which the
 +database is running and a valid username and password to
 +access it. If the database has been installed on the same server as
 +ownCloud to config file could look like this:</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">"oci"</span><span class="p">,</span>
 +  <span class="s2">"dbname"</span>        <span class="o">=></span> <span class="s2">"XE"</span><span class="p">,</span>
 +  <span class="s2">"dbuser"</span>        <span class="o">=></span> <span class="s2">"owncloud"</span><span class="p">,</span>
 +  <span class="s2">"dbpassword"</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>
 +</pre></div>
 +</div>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">This example assumes you are running an Oracle Express Edition on <tt class="docutils literal"><span class="pre">localhost</span></tt>. The <tt class="docutils literal"><span class="pre">dbname</span></tt> is the name</p>
 +</div>
 +<p>of the Oracle instance. For Oracle Express Edition it is always <tt class="docutils literal"><span class="pre">XE</span></tt>.</p>
 +</div>
 +</div>
 +<div class="section" id="trouble-shooting">
 +<h2>Trouble Shooting<a class="headerlink" href="#trouble-shooting" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="how-can-i-find-out-if-my-mysql-postgresql-server-is-reachable">
 +<h3>How can I find out if my MySQL/PostgreSQL  server is reachable?<a class="headerlink" href="#how-can-i-find-out-if-my-mysql-postgresql-server-is-reachable" title="Permalink to this headline">¶</a></h3>
 +<p>Use the ping command to check the server availability:</p>
 +<div class="highlight-python"><pre>ping db.server.dom</pre>
 +</div>
 +<div class="highlight-python"><pre>PING db.server.dom (ip-address) 56(84) bytes of data.
 +64 bytes from your-server.local.lan (192.168.1.10): icmp_req=1 ttl=64 time=3.64 ms
 +64 bytes from your-server.local.lan (192.168.1.10): icmp_req=2 ttl=64 time=0.055 ms
 +64 bytes from your-server.local.lan (192.168.1.10): icmp_req=3 ttl=64 time=0.062 ms</pre>
 +</div>
 +</div>
 +<div class="section" id="how-can-i-find-out-if-a-created-user-can-access-a-database">
 +<h3>How can I find out if a created user can access a database?<a class="headerlink" href="#how-can-i-find-out-if-a-created-user-can-access-a-database" title="Permalink to this headline">¶</a></h3>
 +<p>The easiest way to test if a database can be accessed is by starting the
 +command line interface:</p>
 +<p><strong>SQLite</strong>:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">sqlite3</span> <span class="o">/</span><span class="n">www</span><span class="o">/</span><span class="n">htdocs</span><span class="o">/</span><span class="n">owncloud</span><span class="o">/</span><span class="n">data</span><span class="o">/</span><span class="n">owncloud</span><span class="o">.</span><span class="n">db</span>
 +</pre></div>
 +</div>
 +<div class="highlight-python"><pre>sqlite> .version
 +SQLite 3.7.15.1 2012-12-19 20:39:10 6b85b767d0ff7975146156a99ad673f2c1a23318
 +sqlite> .quit</pre>
 +</div>
 +<p><strong>MySQL</strong>:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">mysql</span> <span class="o">-</span><span class="n">uUSERNAME</span> <span class="o">-</span><span class="n">p</span>
 +</pre></div>
 +</div>
 +<div class="highlight-python"><pre>mysql> SHOW VARIABLES LIKE "version";
 ++---------------+--------+
 +| Variable_name | Value  |
 ++---------------+--------+
 +| version       | 5.1.67 |
 ++---------------+--------+
 +1 row in set (0.00 sec)
 +mysql> quit</pre>
 +</div>
 +<p><strong>PostgreSQL</strong>:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">psql</span> <span class="o">-</span><span class="n">Uusername</span> <span class="o">-</span><span class="n">downcloud</span>
 +</pre></div>
 +</div>
 +<div class="highlight-python"><pre>postgres=# SELECT version();
 +PostgreSQL 8.4.12 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.3 20080704 (prerelease), 32-bit
 +(1 row)
 +postgres=# \q</pre>
 +</div>
 +<p><strong>Oracle</strong>:</p>
 +<div class="highlight-python"><pre>sqlplus username</pre>
 +</div>
 +<div class="highlight-python"><pre>SQL> select * from v$version;
 +
 +BANNER
 +--------------------------------------------------------------------------------
 +Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
 +PL/SQL Release 11.2.0.2.0 - Production
 +CORE  11.2.0.2.0      Production
 +TNS for Linux: Version 11.2.0.2.0 - Production
 +NLSRTL Version 11.2.0.2.0 - Production
 +
 +SQL> exit</pre>
 +</div>
 +</div>
 +<div class="section" id="useful-sql-commands">
 +<h3>Useful SQL commands<a class="headerlink" href="#useful-sql-commands" title="Permalink to this headline">¶</a></h3>
 +<p><strong>Show Database Users</strong>:</p>
 +<div class="highlight-python"><pre>SQLite    : No database user is required.
 +MySQL     : SELECT User,Host FROM mysql.user;
 +PostgreSQL: SELECT * FROM pg_user;
 +Oracle    : SELECT * FROM all_users;</pre>
 +</div>
 +<p><strong>Show available Databases</strong>:</p>
 +<div class="highlight-python"><pre>SQLite    : .databases (normally one database per file!)
 +MySQL     : SHOW DATABASES;
 +PostgreSQL: \l
 +Oracle    : SELECT name FROM v$database; (requires DBA privileges)</pre>
 +</div>
 +<p><strong>Show ownCloud Tables in Database</strong>:</p>
 +<div class="highlight-python"><pre>SQLite    : .tables
 +MySQL     : USE owncloud; SHOW TABLES;
 +PostgreSQL: \c owncloud; \d
 +Oracle    : SELECT table_name FROM user_tables;</pre>
 +</div>
 +<p><strong>Quit Database</strong>:</p>
 +<div class="highlight-python"><pre>SQLite    : .quit
 +MySQL     : quit
 +PostgreSQL: \q
 +Oracle    : quit</pre>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_encryption.html
index d393c7c,0000000..4cc9f9c
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_encryption.html
+++ b/core/doc/admin/configuration/configuration_encryption.html
@@@ -1,223 -1,0 +1,224 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Use Server-Side Encryption</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#enable-file-recovery-feature">Enable File Recovery Feature</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#recover-user-files">Recover User Files</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#ldap-and-other-external-user-back-ends">LDAP and other external user back-ends</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="use-server-side-encryption">
 +<h1>Use Server-Side Encryption<a class="headerlink" href="#use-server-side-encryption" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud ships a encryption app, which allows to encrypt all files stored in
 +your ownCloud. Encryption and decryption always happens server-side. This
 +enables the user to continue to use all the other apps to view and edit his
 +data.</p>
 +<p>The app uses the user’s log-in password as encryption-password. This means that
 +by default the user will lose access to his files if he loses his log-in
 +password.</p>
 +<p>It might be a good idea to make regular backups of all encryption keys. The
 +encryption keys are stored in following folders:</p>
 +<ul class="simple">
 +<li>data/owncloud_private_key (recovery key, if enabled and public share key)</li>
 +<li>data/public-keys (public keys from all users)</li>
 +<li>data/<user>/files_encryption (users’ private keys and all other keys necessary to
 +decrypt the users’ files)</li>
 +</ul>
 +<div class="section" id="enable-file-recovery-feature">
 +<h2>Enable File Recovery Feature<a class="headerlink" href="#enable-file-recovery-feature" title="Permalink to this headline">¶</a></h2>
 +<p>The admin can offer the user some kind of protection against password
 +loss. Therefore you have to enable the recovery key in the admin settings and
 +provide a strong recovery key password. The admin settings also enables you to
 +change the recovery key password if you wish. But you should make sure to never
 +lose this password, because that’s the only way to recover users’ files.</p>
 +<p>Once the recovery key was enabled every user can choose in his personal
 +settings to enable this feature or not.</p>
 +</div>
 +<div class="section" id="recover-user-files">
 +<h2>Recover User Files<a class="headerlink" href="#recover-user-files" title="Permalink to this headline">¶</a></h2>
 +<p>If the recovery feature was enabled the admin will see a additional input field
 +at the top of the user management settings. After entering the recovery-key
 +password the admin can change the user’s log-in password which will
 +automatically recover the user’s file.</p>
 +<p>If you use a user back-end which doesn’t allow you to change the log-in
 +password directly within ownCloud, e.g. the LDAP back-end, than you can follow
 +the same procedure to recover a user’s files. The only difference is that
 +you need to change the log-in password additionally at your back-end. In this
 +case make sure to use both times the same password.</p>
 +</div>
 +<div class="section" id="ldap-and-other-external-user-back-ends">
 +<h2>LDAP and other external user back-ends<a class="headerlink" href="#ldap-and-other-external-user-back-ends" title="Permalink to this headline">¶</a></h2>
 +<p>if you configure a external user back-end you will be able to change the user’s log-in password
 +at the back-end. Since the encryption password must be the same as the user’s log-in password
 +this will result in a non-functional encryption system. If the recovery feature was enabled,
 +the administrator will be able to recover the user’s files directly over the recovery feature.
 +See the description above. Otherwise the user will be informed that his log-in password and
 +his encryption password no longer matches after his next log-in. In this case the user will be
 +able to adjust his encryption password in the personal settings by providing both, his old and
 +his new log-in password.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_knowledgebase.html
index 246dc12,0000000..0809c02
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_knowledgebase.html
+++ b/core/doc/admin/configuration/configuration_knowledgebase.html
@@@ -1,192 -1,0 +1,193 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Knowledge Base Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="knowledge-base-configuration">
 +<h1>Knowledge Base Configuration<a class="headerlink" href="#knowledge-base-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>The usage of ownCloud is more or less self explaining but nevertheless a user
 +might run into a problem where he needs to consult the documentation or knowledge base. To ease access to the ownCloud
 +documentation and knowledge base, a help menu item is shown in the settings menu by default.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>If you want to disable the ownCloud help menu item you can use the <strong>knowledgebaseenabled</strong> parameter inside the
 +<tt class="file docutils literal"><span class="pre">config/config.php</span></tt>. The <strong>knowledgebaseurl</strong> parameter is used to set the http path to the ownCloud help page.
 +The server should support <abbr title="Open Collaboration Services">OCS</abbr>.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"knowledgebaseenabled"</span> <span class="o">=></span> <span class="k">true</span><span class="p">,</span>
 +  <span class="s2">"knowledgebaseurl"</span>     <span class="o">=></span> <span class="s2">"http://api.apps.owncloud.com/v1"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">Disabling the help menu item might increase the number of support request you have to answer in the future</p>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_language.html
index 5e9eb8d,0000000..e452023
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_language.html
+++ b/core/doc/admin/configuration/configuration_language.html
@@@ -1,189 -1,0 +1,190 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Language Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="language-configuration">
 +<h1>Language Configuration<a class="headerlink" href="#language-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>In normal cases ownCloud will automatically detect the language of the Web-GUI.
 +If this doesn’t work properly or you want to make sure that ownCloud always
 +starts with a given language, you can use the <strong>default_language</strong> parameter.</p>
 +<p>Please keep in mind, that this will not effect a users language preference,
 +which has been configured under “personal -> language” once he has logged in.</p>
 +<p>Please check <tt class="file docutils literal"><span class="pre">settings/languageCodes.php</span></tt> for the list of supported language
 +codes.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"default_language"</span> <span class="o">=></span> <span class="s2">"en"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>This parameters can be set in the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_logging.html
index 76e4325,0000000..b9be4ee
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_logging.html
+++ b/core/doc/admin/configuration/configuration_logging.html
@@@ -1,225 -1,0 +1,226 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Logging Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="logging-configuration">
 +<h1>Logging Configuration<a class="headerlink" href="#logging-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>To get an idea of how the current status of an ownCloud system is or to
 +solve issues log information is a good point to start with. ownCloud allows
 +to configure the way how and which depth of information should be logged.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>First you need to decide in which way logging should be done. You can
 +choose between the two options <strong>owncloud</strong> and <strong>syslog</strong>. Then you need
 +to configure the log level which directly influences how much information
 +will be logged. You can choose between:</p>
 +<ul class="simple">
 +<li><strong>0</strong>: DEBUG</li>
 +<li><strong>1</strong>: INFO</li>
 +<li><strong>2</strong>: WARN</li>
 +<li><strong>3</strong>: ERROR</li>
 +</ul>
 +<p>The most detailed information will be written if <strong>0</strong> (DEBUG) is set, the
 +least information will be written if <strong>3</strong> (ERROR) is set. Keep in mind that
 +it might slow down the whole system if a too detailed logging will has been
 +configured. By default the log level is set to <strong>2</strong> (WARN).</p>
 +<p>This parameters can be set in the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt></p>
 +<div class="section" id="owncloud">
 +<h3>ownCloud<a class="headerlink" href="#owncloud" title="Permalink to this headline">¶</a></h3>
 +<p>All log information will be written to a separate log file which can be
 +viewed using the log menu in the admin menu of ownCloud. By default a log
 +file named <strong>owncloud.log</strong> will be created in the directory which has
 +been configured by the <strong>datadirectory</strong> parameter.</p>
 +<p>The desired date format can optionally be defined using the <strong>logdateformat</strong>.
 +By default the <a class="reference external" href="http://www.php.net/manual/en/function.date.php">PHP date function</a> parameter “<em>c</em>” is used and therefore the
 +date/time is written in the format “<em>2013-01-10T15:20:25+02:00</em>”. By using the
 +date format in the example the date/time format will be written in the format
 +“<em>January 10, 2013 15:20:25</em>”.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"log_type"</span> <span class="o">=></span> <span class="s2">"owncloud"</span><span class="p">,</span>
 +  <span class="s2">"logfile"</span> <span class="o">=></span> <span class="s2">"owncloud.log"</span><span class="p">,</span>
 +  <span class="s2">"loglevel"</span> <span class="o">=></span> <span class="s2">"3"</span><span class="p">,</span>
 +  <span class="s2">"logdateformat"</span> <span class="o">=></span> <span class="s2">"F d, Y H:i:s"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="syslog">
 +<h3>syslog<a class="headerlink" href="#syslog" title="Permalink to this headline">¶</a></h3>
 +<p>All log information will be send to the default syslog daemon of a system.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"log_type"</span> <span class="o">=></span> <span class="s2">"syslog"</span><span class="p">,</span>
 +  <span class="s2">"logfile"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +  <span class="s2">"loglevel"</span> <span class="o">=></span> <span class="s2">"3"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_mail.html
index 57fee30,0000000..63baa4d
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_mail.html
+++ b/core/doc/admin/configuration/configuration_mail.html
@@@ -1,455 -1,0 +1,456 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Mail Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#requirements">Requirements</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#send-a-test-email">Send a Test Email</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#trouble-shooting">Trouble shooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="mail-configuration">
 +<h1>Mail Configuration<a class="headerlink" href="#mail-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud does not contain a full email program but contains some parameters to
 +allow to send e.g. password reset email to the users. This function relies on
 +the <a class="reference external" href="http://sourceforge.net/projects/phpmailer/">PHPMailer library</a>. To
 +take advantage of this function it needs to be configured properly.</p>
 +<div class="section" id="requirements">
 +<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
 +<p>Different requirements need to be matched, depending on the environment which
 +you are using and the way how you want to send email. You can choose between
 +<strong>SMTP</strong>, <strong>PHP mail</strong>, <strong>Sendmail</strong> and <strong>qmail</strong>.</p>
 +</div>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>All parameters need to be set in <tt class="file docutils literal"><span class="pre">config/config.php</span></tt></p>
 +<div class="section" id="smtp">
 +<h3>SMTP<a class="headerlink" href="#smtp" title="Permalink to this headline">¶</a></h3>
 +<p>If you want to send email using a local or remote SMTP server it is necessary
 +to enter the name or ip address of the server, optionally followed by a colon
 +separated port number, e.g. <strong>:425</strong>. If this value is not given the default
 +port 25/tcp will be used unless you will change that by modifying the
 +<strong>mail_smtpport</strong> parameter. Multiple server can be entered separated by
 +semicolon:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <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="mi">25</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>or</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <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="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="mi">30</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>If the SMTP server accepts insecure connections, the default setting can be
 +used:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +<span class="s2">"mail_smtpsecure"</span>   <span class="o">=></span> <span class="s1">''</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>If the SMTP server only accepts secure connections you can choose between
 +the following two variants:</p>
 +<div class="section" id="ssl">
 +<h4>SSL<a class="headerlink" href="#ssl" title="Permalink to this headline">¶</a></h4>
 +<p>A secure connection will be initiated using the outdated SMTPS protocol
 +which uses the port 465/tcp:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"mail_smtphost"</span>     <span class="o">=></span> <span class="s2">"smtp.server.dom:465"</span><span class="p">,</span>
 +  <span class="s2">"mail_smtpsecure"</span>   <span class="o">=></span> <span class="s1">'ssl'</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="tls">
 +<h4>TLS<a class="headerlink" href="#tls" title="Permalink to this headline">¶</a></h4>
 +<p>A secure connection will be initiated using the STARTTLS protocol which
 +uses the default port 25/tcp:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</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_smtpsecure"</span>   <span class="o">=></span> <span class="s1">'tls'</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>And finally it is necessary to configure if the SMTP server requires
 +authentication, if not, the default values can be taken as it.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"mail_smtpauth"</span>     <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
 +  <span class="s2">"mail_smtpname"</span>     <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +  <span class="s2">"mail_smtppassword"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>If SMTP authentication is required you have to set the required username
 +and password and can optionally choose between the authentication types
 +<strong>LOGIN</strong> (default) or <strong>PLAIN</strong>.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"mail_smtpauth"</span>     <span class="o">=></span> <span class="k">true</span><span class="p">,</span>
 +  <span class="s2">"mail_smtpauthtype"</span> <span class="o">=></span> <span class="s2">"LOGIN"</span><span class="p">,</span>
 +  <span class="s2">"mail_smtpname"</span>     <span class="o">=></span> <span class="s2">"username"</span><span class="p">,</span>
 +  <span class="s2">"mail_smtppassword"</span> <span class="o">=></span> <span class="s2">"password"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +<div class="section" id="php-mail">
 +<h3>PHP mail<a class="headerlink" href="#php-mail" title="Permalink to this headline">¶</a></h3>
 +<p>If you want to use PHP mail it is necessary to have an installed and working
 +email system on your server. Which program in detail is used to send email is
 +defined by the configuration settings in the <strong>php.ini</strong> file. (On *nix
 +systems this will most likely be Sendmail.) ownCloud should be able to send
 +email out of the box.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <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="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>
 +  <span class="s2">"mail_smtpname"</span>     <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +  <span class="s2">"mail_smtppassword"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="sendmail">
 +<h3>Sendmail<a class="headerlink" href="#sendmail" title="Permalink to this headline">¶</a></h3>
 +<p>If you want to use the well known Sendmail program to send email, it is
 +necessary to have an installed and working email system on your *nix server.
 +The sendmail binary (<strong>/usr/sbin/sendmail</strong>) is usually part of that system.
 +ownCloud should be able to send email out of the box.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <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="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>
 +  <span class="s2">"mail_smtpname"</span>     <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +  <span class="s2">"mail_smtppassword"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="qmail">
 +<h3>qmail<a class="headerlink" href="#qmail" title="Permalink to this headline">¶</a></h3>
 +<p>If you want to use the qmail program to send email, it is necessary to have an
 +installed and working qmail email system on your server. The sendmail binary
 +(<strong>/var/qmail/bin/sendmail</strong>) will then be used to send email. ownCloud should
 +be able to send email out of the box.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <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="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>
 +  <span class="s2">"mail_smtpname"</span>     <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +  <span class="s2">"mail_smtppassword"</span> <span class="o">=></span> <span class="s2">""</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +<div class="section" id="send-a-test-email">
 +<h2>Send a Test Email<a class="headerlink" href="#send-a-test-email" title="Permalink to this headline">¶</a></h2>
 +<p>The only way to test your email configuration is, to force a login failure,
 +because a function to send a test email has not be implemented yet.</p>
 +<p>First make sure that you are using a full qualified domain and not an ip address in the ownCloud URL, like:</p>
 +<div class="highlight-python"><pre>http://my-owncloud-server.domain.dom/owncloud/</pre>
 +</div>
 +<p>The password reset function fetches the domain name from that URL to build the
 +email sender address, e.g.:</p>
 +<div class="highlight-python"><pre>john at domain.dom</pre>
 +</div>
 +<p>Next you need to enter your login and an <em>invalid</em> password. As soon as you
 +press the login button the login mask reappears and a <strong>I’ve forgotten my password</strong> link will be shown above the login
 +field. Click on that link, re-enter your login and press the <strong>Reset password</strong> button - that’s all.</p>
 +</div>
 +<div class="section" id="trouble-shooting">
 +<h2>Trouble shooting<a class="headerlink" href="#trouble-shooting" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="my-web-domain-is-different-from-my-mail-domain">
 +<h3>My web domain is different from my mail domain?<a class="headerlink" href="#my-web-domain-is-different-from-my-mail-domain" title="Permalink to this headline">¶</a></h3>
 +<p>The default domain name used for the sender address is the hostname where your ownCloud installation is served.
 +If you have a different mail domain name you can override this behavior by setting the following configuration parameter:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"mail_domain"</span> <span class="o">=></span> <span class="s2">"example.com"</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>Now every mail send by ownCloud e.g. password reset email, will have the domain part of the sender address look like:</p>
 +<div class="highlight-python"><pre>no-reply at example.com</pre>
 +</div>
 +</div>
 +<div class="section" id="how-can-i-find-out-if-a-smtp-server-is-reachable">
 +<h3>How can I find out if a SMTP server is reachable?<a class="headerlink" href="#how-can-i-find-out-if-a-smtp-server-is-reachable" title="Permalink to this headline">¶</a></h3>
 +<p>Use the ping command to check the server availability:</p>
 +<div class="highlight-python"><pre>ping smtp.server.dom</pre>
 +</div>
 +<div class="highlight-python"><pre>PING smtp.server.dom (ip-address) 56(84) bytes of data.
 +64 bytes from your-server.local.lan (192.168.1.10): icmp_req=1 ttl=64 time=3.64 ms
 +64 bytes from your-server.local.lan (192.168.1.10): icmp_req=2 ttl=64 time=0.055 ms
 +64 bytes from your-server.local.lan (192.168.1.10): icmp_req=3 ttl=64 time=0.062 ms</pre>
 +</div>
 +</div>
 +<div class="section" id="how-can-i-find-out-if-the-smtp-server-is-listening-on-a-specific-tcp-port">
 +<h3>How can I find out if the SMTP server is listening on a specific tcp port?<a class="headerlink" href="#how-can-i-find-out-if-the-smtp-server-is-listening-on-a-specific-tcp-port" title="Permalink to this headline">¶</a></h3>
 +<p>A SMTP server is usually listening on port <strong>25/tcp</strong> (smtp) and/or in
 +rare circumstances is also listening on the outdated port <strong>465/tcp</strong> (smtps).
 +You can use the telnet command to check if a port is available:</p>
 +<div class="highlight-python"><pre>telnet smtp.domain.dom 25</pre>
 +</div>
 +<div class="highlight-python"><pre>Trying 192.168.1.10...
 +Connected to smtp.domain.dom.
 +Escape character is '^]'.
 +220 smtp.domain.dom ESMTP Exim 4.80.1 Tue, 22 Jan 2013 22:28:14 +0100</pre>
 +</div>
 +</div>
 +<div class="section" id="how-can-i-find-out-if-a-smtp-server-supports-the-outdated-smtps-protocol">
 +<h3>How can I find out if a SMTP server supports the outdated SMTPS protocol?<a class="headerlink" href="#how-can-i-find-out-if-a-smtp-server-supports-the-outdated-smtps-protocol" title="Permalink to this headline">¶</a></h3>
 +<p>A good indication that a SMTP server supports the SMTPS protocol is that it
 +is listening on port <strong>465/tcp</strong>. How this can be checked has been described
 +previously.</p>
 +</div>
 +<div class="section" id="how-can-i-find-out-if-a-smtp-server-supports-the-tls-protocol">
 +<h3>How can I find out if a SMTP server supports the TLS protocol?<a class="headerlink" href="#how-can-i-find-out-if-a-smtp-server-supports-the-tls-protocol" title="Permalink to this headline">¶</a></h3>
 +<p>A SMTP server usually announces the availability of STARTTLS right after a
 +connection has been established. This can easily been checked with the telnet command. You need to enter the marked lines to get the information displayed:</p>
 +<div class="highlight-python"><pre>telnet smtp.domain.dom 25</pre>
 +</div>
 +<div class="highlight-python"><pre>Trying 192.168.1.10...
 +Connected to smtp.domain.dom.
 +Escape character is '^]'.
 +220 smtp.domain.dom ESMTP Exim 4.80.1 Tue, 22 Jan 2013 22:39:55 +0100
 +EHLO your-server.local.lan                                             # <<< enter this command
 +250-smtp.domain.dom Hello your-server.local.lan [ip-address]
 +250-SIZE 52428800
 +250-8BITMIME
 +250-PIPELINING
 +250-AUTH PLAIN LOGIN CRAM-MD5
 +250-STARTTLS                                                           # <<< STARTTLS is supported!
 +250 HELP
 +QUIT                                                                   # <<< enter this command
 +221 smtp.domain.dom closing connection
 +Connection closed by foreign host.</pre>
 +</div>
 +</div>
 +<div class="section" id="how-can-i-find-out-which-authentication-types-methods-a-smtp-server-supports">
 +<h3>How can I find out which authentication types/methods a SMTP server supports?<a class="headerlink" href="#how-can-i-find-out-which-authentication-types-methods-a-smtp-server-supports" title="Permalink to this headline">¶</a></h3>
 +<p>A SMTP server usually announces the available authentication types/methods
 +right after a connection has been established. This can easily been checked
 +with the telnet command. You need to enter the marked lines to get the
 +information displayed:</p>
 +<div class="highlight-python"><pre>telnet smtp.domain.dom 25</pre>
 +</div>
 +<div class="highlight-python"><pre>Trying 192.168.1.10...
 +Connected to smtp.domain.dom.
 +Escape character is '^]'.
 +220 smtp.domain.dom ESMTP Exim 4.80.1 Tue, 22 Jan 2013 22:39:55 +0100
 +EHLO your-server.local.lan                                             # <<< enter this command
 +250-smtp.domain.dom Hello your-server.local.lan [ip-address]
 +250-SIZE 52428800
 +250-8BITMIME
 +250-PIPELINING
 +250-AUTH PLAIN LOGIN CRAM-MD5                                          # <<< available Authentication types
 +250-STARTTLS
 +250 HELP
 +QUIT                                                                   # <<< enter this command
 +221 smtp.domain.dom closing connection
 +Connection closed by foreign host.</pre>
 +</div>
 +</div>
 +<div class="section" id="enable-debug-mode">
 +<h3>Enable Debug Mode<a class="headerlink" href="#enable-debug-mode" title="Permalink to this headline">¶</a></h3>
 +<p>If you are still not able to send email it might be useful to activate
 +further debug messages by setting the following parameter. Right after
 +you have pressed the <strong>Reset password</strong> button, as described before, a
 +lot of <strong>SMTP -> get_lines(): ...</strong> messages will be written on the
 +screen.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"mail_smtpdebug"</span> <span class="o">=></span> <span class="k">true</span><span class="p">;</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_maintenance.html
index c44ac0c,0000000..f91d416
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_maintenance.html
+++ b/core/doc/admin/configuration/configuration_maintenance.html
@@@ -1,186 -1,0 +1,187 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Configuration" href="index.html" />
 +    <link rel="next" title="Preview Configuration" href="configuration_preview.html" />
 +    <link rel="prev" title="Mail Configuration" href="configuration_mail.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Maintenance Mode Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="maintenance-mode-configuration">
 +<h1>Maintenance Mode Configuration<a class="headerlink" href="#maintenance-mode-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>If you want to prevent users to login to ownCloud before you start doing
 +some maintenance work, you need to set the value of the <strong>maintenance</strong>
 +parameter to <em>true</em>. Please keep in mind that users who are already logged-in
 +are kicked out of ownCloud instantly.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +
 +  <span class="s2">"maintenance"</span> <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>This parameters can be set in the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_preview.html
index 8730555,0000000..236ef86
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_preview.html
+++ b/core/doc/admin/configuration/configuration_preview.html
@@@ -1,282 -1,0 +1,283 @@@
 +
 +<!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>Preview Configuration — ownCloud Administrators Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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="Maintenance Mode Configuration" href="configuration_maintenance.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Preview Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#soft-dependencies">Soft dependencies:</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="preview-configuration">
 +<h1>Preview Configuration<a class="headerlink" href="#preview-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud 6 introduced the new thumbnail system. It is used to generate
 +thumbnails from various file types.
 +By default, it can generate previews for:</p>
 +<ul class="simple">
 +<li>Images</li>
 +<li>Movies</li>
 +<li>Cover from mp3 files</li>
 +<li>various office files</li>
 +<li>Pdf</li>
 +<li>Svg</li>
 +<li>Text</li>
 +</ul>
 +<div class="section" id="soft-dependencies">
 +<h2>Soft dependencies:<a class="headerlink" href="#soft-dependencies" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="imagick">
 +<h3>imagick:<a class="headerlink" href="#imagick" title="Permalink to this headline">¶</a></h3>
 +<p>ownCloud needs the imagick php extension to generate previews from office, pdf
 +and svg files. For further information on how to install the imagick php
 +extension on your system take a look at the <a class="reference external" href="http://www.php.net/manual/en/imagick.installation.php">PHP documentation</a>.
 +If imagick is not installed, ownCloud will show file type icons instead of previews.</p>
 +</div>
 +<div class="section" id="libreoffice-openoffice">
 +<h3>LibreOffice / OpenOffice:<a class="headerlink" href="#libreoffice-openoffice" title="Permalink to this headline">¶</a></h3>
 +<p>ownCloud comes with a php-only preview system for office files. But this
 +preview system has limited capabilities and is only able to create previews
 +from basic Microsoft Office files. If you need previews from advanced
 +Microsoft Office files or OpenDocument files, you have to install LibreOffice
 +or OpenOffice. To learn more about installing LibreOffice/OpenOffice consider
 +your distribution’s documentation.</p>
 +</div>
 +<div class="section" id="avconv-ffmpeg">
 +<h3>avconv / ffmpeg:<a class="headerlink" href="#avconv-ffmpeg" title="Permalink to this headline">¶</a></h3>
 +<p>ownCloud requires avconv of ffmpeg to generate previews from movies. To learn
 +more about installing avconv or ffmpeg consider your distribution’s
 +documentation.</p>
 +</div>
 +</div>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="disabling-previews">
 +<h3>Disabling previews:<a class="headerlink" href="#disabling-previews" title="Permalink to this headline">¶</a></h3>
 +<p>Under certain circumstances like a big user base or limited resources you might
 +want to consider disabling previews.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'enable_previews'</span> <span class="o">=></span> <span class="k">true</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>There is a config option called ‘enable_previews’. By default it’s set to true.
 +You can disable previews by setting this option to false:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'enable_previews'</span> <span class="o">=></span> <span class="k">false</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="maximum-preview-size">
 +<h3>Maximum preview size:<a class="headerlink" href="#maximum-preview-size" title="Permalink to this headline">¶</a></h3>
 +<p>There are two config options to set the maximum size of a preview.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'preview_max_x'</span> <span class="o">=></span> <span class="k">null</span><span class="p">,</span>
 +  <span class="s1">'preview_max_y'</span> <span class="o">=></span> <span class="k">null</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>By default, both config options are set to null. ‘Null’ is equal to no limit.
 +Numeric values represent the size in pixel. The following code limits previews
 +to a maximum size of 100px by 100px:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'preview_max_x'</span> <span class="o">=></span> <span class="mi">100</span><span class="p">,</span>
 +  <span class="s1">'preview_max_y'</span> <span class="o">=></span> <span class="mi">100</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>‘preview_max_x’ represents the x-axis and ‘preview_max_y’ represents the y-axis.</p>
 +</div>
 +<div class="section" id="maximum-scale-factor">
 +<h3>Maximum scale factor:<a class="headerlink" href="#maximum-scale-factor" title="Permalink to this headline">¶</a></h3>
 +<p>If you have a lot of small pictures and the preview system generates blurry
 +previews, you might want to consider setting a maximum scale factor. By default,
 +ownCloud scales pictures up to 10 times the original size:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'preview_max_scale_factor'</span> <span class="o">=></span> <span class="mi">10</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>If you want to disable scaling at all, you can set the config value to ‘1’:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'preview_max_scale_factor'</span> <span class="o">=></span> <span class="mi">1</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>If you want to disable the maximum scaling factor, you can set the config value to ‘null’:</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'preview_max_scale_factor'</span> <span class="o">=></span> <span class="k">null</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="id1">
 +<h3>LibreOffice / OpenOffice:<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
 +<p>You can set a custom path for the LibreOffice binary. If LibreOffice is not yet
 +available on your system, you can also use OpenOffice instead.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'preview_libreoffice_path'</span> <span class="o">=></span> <span class="s1">'/usr/bin/libreoffice'</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +<p>You can set custom LibreOffice / OpenOffice command line parameters by setting
 +the preview_office_cl_parameters option.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +  <span class="s1">'preview_office_cl_parameters'</span> <span class="o">=></span> <span class="s1">' '</span><span class="p">,</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_reverseproxy.html
index 31dd54a,0000000..92dd624
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_reverseproxy.html
+++ b/core/doc/admin/configuration/configuration_reverseproxy.html
@@@ -1,218 -1,0 +1,219 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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="Preview Configuration" href="configuration_preview.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Reverse Proxy 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="#example">Example</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="reverse-proxy-configuration">
 +<h1>Reverse Proxy Configuration<a class="headerlink" href="#reverse-proxy-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>The automatic hostname, protocol or webroot detection of ownCloud can fail in
 +certain reverse proxy situations. This configuration allows to manually override
 +the automatic detection.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>If ownCloud fails to automatically detected the hostname, protocol or webroot
 +you can use the <strong>overwrite</strong> parameters inside the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt>.
 +The <strong>overwritehost</strong> parameter is used to set the hostname of the proxy. You
 +can also specify a port. The <strong>overwriteprotocol</strong> parameter is used to set the
 +protocol of the proxy. You can choose between the two options <strong>http</strong> and
 +<strong>https</strong>. The <strong>overwritewebroot</strong> parameter is used to set the absolute web
 +path of the proxy to the ownCloud folder. When you want to keep the automatic
 +detection of one of the three parameters you can leave the value empty or don’t
 +set it. The <strong>overwritecondaddr</strong> parameter is used to overwrite the values
 +dependent on the remote address. The value must be a <strong>regular expression</strong> of
 +the IP addresses of the proxy. This is useful when you use a reverse SSL proxy
 +only for https access and you want to use the automatic detection for http
 +access.</p>
 +</div>
 +<div class="section" id="example">
 +<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="multiple-domains-reverse-ssl-proxy">
 +<h3>Multiple Domains Reverse SSL Proxy<a class="headerlink" href="#multiple-domains-reverse-ssl-proxy" title="Permalink to this headline">¶</a></h3>
 +<p>If you want to access your ownCloud installation <strong>http://domain.tld/owncloud</strong>
 +via a multiple domains reverse SSL proxy
 +<strong>https://ssl-proxy.tld/domain.tld/owncloud</strong> with the IP address <strong>10.0.0.1</strong>
 +you can set the following parameters inside the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt>.</p>
 +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span>
 +<span class="nv">$CONFIG</span> <span class="o">=</span> <span class="k">array</span> <span class="p">(</span>
 +  <span class="s2">"overwritehost"</span>     <span class="o">=></span> <span class="s2">"ssl-proxy.tld"</span><span class="p">,</span>
 +  <span class="s2">"overwriteprotocol"</span> <span class="o">=></span> <span class="s2">"https"</span><span class="p">,</span>
 +  <span class="s2">"overwritewebroot"</span>  <span class="o">=></span> <span class="s2">"/domain.tld/owncloud"</span><span class="p">,</span>
 +  <span class="s2">"overwritecondaddr"</span> <span class="o">=></span> <span class="s2">"^10\.0\.0\.1$"</span><span class="p">,</span>
 +<span class="p">);</span>
 +</pre></div>
 +</div>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">If you want to use the SSL proxy during installation you have to
 +create the <tt class="file docutils literal"><span class="pre">config/config.php</span></tt> otherwise you have to extend to existing
 +<strong>$CONFIG</strong> array.</p>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/configuration_users.html
index 0000000,0000000..ab9f53c
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/configuration/configuration_users.html
@@@ -1,0 -1,0 +1,378 @@@
++
++<!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 Management — ownCloud Administrators Manual 6.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:    '../',
++        VERSION:     '6.0',
++        COLLAPSE_INDEX: false,
++        FILE_SUFFIX: '.html',
++        HAS_SOURCE:  true
++      };
++    </script>
++    <script type="text/javascript" src="../_static/jquery.js"></script>
++    <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 6.0 documentation" href="../index.html" />
++    <link rel="up" title="Configuration" href="index.html" />
++    <link rel="next" title="User Authentication with LDAP" href="auth_ldap.html" />
++    <link rel="prev" title="Apps Configuration" href="configuration_apps.html" />
++<script type="text/javascript">
++(function () {
++  /**
++   * Patch TOC list.
++   *
++   * Will mutate the underlying span to have a correct ul for nav.
++   *
++   * @param $span: Span containing nested UL's to mutate.
++   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
++   */
++  var patchToc = function ($ul, minLevel) {
++    var findA;
++
++    // Find all a "internal" tags, traversing recursively.
++    findA = function ($elem, level) {
++      var level = level || 0,
++        $items = $elem.find("> li > a.internal, > ul, > li > ul");
++
++      // Iterate everything in order.
++      $items.each(function (index, item) {
++        var $item = $(item),
++          tag = item.tagName.toLowerCase(),
++          pad = 15 + ((level - minLevel) * 10);
++
++        if (tag === 'a' && level >= minLevel) {
++          // Add to existing padding.
++          $item.css('padding-left', pad + "px");
++          console.log(level, $item, 'padding-left', pad + "px");
++        } else if (tag === 'ul') {
++          // Recurse.
++          findA($item, level + 1);
++        }
++      });
++    };
++
++    console.log("HERE");
++    findA($ul);
++  };
++
++  $(document).ready(function () {
++    // Add styling, structure to TOC's.
++    $(".dropdown-menu").each(function () {
++      $(this).find("ul").each(function (index, item){
++        var $item = $(item);
++        $item.addClass('unstyled');
++      });
++      $(this).find("li").each(function () {
++        $(this).parent().append(this);
++      });
++    });
++
++    // Patch in level.
++    patchToc($("ul.globaltoc"), 2);
++    patchToc($("ul.localtoc"), 2);
++
++    // Enable dropdown.
++    $('.dropdown-toggle').dropdown();
++  });
++}());
++</script>
++
++  </head>
++  <body>
++  
++
++<div class="container">
++  <div class="content">
++    <div class="page-header">
++      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
++
++    </div>
++    
++			<div class="row">
++				<div class="span3">
++					<div class="sidebar">
++						<div class="well">
++							<div class="menu-support-container">
++								<ul id="menu-support" class="menu">
++									<ul>
++										<li><a href="../contents.html">Overview</a></li>
++									</ul>
++                  <ul>
++<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
++</ul>
++<ul class="current">
++<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
++<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<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="">User Management</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="#users">Users</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#user-groups">User Groups</a></li>
++</ul>
++</li>
++<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
++<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
++<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
++</ul>
++
++								</ul>
++							</div>
++						</div>
++					</div>
++				</div>
++        
++
++				<div class="span9">
++					<div class="page-content">
++						
++  <div class="section" id="user-management">
++<h1>User Management<a class="headerlink" href="#user-management" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud administrators can easily manage users via the web interface. To go into
++user management page, click your username on the web interface and select <em>Users</em>.
++A page similar to the image below will be shown:</p>
++<div class="figure">
++<img alt="../_images/oc_admin_user_manage.png" src="../_images/oc_admin_user_manage.png" />
++</div>
++<p>Users management page</p>
++<p>A fictive use case will help you understand the concept of users, user groups
++and group admins.</p>
++<p>Think of a small, 25-member staff company, named “Cloud Lovers”, that is lead
++by its founder Richard. In this company Bob acts as IT operator and recently
++set up ownCloud. Being the installing user, Bob is member of the so called
++“admin” user group of ownCloud. His colleague Tom, who provides support if Bob
++is on holiday, is member of the “admin” user group as well. All employees,
++including Bob and Tom, are members of the user group “Internal”, that is used
++to share data across the company. Mostly for operational data, that should not
++be accessible to all employees, Bob created the “Administration” user group
++having two members: Richard and his assistant Susan. Richard is group admin of
++this user group, so he can manage the members of the “Administration” user
++group on his own.</p>
++<div class="section" id="users">
++<h2>Users<a class="headerlink" href="#users" title="Permalink to this headline">¶</a></h2>
++<p>A user represents an account of the ownCloud installation. In this section the
++core properties are listed.</p>
++<dl class="docutils">
++<dt><em>Login name (Username)</em></dt>
++<dd>This is the unique ID of a ownCloud user (e.g. test, jon.doe).</dd>
++<dt><em>Full Name</em></dt>
++<dd>This is the name that is used all over the user interface to identify the
++user i.e. when sharing data or sending mails. If no display name is set, it
++defaults to the login name.</dd>
++<dt><em>Password</em></dt>
++<dd>This is the password the user uses to login to ownCloud.</dd>
++<dt><em>Groups</em></dt>
++<dd>This is a list of security groups the user is assigned to. By default the
++user is not member of any user group.</dd>
++<dt><em>Group Admin</em></dt>
++<dd>This is a list of security groups the user has administration privileges for.
++By default the user is not registered as group admin for any user group.</dd>
++<dt><em>Storage</em></dt>
++<dd>This is the maximum disk space that may be used by the user. If the user
++reaches this limit he/she is not able to upload or sync further data. The
++storage quota is specified in the format <em>Number Unit</em> (e.g. 100 B (byte),
++50 KB (kilobyte), 20 MB (megabyte), 5 GB (gigabyte)). If no unit is given,
++the number is interpreted as bytes.</dd>
++</dl>
++<p>Each user is able to change its display name and password.</p>
++<div class="section" id="create-a-user">
++<h3>Create a user<a class="headerlink" href="#create-a-user" title="Permalink to this headline">¶</a></h3>
++<p>Before users can sign in and share data, they need ownCloud user accounts.</p>
++<p>To create a user account:</p>
++<ol class="arabic">
++<li><p class="first">Enter the new user’s <strong>Login Name</strong> and its initial <strong>Password</strong> in the
++appropriate fields.</p>
++</li>
++<li><p class="first">(Optional) Select the <strong>Groups</strong> to which you want to assign the new user.</p>
++</li>
++<li><p class="first">Click <strong>Create</strong>.</p>
++</li>
++<li><p class="first">(Optional) Edit additional user settings.</p>
++<p>To set other user settings, such as setting a display name or limiting the
++user’s storage, see instructions as follows.</p>
++</li>
++</ol>
++<p>Created users will have the storage specified on <em>Default Storage</em> setting
++on the same page.</p>
++<p>Login names may contain letters (a-z, A-Z), numbers (0-9), dashes (-),
++underscores (_), periods (.) and at signs (@).</p>
++</div>
++<div class="section" id="reset-a-user-s-password">
++<h3>Reset a user’s password<a class="headerlink" href="#reset-a-user-s-password" title="Permalink to this headline">¶</a></h3>
++<p>To reset a user’s password:</p>
++<ol class="arabic simple">
++<li>Hover the line of the user.</li>
++<li>Click on the <strong>pencil icon</strong> next to the password field.</li>
++<li>Enter the user’s new password in the password field and then hit the
++<strong>Enter</strong> key of your keyboard.</li>
++</ol>
++<p>Remember to provide the user with the new login information after you have
++reset the password.</p>
++</div>
++<div class="section" id="rename-a-user">
++<h3>Rename a user<a class="headerlink" href="#rename-a-user" title="Permalink to this headline">¶</a></h3>
++<p>Each ownCloud user has two names: an unique <em>login name</em> used for
++authentication, and a <em>display name</em> (e.g. the user’s first name and last name)
++used in the user interface. You can edit the display name of a user, but you
++cannot change the login name of any user.</p>
++<p>To set a user’s display name:</p>
++<ol class="arabic simple">
++<li>Hover the line of the user.</li>
++<li>Click on the <strong>pencil icon</strong> next to the display name field.</li>
++<li>Enter the user’s new display name in the corresponding field and then hit
++the <strong>Enter</strong> key of your keyboard.</li>
++</ol>
++</div>
++<div class="section" id="grant-administrator-privileges-to-a-user">
++<h3>Grant administrator privileges to a user<a class="headerlink" href="#grant-administrator-privileges-to-a-user" title="Permalink to this headline">¶</a></h3>
++<p>If a user has administrator privileges, the user has the right to manage other
++users. Within ownCloud there are two types of administrators: <em>Super
++Administrators</em> and <em>Group Administrators</em>.</p>
++<p>Group administrators have the management rights to:</p>
++<ul class="simple">
++<li>Create new users and assign them to the group of the group administrator</li>
++<li>Edit and delete users that are assigned to the group of the group
++administrator</li>
++</ul>
++<p>Group administrators cannot access system settings or modify installation-wide
++configuration like the default storage.</p>
++<p>To assign the <em>super administrator</em> role to a user:</p>
++<ol class="arabic simple">
++<li>Use the drop-down list in <em>Groups</em> column of the user</li>
++<li>Assign the user to the “admin” user group</li>
++</ol>
++<p>To assign the <em>group administrator</em> role to a user:</p>
++<p>Find the user and select the user groups from the <strong>Group Admin</strong> drop-down
++list you want the user become group administrator for.</p>
++</div>
++<div class="section" id="assign-a-user-to-a-user-group">
++<h3>Assign a user to a user group<a class="headerlink" href="#assign-a-user-to-a-user-group" title="Permalink to this headline">¶</a></h3>
++<p>To assign a user to a user group:</p>
++<p>Find the user and select the user groups from the <strong>Groups</strong> drop-down list
++you want to assign the user to. You can use <em>add group</em> link to create a new
++group to assign the user to. You can assign the user more than one group by checking
++multiple groups.</p>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">If a file/folder is shared with a group, newly created users will immediately
++have access to the share.</p>
++</div>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">If you assign a user to the <em>admin</em> user group, the user will become a
++<em>Super Administrator</em> with unlimited privileges.</p>
++</div>
++</div>
++<div class="section" id="limit-a-user-s-storage">
++<h3>Limit a user’s storage<a class="headerlink" href="#limit-a-user-s-storage" title="Permalink to this headline">¶</a></h3>
++<p>To limit a user’s storage quota:</p>
++<p>Find the user and select an item from the <strong>Storage</strong> drop-down list.</p>
++<blockquote>
++<div><ul class="simple">
++<li>If you select <em>Default</em>, the default storage limit, specified in the
++action bar at the top, is applied.</li>
++<li>If you select <em>Unlimited</em>, the user is not limited until the total disk
++space is consumed.</li>
++<li>If you want to enter a custom limit, select <em>Other...</em>, enter the storage
++quota of your choice and hit the <strong>Enter</strong> key of your keyboard.</li>
++</ul>
++</div></blockquote>
++<p>If you edit the value of the <strong>Default Storage</strong> field in the action bar, all
++users with storage <em>Default</em> are affected by this change, i.e. changing the
++default storage from <em>Unlimited</em> to <em>1 GB</em> will cause all users with <em>Default</em>
++storage being limited to 1 GB storage each.</p>
++</div>
++<div class="section" id="delete-user">
++<h3>Delete User<a class="headerlink" href="#delete-user" title="Permalink to this headline">¶</a></h3>
++<p><strong>Important considerations before deleting a user:</strong></p>
++<ul class="simple">
++<li>The user will no longer be able to sign in to your ownCloud installation.</li>
++<li>You cannot revert the deletion or restore a deleted account.</li>
++</ul>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">If this user had a share with a group or user, the share also will
++be deleted permanently.</p>
++</div>
++<p>To delete a user account:</p>
++<ol class="arabic simple">
++<li>Hover the line of the user you want to delete.</li>
++<li>Click the <strong>cross icon</strong> at the end of the line.</li>
++</ol>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">If you accidentally delete a user, you can use undo button shown on
++notification bar at the top of the page.</p>
++</div>
++</div>
++</div>
++<div class="section" id="user-groups">
++<h2>User Groups<a class="headerlink" href="#user-groups" title="Permalink to this headline">¶</a></h2>
++<div class="section" id="create-group">
++<h3>Create Group<a class="headerlink" href="#create-group" title="Permalink to this headline">¶</a></h3>
++<p>To create a user group:</p>
++<ol class="arabic simple">
++<li>Open the <strong>Groups</strong> drop-down list in the action bar.</li>
++<li>Click <strong>add group</strong>.</li>
++<li>Enter the name of the new group and then hit the <strong>Enter</strong> key of your
++keyboard.</li>
++</ol>
++<p>You can <em>assign users</em> to the newly created user groups anytime by using users’
++group drop-down list.</p>
++</div>
++<div class="section" id="edit-delete-group">
++<h3>Edit/Delete Group<a class="headerlink" href="#edit-delete-group" title="Permalink to this headline">¶</a></h3>
++<p>Currently, groups cannot be edited (e.g. renamed) or removed. This feature
++will be available in a future version of ownCloud.</p>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">If you have direct access to the database, you can manually delete the group
++from database tables oc_groups and oc_group_user.</p>
++</div>
++</div>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/configuration/configuring_big_file_upload.html
index 3926b85,0000000..40f4faa
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuring_big_file_upload.html
+++ b/core/doc/admin/configuration/configuring_big_file_upload.html
@@@ -1,219 -1,0 +1,220 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Uploading big files > 512MB (as set by default)</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#not-outnumberable-upload-limits">Not outnumberable upload limits:</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#other-recommendable-preconditions">Other recommendable preconditions:</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="uploading-big-files-512mb-as-set-by-default">
 +<h1>Uploading big files > 512MB (as set by default)<a class="headerlink" href="#uploading-big-files-512mb-as-set-by-default" title="Permalink to this headline">¶</a></h1>
 +<p>It’s usefull to know limiting factors, that make it impossible to exceed the values given by the ownCloud-system:</p>
 +<div class="section" id="not-outnumberable-upload-limits">
 +<h2>Not outnumberable upload limits:<a class="headerlink" href="#not-outnumberable-upload-limits" title="Permalink to this headline">¶</a></h2>
 +<ul class="simple">
 +<li>< 2GB on 32Bit OS-architecture</li>
 +<li>< 2GB with Server Version 4.5 or older</li>
 +<li>< 2GB with IE6 - IE8</li>
 +<li>< 4GB with IE9 - IE10</li>
 +</ul>
 +</div>
 +<div class="section" id="other-recommendable-preconditions">
 +<h2>Other recommendable preconditions:<a class="headerlink" href="#other-recommendable-preconditions" title="Permalink to this headline">¶</a></h2>
 +<ul class="simple">
 +<li>Make sure, that the latest version of php (at least 5.4.9) is installed</li>
 +<li>Disable user quota. This means: set the user quota of the account, you are currently logged in, to “unlimited”.</li>
 +</ul>
 +<p>This is important, because you possibly could not watch otherwise, whether the desired changes take effect.</p>
 +</div>
 +</div>
 +<div class="section" id="enabling-uploading-big-files">
 +<h1>Enabling uploading big files<a class="headerlink" href="#enabling-uploading-big-files" title="Permalink to this headline">¶</a></h1>
 +<p>Note: The order of the following steps is important! If you swap steps described below, the settings may fail.</p>
 +<p><strong>Go to the admin section in the ownCloud-WebUI and do the following:</strong></p>
 +<ul class="simple">
 +<li>Under “File handling” set the Maximum upload size to the desired value (e.g. 16GB)</li>
 +<li>Click the “save”-Button</li>
 +</ul>
 +<p><strong>Open the php.ini - file</strong></p>
 +<ul class="simple">
 +<li>Under Debian or SUSE and their derivatives this file lies at /etc/php5/apache2/php.ini</li>
 +<li>On Windows, you can find this file within C:/Program Files (x86)/PHP/PHP.ini</li>
 +</ul>
 +<p><strong>Do the following:</strong></p>
 +<ul class="simple">
 +<li>Set the following three parameters inside th php.ini to the same value as chosen inside the admin-section one step before:</li>
 +<li>upload_max_filesize = 16G   (e.g., to stay consistent with the example value above)</li>
 +<li>post_max_size = 16G   (e.g., to stay consistent with the example value above)</li>
 +<li>output_buffering = 16384      (e.g., to stay consistent with the example value above)</li>
 +</ul>
 +<p>whereas the “output_buffering” has to be given in MegaBytes but as a plain figure (without size-units as ‘M’ or ‘G’)</p>
 +<p>These client configurations have been proven by testing maximum file sizes of 16 GB:</p>
 +<ul class="simple">
 +<li>Linux 32 Bit: Ubuntu, Firefox => 16GB</li>
 +<li>Windows 8  64 Bit: Google Chrome => 8GB</li>
 +</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/custom_mount_config.html
index dd66973,0000000..1b31310
mode 100644,000000..100644
--- a/core/doc/admin/configuration/custom_mount_config.html
+++ b/core/doc/admin/configuration/custom_mount_config.html
@@@ -1,494 -1,0 +1,495 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Custom Mount Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#example">Example</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#backends">Backends</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="custom-mount-configuration">
 +<h1>Custom Mount Configuration<a class="headerlink" href="#custom-mount-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>Since ownCloud 4.0 it is possible to configure the filesystem to mount external
 +storage providers into ownCloud’s virtual file system. You can configure these
 +file systems by creating and editing <tt class="file docutils literal"><span class="pre">data/mount.json</span></tt>. This file contains
 +all settings in JSON (JavaScript Object Notation) format. At the moment two
 +different types of entries exist:</p>
 +<ul class="simple">
 +<li><strong>Group mounts:</strong> each entry configures a mount for each user in group.</li>
 +<li><strong>User mounts:</strong> each entry configures a mount for a single user or for all
 +users.</li>
 +</ul>
 +<p>For each type, there is a JSON array with the user/group name as key, and an
 +array of configuration entries as value. Each entry consist of the class name
 +of the storage backend and an array of backend specific options and will be
 +replaced by the user login. The template <strong>$user</strong> can be used in the mount
 +point or backend options. As of writing the following storage backends are
 +available for use:</p>
 +<ul class="simple">
 +<li>Local file system</li>
 +<li>FTP (or FTPS)</li>
 +<li>SFTP</li>
 +<li>SMB</li>
 +<li>WebDAV</li>
 +<li><a class="reference external" href="http://aws.amazon.com/de/s3/">Amazon S3</a></li>
 +<li><a class="reference external" href="https://www.dropbox.com/">Dropbox</a></li>
 +<li><a class="reference external" href="https://drive.google.com/start">Google Drive</a></li>
 +<li><a class="reference external" href="http://openstack.org/projects/storage/">OpenStack Swift</a></li>
 +</ul>
 +<p>Please keep in mind that some formatting has been applied and carriage returns
 +have been added for better readability. In the <tt class="file docutils literal"><span class="pre">data/mount.json</span></tt> all
 +values need to be concatenated and written in a row without these modifications!</p>
 +<p>It is recommended to use the <a class="reference internal" href="custom_mount_config_gui.html"><em>Web-GUI</em></a> in the
 +administrator panel to add, remove or modify mount options to prevent any problems!</p>
 +<div class="section" id="example">
 +<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
 +<div class="highlight-json"><pre>{"group":{
 +    "admin":{
 +        "\/$user\/files\/Admin_Stuff":{
 +            "class":"\\OC\\Files\\Storage\\Local",
 +            "options":{ ... }
 +            }
 +        }
 +    }
 + "user":{
 +    "all":{
 +        "\/$user\/files\/Pictures":{
 +            "class":"\\OC\\Files\\Storage\\DAV",
 +            "options":{ ... }
 +            }
 +        }
 +    "someuser":{
 +        "\/someuser\/files\/Music":{
 +            "class":"\\OC\\Files\\Storage\\FTP",
 +            "options":{ ... }
 +            }
 +        }
 +    }
 +}</pre>
 +</div>
 +</div>
 +<div class="section" id="backends">
 +<h2>Backends<a class="headerlink" href="#backends" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="local-filesystem">
 +<h3>Local Filesystem<a class="headerlink" href="#local-filesystem" title="Permalink to this headline">¶</a></h3>
 +<p>The local filesystem backend mounts a folder on the server into the virtual
 +filesystem, the class to be used is <strong>\OC\Files\Storage\Local</strong> and
 +takes the following options:</p>
 +<ul class="simple">
 +<li><strong>datadir</strong> : the path to the local directory to be mounted</li>
 +</ul>
 +<div class="section" id="id1">
 +<h4>Example<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
 +<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>
 +<p class="last">You must ensure that the web server has sufficient permissions on the folder.</p>
 +</div>
 +</div>
 +</div>
 +<div class="section" id="ftp-or-ftps">
 +<h3>FTP (or FTPS)<a class="headerlink" href="#ftp-or-ftps" title="Permalink to this headline">¶</a></h3>
 +<p>The FTP backend mounts a folder on a remote FTP server into the virtual
 +filesystem and is part of the ‘External storage support’ app, the class
 +to be used is <strong>\OC\Files\Storage\FTP</strong> and takes the following
 +options:</p>
 +<ul class="simple">
 +<li><strong>host</strong>: the hostname of the ftp server</li>
 +<li><strong>user</strong>: the username used to login on the ftp server</li>
 +<li><strong>password</strong>: the password to login on the ftp server</li>
 +<li><strong>secure</strong>: whether to use ftps:// (FTP over TLS) to connect to the ftp
 +server instead of ftp:// (optional, defaults to false)</li>
 +<li><strong>root</strong>: the folder inside the ftp server to mount (optional, defaults
 +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"><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>
 +<p class="last">PHP needs to be build with FTP support for this backend to work.</p>
 +</div>
 +</div>
 +</div>
 +<div class="section" id="sftp">
 +<h3>SFTP<a class="headerlink" href="#sftp" title="Permalink to this headline">¶</a></h3>
 +<p>The SFTP backend mounts a folder on a remote SSH server into the virtual
 +filesystem and is part of the ‘External storage support’ app. The class
 +to be used is <strong>\OC\Files\Storage\SFTP</strong> and takes the following
 +options:</p>
 +<ul class="simple">
 +<li><strong>host</strong>: the hostname of the SSH server</li>
 +<li><strong>user</strong>: the username used to login to the SSH server</li>
 +<li><strong>password</strong>: the password to login on the SSH server</li>
 +<li><strong>root</strong>: the folder inside the SSH server to mount (optional, defaults
 +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"><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>
 +<p class="last">PHP needs to be build with SFTP support for this backend to work.</p>
 +</div>
 +</div>
 +</div>
 +<div class="section" id="smb">
 +<h3>SMB<a class="headerlink" href="#smb" title="Permalink to this headline">¶</a></h3>
 +<p>The SMB backend mounts a folder on a remote Samba server, a NAS appliance or
 +a Windows machine into the virtual file system. It is part of the ‘External
 +storage support’ app, the class to be used is <strong>\OC\Files\Storage\SMB</strong> and
 +takes the following options:</p>
 +<ul class="simple">
 +<li><strong>host</strong>: the host name of the samba server</li>
 +<li><strong>user</strong>: the user name used to login on the samba server</li>
 +<li><strong>password</strong>: the password to login on the samba server</li>
 +<li><strong>share</strong>: the share on the samba server to mount</li>
 +<li><strong>root</strong>: the folder inside the samba share to mount (optional, defaults
 +to ‘/’)</li>
 +</ul>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">The SMB backend requires <strong>smbclient</strong> to be installed on the server.</p>
 +</div>
 +<div class="section" id="id4">
 +<h4>Example<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h4>
 +<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>
 +<div class="section" id="webdav">
 +<h3>WebDAV<a class="headerlink" href="#webdav" title="Permalink to this headline">¶</a></h3>
 +<p>The WebDAV backend mounts a folder on a remote WebDAV server into the
 +virtual filesystem and is part of the ‘External storage support’ app,
 +the class to be used is <strong>\OC\Files\Storage\DAV</strong> and takes the
 +following options:</p>
 +<ul class="simple">
 +<li><strong>host</strong>: the hostname of the webdav server.</li>
 +<li><strong>user</strong>: the username used to login on the webdav server</li>
 +<li><strong>password</strong>: the password to login on the webdav server</li>
 +<li><strong>secure</strong>: whether to use <a class="reference external" href="https://">https://</a> to connect to the webdav server
 +instead of <a class="reference external" href="http://">http://</a> (optional, defaults to false)</li>
 +<li><strong>root</strong>: the folder inside the webdav server to mount (optional,
 +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"><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>
 +<div class="section" id="amazon-s3">
 +<h3>Amazon S3<a class="headerlink" href="#amazon-s3" title="Permalink to this headline">¶</a></h3>
 +<p>The Amazon S3 backend mounts a bucket in the Amazon cloud into the virtual
 +filesystem and is part of the ‘External storage support’ app, the class to
 +be used is <strong>\OC\Files\Storage\AmazonS3</strong> and takes the following
 +options:</p>
 +<ul class="simple">
 +<li><strong>key</strong>: the key to login to the Amazon cloud</li>
 +<li><strong>secret</strong>: the secret to login to the Amazon cloud</li>
 +<li><strong>bucket</strong>: the bucket in the Amazon cloud to mount</li>
 +</ul>
 +<div class="section" id="id6">
 +<h4>Example<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h4>
 +<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>
 +<div class="section" id="dropbox">
 +<h3>Dropbox<a class="headerlink" href="#dropbox" title="Permalink to this headline">¶</a></h3>
 +<p>The Dropbox backend mounts a dropbox in the Dropbox cloud into the virtual
 +filesystem and is part of the ‘External storage support’ app, the class to
 +be used is <strong>\OC\Files\Storage\Dropbox</strong> and takes the following options:</p>
 +<ul class="simple">
 +<li><strong>configured</strong>: whether the drive has been configured or not (true or false)</li>
 +<li><strong>app_key</strong>: the app key to login to your Dropbox</li>
 +<li><strong>app_secret</strong>: the app secret to login to your Dropbox</li>
 +<li><strong>token</strong>: the OAuth token to login to your Dropbox</li>
 +<li><strong>token_secret</strong>: the OAuth secret to login to your Dropbox</li>
 +</ul>
 +<div class="section" id="id7">
 +<h4>Example<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h4>
 +<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>
 +<div class="section" id="google-drive">
 +<h3>Google Drive<a class="headerlink" href="#google-drive" title="Permalink to this headline">¶</a></h3>
 +<p>The Google Drive backend mounts a share in the Google cloud into the virtual
 +filesystem and is part of the ‘External storage support’ app, the class to
 +be used is <strong>\OC\Files\Storage\Google</strong> and is done via an OAuth2.0 request.
 +That means that the App must be registered through the Google APIs Console.
 +The result of the registration process is a set of values (incl. client_id, client_secret).
 +It takes the following options:</p>
 +<ul class="simple">
 +<li><strong>configured</strong>: whether the drive has been configured or not (true or false)</li>
 +<li><strong>client_id</strong>: the client id to login to the Google drive</li>
 +<li><strong>client_secret</strong>: the client secret to login to the Google drive</li>
 +<li><strong>token</strong>: a compound value including access and refresh tokens</li>
 +</ul>
 +<div class="section" id="id8">
 +<h4>Example<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h4>
 +<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>
 +<div class="section" id="openstack-swift">
 +<h3>OpenStack Swift<a class="headerlink" href="#openstack-swift" title="Permalink to this headline">¶</a></h3>
 +<p>The Swift backend mounts a container on an OpenStack Object Storage server
 +into the virtual filesystem and is part of the ‘External storage support’
 +app, the class to be used is <strong>\OC\Files\Storage\SWIFT</strong> and takes
 +the following options:</p>
 +<ul class="simple">
 +<li><strong>host</strong>: the hostname of the authentication server for the swift
 +storage.</li>
 +<li><strong>user</strong>: the username used to login on the swift server</li>
 +<li><strong>token</strong>: the authentication token to login on the swift server</li>
 +<li><strong>secure</strong>: whether to use ftps:// to connect to the swift server instead
 +of ftp:// (optional, defaults to false)</li>
 +<li><strong>root</strong>: the container inside the swift server to mount (optional,
 +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"><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>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/custom_mount_config_gui.html
index 4fb9687,0000000..6d8df69
mode 100644,000000..100644
--- a/core/doc/admin/configuration/custom_mount_config_gui.html
+++ b/core/doc/admin/configuration/custom_mount_config_gui.html
@@@ -1,234 -1,0 +1,235 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Custom Mount Configuration Web-GUI</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#id1">Dropbox</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#id2">Google Drive</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="custom-mount-configuration-web-gui">
 +<h1>Custom Mount Configuration Web-GUI<a class="headerlink" href="#custom-mount-configuration-web-gui" title="Permalink to this headline">¶</a></h1>
 +<p>Since ownCloud 5.0 it is possible to mount external storage providers into
 +ownCloud’s virtual file system. To add an external storage backend to your
 +ownCloud head to <em>Settings</em> -> <em>Admin</em> or <em>Personal</em>. As administrator you
 +can mount external storage for any group or user. Users are also allowed
 +to mount external storage for themselves if this setting has been enabled
 +by the administrator.</p>
 +<div class="figure">
 +<img alt="../_images/custom_mount_config_gui-1.png" src="../_images/custom_mount_config_gui-1.png" />
 +</div>
 +<p>At first the mount point has to be entered, this is the directory in ownCloud’s
 +virtual file system, that the storage will be mounted to. Then the storage
 +backend has to be selected from the list of supported backends. As of writing
 +ownCloud currently supports the following storage backends:</p>
 +<div class="figure">
 +<img alt="../_images/custom_mount_config_gui-2.png" src="../_images/custom_mount_config_gui-2.png" />
 +</div>
 +<ul class="simple">
 +<li>Local file system (mount local storage that is outside ownCloud’s data
 +directory)</li>
 +<li>FTP (or FTPS)</li>
 +<li>SFTP</li>
 +<li>SMB</li>
 +<li>WebDAV</li>
 +<li><a class="reference external" href="http://aws.amazon.com/de/s3/">Amazon S3</a></li>
 +<li><a class="reference external" href="https://www.dropbox.com/">Dropbox</a></li>
 +<li><a class="reference external" href="https://drive.google.com/start">Google Drive</a></li>
 +<li><a class="reference external" href="http://openstack.org/projects/storage/">OpenStack Swift</a></li>
 +</ul>
 +<p>Please keep in mind, that users are not allowed to mount local file storage for
 +security purposes.</p>
 +<div class="figure">
 +<img alt="../_images/custom_mount_config_gui-3.png" src="../_images/custom_mount_config_gui-3.png" />
 +</div>
 +<div class="figure">
 +<img alt="../_images/custom_mount_config_gui-4.png" src="../_images/custom_mount_config_gui-4.png" />
 +</div>
 +<p>Once a backend has been selected, more configuration fields will appear. The
 +displayed configuration fields may vary depending on the selected storage backend.
 +For example, the FTP storage backend needs the following configuration details
 +to be entered:</p>
 +<ul class="simple">
 +<li><strong>host</strong>: the hostname of the ftp server</li>
 +<li><strong>user</strong>: the username used to login to the ftp server</li>
 +<li><strong>password</strong>: the password to login to the ftp server</li>
 +<li><strong>secure</strong>: whether to use ftps:// (FTP over TLS) to connect to the ftp
 +server instead of ftp:// (optional, defaults to false)</li>
 +<li><strong>root</strong>: the name of the folder inside the ftp server to mount (optional,
 +defaults to ‘/’)</li>
 +</ul>
 +<div class="section" id="id1">
 +<h2>Dropbox<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
 +<p>Mounting a Dropbox account requires that you create an app with Dropbox and then provide the app key and secret to the
 +external storage configuration user interface. Go to My apps at Dropbox and create an app. Select <em>Full Dropbox</em> access
 +level. Copy the app key and app secret and paste them into the corresponding fields for the Dropbox storage.</p>
 +<p>Click the <em>Grant access</em> button and you will be redirected to a Dropbox website to give ownCloud permission to access your account.</p>
 +</div>
 +<div class="section" id="id2">
 +<h2>Google Drive<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
 +<p>For a detailed step-by-step guide read <a class="reference external" href="../../user_manual/external_storage/google_drive.html">User Manual</a></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/custom_user_backend.html
index f40f3b6,0000000..360b0c8
mode 100644,000000..100644
--- a/core/doc/admin/configuration/custom_user_backend.html
+++ b/core/doc/admin/configuration/custom_user_backend.html
@@@ -1,253 -1,0 +1,254 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Custom User Backend Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#imap">IMAP</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#smb">SMB</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="custom-user-backend-configuration">
 +<h1>Custom User Backend Configuration<a class="headerlink" href="#custom-user-backend-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>Starting with ownCloud 4.5 is possible to configure additional user backends
 +in ownCloud’s configuration <tt class="file docutils literal"><span class="pre">config/config.php</span></tt> using the following
 +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="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="mi">0</span> <span class="o">=></span> <span class="o">...</span>
 +                              <span class="p">),</span>
 +    <span class="p">),</span>
 +<span class="p">),</span>
 +</pre></div>
 +</div>
 +<p>Currently the “External user support” (user_external) app provides the following user backends:</p>
 +<div class="section" id="imap">
 +<h2>IMAP<a class="headerlink" href="#imap" title="Permalink to this headline">¶</a></h2>
 +<p>Provides authentication against IMAP servers</p>
 +<ul class="simple">
 +<li><strong>Class:</strong> OC_User_IMAP</li>
 +<li><strong>Arguments:</strong>  a mailbox string as defined <a class="reference external" href="http://www.php.net/manual/en/function.imap-open.php">in the PHP documention</a></li>
 +<li><strong>Example:</strong></li>
 +</ul>
 +<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="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="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>
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="smb">
 +<h2>SMB<a class="headerlink" href="#smb" title="Permalink to this headline">¶</a></h2>
 +<p>Provides authentication against Samba servers</p>
 +<ul class="simple">
 +<li><strong>Class:</strong> OC_User_SMB</li>
 +<li><strong>Arguments:</strong> the samba server to authenticate against</li>
 +<li><strong>Example:</strong></li>
 +</ul>
 +<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="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="mi">0</span> <span class="o">=></span> <span class="s1">'localhost'</span>
 +                              <span class="p">),</span>
 +    <span class="p">),</span>
 +<span class="p">),</span>
 +</pre></div>
 +</div>
 +<div class="section" id="ftp">
 +<h3>FTP<a class="headerlink" href="#ftp" title="Permalink to this headline">¶</a></h3>
 +<p>Provides authentication against FTP servers</p>
 +<ul class="simple">
 +<li><strong>Class:</strong> OC_User_FTP</li>
 +<li><strong>Arguments:</strong> the FTP server to authenticate against</li>
 +<li><strong>Example:</strong></li>
 +</ul>
 +<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="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="mi">0</span> <span class="o">=></span> <span class="s1">'localhost'</span>
 +                              <span class="p">),</span>
 +    <span class="p">),</span>
 +<span class="p">),</span>
 +</pre></div>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/index.html
index 08be5fd,0000000..a4294ae
mode 100644,000000..100644
--- a/core/doc/admin/configuration/index.html
+++ b/core/doc/admin/configuration/index.html
@@@ -1,194 -1,0 +1,196 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
-     <link rel="next" title="User Authentication with LDAP" href="auth_ldap.html" />
++    <link rel="next" title="Apps Configuration" href="configuration_apps.html" />
 +    <link rel="prev" title="PageKite Configuration" href="../installation/installation_others.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="current reference internal" href="">Configuration</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="configuration">
 +<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +<ul>
++<li class="toctree-l1"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l1"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/xsendfile.html
index aff2572,0000000..78df82c
mode 100644,000000..100644
--- a/core/doc/admin/configuration/xsendfile.html
+++ b/core/doc/admin/configuration/xsendfile.html
@@@ -1,289 -1,0 +1,290 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
++<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="background_jobs.html">Background Jobs</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Serving static files via web server</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#apache2-x-sendfile">Apache2 (X-Sendfile)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#lighttpd-x-sendfile2">LigHTTPd (X-Sendfile2)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#nginx-x-accel-redirect">Nginx (X-Accel-Redirect)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#how-to-check-if-it-s-working">How to check if it’s working?</a></li>
 +</ul>
 +</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="serving-static-files-via-web-server">
 +<h1>Serving static files via web server<a class="headerlink" href="#serving-static-files-via-web-server" title="Permalink to this headline">¶</a></h1>
 +<p>Since ownCloud 5 it is possible to let web servers handle static file serving.
 +This should generally improve performance (web servers are optimized for this) and in some cases permits controlled
 +file serving (i.e. pause and resume downloads).</p>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">This feature can currently only be activated for local files, i.e. files inside the <strong>data/</strong> directory</p>
 +</div>
 +<p>and local mounts. Controlled file serving <strong>does not work for generated zip files</strong>. This is due to how temporary files are created.</p>
 +<div class="section" id="apache2-x-sendfile">
 +<h2>Apache2 (X-Sendfile)<a class="headerlink" href="#apache2-x-sendfile" title="Permalink to this headline">¶</a></h2>
 +<p>It is possible to let Apache handle static file serving via <a class="reference external" href="https://tn123.org/mod_xsendfile/">mod_xsendfile</a>.</p>
 +<div class="section" id="installation">
 +<h3>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h3>
 +<p>On Debian and Ubuntu systems use:</p>
 +<div class="highlight-bash"><div class="highlight"><pre>apt-get install libapache2-mod-xsendfile
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="configuration">
 +<h3>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h3>
 +<p>Configuration of mod_xsendfile for ownCloud depends on its version.
 +For versions below 0.10 (Debian squeeze ships with 0.9)</p>
 +<div class="highlight-xml"><pre><Directory /var/www/owncloud>
 +    ...
 +    SetEnv MOD_X_SENDFILE_ENABLED 1
 +    XSendFile On
 +    XSendFileAllowAbove On
 +</Directory></pre>
 +</div>
 +<p>For versions >=0.10 (e.g. Ubuntu 12.10)</p>
 +<div class="highlight-xml"><pre><Directory /var/www/owncloud>
 +    ...
 +    SetEnv MOD_X_SENDFILE_ENABLED 1
 +    XSendFile On
 +    XSendFilePath /tmp/oc-noclean
 +    XSendFilePath /home/valerio
 +</Directory></pre>
 +</div>
 +<ul class="simple">
 +<li><strong>SetEnv MOD_X_SENDFILE_ENABLED</strong>: tells ownCloud scripts that they should add the X-Sendfile header when serving files</li>
 +<li><strong>XSendFile</strong>: enables web server handling of X-Sendfile headers (and therefore file serving) for the specified Directory</li>
 +<li><strong>XSendFileAllowAbove (<0.10)</strong>: enables file serving through web server on path outside the specified Directory. This is needed for PHP temporary directory where zip files are created and for configured local mounts which may reside outside data directory</li>
 +<li><strong>XSendFilePath (>=0.10)</strong>: a white list of paths that the web server is allowed to serve outside of the specified Directory. At least PHP temporary directory concatenated with <em>oc-noclean</em> must be configured. Temporary zip files will be created inside this directory when using mod_xsendfile. Other paths which correspond to local mounts should be configured here as well. For a more in-dept documentation of this directive refer to mod_xsendfile website linked a [...]
 +</ul>
 +</div>
 +</div>
 +<div class="section" id="lighttpd-x-sendfile2">
 +<h2>LigHTTPd (X-Sendfile2)<a class="headerlink" href="#lighttpd-x-sendfile2" title="Permalink to this headline">¶</a></h2>
 +<p>LigHTTPd uses similar headers to Apache2, apart from the fact that it does not handle partial downloads in the same way
 +Apache2 does. For this reason, a different method is used for LigHTTPd.</p>
 +<div class="section" id="id1">
 +<h3>Installation<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
 +<p>X-Sendfile and X-Sendfile2 are supported by default in LigHTTPd and no additional operation should be needed to install it.</p>
 +</div>
 +<div class="section" id="id2">
 +<h3>Configuration<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
 +<p>Your server configuration should include the following statements:</p>
 +<div class="highlight-python"><pre>fastcgi.server          = ( ".php" => ((
 +   ...
 +   "allow-x-send-file" => "enable",
 +   "bin-environment" => (
 +      "MOD_X_SENDFILE2_ENABLED" => "1",
 +   ),
 +)))</pre>
 +</div>
 +<ul class="simple">
 +<li><strong>allow-x-send-file</strong>: enables LigHTTPd to use X-Sendfile and X-Sendfile2 headers to serve files</li>
 +<li><strong>bin-environment</strong>: is used to parse MOD_X_SENDFILE2_ENABLED to the ownCloud backend, to make it use the X-Sendfile and X-Sendfile2 headers in it’s response</li>
 +</ul>
 +</div>
 +</div>
 +<div class="section" id="nginx-x-accel-redirect">
 +<h2>Nginx (X-Accel-Redirect)<a class="headerlink" href="#nginx-x-accel-redirect" title="Permalink to this headline">¶</a></h2>
 +<p>Nginx supports handling of static files differently from Apache. Documentation can be found in the Nginx Wiki
 +section <a class="reference external" href="http://wiki.nginx.org/XSendfile">Mod X-Sendfile</a> and section <a class="reference external" href="http://wiki.nginx.org/X-accel">X-Accell</a>.
 +The header used by Nginx is X-Accel-Redirect.</p>
 +<div class="section" id="id3">
 +<h3>Installation<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
 +<p>X-Accel-Redirect is supported by default in Nginx and no additional operation should be needed to install it.</p>
 +</div>
 +<div class="section" id="id4">
 +<h3>Configuration<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
 +<p>Configuration is similar to Apache:</p>
 +<div class="highlight-python"><pre>location ~ \.php$ {
 +    ...
 +    fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
 +}
 +
 +location ~ ^/home/valerio/(owncloud/)?data {
 +    internal;
 +    root /;
 +}
 +
 +location ~ ^/tmp/oc-noclean/.+$ {
 +    internal;
 +    root /;
 +}</pre>
 +</div>
 +<ul class="simple">
 +<li><strong>fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED:</strong> tells ownCloud scripts that they should add the X-Accel-Redirect header when serving files</li>
 +<li><strong>internal location:</strong> each directory that contains local user data should correspond to an internal location. In the example uses the following directories:<ul>
 +<li><strong>/home/valerio/owncloud/data</strong>: ownCloud data directory</li>
 +<li><strong>/home/valerio/data</strong>: a local mount</li>
 +<li><strong>/tmp/oc-noclean</strong>: PHP temporary directory concatenated with <em>oc-noclean</em>. Temporary zip files will be created inside this directory when using X-Accel-Redirect</li>
 +</ul>
 +</li>
 +</ul>
 +</div>
 +</div>
 +<div class="section" id="how-to-check-if-it-s-working">
 +<h2>How to check if it’s working?<a class="headerlink" href="#how-to-check-if-it-s-working" title="Permalink to this headline">¶</a></h2>
 +<p>You are still able to download stuff via the web interface and single, local file downloads can be paused and resumed.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/contents.html
index 84b6e30,0000000..d85659f
mode 100644,000000..100644
--- a/core/doc/admin/contents.html
+++ b/core/doc/admin/contents.html
@@@ -1,330 -1,0 +1,335 @@@
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.0 documentation" href="index.html" />
 +    <link rel="next" title="Admin Documentation" href="index.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="#">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="#">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">Admin Documentation</a></li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="owncloud-documentation-contents">
 +<span id="contents"></span><h1>ownCloud documentation contents<a class="headerlink" href="#owncloud-documentation-contents" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +</div>
 +<div class="toctree-wrapper compound">
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="installation/index.html">Installation</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_appliance.html">Appliances</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_appliance.html#software-appliances">Software Appliances</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_appliance.html#owncloud-on-hardware-appliances">ownCloud on Hardware Appliances</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_linux.html">Linux Distributions</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#supported-distribution-packages">Supported Distribution Packages</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_macos.html">Mac OS X</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_windows.html">Windows 7 and Windows Server 2008</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#activate-iis-with-cgi-support">Activate IIS with CGI Support</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#installing-php">Installing PHP</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#installing-mysql">Installing MySQL</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#installing-owncloud">Installing ownCloud</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#ensure-proper-http-verb-handling">Ensure Proper HTTP-Verb handling</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#configuring-owncloud-php-and-iis-for-large-file-uploads">Configuring ownCloud, PHP and IIS for Large File Uploads</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_ucs.html">Univention Corporate Server</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#pre-configuration">Pre configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#installation">Installation</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#postconfiguration-optional">Postconfiguration (optional)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#using-owncloud">Using ownCloud</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_source.html">Manual Installation</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#prerequisites">Prerequisites</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#extract-owncloud-and-copy-to-your-web-server">Extract ownCloud and Copy to Your Web Server</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#set-the-directory-permissions">Set the Directory Permissions</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#web-server-configuration">Web Server Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#follow-the-install-wizard">Follow the Install Wizard</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_others.html">PageKite Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_others.html#open-wrt">Open Wrt</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration/index.html">Configuration</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_apps.html">Apps Configuration</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_apps.html#parameters">Parameters</a></li>
++</ul>
++</li>
++<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_users.html">User Management</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_users.html#users">Users</a></li>
++<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_users.html#user-groups">User Groups</a></li>
++</ul>
++</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/auth_ldap.html">User Authentication with LDAP</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#configuration">Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#advanced-settings">Advanced Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#expert-settings">Expert Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#testing-the-configuration">Testing the configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#owncloud-avatar-integration">ownCloud Avatar integration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#troubleshooting-tips-and-tricks">Troubleshooting, Tips and Tricks</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#ssl-certificate-verification-ldaps-tls">SSL Certificate Verification (LDAPS, TLS)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#microsoft-active-directory">Microsoft Active Directory</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#duplicating-server-configurations">Duplicating Server Configurations</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#owncloud-ldap-internals">ownCloud LDAP Internals</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#user-and-group-mapping">User and Group Mapping</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#caching">Caching</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#handling-with-backup-server">Handling with Backup Server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/background_jobs.html">Background Jobs</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/background_jobs.html#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/background_jobs.html#cron-jobs">Cron-Jobs</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_3rdparty.html">3rd-Party Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_3rdparty.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
- <li class="toctree-l2"><a class="reference internal" href="configuration/configuration_apps.html">Apps Configuration</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="configuration/configuration_apps.html#parameters">Parameters</a></li>
- </ul>
- </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>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_custom_clients.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_database.html">Database Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_database.html#requirements">Requirements</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_database.html#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_database.html#trouble-shooting">Trouble Shooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_encryption.html">Use Server-Side Encryption</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_encryption.html#enable-file-recovery-feature">Enable File Recovery Feature</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_encryption.html#recover-user-files">Recover User Files</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_encryption.html#ldap-and-other-external-user-back-ends">LDAP and other external user back-ends</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_knowledgebase.html">Knowledge Base Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_knowledgebase.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_language.html">Language Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_language.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_logging.html">Logging Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_logging.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_mail.html">Mail Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_mail.html#requirements">Requirements</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_mail.html#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_mail.html#send-a-test-email">Send a Test Email</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_mail.html#trouble-shooting">Trouble shooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_maintenance.html">Maintenance Mode Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_maintenance.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_preview.html">Preview Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_preview.html#soft-dependencies">Soft dependencies:</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_preview.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_reverseproxy.html">Reverse Proxy Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_reverseproxy.html#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_reverseproxy.html#example">Example</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuring_big_file_upload.html#not-outnumberable-upload-limits">Not outnumberable upload limits:</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuring_big_file_upload.html#other-recommendable-preconditions">Other recommendable preconditions:</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/custom_mount_config_gui.html#id1">Dropbox</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/custom_mount_config_gui.html#id2">Google Drive</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/custom_mount_config.html">Custom Mount Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/custom_mount_config.html#example">Example</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/custom_mount_config.html#backends">Backends</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/custom_user_backend.html">Custom User Backend Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/custom_user_backend.html#imap">IMAP</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/custom_user_backend.html#smb">SMB</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/xsendfile.html">Serving static files via web server</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/xsendfile.html#apache2-x-sendfile">Apache2 (X-Sendfile)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/xsendfile.html#lighttpd-x-sendfile2">LigHTTPd (X-Sendfile2)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/xsendfile.html#nginx-x-accel-redirect">Nginx (X-Accel-Redirect)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/xsendfile.html#how-to-check-if-it-s-working">How to check if it’s working?</a></li>
 +</ul>
 +</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="maintenance/index.html">Maintenance</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="maintenance/backup.html">Backing Up ownCloud</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="maintenance/backup.html">Backing up ownCloud</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="maintenance/backup.html#backup-folders">Backup Folders</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="maintenance/backup.html#backup-database">Backup Database</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="maintenance/update.html">Updating ownCloud</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="maintenance/update.html#update">Update</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="maintenance/update.html#upgrade">Upgrade</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="maintenance/restore.html">Restoring ownCloud</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="maintenance/restore.html#restore-folders">Restore Folders</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="maintenance/restore.html#restore-database">Restore Database</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="maintenance/migrating.html">Migrating ownCloud Installations</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="issues/index.html">Issues</a></li>
 +</ul>
 +</div>
 +<div class="section" id="indices-and-tables">
 +<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
 +<ul class="simple">
 +<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/index.html
index 2eee209,7785f2c..4d44f72
--- a/core/doc/admin/index.html
+++ b/core/doc/admin/index.html
@@@ -1,225 -1,2 +1,226 @@@
 -Here goes the admin documentation.
 -In the meantime go to <a href="http://owncloud.org/support/" target="_blank">ownCloud.org/support</a>
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.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">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul class="current">
 +<li class="toctree-l1 current"><a class="current reference internal" href="">Admin Documentation</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="#introduction">Introduction</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#target-audience">Target audience</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#structure-of-this-document">Structure of this document</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="#installation">Installation</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#configuration">Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#maintenance">Maintenance</a></li>
 +</ul>
 +</li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="admin-documentation">
 +<h1>Admin Documentation<a class="headerlink" href="#admin-documentation" title="Permalink to this headline">¶</a></h1>
 +<div class="section" id="introduction">
 +<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
 +<p>This is the administrators manual for ownCloud, a flexible, open source file
 +sync and share solution. It comprises of the ownCloud server, as well as client
 +applications for Microsoft Windows, Mac OS X and Linux (Desktop Client) and
 +mobile clients for the Android and Apple iOS operating system.</p>
 +<div class="section" id="target-audience">
 +<h3>Target audience<a class="headerlink" href="#target-audience" title="Permalink to this headline">¶</a></h3>
 +<p>This guide is targeted towards people who want to install, administer and
 +optimize ownCloud Server. If you want to learn how to use the Web UI, or how to
 +install clients on the server, please refer to the <a class="reference external" href="http://doc.owncloud.com/">User Manual</a> or the <a class="reference external" href="http://doc.owncloud.com/">Desktop
 +Client Manual</a> respectively.</p>
 +</div>
 +<div class="section" id="structure-of-this-document">
 +<h3>Structure of this document<a class="headerlink" href="#structure-of-this-document" title="Permalink to this headline">¶</a></h3>
 +<p>The next chapters describes how to set up ownCloud Server on different platforms
 +and operating systems, as well as how to update existing installations.</p>
 +<p>Further chapters will then detail on integrating ownCloud into your existing
 +environment, e.g. how to setup LDAP or how to mount your storage.</p>
 +</div>
 +</div>
 +<div class="section" id="installation">
 +<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
 +<p>This chapter will introduce you to the installation of ownCloud in different scenarios.</p>
 +<p>If you want to just try ownCloud in a virtual machine without any configuration, check the section
 +<a class="reference internal" href="installation/installation_appliance.html"><em>Appliances</em></a>, where you will find ready-to-use images.</p>
 +<ul class="simple">
 +<li><a class="reference internal" href="installation/installation_linux.html"><em>Linux Distributions</em></a> (recommended)</li>
 +<li><a class="reference internal" href="installation/installation_windows.html"><em>Windows 7 and Windows Server 2008</em></a></li>
 +<li><a class="reference internal" href="installation/installation_source.html"><em>Manual Installation</em></a></li>
 +<li><a class="reference internal" href="installation/installation_others.html"><em>PageKite Configuration</em></a></li>
 +<li><a class="reference internal" href="installation/installation_ucs.html"><em>Univention Corporate Server</em></a></li>
 +<li><a class="reference internal" href="installation/installation_macos.html"><em>Mac OS X</em></a> (not supported)</li>
 +<li><a class="reference internal" href="installation/installation_appliance.html"><em>Appliances</em></a></li>
 +</ul>
 +</div>
 +<div class="section" id="configuration">
 +<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
 +<p>This chapter covers ownCloud and web server configuration.</p>
 +<ul class="simple">
++<li><a class="reference internal" href="configuration/configuration_apps.html"><em>Apps Configuration</em></a></li>
++<li><a class="reference internal" href="configuration/configuration_users.html"><em>User Management</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_database.html"><em>Database Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/auth_ldap.html"><em>User Authentication with LDAP</em></a></li>
 +<li><a class="reference internal" href="configuration/custom_mount_config_gui.html"><em>Custom Mount Configuration Web-GUI</em></a></li>
 +<li><a class="reference internal" href="configuration/custom_mount_config.html"><em>Custom Mount Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/background_jobs.html"><em>Background Jobs</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_mail.html"><em>Mail Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_automation.html"><em>Automatic Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_encryption.html"><em>Use Server-Side Encryption</em></a></li>
 +<li><a class="reference internal" href="configuration/configuring_big_file_upload.html"><em>Uploading big files > 512MB (as set by default)</em></a></li>
- <li><a class="reference internal" href="configuration/configuration_apps.html"><em>Apps Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_reverseproxy.html"><em>Reverse Proxy Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/xsendfile.html"><em>Serving static files via web server</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_3rdparty.html"><em>3rd-Party Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/custom_user_backend.html"><em>Custom User Backend Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_custom_clients.html"><em>Custom Client Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_maintenance.html"><em>Maintenance Mode Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_knowledgebase.html"><em>Knowledge Base Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_logging.html"><em>Logging Configuration</em></a></li>
 +<li><a class="reference internal" href="configuration/configuration_language.html"><em>Language Configuration</em></a></li>
 +</ul>
 +</div>
 +<div class="section" id="maintenance">
 +<h2>Maintenance<a class="headerlink" href="#maintenance" title="Permalink to this headline">¶</a></h2>
 +<p>This chapter covers maintenance tasks such as updating or migrating to a new version.</p>
 +<ul class="simple">
 +<li><a class="reference internal" href="maintenance/migrating.html"><em>Migrating ownCloud Installations</em></a></li>
 +<li><a class="reference internal" href="maintenance/update.html"><em>Updating ownCloud</em></a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_source.html
index 73c36d1,0000000..a15b651
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_source.html
+++ b/core/doc/admin/installation/installation_source.html
@@@ -1,452 -1,0 +1,458 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Installation" href="index.html" />
 +    <link rel="next" title="PageKite Configuration" href="installation_others.html" />
 +    <link rel="prev" title="Univention Corporate Server" href="installation_ucs.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Installation</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="installation_appliance.html">Appliances</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_linux.html">Linux Distributions</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_macos.html">Mac OS X</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_windows.html">Windows 7 and Windows Server 2008</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_ucs.html">Univention Corporate Server</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Manual Installation</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#extract-owncloud-and-copy-to-your-web-server">Extract ownCloud and Copy to Your Web Server</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#set-the-directory-permissions">Set the Directory Permissions</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#web-server-configuration">Web Server Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#follow-the-install-wizard">Follow the Install Wizard</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_others.html">PageKite Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="manual-installation">
 +<h1>Manual Installation<a class="headerlink" href="#manual-installation" title="Permalink to this headline">¶</a></h1>
 +<p>If you do not want to use packages, here is how you setup ownCloud on from scratch
 +using a classic <abbr title="Linux, Apache, MySQL, PHP">LAMP</abbr> setup:</p>
 +<div class="section" id="prerequisites">
 +<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2>
 +<p>To run ownCloud, your web server must have the following installed:</p>
 +<ul class="simple">
 +<li>php5 (>= 5.3.3, minimum recommended 5.4)</li>
- <li>PHP module zip</li>
- <li>PHP module dom</li>
- <li>PHP module libxml</li>
- <li>PHP module mb multibyte</li>
 +<li>PHP module ctype</li>
- <li>PHP module JSON</li>
++<li>PHP module dom</li>
 +<li>PHP module GD</li>
- <li>PHP module zlib</li>
 +<li>PHP module iconv</li>
++<li>PHP module JSON</li>
++<li>PHP module libxml</li>
++<li>PHP module mb multibyte</li>
 +<li>PHP module SimpleXML</li>
++<li>PHP module zip</li>
++<li>PHP module zlib</li>
 +</ul>
- <p>And as <em>optional</em> dependencies:</p>
++<p>Database connectors (pick at least one):</p>
 +<ul class="simple">
- <li>PHP module intl</li>
- <li>PHP module mcrypt</li>
- <li>PHP module bz2</li>
- <li>PHP module openssl</li>
 +<li>PHP module sqlite (>= 3)</li>
 +<li>PHP module mysql</li>
- <li>PHP module pgsql</li>
++<li>PHP module pgsql (requires PostgreSQL >= 9.0)</li>
++</ul>
++<p>And as <em>optional</em> dependencies:</p>
++<ul class="simple">
++<li>PHP module bz2</li>
++<li>PHP module curl</li>
 +<li>PHP module exif (for image rotation in pictures app)</li>
++<li>PHP module intl</li>
 +<li>PHP module ldap (for ldap integration)</li>
- <li>PHP module curl</li>
++<li>PHP module mcrypt</li>
++<li>PHP module openssl</li>
 +<li>curl</li>
 +<li>libcurl3</li>
 +</ul>
 +<p>For performance increase (<em>optional</em> / select one of the following):</p>
 +<ul class="simple">
 +<li>PHP module apc</li>
 +<li>PHP module apcu</li>
 +<li>PHP module xcache</li>
 +</ul>
 +<p>For preview generation (<em>optional</em>):</p>
 +<ul class="simple">
 +<li>PHP module imagick</li>
 +<li>avconv or ffmpeg</li>
 +<li>OpenOffice or libreOffice</li>
 +</ul>
 +<p>For external storage (<em>optional</em>):</p>
 +<ul class="simple">
 +<li>smbclient (for SMB storage)</li>
 +<li>php5-ftp (for FTP storage)</li>
 +</ul>
 +<p>Please check your distribution, operating system or hosting partner documentation on how to install/enable
 +these modules.</p>
 +<p>The curl packages are needed for some apps (e.g. http user authentication)</p>
 +<p>If you are running Ubuntu 10.04 LTS you will need to update your PHP from
 +this <a class="reference external" href="https://launchpad.net/~ondrej/+archive/php5">PHP PPA</a>:</p>
 +<div class="highlight-python"><pre>sudo add-apt-repository ppa:ondrej/php5
 +sudo apt-get update
 +sudo apt-get install php5</pre>
 +</div>
 +<p>You don’t need any WebDAV support of your web server (i.e. apache’s mod_webdav)
 +to access your ownCloud data via WebDAV, ownCloud has a WebDAV server built in.
 +In fact, you should make sure that any built-in WebDAV module of your web server
 +is disabled (at least for the ownCloud directory), as it can interfere with
 +ownCloud’s built-in WebDAV support.</p>
 +</div>
 +<div class="section" id="extract-owncloud-and-copy-to-your-web-server">
 +<h2>Extract ownCloud and Copy to Your Web Server<a class="headerlink" href="#extract-owncloud-and-copy-to-your-web-server" title="Permalink to this headline">¶</a></h2>
 +<div class="highlight-python"><pre>tar -xjf path/to/downloaded/owncloud-x.x.x.tar.bz2
 +cp -r owncloud /path/to/your/webserver</pre>
 +</div>
 +</div>
 +<div class="section" id="set-the-directory-permissions">
 +<h2>Set the Directory Permissions<a class="headerlink" href="#set-the-directory-permissions" title="Permalink to this headline">¶</a></h2>
 +<p>The owner of your web server must own the apps/, data/ and config/ directories
 +in your ownCloud install. You can do this by running the following command for
 +the apps, data and config directories.</p>
 +<p>For Debian based distributions like Ubuntu, Debian or Linux Mint and Gentoo use:</p>
 +<div class="highlight-python"><pre>chown -R www-data:www-data /path/to/your/owncloud/install/data</pre>
 +</div>
 +<p>For ArchLinux use:</p>
 +<div class="highlight-python"><pre>chown -R http:http /path/to/your/owncloud/install/data</pre>
 +</div>
 +<p>Fedora users should use:</p>
 +<div class="highlight-python"><pre>chown -R apache:apache /path/to/your/owncloud/install/data</pre>
 +</div>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">The <strong>data/</strong> directory will only be created after setup has run (see below) and is not present by default in the tarballs.</p>
 +</div>
 +</div>
 +<div class="section" id="web-server-configuration">
 +<h2>Web Server Configuration<a class="headerlink" href="#web-server-configuration" title="Permalink to this headline">¶</a></h2>
 +<p>Apache is the recommended web server.</p>
 +<div class="section" id="apache-configuration">
 +<h3>Apache Configuration<a class="headerlink" href="#apache-configuration" title="Permalink to this headline">¶</a></h3>
 +<p>Example Apache 2.2:</p>
 +<div class="highlight-xml"><pre><Directory /path/to/your/owncloud/install>
 +    Options Indexes FollowSymLinks MultiViews
 +    AllowOverride All
 +    Order allow,deny
 +    allow from all
 +</Directory></pre>
 +</div>
 +<p>Example Apache 2.4:</p>
 +<div class="highlight-xml"><pre><Directory /path/to/your/owncloud/install>
 +    Options Indexes FollowSymLinks MultiViews
 +    AllowOverride All
-     Order allow,deny
 +    Require all granted
 +</Directory></pre>
 +</div>
 +<p>Enable mod_rewrite:</p>
 +<div class="highlight-python"><pre>a2enmod rewrite</pre>
 +</div>
 +<p>In distributions that do not come with a2enmod the <tt class="file docutils literal"><span class="pre">/etc/httpd/httpd.conf</span></tt> needs to be changed to enable <strong>mod_rewrite</strong></p>
 +<p>Then restart apache. For Ubuntu systems (or distributions using upstartd) use:</p>
 +<div class="highlight-python"><pre>service apache2 restart</pre>
 +</div>
 +<p>For systemd systems (Fedora, ArchLinux, OpenSUSE) use:</p>
 +<div class="highlight-python"><pre>systemctl restart httpd.service</pre>
 +</div>
 +<p>In order for the maximum upload size to be configurable, the .htaccess file in the ownCloud folder needs to be made writable by the server.</p>
 +</div>
 +<div class="section" id="nginx-configuration">
 +<h3>Nginx Configuration<a class="headerlink" href="#nginx-configuration" title="Permalink to this headline">¶</a></h3>
 +<ul class="simple">
 +<li>You need to insert the following code into <strong>your nginx config file.</strong></li>
 +<li>Adjust <strong>server_name</strong>, <strong>root</strong>, <strong>ssl_certificate</strong> and <strong>ssl_certificate_key</strong> to suit your needs.</li>
 +<li>Make sure your SSL certificates are readable by the server (see <a class="reference external" href="http://wiki.nginx.org/HttpSslModule">http://wiki.nginx.org/HttpSslModule</a>).</li>
 +</ul>
- <div class="highlight-python"><pre>server {
++<div class="highlight-python"><pre>upstream php-handler {
++        server 127.0.0.1:9000;
++        #server unix:/var/run/php5-fpm.sock;
++}
++
++server {
 +        listen 80;
 +        server_name cloud.example.com;
 +        return 301 https://$server_name$request_uri;  # enforce https
 +}
 +
 +server {
 +        listen 443 ssl;
 +        server_name cloud.example.com;
 +
 +        ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
 +        ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
 +
 +        # Path to the root of your installation
 +        root /var/www/;
 +
 +        client_max_body_size 10G; # set max upload size
 +        fastcgi_buffers 64 4K;
 +
 +        rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
 +        rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
 +        rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
 +
 +        index index.php;
 +        error_page 403 /core/templates/403.php;
 +        error_page 404 /core/templates/404.php;
 +
 +        location = /robots.txt {
 +            allow all;
 +            log_not_found off;
 +            access_log off;
 +        }
 +
 +        location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
 +                deny all;
 +        }
 +
 +        location / {
 +                # The following 2 rules are only needed with webfinger
 +                rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
 +                rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
 +
 +                rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
 +                rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
 +
 +                rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
 +
 +                try_files $uri $uri/ index.php;
 +        }
 +
 +        location ~ ^(.+?\.php)(/.*)?$ {
 +                try_files $1 = 404;
 +
 +                include fastcgi_params;
 +                fastcgi_param SCRIPT_FILENAME $document_root$1;
 +                fastcgi_param PATH_INFO $2;
 +                fastcgi_param HTTPS on;
-                 fastcgi_pass 127.0.0.1:9000;
-                 # Or use unix-socket with 'fastcgi_pass unix:/var/run/php5-fpm.sock;'
++                fastcgi_pass php-handler;
 +        }
 +
 +        # Optional: set long EXPIRES header on static assets
 +        location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
 +                expires 30d;
 +                # Optional: Don't log access to assets
 +                access_log off;
 +        }
 +
 +}</pre>
 +</div>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">You can use ownCloud without SSL/TLS support, but we strongly encourage you not to do that:</p>
 +</div>
 +<ul class="simple">
 +<li>Remove the server block containing the redirect</li>
 +<li>Change <strong>listen 443 ssl</strong> to <strong>listen 80;</strong></li>
 +<li>Remove <strong>ssl_certificate</strong> and <strong>ssl_certificate_key</strong>.</li>
 +<li>Remove <strong>fastcgi_params HTTPS on;</strong></li>
 +</ul>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">If you want to effectively increase maximum upload size you will also have to modify your <strong>php-fpm configuration</strong> (<strong>usually at
 +/etc/php5/fpm/php.ini</strong>) and increase <strong>upload_max_filesize</strong> and
 +<strong>post_max_size</strong> values. You’ll need to restart php5-fpm and nginx
 +services in order these changes to be applied.</p>
 +</div>
 +</div>
 +<div class="section" id="lighttpd-configuration">
 +<h3>Lighttpd Configuration<a class="headerlink" href="#lighttpd-configuration" title="Permalink to this headline">¶</a></h3>
 +<p>This assumes that you are familiar with installing PHP application on
 +lighttpd.</p>
 +<p>It is important to note that the <strong>.htaccess</strong> files used by ownCloud to protect the <strong>data</strong> folder are ignored by
 +lighttpd, so you have to secure it by yourself, otherwise your <strong>owncloud.db</strong> database and user data are publicly
 +readable even if directory listing is off. You need to add two snippets to your lighttpd configuration file:</p>
 +<p>Disable access to data folder:</p>
 +<div class="highlight-python"><pre>$HTTP["url"] =~ "^/owncloud/data/" {
 +     url.access-deny = ("")
 +   }</pre>
 +</div>
 +<p>Disable directory listing:</p>
 +<div class="highlight-python"><pre>$HTTP["url"] =~ "^/owncloud($|/)" {
 +     dir-listing.activate = "disable"
 +   }</pre>
 +</div>
 +</div>
 +<div class="section" id="yaws-configuration">
 +<h3>Yaws Configuration<a class="headerlink" href="#yaws-configuration" title="Permalink to this headline">¶</a></h3>
 +<p>This should be in your <strong>yaws_server.conf</strong>. In the configuration file, the
 +<strong>dir_listings = false</strong> is important and also the redirect from <strong>/data</strong>
 +to somewhere else, because files will be saved in this directory and it
 +should not be accessible from the outside. A configuration file would look
 +like this</p>
 +<div class="highlight-xml"><pre><server owncloud.myserver.com/>
 +        port = 80
 +        listen = 0.0.0.0
 +        docroot = /var/www/owncloud/src
 +        allowed_scripts = php
 +        php_handler = <cgi, /usr/local/bin/php-cgi>
 +        errormod_404 = yaws_404_to_index_php
 +        access_log = false
 +        dir_listings = false
 +        <redirect>
 +                /data == /
 +        </redirect>
 +</server></pre>
 +</div>
 +<p>The apache <strong>.htaccess</strong> file that comes with ownCloud is configured to
 +redirect requests to nonexistent pages. To emulate that behaviour, you
 +need a custom error handler for yaws. See this <a class="reference external" href="https://gist.github.com/2200407">github gist for further instructions</a> on how to create and compile that error handler.</p>
 +</div>
 +<div class="section" id="hiawatha-configuration">
 +<h3>Hiawatha Configuration<a class="headerlink" href="#hiawatha-configuration" title="Permalink to this headline">¶</a></h3>
 +<p>Add <strong>WebDAVapp = yes</strong> to the ownCloud virtual host. Users accessing
 +WebDAV from MacOS will also need to add <strong>AllowDotFiles = yes</strong>.</p>
 +<p>Disable access to data folder:</p>
 +<div class="highlight-python"><pre>UrlToolkit {
 +    ToolkitID = denyData
 +    Match ^/data DenyAccess
 +}</pre>
 +</div>
 +</div>
 +<div class="section" id="microsoft-internet-information-server-iis">
 +<h3>Microsoft Internet Information Server (IIS)<a class="headerlink" href="#microsoft-internet-information-server-iis" title="Permalink to this headline">¶</a></h3>
 +<p>See <a class="reference internal" href="installation_windows.html"><em>Windows 7 and Windows Server 2008</em></a> for further instructions.</p>
 +</div>
 +</div>
 +<div class="section" id="follow-the-install-wizard">
 +<h2>Follow the Install Wizard<a class="headerlink" href="#follow-the-install-wizard" title="Permalink to this headline">¶</a></h2>
 +<p>Open your web browser and navigate to your ownCloud instance. If you are
 +installing ownCloud on the same machine as you will access the install wizard
 +from, the url will be: <a class="reference external" href="http://localhost/">http://localhost/</a> (or <a class="reference external" href="http://localhost/owncloud">http://localhost/owncloud</a>).</p>
 +<p>For basic installs we recommend SQLite as it is easy to setup (ownCloud will do it for you). For larger installs you
 +should use MySQL or PostgreSQL. Click on the Advanced options to show the configuration options. You may enter admin
 +credentials and let ownCloud create its own database user, or enter a preconfigured user.  If you are not using apache
 +as the web server, please set the data directory to a location outside of the document root. See the advanced
 +install settings.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/maintenance/backup.html
index 115252f,0000000..713a62c
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/backup.html
+++ b/core/doc/admin/maintenance/backup.html
@@@ -1,189 -1,0 +1,189 @@@
 +
 +<!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 6.0 documentation</title>
++    <title>Backing up ownCloud — ownCloud Administrators Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Maintenance</a><ul class="current">
- <li class="toctree-l2 current"><a class="current reference internal" href="">Backing Up ownCloud</a><ul>
++<li class="toctree-l2 current"><a class="current reference internal" href="">Backing up ownCloud</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#backup-folders">Backup Folders</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#backup-database">Backup Database</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="update.html">Updating ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="restore.html">Restoring ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="migrating.html">Migrating ownCloud Installations</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="backing-up-owncloud">
- <h1>Backing Up ownCloud<a class="headerlink" href="#backing-up-owncloud" title="Permalink to this headline">¶</a></h1>
++<h1>Backing up ownCloud<a class="headerlink" href="#backing-up-owncloud" title="Permalink to this headline">¶</a></h1>
 +<p>To backup an ownCloud installation there are three main things you need to retain:</p>
 +<ol class="arabic simple">
 +<li>The config folder</li>
 +<li>The data folder</li>
 +<li>The database</li>
 +</ol>
 +<div class="section" id="backup-folders">
 +<h2>Backup Folders<a class="headerlink" href="#backup-folders" title="Permalink to this headline">¶</a></h2>
 +<p>Simply copy your config and data folder (or even your whole ownCloud install and data folder) to a place outside of
 +your ownCloud environment. You could use this command:</p>
 +<div class="highlight-python"><pre>rsync -Aax owncloud/ owncloud-dirbkp_`date +"%Y%m%d"`/</pre>
 +</div>
 +</div>
 +<div class="section" id="backup-database">
 +<h2>Backup Database<a class="headerlink" href="#backup-database" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="mysql">
 +<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>
 +<div class="highlight-python"><pre>mysqldump --lock-tables -h [server] -u [username] -p[password] > owncloud-sqlbkp_`date +"%Y%m%d"`.bak</pre>
 +</div>
 +</div>
 +<div class="section" id="sqlite">
 +<h3>SQLite<a class="headerlink" href="#sqlite" title="Permalink to this headline">¶</a></h3>
 +<div class="highlight-python"><pre>sqlite3 data/owncloud.db .dump > owncloud-sqlbkp_`date +"%Y%m%d"`.bak</pre>
 +</div>
 +</div>
 +<div class="section" id="postgresql">
 +<h3>PostgreSQL<a class="headerlink" href="#postgresql" title="Permalink to this headline">¶</a></h3>
 +<div class="highlight-python"><pre>PGPASSWORD="password" pg_dump owncloud -h [server] -U [username] -f owncloud-sqlbkp_`date +"%Y%m%d"`.bak</pre>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/maintenance/index.html
index 8654067,0000000..7c95ef6
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/index.html
+++ b/core/doc/admin/maintenance/index.html
@@@ -1,160 -1,0 +1,160 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
-     <link rel="next" title="Backing Up ownCloud" href="backup.html" />
++    <link rel="next" title="Backing up ownCloud" href="backup.html" />
 +    <link rel="prev" title="Serving static files via web server" href="../configuration/xsendfile.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1 current"><a class="current reference internal" href="">Maintenance</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="backup.html">Backing Up ownCloud</a></li>
++<li class="toctree-l2"><a class="reference internal" href="backup.html">Backing up ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="update.html">Updating ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="restore.html">Restoring ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="migrating.html">Migrating ownCloud Installations</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="maintenance">
 +<h1>Maintenance<a class="headerlink" href="#maintenance" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +<ul>
- <li class="toctree-l1"><a class="reference internal" href="backup.html">Backing Up ownCloud</a></li>
++<li class="toctree-l1"><a class="reference internal" href="backup.html">Backing up ownCloud</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="update.html">Updating ownCloud</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="restore.html">Restoring ownCloud</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migrating.html">Migrating ownCloud Installations</a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/maintenance/migrating.html
index 2abdfeb,0000000..e19e559
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/migrating.html
+++ b/core/doc/admin/maintenance/migrating.html
@@@ -1,160 -1,0 +1,160 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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="Restoring ownCloud" href="restore.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Maintenance</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="backup.html">Backing Up ownCloud</a></li>
++<li class="toctree-l2"><a class="reference internal" href="backup.html">Backing up ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="update.html">Updating ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="restore.html">Restoring ownCloud</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Migrating ownCloud Installations</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="migrating-owncloud-installations">
 +<h1>Migrating ownCloud Installations<a class="headerlink" href="#migrating-owncloud-installations" title="Permalink to this headline">¶</a></h1>
 +<p>To migrate an ownCloud install, follow those steps:</p>
 +<ol class="arabic simple">
 +<li>Backup data/config folders and your database (look at “Backing Up ownCloud”)</li>
 +<li>Move your data</li>
 +<li>Restore your data/config folders and your database (look at “Restore ownCloud”)</li>
 +<li>Update config.php of any changes to your database connection</li>
 +</ol>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/maintenance/restore.html
index 0ffa3a3,0000000..83e64fe
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/restore.html
+++ b/core/doc/admin/maintenance/restore.html
@@@ -1,198 -1,0 +1,198 @@@
 +
 +<!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>Restoring ownCloud — ownCloud Administrators Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Maintenance" href="index.html" />
 +    <link rel="next" title="Migrating ownCloud Installations" href="migrating.html" />
 +    <link rel="prev" title="Updating ownCloud" href="update.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Maintenance</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="backup.html">Backing Up ownCloud</a></li>
++<li class="toctree-l2"><a class="reference internal" href="backup.html">Backing up ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="update.html">Updating ownCloud</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Restoring ownCloud</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#restore-folders">Restore Folders</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#restore-database">Restore Database</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="migrating.html">Migrating ownCloud Installations</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="restoring-owncloud">
 +<h1>Restoring ownCloud<a class="headerlink" href="#restoring-owncloud" title="Permalink to this headline">¶</a></h1>
 +<p>To restore an ownCloud installation there are three main things you need to restore:</p>
 +<ol class="arabic simple">
 +<li>The config folder</li>
 +<li>The data folder</li>
 +<li>The database</li>
 +</ol>
 +<div class="section" id="restore-folders">
 +<h2>Restore Folders<a class="headerlink" href="#restore-folders" title="Permalink to this headline">¶</a></h2>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">This guide assumes that your previous backup is called “owncloud-dirbkp”</p>
 +</div>
 +<p>Simply copy your config and data folder (or even your whole ownCloud install and data folder) to a place outside of
 +your ownCloud environment. You could use this command:</p>
 +<div class="highlight-python"><pre>rsync -Aax owncloud-dirbkp/ owncloud/</pre>
 +</div>
 +</div>
 +<div class="section" id="restore-database">
 +<h2>Restore Database<a class="headerlink" href="#restore-database" title="Permalink to this headline">¶</a></h2>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">This guide assumes that your previous backup is called “owncloud-sqlbkp.bak”</p>
 +</div>
 +<div class="section" id="mysql">
 +<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>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">mysql</span> <span class="o">-</span><span class="n">h</span> <span class="p">[</span><span class="n">server</span><span class="p">]</span> <span class="o">-</span><span class="n">u</span> <span class="p">[</span><span class="n">username</span><span class="p">]</span> <span class="o">-</span><span class="n">p</span><span class="p">[</span><span class="n">password</span><span class="p">]</span> <span class="o">< [...]
 +</pre></div>
 +</div>
 +</div>
 +<div class="section" id="sqlite">
 +<h3>SQLite<a class="headerlink" href="#sqlite" title="Permalink to this headline">¶</a></h3>
 +<div class="highlight-python"><pre>sqlite3 data/owncloud.db .dump < owncloud-sqlbkp.bak</pre>
 +</div>
 +</div>
 +<div class="section" id="postgresql">
 +<h3>PostgreSQL<a class="headerlink" href="#postgresql" title="Permalink to this headline">¶</a></h3>
 +<div class="highlight-python"><pre>PGPASSWORD="password" pg_restore -c -d owncloud -h [server] -U [username] owncloud-sqlbkp.bak</pre>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/maintenance/update.html
index 8a63a4f,0000000..24715af
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/update.html
+++ b/core/doc/admin/maintenance/update.html
@@@ -1,216 -1,0 +1,213 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Maintenance" href="index.html" />
 +    <link rel="next" title="Restoring ownCloud" href="restore.html" />
-     <link rel="prev" title="Backing Up ownCloud" href="backup.html" />
++    <link rel="prev" title="Backing up ownCloud" href="backup.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Maintenance</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="backup.html">Backing Up ownCloud</a></li>
++<li class="toctree-l2"><a class="reference internal" href="backup.html">Backing up ownCloud</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Updating ownCloud</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#update">Update</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#upgrade">Upgrade</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="restore.html">Restoring ownCloud</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="migrating.html">Migrating ownCloud Installations</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="updating-owncloud">
 +<h1>Updating ownCloud<a class="headerlink" href="#updating-owncloud" title="Permalink to this headline">¶</a></h1>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">If you have installed ownCloud from a repository, your package management should take care of it. Probably
 +you will need to look for compatible third party applications yourself. <strong>Always do backups anyway.</strong></p>
 +</div>
 +<div class="section" id="update">
 +<h2>Update<a class="headerlink" href="#update" title="Permalink to this headline">¶</a></h2>
 +<p>Updating means updating ownCloud to the latest <em>point release</em>, e.g. ownCloud 4.0.6 → 4.0.7. This procedure uses the
 +ownCloud updater plugin called “Updater”: it’s an internal application already present in your ownCloud installation.</p>
 +<p>To update ownCloud, follow those steps:</p>
 +<ol class="arabic simple">
 +<li>Make a backup of the ownCloud folder and the database.</li>
 +<li>Make sure that updater plugin is enabled.</li>
 +<li>Navigate to the ‘Admin’ page.</li>
 +<li>Click ‘Update’.</li>
 +<li>Refresh the page with Ctrl+F5.</li>
 +</ol>
 +<p>If this procedure doesn’t work (for example, ownCloud 5.0.10 doesn’t show new any new version) you could try to perform
 +a full upgrade to update to the latest point release (see below).</p>
 +</div>
 +<div class="section" id="upgrade">
 +<h2>Upgrade<a class="headerlink" href="#upgrade" title="Permalink to this headline">¶</a></h2>
 +<p>Upgrade is to bring an ownCloud instance to a new <em>major release</em>, e.g.
 +ownCloud 4.0.7 → 4.5.0. Always do backups anyway.</p>
 +<p>To upgrade ownCloud, follow those steps:</p>
 +<ol class="arabic">
 +<li><p class="first">Make sure that you ran the latest point release of the major ownCloud
 +version, e.g. 4.0.7 in the 4.0 series. If not, update to that version first
 +(see above).</p>
 +</li>
 +<li><p class="first">Make a backup of the ownCloud folder and the database.</p>
 +</li>
 +<li><p class="first">Download the latest version to the working directory:</p>
- <blockquote>
- <div><p>wget <a class="reference external" href="http://download.owncloud.org/community/owncloud-latest.tar.bz2">http://download.owncloud.org/community/owncloud-latest.tar.bz2</a></p>
- </div></blockquote>
++<div class="highlight-python"><pre>wget http://download.owncloud.org/community/owncloud-latest.tar.bz2</pre>
++</div>
 +</li>
 +<li><p class="first">Deactivate all third party applications.</p>
 +</li>
 +<li><p class="first">Delete everything from your ownCloud installation directory, except data and
 +config. Assuming that it’s your working directory, you could execute this command:</p>
- <blockquote>
- <div><p>ls | grep -v ‘data\|config’ | xargs rm -r</p>
- </div></blockquote>
++<div class="highlight-python"><pre>ls | grep -v 'data\|config' | xargs rm -r</pre>
++</div>
 +</li>
 +<li><p class="first">Unpack the release tarball in the ownCloud directory (or copy the
 +files thereto). Assuming that your installation directory is called ‘owncloud’ and that it’s inside your working
 +directory, you could execute this command:</p>
- <blockquote>
- <div><p>tar xfj owncloud-latest.tar.bz2</p>
- </div></blockquote>
++<div class="highlight-python"><pre>tar xfj owncloud-latest.tar.bz2</pre>
++</div>
 +</li>
 +<li><p class="first">With the next page request the update procedures will run.</p>
 +</li>
 +<li><p class="first">If you had 3rd party applications, check if they provide versions compatible
 +with the new release. If so, install and enable them, update procedures will run if needed.</p>
 +</li>
 +</ol>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/_images/bookmark_addurl.png
index 0000000,0000000..b998365
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/bookmark_setting.png
index 0000000,0000000..0eec3bd
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/calendar_createevent.png
index e692764,0000000..ceabce3
mode 100644,000000..100644
Binary files differ
diff --cc core/doc/user/_images/calendar_export.png
index f2fe2be,0000000..ffcde28
mode 100644,000000..100644
Binary files differ
diff --cc core/doc/user/_images/calendar_import.png
index be93af4,0000000..17fb7e3
mode 100644,000000..100644
Binary files differ
diff --cc core/doc/user/_images/calendar_manage-calendars.png
index c1ca01c,0000000..e1b6a9a
mode 100644,000000..100644
Binary files differ
diff --cc core/doc/user/_images/contact_bottombar.png
index 0000000,0000000..3d91ea9
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/contact_del_ab.png
index 0000000,0000000..d325a88
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/contact_emptycontact.png
index 0000000,0000000..ae5c09d
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/contact_uploadbutton.png
index 0000000,0000000..c524af8
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/files_versioning.png
index 0000000,0000000..48388c8
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_connect.png
index 27aefc7,0000000..ec41aae
mode 100644,000000..100644
Binary files differ
diff --cc core/doc/user/_images/oc_documents.png
index 0000000,0000000..0537ffb
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_documents_col_edit.png
index 0000000,0000000..eb2d5e2
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_documents_edit.png
index 0000000,0000000..05a2f9f
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_documents_share.png
index 0000000,0000000..41e33a2
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_files_share.png
index 0000000,0000000..e9213e8
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_filesweb.png
index 0000000,0000000..54658c8
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_filesweb_navigate.png
index 0000000,0000000..c969433
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_filesweb_new.png
index 0000000,0000000..4e53766
new file mode 100644
Binary files differ
diff --cc core/doc/user/_images/oc_ui.png
index c30b229,0000000..4ddbea7
mode 100644,000000..100644
Binary files differ
diff --cc core/doc/user/_images/oc_user_preferences.png
index 0000000,0000000..35f63e9
new file mode 100644
Binary files differ
diff --cc core/doc/user/_sources/bookmarks.txt
index f05eee5,0000000..d74f096
mode 100644,000000..100644
--- a/core/doc/user/_sources/bookmarks.txt
+++ b/core/doc/user/_sources/bookmarks.txt
@@@ -1,60 -1,0 +1,62 @@@
 +Using the Bookmarks App
 +=======================
 +
 +If you want to add a bookmark to the Bookmarks application, 
 +you can either use the main interface or the bookmarklet.
 +
 +The main interface
 +--------------------
 +
 +Add a bookmark
 +~~~~~~~~~~~~~~
- 
- The main ownCloud interface contains 3 fields at the top where
- you can enter the website address (or URL), the title of your bookmark and
++In the bookmark application, enter a URL into the top-left area of the content section. After adding an address, click on the pencil button to edit fields for the given address.
++The main ownCloud bookmark interface contains 3 fields at the top where
++you can enter the website address (or URL), the title of your bookmark, and
 +a set of tags separated from each other by a space.
 +
- .. figure:: images/bookmark_addurl.jpg
++.. figure:: images/bookmark_addurl.png
++Adding a bookmark manually
 +
- In this example, we have added the page : http://wikipedia.org with the title "Wikipedia"
- and some tags describing what wikipedia is (for an easier search later on).
++In this example, we have added the page `http://wikipedia.org` with the title "Wikipedia"
++and some tags describing what Wikipedia is for an easier search later on.
 +
- Edit/delete a bookmark
++Edit/Delete a bookmark
 +~~~~~~~~~~~~~~~~~~~~~~
 +
- You also have the possibility to edit or delete your bookmark.
- For that, just hover on the bookmark and click on the little pencil if you wish to edit the bookmark
- or on the cross if you want to the delete it.
++You also have the possibility to edit or delete a bookmark.
++
++To edit a bookmark, hover over the bookmark and click on the pencil icon. 
++The bookmark details will then be filled into the 3 fields at the top of the screen.
++Modify your bookmark to your needs then click the save button to persist the change.
 +
- The bookmark will then be filled into the 3 fields at the top of the screen.
- Modify your bookmark to your need then hit the save button to persist the change.
++To delete a bookmark, hover over the bookmark and click the cross icon.
 +
 +Search
 +~~~~~~
 +
 +If you click on a tag, ownCloud will only display the bookmarks that
 +are described with this tag.
 +
- You can also use the search bar of owncloud in the top right of your screen.
++You can also use the search bar of ownCloud in the top right of your screen.
 +
 +Simply click on the "Bookmarks" menu in the sidebar to come back to
 +the default view.
 +
 +
- The bookmarklet
++The Bookmarklet
 +---------------
 +
- .. figure:: images/bookmark_setting.jpg
++.. figure:: images/bookmark_setting.png
++Bookmarklet link
 +
- The creator of this app understand that people won't come,
- open the ownCloud page to add the bookmark when the see a cool site.
++The creator of this app understands that people won't want to
++open the ownCloud boorkmarks page to add a bookmark every time they see a cool site.
 +This is why they have made this cool "bookmarklet".
 +
 +A bookmarklet is small button that you can drag and drop in your bookmarks.
- The next time you see a cool new site, press on this special bookmark,
- it will add the site to your ownCloud bookmarks.
++The next time you see a cool new site, click on this special bookmark
++to add the site to your ownCloud bookmarks.
 +
- To find this bookmark go to your personnal preference and search for
- the "Bookmarklet" item.
++To find this bookmark, click on the gear button at the bottom of the bookmarks app.
 +
 +
diff --cc core/doc/user/_sources/contents.txt
index 808ad81,0000000..36ceee6
mode 100644,000000..100644
--- a/core/doc/user/_sources/contents.txt
+++ b/core/doc/user/_sources/contents.txt
@@@ -1,27 -1,0 +1,29 @@@
 +.. _contents:
 +
 +===============================
 +ownCloud documentation contents
 +===============================
 +
 +.. toctree::
 +    :hidden:
 +
 +    index
 +
 +.. toctree::
 +    :maxdepth: 3
 +
 +    webinterface
 +    files/index
 +    pim/index
 +    bookmarks
++    documents
 +    migration
++    userpreferences
 +    external_storage/google_drive
 +
 +
 +
 +Indices and tables
 +==================
 +
 +* :ref:`genindex`
diff --cc core/doc/user/_sources/documents.txt
index 0000000,0000000..4c03d83
new file mode 100644
--- /dev/null
+++ b/core/doc/user/_sources/documents.txt
@@@ -1,0 -1,0 +1,68 @@@
++Documents
++=========
++
++Document editing is one of the new features in ownCloud 6. With this app, multiple users
++can edit rich-text simultaneously. The documents can be created from within the
++web-interface or existing documents can be uploaded. Sharing and editing can be done
++securely in the browser and be shared inside ownCloud or via a public link. User that
++have an account on the same server can be invited or public invitations can also be
++sent be email. The editing works on top of normal ODF files that are stored in ownCloud.
++
++The main interface
++------------------
++
++.. figure:: images/oc_documents.png
++
++Create/Upload a Document
++~~~~~~~~~~~~~~~~~~~~~~~~
++
++In the documents application, click on the respective buttons to create or upload a document into your ownCloud. The *New document* button will create a document named "New document.odt". The extension ODT is an OpenDocument format, which many major office applications let you create/edit/view.
++
++The *Upload* button allows you to upload any kind of document, but currently you can only edit ODT files within ownCloud.
++
++Edit a Document
++~~~~~~~~~~~~~~~
++
++If ownCloud contains at least one ODT file, you can immediately start editing by clicking on
++the file within the documents app. Clicking on documents in files app will only display it. Below, you
++can see editing a newly created document file:
++
++.. figure:: images/oc_documents_edit.png
++
++Here is the explanation of each field in the image shown above:
++
++#. Clicking on the file name allows you to change filename.
++#. Allows you to share the document to public, specific users or groups. Will be explained in detail in :ref:`Share a document <share-a-document>` section.
++#. Formatting toolbar lets you change text styles.
++#. Zoom in/out
++#. Close document by saving changes
++#. Users currently editing this document
++
++Collaboratively Editing a Document
++^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++
++To edit a file collaboratively, it needs to be shared with at least one user by using the *Share* button. When multiple uses have permission to edit a document, they will be able to edit it at the same time. The cursor of all editing users will be the same color as the border color of their user picture.
++
++.. figure:: images/oc_documents_col_edit.png
++
++If a user is not a local user (e.g accessing the file using public link), he/she will be shown as guest in user list and they will type a nickname before editing.
++
++
++Delete a Document
++~~~~~~~~~~~~~~~~~
++
++A document can be deleted using the files app and following the same procedure as for other file types. Clicking on the cross icon deletes the selected document.
++
++.. _share-a-document:
++
++Share a Document
++~~~~~~~~~~~~~~~~
++
++Document sharing has the same options as when sharing other files. While editing a document, you can use the *Share* button to enable other users to edit the document. This button will display all available options to share:
++
++.. figure:: images/oc_documents_share.png
++
++By default, you can enter local users or groups to share with. Checking *Share link* will enable sharing via a public link, for which you can set a password to prevent editing by unwanted users. Shares can also have an expiration date that will expire the link after a given date. ownCloud will send the public link to users by email by typing each email address into the email field.  Separate multiple email addresses with a space.
++
++To see all of the features of the ownCloud document app, watch the
++`video on YouTube <https://www.youtube.com/watch?v=70pCBnNPdew>`_.
diff --cc core/doc/user/_sources/files/configuring_big_file_upload.txt
index f03a805,0000000..0edc105
mode 100644,000000..100644
--- a/core/doc/user/_sources/files/configuring_big_file_upload.txt
+++ b/core/doc/user/_sources/files/configuring_big_file_upload.txt
@@@ -1,11 -1,0 +1,11 @@@
 +Big Files
 +=========
 +
 +There are a few default configuration settings that you will want to change to enable ownCloud to operate 
 +more effectively as a self hosted file sync and share server. 
 +When uploading through the web client, ownCloud is governed by PHP and Apache. 
 +As a default, PHP is configured for only 2 MB uploads. 
 +This is not entirely useful, so it is important to increase these variables to the sizes you want to
 +support on your server.
 +Ask your administrator to increase these variables for you or read the section in concern `within the
- Admin Documentation. <http://doc.owncloud.com/server/5.0EE/admin_manual/configuration/configuring_big_file_upload.html>`_
++Admin Documentation <http://doc.owncloud.org/server/6.0/admin_manual/configuration/configuring_big_file_upload.html>`_.
diff --cc core/doc/user/_sources/files/deletedfiles.txt
index 630bec7,0000000..5012ffa
mode 100644,000000..100644
--- a/core/doc/user/_sources/files/deletedfiles.txt
+++ b/core/doc/user/_sources/files/deletedfiles.txt
@@@ -1,18 -1,0 +1,21 @@@
 +Deleted Files
 +=============
 +
 +ownCloud keeps a copy of your deleted files in case you need them again. To
- make sure that the user doesn't run out of memory the deleted files app
++make sure that the user doesn't run out of memory, the deleted files app
 +manages the size of the deleted files for the user. The app takes care to never
 +use more that 50% of your currently available free space. If your deleted files
- exceed this limit ownCloud deletes the oldest versions until it meets the memory
++exceed this limit, ownCloud deletes the oldest versions until it meets the memory
 +usage limit again.
 +
- Beside that ownCloud checks the age of the files every time a new files gets moved
- to the deleted files. By default deleted files stay in the trash bin for 180 days.
++Deleted files can be found by clicking on the *Deleted files* button on files app of web interface.
++You can either restore or permanently delete using appropriate buttons.
++
++ownCloud also checks the age of deleted files every time new files are added
++to the deleted files. By default, deleted files stay in the trash bin for 180 days.
 +The Administrator can adjust this value in the config.php by setting the
 +***"trashbin_retention_obligation"*** value. Files older than the 
 +***"trashbin_retention_obligation"*** will be deleted permanently.
- Additionally ownCloud calculates the maximum available space every time
- a new file was added. If the deleted files exceed the new maximum available space
- ownCloud will expire old deleted files until we meet the limit again.
++Additionally, ownCloud calculates the maximum available space every time
++a new file is added. If the deleted files exceed the new maximum allowed space
++ownCloud will expire old deleted files until the limit is met once again.
diff --cc core/doc/user/_sources/files/encryption.txt
index 8d8cba3,0000000..6cd49fc
mode 100644,000000..100644
--- a/core/doc/user/_sources/files/encryption.txt
+++ b/core/doc/user/_sources/files/encryption.txt
@@@ -1,65 -1,0 +1,65 @@@
 +Files Encryption
 +================
 +
 +ownCloud ships a encryption app, which allows to encrypt all files stored in
 +your ownCloud. Once the encryption app was enabled by the admin all your files
 +will be encrypted automatically. Encryption and decryption always happens
 +server-side. This enables the user to continue to use all the other apps to
 +view and edit his data. But this also means that the server administrator could
 +intercept your data. Server-Side encryption is especially interesting if you
 +use external storages. This way you can make sure that the storage provider is
 +not able to read your data.
 +
 +Please remember. Once the encryption app is enabled you need your log-in
 +password to decrypt and access your data. By default your data will be lost if
- you loss your log-in pasword. If you want to protect yourself against password
++you loss your log-in password. If you want to protect yourself against password
 +loss store your log-in password on a secure place or enable the recovery key
 +as described below.
 +
 +What gets encrypted
 +-------------------
 +
 +The current version encrypts all your files stored in ownCloud.
 +
 +At the moment we don't encrypt:
 +
 +- old files in the trash bin (files which were deleted before the encryption app was enabled)
 +- image thumbnails from the gallery app and previews from the files app
 +- search index from the full text search app
 +
 +All this data is stored directly on your ownCloud server, so you don't have to worry to expose
 +your data to a third party storage provider.
 +
 +Decrypt your data again
 +-----------------------
 +
 +If the encryption app was disabled users can decrypt their files again in their
 +personal settings. After this was done they can continue to use their ownCloud
 +without encryption.
 +
 +
 +Settings
 +--------
 +
 +Once the encryption app is enabled you will find some additional settings on
 +your personal settings page.
 +
 +Recovery Key
 +~~~~~~~~~~~~
 +
 +If the admin enabled the recovery-key you can decide by your own if you
 +want to use this feature for your account. If you enable "Password recovery"
 +the admin will be able to read your data with a special password. This allows
 +him to recover your files in case of password loss. If the recovery-key is not
 +enabled than there is no way to restore your files if you loss your log-in
 +password.
 +
 +Change Private Key Password
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +This option will be only available if your log-in password but not your
 +encryption password was changed by your admin. This can happen if your ownCloud
 +provider uses a external user back-end, e.g. LDAP, and changed your log-in
 +password there. In this case you can set your encryption password to your new
 +log-in password by providing your old and new log-in password. The encryption
 +app only works if log-in password and encryption password is identical.
diff --cc core/doc/user/_sources/files/files.txt
index e55afaf,0000000..77d840b
mode 100644,000000..100644
--- a/core/doc/user/_sources/files/files.txt
+++ b/core/doc/user/_sources/files/files.txt
@@@ -1,253 -1,0 +1,253 @@@
- Accessing your Files (WebDav)
++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 **youraddress.com/** to the URL of your ownCloud server installation
++.. note:: You will have to adjust **example.org/** to the URL of your ownCloud server installation
 +
 +
 +Linux
 +-----
 +
 +Gnome 3/Nautilus
 +~~~~~~~~~~~~~~~~
 +
- The URL that you have to use to connect to the owncloud installation in nautilus is::
++The URL that you have to use to connect to the ownCloud installation in nautilus is::
 +
-   davs://youraddress.com/owncloud/remote.php/webdav
++  davs://example.org/owncloud/remote.php/webdav
 +
 +
 +.. image:: ../images/gnome3_nautilus_webdav.png
 +
 +If your server connection is not HTTPS-secured, use `dav://` instead of `davs://` .
 +
 +KDE/Dolphin
 +~~~~~~~~~~~
- Click in the adress area and enter::
++Click in the address area and enter::
 +
-     webdav://youraddress.com/owncloud/remote.php/webdav
++    webdav://example.org/owncloud/remote.php/webdav
 +
 +.. image:: ../images/dolphin_webdav.png
 +
 +or:
 +
 +1. Open Dolphin and click on where it says Network in the left hand Places column.
 +2. Click on the icon labeled **Add a Network Folder**.
 +3. It should come up with WebDAV already selected. Make sure it is and then click **Next**.
 +4. Enter the following settings:
 +
 +* Name: The name you’ll see in the **Places** bookmark, for example ownCloud
 +* User: Your ownCloud username you use to log in, for example admin
- * Server: Your ownCloud domain name, for example **youraddress.com** (without **http://** before or directories afterwards).
++* Server: Your ownCloud domain name, for example **example.org** (without **http://** before or directories afterwards).
 +* Folder: Enter::
 +
 +        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.
 +
 +Mounting from command line
 +~~~~~~~~~~~~~~~~~~~~~~~~~~
 +1. Install the WebDAV support using the davfs package. On Debian/Ubuntu, you can use::
 +
 +	sudo apt-get install davfs2
 +
 +2. Reconfigure davfs2 to allow access to normal users (select Yes when prompted)::
 +
 +        sudo dpkg-reconfigure davfs2
 +
 +3. Add the users you want to be able to mount the share to the davfs2 group::
 +
 +        sudo usermod -aG davfs2 <user>
 +
 +4. Edit :file:`/etc/fstab` and add the following line for each user who wants to mount the folder (with your details where appropriate)::
 +
-         youraddress.com/owncloud/remote.php/webdav /home/<username>/owncloud davfs user,rw,noauto 0 0
++        example.org/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)::
 +
-         youraddress.com/owncloud/remote.php/webdav <username> <password>
++        example.org/owncloud/remote.php/webdav <username> <password>
 +
 +3. Ensure the file is only writable by you either through the file manager, or via::
 +
 +        chmod 600 ~/.davfs2/secrets
 +
 +4. Run the command::
 +
 +        mount ~/owncloud
 +
 +5. To automatically mount the folder on login, add the command you used in step 4 to :file:`./.bashrc`
 +
 +Known Issues
 +^^^^^^^^^^^^
 +
 +**Problem:** Resource temporarily unavailable
 +
 +**Solution:** If you experience trouble when you create a file in the directory, edit :file:`/etc/davfs2/davfs2.conf` and add::
 +
 +        use_locks 0
 +
 +**Problem:** Certificate warnings
 +
 +**Solution:** If you use a self-signed certificate, you will get a warning. If you are willing to take the risk of a man in the middle attack, run this command instead::
 +
 +        echo "y" | mount ~/owncloud > /dev/null 2>&1
 +
 +MacOS
 +-----
 +
 +.. note:: Finder suffers from a `series of implementation problems <http://code.google.com/p/sabredav/wiki/Finder>`_ and should only be used if the ownCloud server runs on **Apache** and **mod_php**
 +
 +In the Finder, choose **Go > Connect to Server,** type the address of the server in the **Server Address** field, and click **Connect**.
 +
 +.. image:: ../images/osx_webdav1.png
 +
- The URL that you have to use to connect to the owncloud installation in finder is::
++The URL that you have to use to connect to the ownCloud installation in finder is::
 +
-   http://youraddress.com/owncloud/remote.php/webdav
++  http://example.org/owncloud/remote.php/webdav
 +
 +.. image:: ../images/osx_webdav2.png
 +
 +For details, check the respective `vendor documentation`_ at the Apple website.
 +
 +.. _`vendor documentation`: http://docs.info.apple.com/article.html?path=Mac/10.6/en/8160.html
 +
 +Windows
 +-------
- For Windows a seperate webdav client is recommended to access the files from your server. Choose one from the `WebDav Project page <http://www.webdav.org/projects/>`_
++For Windows a seperate WebDAV client is recommended to access the files from your server. Choose one from the `WebDav Project page <http://www.webdav.org/projects/>`_
 +
- Should you have to use the native implementation then you can assign ownCloud a drive letter.  This allows you to browse files stored on an ownCloudserver the way you would files stored in a mapped network drive.
++Should you have to use the native implementation then you can assign ownCloud a drive letter. This allows you to browse files stored on an ownCloudserver the way you would files stored in a mapped network drive.
 +
 +Using this feature requires network connectivity. If you want to store
 +your files offline, use the ownCloud Client to sync all files on your
 +ownCloud to one or more directories of your local hard drive.
 +
 +
 +.. note:: Prior to mapping your drive, you will need to permit the use of Basic Authentication in the Windows Registry. The procedure is documented in KB841215_ and differs between Windows XP/Server 2003 and Windows Vista/7. Please follow the Knowledge Base article before proceeding, and follow the Vista instructions if you run Windows 7.
 +
 +.. _KB841215: http://support.microsoft.com/kb/841215
 +
 +Mapping via the command line
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
- Suppose your ownCloud is installed at **https://youraddress.com/owncloud**,
- that is, entering this URL in your webbrowser will bring up the login screen.
++Suppose your ownCloud is installed at **https://example.org/owncloud**,
++that is, entering this URL in your web browser will bring up the login screen.
 +Running::
 +
-   net use Z: https://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword
++  net use Z: https://example.org/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: \\youraddress.com at ssl\owncloud\remote.php\webdav /user:youruser yourpassword
++  net use Z: \\example.org 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://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword
-   net use Z: \\youraddress.com\owncloud\remote.php\webdav /user:youruser yourpassword
++  net use Z: http://example.org/owncloud/remote.php/webdav /user:youruser yourpassword
++  net use Z: \\example.org\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.
 +
 +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://youraddress.com/owncloud/remote.php/webdav
++  https://example.org/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**.
 +
 +.. figure:: ../images/explorer_webdav.png
 +   :scale: 80%
 +
 +   Mapping WebDAV on Windows Explorer.
 +
 +After pressing **Finish**, Windows Explorer will map the network drive and your ownCloud instance should be available
 +
 +Using Cyberduck (4.2.1)
 +~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Specify a server without any leading protocol information. e.g.:
 +
 +Server
-   youraddress.com
++  example.org
 +
 +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)'):
 +
 +Port
 +  80 (for WebDAV)
 +  443 (for WebDAV (HTTPS/SSL))
 +
- Use the 'More Options' drop-down menu to add the rest of your webdav URL into the 'Path' field. e.g.:
++Use the 'More Options' drop-down menu to add the rest of your WebDAV URL into the 'Path' field. e.g.:
 +
 +Path
 +  remote.php/webdav
 +
 +Known Problems
 +~~~~~~~~~~~~~~
 +
 +
 +Problem
 +  Windows refuses to connect via HTTPS
 +
 +Solution
 +  The Windows WebDAV Client does not support Server Name Indication (SNI) on
 +  encrypted connections. If you encounter an error mounting an SSL-encrypted
 +  ownCloud instance, please contact your provider about assigning a dedicated
 +  IP address for your SSL-based server.
 +
 +Problem
 +  I receive the error **Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved.**
 +
 +Solution
 +  Windows limits the maximum size a file transferred from or to  a WebDAV
 +  share may have.  You can increase the value **FileSizeLimitInBytes** in
 +  **HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters**.
 +  by clicking on **Modify**. In order to increase the limit to the maximum
 +  value of 4GB, pick **Decimal** and enter **4294967295** as value. Afterwards,
 +  reboot Windows or restart the **WebClient** service.
 +
 +.. todo::
 +
 +   document registry keys on file size limit and not complaining in no network cases
 +
 +
 +Sync Client
 +-----------
 +However, some applications only allow you to save to a local folder. To
- get around this issue, you can use the :doc:`ownCloud sync clients <../files/index>`
++get around this issue, you can use the `ownCloud sync clients`_
 +
 +Mobile
 +-------
 +To connect to your ownCloud server with the **ownCloud** mobile apps, use the base URL and folder only::
 +
-     youraddress.com/owncloud
++    example.org/owncloud
 +
 +No need to add remote.php/webdav as you do for any other WebDAV client.
 +
 +There are apps in development for both `Android`_ and `webOS`_. Feel
 +free to `contribute, if you can`_! Right now you can use other apps to
 +connect to ownCloud from your phone via WebDAV. `WebDAV Navigator`_ is a
 +good (proprietary) app for `Android App`_ , `iPhone`_ & `BlackBerry`_.
 +
 +The URL for these is::
 +
-     youraddress.com/owncloud/remote.php/webdav
++    example.org/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/
++.. _ownCloud sync clients: http://owncloud.org/documentation/sync-clients/
 +.. _Mount ownCloud to a local folder without sync: http://owncloud.org/use/webdav/
- .. _ownCloud Mirall repository: https://gitorious.org/owncloud/mirall
- .. _Android: http://gitorious.org/owncloud/android
- .. _webOS: http://gitorious.org/owncloud/webos
++.. _ownCloud Mirall repository: https://github.com/owncloud/mirall
++.. _Android: http://github.com/owncloud/android
++.. _webOS: http://github.com/owncloud/webos
 +.. _contribute, if you can: /contribute/
 +.. _WebDAV Navigator: http://seanashton.net/webdav/
- .. _Android App: http://market.android.com/details?id=com.schimera.webdavnavlite
- .. _iPhone: http://itunes.apple.com/app/webdav-navigator/id382551345
- .. _BlackBerry: http://appworld.blackberry.com/webstore/content/46279
++.. _Android App: https://play.google.com/store/apps/details?id=com.schimera.webdavnavlite
++.. _iPhone: https://itunes.apple.com/app/webdav-navigator/id382551345
++.. _BlackBerry: http://appworld.blackberry.com/webstore/content/46816
diff --cc core/doc/user/_sources/files/filesweb.txt
index 0000000,0000000..f87f971
new file mode 100644
--- /dev/null
+++ b/core/doc/user/_sources/files/filesweb.txt
@@@ -1,0 -1,0 +1,85 @@@
++Accessing your Files (Web Interface)
++====================================
++
++Your ownCloud files can be accessed from anywhere by using your ownCloud's web interface. In the files app,
++you can view (if a common type), move, rename, download, share and delete your files easily. If versioning app is
++enabled, you can also revert a file to specific version. See :doc:`versioncontrol` for details.
++
++.. figure:: ../images/oc_filesweb.png
++Files app on ownCloud web interface
++
++With ownCloud 6, you can now see file thumbnails next to the filenames. By hovering your cursor on a file, you
++will be provided with some file operations. You can use rename, download, share buttons to perform those actions
++or click on the cross icon at the rightmost location to remove the hovered file. If the file is an editable
++office file, it will also show *Edit* button to open the file in documents app (if this app is enabled).
++
++Navigating inside your ownCloud
++-------------------------------
++
++To navigate through folders in your ownCloud, you can simply click on a folder name. The navigation bar
++will show your current directory:
++
++.. figure:: ../images/oc_filesweb_navigate.png
++Navigation bar
++
++You can click on one of the upper directories to navigate up or use home icon to navigate back into your root
++folder.
++
++
++Creating/uploading files
++------------------------
++
++You can create files by simply clicking on *New* button on files app. The *New* button will provide three
++options to choose from:
++
++.. figure:: ../images/oc_filesweb_new.png
++New button options
++
++* *Text file* will create a simple text file and add into the current folder in your ownCloud.
++* *Folder* will create a folder in current folder.
++* *From link* will download the file from the provided link and place it into the current folder.
++
++
++Selecting files
++---------------
++
++You can select one or more files by clicking on small thumbnails or icons of the files. To select all files in
++the current directory, use the checkbox just above the first file/folder on the list.
++
++If you select multiple files, selected files can be deleted or downloaded as ZIP by using the buttons just above of the file list.
++If download button is not visible, this means that administrator had disabled this feature.
++
++Viewing files
++-------------
++
++ownCloud can display uncompressed text files, OpenDocument files, PDFs, and image files by simply clicking on
++the file name. If displaying of a file is not possible, a download process will start.
++
++Moving files
++------------
++
++In ownCloud web interface, file(s) can be moved by dragging and dropping them into a sub-directory. If you would like move a directory to an upper directory, drag the file(s) into one of the folders shown in navigation bar.
++
++Sharing files
++-------------
++
++Any file/folder on ownCloud can be shared to download with a local user, group or any person online with a public link. Shared files/folders will show a *Shared* text next to their names.
++
++To share a file/folder, hover your cursor on an item in the files app and click *Share*. You will be provided with some options:
++
++.. figure:: ../images/oc_files_share.png
++Share dialog
++
++* The first field is to share this file/folder with local users/groups. This is very useful
++  if you are in a company and want to create a quick share with a collegue.
++* If you click on *Share link*, the other options will be visible. Since this link allows everyone
++  to download this file/folder, you may want to protect this share with a password. To do that,
++  click on *Password protect* and set a password.
++* If this share is a folder, you will also have an option to enable uploads into this folder using
++  the provided link. This is very useful to collect files from multiple users into same place easily.
++* If your server is configured with a mail server, you can type e-mail addresses seperated with space to send the link to multiple users.
++* Finally, setting an expiration date will expiry the share after the specified date.
++
++If you type a user and/or group to the *share with* field, you will be given extra sharing options such as informing via e-mail,
++letting users edit (create, update, delete, re-share) the share. To revoke permissions from users, simply click on cross icon
++on the same line with the users.
diff --cc core/doc/user/_sources/files/index.txt
index b41dd8b,0000000..b102d71
mode 100644,000000..100644
--- a/core/doc/user/_sources/files/index.txt
+++ b/core/doc/user/_sources/files/index.txt
@@@ -1,14 -1,0 +1,15 @@@
 +=======================
 +Files & Synchronization
 +=======================
 +
 +.. toctree::
 +   :maxdepth: 1
 +
++   filesweb
 +   files
 +   versioncontrol
 +   deletedfiles
 +   sync
 +   encryption
 +   quota
 +   configuring_big_file_upload
diff --cc core/doc/user/_sources/files/sync.txt
index da6b37a,0000000..79f3957
mode 100644,000000..100644
--- a/core/doc/user/_sources/files/sync.txt
+++ b/core/doc/user/_sources/files/sync.txt
@@@ -1,22 -1,0 +1,22 @@@
- Desktop Synchronisation
++Desktop Synchronization
 +========================
 +
 +For synchronizing files with your desktop computer, we recommend using the
 +`ownCloud Client`_ for Windows, Mac OS X and Linux.
 +
 +The ownCloud Desktop Client enables you to connect to your private ownCloud Server. 
 +You can create folders in your home directory, and keep the contents of those 
 +folders synced with your ownCloud server. Simply copy a file into the directory 
 +and the ownCloud desktop client does the rest. Make a change to the files on one 
 +computer, it will flow across the others using these desktop sync clients. Always 
 +have your latest files with you wherever you are. 
 +
 +Its usage is documented separately in the `ownCloud Desktop Client Manual`_.
 +
 +Furthermore, It is possible to synchronize your ownCloud calendar and address book
 +with a variety of different operating systems and devices. It is also possible to
 +mount your ownCloud storage via WebDAV, which is also documented in the next chapters.
 +
 +
 +.. _ownCloud Client: http://owncloud.org/sync-client/
- .. _ownCloud Desktop Client Manual:  http://doc.owncloud.com/desktop/1.2/
++.. _ownCloud Desktop Client Manual:  http://doc.owncloud.com/desktop
diff --cc core/doc/user/_sources/files/versioncontrol.txt
index f7c41ed,0000000..26e91a0
mode 100644,000000..100644
--- a/core/doc/user/_sources/files/versioncontrol.txt
+++ b/core/doc/user/_sources/files/versioncontrol.txt
@@@ -1,27 -1,0 +1,37 @@@
 +Version Control
 +===============
 +
- ownCloud supports simple version control for files. Versioning is
- enabled by default, and creates backups of files which are accessible
- via the history tab. This tab also links to the history page, where you
- can roll back a file to any previous version. Changes made at intervals
- greater than two minutes are saved in data/[user]/versions, and made
- accessible using the above pages.
++ownCloud supports simple version control for files. Versioning creates backups
++of files which are accessible via the Versions link. This link contains the
++history of the file where you can roll back a file to any previous version. Changes
++made at intervals greater than two minutes are saved in data/[user]/versions,
++and made accessible using the above pages.
 +
++Versioning is **not** enabled by default and needs to be enabled by administrator
++using App management page.
++
++To restore a specific version of a file, hover your cursor on a file and click
++*Versions* link. If any version is available, you should see a list like the image
++below:
++
++.. figure:: ../images/files_versioning.png
++
++Clicking on *Restore* next to any version will revert the file to that
++version back.
 +
 +The versioning app expires old versions automatically to make sure that
 +the user doesn't run out of space. Following pattern is used to delete
 +old versions:
 +
 +* For the first 10 seconds ownCloud keeps one version every 2 seconds
 +* For the first hour ownCloud keeps one version every minute
 +* For the first 24 hours ownCloud keeps one version every hour
 +* For the first 30 days ownCloud keeps one version every day
 +* After the first 30 days ownCloud keeps one version every week
 +
 +The versions are adjusted along this pattern every time a new version gets
 +created.
 +
 +Beside that the version app takes care to never use more that 50% of the users
 +currently available free space. If the stored versions exceed this limit ownCloud
 +delete the oldest versions until it meets the memory usage limit again.
diff --cc core/doc/user/_sources/index.txt
index 9119fd4,0000000..a0c2cb2
mode 100644,000000..100644
--- a/core/doc/user/_sources/index.txt
+++ b/core/doc/user/_sources/index.txt
@@@ -1,64 -1,0 +1,71 @@@
 +.. _index:
 +
 +==================
 +User Documentation
 +==================
 +**Welcome to ownCloud, your self-hosted file sync and share solution.**
 +
- OwnCloud is open source file sync and share software for everyone from individuals operating the free Community Edition, to large enterprises and service providers operating ownCloud Enterprise Edition. ownCloud provides a safe, secure and compliant file sync and share solution on servers you control.
++ownCloud is open source file sync and share software for everyone from individuals operating the free Community Edition, to large enterprises and service providers operating ownCloud Enterprise Edition. ownCloud provides a safe, secure and compliant file sync and share solution on servers you control.
 +
 +With ownCloud you can share one or more folders on your PC, and sync them with your ownCloud server. Place files in your local shared directories, and those files are immediately synced to the server, and then to other PCs via the desktop client. Not near a desktop client? No problem, simply log in with the web client and manage your files there. The Android and iOS mobile apps allow you to browse, download and upload photos and videos. On Android, you may also create, download, edit an [...]
 +
 +Whether using a mobile device, a workstation, or a web client, ownCloud provides the ability to put the right files in the right hands at the right time on any device in one simple-to-use, secure, private and controlled solution. After all, with ownCloud, it’s Your Cloud, Your Data, Your Way.
 +
- Webinterface
- ============
++Web interface
++=============
 +This chapter contains a general overview how you access ownCloud from a Browser like Firefox, Chrome or Internet Explorer
 +
 +* :doc:`webinterface`
 +
 +Files & Synchronization
 +=======================
- This chapter contains information about accessing your files via WebDav and Synchronization.
++This chapter contains information about accessing your files via WebDAV and Synchronization.
 +
++* :doc:`files/filesweb`
 +* :doc:`files/files`
 +* :doc:`files/sync`
 +* :doc:`files/versioncontrol`
 +* :doc:`files/deletedfiles`
 +* :doc:`files/encryption`
 +* :doc:`files/quota`
 +* :doc:`files/configuring_big_file_upload`
 +
 +
 +Contacts & Calendar
 +===================
 +Contacts & Calendar web interface, export, import and synchronization.
 +
 +* :doc:`pim/calendar`
 +* :doc:`pim/contacts`
 +* :doc:`pim/sync_ios`
 +* :doc:`pim/sync_kde`
 +* :doc:`pim/sync_osx`
 +
++Documents
++=========
++Documents allows users collaboratively edit rich-text documents at the same time.
++
++* :doc:`documents`
++
 +Bookmarks
 +=========
 +Web interface for managing your bookmarks.
 +
 +* :doc:`bookmarks`
 +
 +Backup
 +======
 +Import and export your user account settings.
 +
 +* :doc:`migration`
 +
 +External storage
 +================
 +Mount external storages into ownCloud.
 +
 +* :doc:`external_storage/google_drive`
 +
 +Indices and tables
 +==================
 +
 +* :ref:`genindex`
diff --cc core/doc/user/_sources/migration.txt
index 0d94096,0000000..6a168a5
mode 100644,000000..100644
--- a/core/doc/user/_sources/migration.txt
+++ b/core/doc/user/_sources/migration.txt
@@@ -1,19 -1,0 +1,19 @@@
 +User Account Migration
 +======================
 +
- User account migration support is provided by the user_migrate app. It is important to note that only data from apps that support migration will be migrated. While we encoruage all apps to support migration, it is not a requirement and it the responsibility of the app developer.
++User account migration support is provided by the user_migrate app. It is important to note that only data from apps that support migration will be migrated. While we encourage all apps to support migration, it is not a requirement and it the responsibility of the app developer.
 +
 +Export
 +------
 +To export your user account, simply visit Settings > Personal and click on the 'Export' button. A compressed zip file will be generated on the fly and downloaded to your computer. This file includes all of your files and application data that was stored on your ownCloud account. You may use this as a method of backing up your personal account.
 +
 +Import
 +------
 +To import your user account, you must first have an existing account on your new ownCloud install. Then follow this procedure:
 +
 +#. Login to your new account on the new ownCloud instance
 +#. Navigate to the Settings > Personal page
 +#. Select the 'Import' button, and locate the zip file that you downloaded from your old ownCloud instance
 +#. Wait for the file to be uploaded and imported
 +
- .. note:: Your user account credentials will **not** be migrated.
++.. note:: Your user account credentials will **not** be migrated.
diff --cc core/doc/user/_sources/pim/calendar.txt
index fcb1fa3,0000000..8d92419
mode 100644,000000..100644
--- a/core/doc/user/_sources/pim/calendar.txt
+++ b/core/doc/user/_sources/pim/calendar.txt
@@@ -1,99 -1,0 +1,99 @@@
 +Using the Calendar App
 +======================
 +
 +Creating a calendar
 +-------------------
 +
 +.. figure:: ../images/calendar_manage-calendars.png
-    :scale: 30
++Calendar view
 +
 +If you use the calendar the first time, there will be already a calendar called
 +"Default calendar". You can manage your calendars with a click on the "Calendar"
 +button in the top right corner. In the dialog, which will appear, you can add,
 +edit, export, enable, disable and delete your calendars. There will be also a
- link for CalDav access.
++link for CalDAV access.
 +
- Synchronising Calendars with CalDav
++Synchronising Calendars with CalDAV
 +-----------------------------------
 +
 +Assuming you access your web interface via an address like this::
 +
 +  http://ADDRESS
 +
 +Then you can access your calendars with CalDAV-compatible programs like
 +Kontact, Evolution, Thunderbird using the following URL::
 +
 +  http://ADDRESS/remote.php/caldav
 +
 +To use the ownCloud calendar with Apple iCal you will need to use the following
 +URL, including the trailing slash::
 +
 +  http://ADDRESS/remote.php/caldav/principals/username/
 +
 +Mozilla Lightning users need to this URL scheme::
 +
 +  https://ADDRESS/remote.php/caldav/calendars/USERNAME/CALENDARNAME
 +
 +   Example for a simple calendar: The "Default calendar" is referred to as "defaultcalendar", 
 +   and the users' name here is "test".
 +   The full URL (which on the picture can't be seen because of the
 +   short edit field) is then::
 +
 +       https://localhost/owncloud/remote.php/caldav/calendars/test/defaultcalendar
 +
 +.. Note: the calendar names are lowercased and the spaces removed. They are not to be URL-encoded anymore.
 +
 +Creating events
 +---------------
 +
 +To create an event just click on the date in the month view or choose the
 +timeframe in the weekview. In the dialog which will appear you can enter your
 +information like title, category, etc.
 +
 +.. figure:: ../images/calendar_createevent.png
-    :scale: 50
++New event window
 +
 +With the advanced options you can set the
 +description, the location and the repetition rate of an event. If the repeating
 +should end you can choose between setting the end by date or by occurrences. If
 +you choose in the weekview all days from Monday to Friday it will automatically
 +set the repeat rule to "every weekday". If the interval of the weekview can be
- devided by two it automatically set the repeat rule to "Bi-Weekly".
++divided by two it automatically set the repeat rule to "Bi-Weekly".
 +
 +Exporting / Importing events
 +----------------------------
 +
 +Export
 +~~~~~~
 +
 +.. figure:: ../images/calendar_export.png
-    :scale: 50
++Exporting an event
 +
 +You can export either a single event or a whole calendar. If you want to export
 +a single event click on it and press the export button in the bottom right
 +corner. If you want to export a whole calendar use the "Calendar" button as
 +described in the chapter "Creating a calendar".
 +
 +Import
 +~~~~~~
 +
 +.. figure:: ../images/calendar_import.png
-    :scale: 50
++Importing events
 +
- Import your calendar as ical file using the files app. Just click on the
++Import your calendar as iCal file using the files app. Just click on the
 +calendar file to open the import dialog. You can import the calendar into a new
 +calendar or into an already existing calendar.
 +
- .. note:: If the progressbar does not work properly, the folder
++.. note:: If the progress bar does not work properly, the folder
 +          ``apps/calendar/import_tmp/`` has probably no write permission.
 +
 +Why is the calendar app asking for my current location?
 +-------------------------------------------------------
 +
 +.. figure:: ../images/calendar_newtimezone1.png
-    :scale: 50
++Timezone set notification
 +
 +The calendar needs your current position in order to detect your timezone.
 +Without the correct timezone there will be a time offset between the events in
 +ownCloud and your desktop calendar you synchronise with ownCloud. You can also
 +set the timezone manually in the personal settings.
diff --cc core/doc/user/_sources/pim/contacts.txt
index 296c56e,0000000..b30aa24
mode 100644,000000..100644
--- a/core/doc/user/_sources/pim/contacts.txt
+++ b/core/doc/user/_sources/pim/contacts.txt
@@@ -1,139 -1,0 +1,146 @@@
 +Using the Contacts App
 +======================
 +
 +The contacts app of ownCloud is like any other mobile contact app but with more functionality.
 +Just as you open your account you will get the a default addressbook available.
 +We will see later that Of course you can always add and remove addressbooks in here.
 +
 +Adding contacts
 +---------------
 +There are two ways in which you can add contacts
 +
 +1. Add them manually
 +2. Import a VCF file
 +
 +Importing
 +~~~~~~~~~
 +
 +So first we'll check out how to import all the VCF files as they are a lot
 +more faster way of creating contacts.
- Just below the contact list, 3 buttons: The middle one let you upload files.
++Just below the contact list, click on the gear button:
 +
- .. image:: ../images/contact_bottombar.jpg
++.. image:: ../images/contact_bottombar.png
++Contact settings icon
 +
++Once you've clicked it, an up arrow button which lets you upload files will be shown:
 +
- Once you've clicked it, the upload window let you choose your files.
- We can upload the files one by one or upload all of them at one go.
++.. image:: ../images/contact_uploadbutton.png
++Contact file upload icon
 +
- Let me demonstrate.
++After choosing an addressbook to import into, click on the arrow. The upload window will be opened and let you choose your files.
++You can upload the files one by one or upload all of them at one go.
++
++Let us demonstrate.
 +Open the directory in which you store all the files and then do the following
 +Keep pressing CTRL and select the files to upload.
 +After you are done just click on the open button
 +After the upload it should look something like this in which all the names and contacts will be sorted alphabetically
 +
 +.. image:: ../images/contact_vcfpick.jpg
++Picking VCF files
 +
- Then, the interface ask you where to put your imported contacts.
- You have the ability to choose an existing addressbook or to create a new one.
- Then click on "OK" and that's all for the import of contacts.
++After upload, the interface will automatically place your contacts into ownCloud.
 +
- .. image:: ../images/contact_import.jpg
 +
 +Create contacts manually
 +~~~~~~~~~~~~~~~~~~~~~~~~
 +
- In the picture of the bottom bar, you could see the new contact button (first one).
++On the left side of contacts app, you could see the new contact button (first one).
 +Click on it. You can now see an empty contact in the main part of the interface.
 +You have the ability to add all your informations about the contact:
- the name, the address, the e-mail, the telephone nr, ...
++the name, the address, the e-mail, the telephone nr, etc.
 +
 +Just click on a field and start typing the information.
 +You can use the "Add Field" button to add another types of information for this contact.
 +
- .. image:: ../images/contact_emptycontact.jpg
++.. image:: ../images/contact_emptycontact.png
++Empty contact view
 +
 +When you want to remove an information of your contact, just click on little delete icon
 +at the right of the field you want to remove.
 +
 +Adding picture to the contact
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
- 
 +There are two methods in which you can give a picture id to the specific contact
 +
 +.. image:: ../images/contact_picture.jpg
++Contact picture options
 +
 +1) **Direct upload**
 +2) **Select pics already uploaded in ownCloud files.**
 +
 +After you have selected the picture for the contact you get
 +an option to crop the picture to suit your requirements
 +
 +.. image:: ../images/contact_crop.jpg
++Cropping contact picture
 +
 +You can crop the picture however you wish and then press OK.
 +
- 
 +As you can see it is really easy to set things right in this app.
- It automatically pics up the First name, Middle name (if any) and the last name
++It automatically picks up the First name, Middle name (if any) and the last name
 +You may add or delete any section you want for your own convenience.
 +
- Creating new address books
++Creating new addressbooks
 +--------------------------
 +
- When you click on the third button of the bottom bar,
++When you click on settings button on bottom bar,
 +you will have access to the application's settings.
- Then, press on the "More button" to access the options of your Addressbooks.
++Then, you will be shown all available addressbooks to access the options.
 +
- .. image:: ../images/contact_del_ab.jpg
++.. image:: ../images/contact_del_ab.png
++Addressbook options
 +
- You have there the ability to add, delete, download or share your addressbooks.
++There, you have the ability to add, delete, download or share your addressbooks.
 +Hover your cursor on every icon to see what they mean.
 +
 +
- Keeping your address book in sync
++Keeping your addressbook in sync
 +---------------------------------
++
 +One of the most important thing in any contact app is to keep it in Sync.
- You can sync this contact app to your phone which has the following OS's- Android and IOS
++You can sync this contact app to your phone which has the following OS's- Android and iOS
 +
 +
 +Syncing with Android
 +~~~~~~~~~~~~~~~~~~~~
- 1) Install cardDav- Sync free from Google play store by visiting this link-  https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync
- 2) This app supports auto- configuration which is a Boon- after installing visit this link- carddavs://owncloud.example.net/remote.php/carddav/  to auto configure the app.
++
++1) Install CardDAV- Sync free from Google play store by visiting `this link <https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync>`_.
++2) This app supports auto- configuration which is a Boon- after installing visit this link - carddavs://example.org/remote.php/carddav/ to auto-configure the app.
 +3) Enter your login details
 +4) After the app has checked your login details you may just select- Sync server to phone option
 +5) That's it there is nothing else to do for Android :)
 +
 +.. image:: ../images/contact_syncopt.jpg
 +
- Syncing your IOS device
++Syncing your iOS device
 +~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Synchronizing the Address book
 +
 +1. Open the settings application.
 +2. Select Mail, Contacts, Calendars.
 +3. Select Add Account.
 +4. Select other as account type.
 +5. Select Add CardDAV account.
- 6. For server, type http://owncloud.example.net/remote.php/carddav/principals/username
++6. For server, type http://example.org/remote.php/carddav/principals/username
 +7. Enter your user name and password.
 +8. Select Next.
 +9. If your server does not support SSL, a warning will be displayed. Select Continue.
 +10. If the iPhone is unable to verify the account information perform the following:
 +
 +* Select OK.
 +* Select advanced settings.
 +* Make sure Use SSL is set to OFF.
 +* Change port to 80.
 +* Go back to account information and hit Save.
 +
- Now should now find your contacts in the address book of your iPhone
++Now should now find your contacts in the address book of your iPhone.
 +
 +
 +Other Syncing options provided by ownCloud
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 1. For android you may use their official android app-  https://owncloud.com/overview/mobileapps
 +
- 2. And for IOS(Iphone and Ipad) use their app - https://owncloud.com/overview/mobileapps
++1. For Android you may use official Android app which can be found `here <https://owncloud.org/install/>`_.
++2. And for iOS (iPhone and iPad) use their app which can be found `here <https://owncloud.org/install/>`_.
diff --cc core/doc/user/_sources/pim/sync_osx.txt
index 6369c5b,0000000..fecc23b
mode 100644,000000..100644
--- a/core/doc/user/_sources/pim/sync_osx.txt
+++ b/core/doc/user/_sources/pim/sync_osx.txt
@@@ -1,33 -1,0 +1,35 @@@
 +Synchronizing with OS X
 +=======================
 +
- To use ownCloud with iCal you will need to use the following URL: http://ADDRESS/remote.php/caldav/principals/username/
++To use ownCloud with iCal you will need to use the following URL::
++
++    http://ADDRESS/remote.php/caldav/principals/username/
 +
 +The setup is basically the same as with iOS using the path **ADDRESS/remote.php/caldav/principals/username/** to sync with ownCloud. For OS X 10.7 Lion and 10.8 Mountain Lion everything works fine, but OS X 10.6 (Snow Leopard) and older needs some fiddling to work. A user contributed the following:
 +
- #. Make sure, Addressbook is not running. If it is, select the windows and press Command + Q to terminate it.
- #. Navigate to **/Users/YOUR\_USERNAME/Library/Application Support/AddressBook/Sources**. If you have all ready some kind of address book setup, it is likely you will see some folders named like this **BEA92826-FBF3-4E53-B5C6-ED7C2B454430**. Note down what folders there are now and leave the window open.
- #. Open addressbook and try to add a new CardDav addressbook. At this point, it does not matter what information you enter. It will come up with the same error message you mentioned before when you click "Create". Ignore it and click "Create" again. A non-functional address book will be added.
- #. Close Address-Book again using Command + Q
++#. Make sure, addressbook is not running. If it is, select the windows and press Command + Q to terminate it.
++#. Navigate to **/Users/YOUR\_USERNAME/Library/Application Support/AddressBook/Sources**. If you have all ready some kind of addressbook setup, it is likely you will see some folders named like this **BEA92826-FBF3-4E53-B5C6-ED7C2B454430**. Note down what folders there are now and leave the window open.
++#. Open addressbook and try to add a new CardDav addressbook. At this point, it does not matter what information you enter. It will come up with the same error message you mentioned before when you click "Create". Ignore it and click "Create" again. A non-functional addressbook will be added.
++#. Close addressbook again using Command + Q
 +#. Go back to the folder window from step 2. You will now see a newly created folder with another long string as its name.
 +#. Navigate to the newly created folder and edit the **Configuration.plist** with your favorite text editor.
 +#. Search for a section looking like this::
 +
 +    <key>servername</key> <string>http://:0(null)</string> <key>username</key> <string>Whatever_you_entered_before</string>
 +
 +8. Make it look like this. Please note that the :80 after **YOUR_DOMAIN** is important::
 +
 +    <key>servername</key <string>http://YOUR_DOMAIN:80/owncloud/remote.php/carddav/principals/username</string> <key>username</key <string>username</string>
 +
- 9. Save the file and open Address Book again. It will not work yet.
++9. Save the file and open addressbook again. It will not work yet.
 +
 +10. Open the preferences for your ownCloud CardDAV-Account and enter your password.
 +
- 11. You may have to restart Address Book once more. After this, it should work.
++11. You may have to restart addressbook once more. After this, it should work.
 +
 +If it's still not working, have a look at the :doc:`troubleshooting` guide.
 +
 +There is also an easy `HOWTO`_ in the forum.
 +
 +
 +.. _HOWTO: http://forum.owncloud.org/viewtopic.php?f=3&t=132
diff --cc core/doc/user/_sources/pim/sync_thunderbird.txt
index 49f2f7b,0000000..61d90ab
mode 100644,000000..100644
--- a/core/doc/user/_sources/pim/sync_thunderbird.txt
+++ b/core/doc/user/_sources/pim/sync_thunderbird.txt
@@@ -1,32 -1,0 +1,32 @@@
- Thunderbird - Synchronize Address Book
++Thunderbird - Synchronize Addressbook
 +======================================
 +
- Address book
++Addressbook
 +------------
 +
- As someone who is new to OwnCloud, New to SoGo Connector, and new to Thunderbird Addressbook... here is what you need in excruciating pithy detail I needed to make this work (for all the other lost souls out there).
++As someone who is new to ownCloud, New to SoGo Connector, and new to Thunderbird Addressbook... here is what you need in excruciating pithy detail you need to make this work (for all the other lost souls out there):
 +
- 1. `<http://www.mozilla.org/en-US/thunderbird/>`__ **Thunderbird** for your OS unless it comes with your OS distribution (Linux) 
- #. `<http://www.sogo.nu/english/downloads/frontends.html>`__ **Sogo Connector** (latest release)
++#. `Thunderbird <http://www.mozilla.org/en-US/thunderbird/>`_ for your OS unless it comes with your OS distribution (Linux)
++#. `Sogo Connector <http://www.sogo.nu/english/downloads/frontends.html>`_ (latest release)
 +
 + With an installed Thunderbird mailtool, and installed SoGo Connector:
 +#. Thunderbird Addressbook is in the Thunderbird "Tools" Menu
 +#. In the Thunderbird Addressbook application:
 +
 +   -  "File > New > **Remote Addressbook**" (SoGo Connector added this)
 +   -  "**Name:**" is the name you want to give your Addressbook in the Thunderbird addressbook bar area
-    -  "**URL:**" is found in your OwnCloud Contacts area, that little Gear symbol 
++   -  "**URL:**" is found in your OwnCloud Contacts area, that little Gear symbol
++
 +.. image:: ../images/contact_thunderbird-Symbol_Gear.jpg
 +in the -bottom left- of the Contacts View (same symbol as found in the -top right- in the Calendar view). Then look for a little impeller symbol
 +
 +.. image:: ../images/contact_thunderbird-Symbol_Impeller.jpg
 +which will display the URL you need for your installation to work. 
 +
 +.. image:: ../images/contact_thunderbird-URL_config.jpg
-    
 +
- Once installed, synchronize (right click on your newly made remote addressbook and select "Synchronize"). You'll see your addressbook populate from OwnCloud! Don't click "read only" above unless you don't want to modify your OwnCloud server addressbook, like it contains a listing of corporate contacts and is shared with lots of people, and you don't want a new user dragging it somewhere unintended.
++Once installed, synchronize (right click on your newly made remote addressbook and select "Synchronize"). You'll see your addressbook populate from ownCloud! Don't click "read only" above unless you don't want to modify your ownCloud server addressbook, like it contains a listing of corporate contacts and is shared with lots of people, and you don't want a new user dragging it somewhere unintended.
 +
- The rest of the details of dealing with Thunderbird addressbook are left to the reader... First thing I learned is dragging a contact to a different addressbook is a "move" operation. If you are worried about losing the contact, save it to a VCF file using OwnCloud (Or LDIF using Thunderbird Addressbook) first! Like dragging from "OwnCloud Addressbook" to "Personal Address Book" removes the contact from OwnCloud Server (*deleting it from all the other synchronized installations*) and pu [...]
++The rest of the details of dealing with Thunderbird addressbook are left to the reader... First thing I learned is dragging a contact to a different addressbook is a "move" operation. If you are worried about losing the contact, save it to a VCF file using ownCloud (Or LDIF using Thunderbird Addressbook) first! Like dragging from "ownCloud Addressbook" to "Personal Address Book" removes the contact from ownCloud Server (*deleting it from all the other synchronized installations*) and pu [...]
 +
 +Contact *Pictures* are also sync'ed!
diff --cc core/doc/user/_sources/userpreferences.txt
index 0000000,0000000..370950b
new file mode 100644
--- /dev/null
+++ b/core/doc/user/_sources/userpreferences.txt
@@@ -1,0 -1,0 +1,31 @@@
++Changing Preferences
++====================
++
++.. figure:: images/oc_user_preferences.png
++
++As a user, you can change your personal settings by clicking on your username
++on the top-right of ownCloud instance and choosing *Personal*.
++
++If you are an administrator, you can also manage users and administer the server
++by using the related links. Those links will not be shown to a normal user.
++
++This document will explain the default items on this page. Depending on the enabled
++applications, you may have more options listed.
++
++* In the beginning of the page, you will see your usage and available quota.
++
++* You can change your password. For that, you need to enter your current and new password in the field
++  named *Password*. If you would like to able to recover your password via e-mail, fill the e-mail field
++  with the one that you currently using.
++
++* By default, your image will have the initial of your username. This image is currently used in editing documents.
++  You can either upload a new image or choose one from the existing images on your ownCloud to set.
++
++* In this page, you can also change your web interface language if you want to override the browser settings.
++
++* WebDAV link will allow you to only view and download your ownCloud files using a browser. You will still need
++  your username and password to access this page.
++
++* Documents app will have an option to specify the folder for newly created documents. You can set the folder here.
++
++* This page will have more options if you have e.g. external storage app enabled.
diff --cc core/doc/user/_sources/webinterface.txt
index ba33c25,0000000..9fe6517
mode 100644,000000..100644
--- a/core/doc/user/_sources/webinterface.txt
+++ b/core/doc/user/_sources/webinterface.txt
@@@ -1,55 -1,0 +1,55 @@@
 +The ownCloud Web Interface 
 +==========================
 +
 +You can connect to ownCloud with your web browser by pointing
 +it to the address that you have received from your service
 +provider. In case you are administering the server yourself,
- have a look at ownCloud Administrators Manual.
++have a look at `ownCloud Administrators Manual <http://doc.owncloud.org/server/6.0/admin_manual/>`_.
 +
 +When you enter the URL, you will receive a page that is similar
 +to the one depicted below:
 +
 +.. figure:: images/oc_connect.png
-    :scale: 50
 +
 +   The ownCloud login screen
 +
 +Login with the user name and password with you have received from
 +your service provider. If you have set up the server yourself,
 +log in with the user name which you have created during the
 +setup process. You can add further users through the settings,
 +or by hooking up a user backend, such as LDAP.
 +
 +Overview
 +--------
 +
 +After clicking the :guilabel:`Log in` button, you will be redirected
 +to ownCloud's main web interface:
 +
 +.. figure:: images/oc_ui.png
-    :scale: 50
++   :align: center
 +
 +   The ownCloud main interface with the essential elements numbered
 +
 +The web interface comprises of the following items:
 +
 +1. **Navigation bar**: Allows navigation between different parts of ownCloud,
-    provided by apps. Not all apps depicted in this screen shot are installed
++   provided by apps. Not all apps depicted in this screenshot are installed
 +   and enabled by default.
 +2. **Application view**: This is where apps show their content. By default, this
 +   will show the files and directory (file view) of your user on the ownCloud
 +   installation.
- 3. **Upload/Create button**: This allows you to create new files or upload
++3. **New/Upload button**: This allows you to create new files or upload
 +   existing ones from your device. Note that you can also drop files from
 +   Explorer or Finder onto the ownCloud file view and they will get uploaded to
-    ownCloud.
- 4. **Search/Logout**: Search allows you to look for files and
-    directories. Currently, ownCloud does not provide a full text search, but
-    this may change in future releases.
- 5. **Settings**: This button provides access to the settings menu, where you can
++   ownCloud. With *New* button, you can create a text file, folder or download
++   a file from the provided URL.
++4. **Search/Settings**: Search allows you to look for files and
++   directories. Currently, ownCloud provides a full text search. If full text seach does
++   not work, administrators need to enable this app from app settings.
++   Settings menu provides access to the settings menu, where you can
 +   change your personal settings, such as the interface language or your
 +   password. You can also retrieve the WebDAV URL (see next chapter) and show
 +   your quota. Administrators will also get access to user management
-    (:guilabel:`Users`), the apps settings (:guilabel:`Apps`) and administrative
-    settings (:guilabel:`Admin`) including access to ownCloud's log.
++   (:guilabel:`Users`), the apps settings (:guilabel:`Apps`) and administrative settings (:guilabel:`Admin`) including access to ownCloud's log. You will also find logout button in this menu.
++5. **Apps**: This button is only visible to administrators. Using this button allows administrators to enable/disable apps.
 +
diff --cc core/doc/user/bookmarks.html
index 117415e,0000000..add4060
mode 100644,000000..100644
--- a/core/doc/user/bookmarks.html
+++ b/core/doc/user/bookmarks.html
@@@ -1,203 -1,0 +1,207 @@@
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.0 documentation" href="index.html" />
-     <link rel="next" title="User Account Migration" href="migration.html" />
++    <link rel="next" title="Documents" href="documents.html" />
 +    <link rel="prev" title="Troubleshooting" href="pim/troubleshooting.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1 current"><a class="current reference internal" href="">Using the Bookmarks App</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="#the-main-interface">The main interface</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#add-a-bookmark">Add a bookmark</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#edit-delete-a-bookmark">Edit/delete a bookmark</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#edit-delete-a-bookmark">Edit/Delete a bookmark</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#search">Search</a></li>
 +</ul>
 +</li>
- <li class="toctree-l2"><a class="reference internal" href="#the-bookmarklet">The bookmarklet</a></li>
++<li class="toctree-l2"><a class="reference internal" href="#the-bookmarklet">The Bookmarklet</a></li>
 +</ul>
 +</li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="using-the-bookmarks-app">
 +<h1>Using the Bookmarks App<a class="headerlink" href="#using-the-bookmarks-app" title="Permalink to this headline">¶</a></h1>
 +<p>If you want to add a bookmark to the Bookmarks application,
 +you can either use the main interface or the bookmarklet.</p>
 +<div class="section" id="the-main-interface">
 +<h2>The main interface<a class="headerlink" href="#the-main-interface" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="add-a-bookmark">
 +<h3>Add a bookmark<a class="headerlink" href="#add-a-bookmark" title="Permalink to this headline">¶</a></h3>
- <p>The main ownCloud interface contains 3 fields at the top where
- you can enter the website address (or URL), the title of your bookmark and
++<p>In the bookmark application, enter a URL into the top-left area of the content section. After adding an address, click on the pencil button to edit fields for the given address.
++The main ownCloud bookmark interface contains 3 fields at the top where
++you can enter the website address (or URL), the title of your bookmark, and
 +a set of tags separated from each other by a space.</p>
 +<div class="figure">
- <img alt="_images/bookmark_addurl.jpg" src="_images/bookmark_addurl.jpg" />
++<img alt="_images/bookmark_addurl.png" src="_images/bookmark_addurl.png" />
 +</div>
- <p>In this example, we have added the page : <a class="reference external" href="http://wikipedia.org">http://wikipedia.org</a> with the title “Wikipedia”
- and some tags describing what wikipedia is (for an easier search later on).</p>
++<p>Adding a bookmark manually</p>
++<p>In this example, we have added the page <cite>http://wikipedia.org</cite> with the title “Wikipedia”
++and some tags describing what Wikipedia is for an easier search later on.</p>
 +</div>
 +<div class="section" id="edit-delete-a-bookmark">
- <h3>Edit/delete a bookmark<a class="headerlink" href="#edit-delete-a-bookmark" title="Permalink to this headline">¶</a></h3>
- <p>You also have the possibility to edit or delete your bookmark.
- For that, just hover on the bookmark and click on the little pencil if you wish to edit the bookmark
- or on the cross if you want to the delete it.</p>
- <p>The bookmark will then be filled into the 3 fields at the top of the screen.
- Modify your bookmark to your need then hit the save button to persist the change.</p>
++<h3>Edit/Delete a bookmark<a class="headerlink" href="#edit-delete-a-bookmark" title="Permalink to this headline">¶</a></h3>
++<p>You also have the possibility to edit or delete a bookmark.</p>
++<p>To edit a bookmark, hover over the bookmark and click on the pencil icon.
++The bookmark details will then be filled into the 3 fields at the top of the screen.
++Modify your bookmark to your needs then click the save button to persist the change.</p>
++<p>To delete a bookmark, hover over the bookmark and click the cross icon.</p>
 +</div>
 +<div class="section" id="search">
 +<h3>Search<a class="headerlink" href="#search" title="Permalink to this headline">¶</a></h3>
 +<p>If you click on a tag, ownCloud will only display the bookmarks that
 +are described with this tag.</p>
- <p>You can also use the search bar of owncloud in the top right of your screen.</p>
++<p>You can also use the search bar of ownCloud in the top right of your screen.</p>
 +<p>Simply click on the “Bookmarks” menu in the sidebar to come back to
 +the default view.</p>
 +</div>
 +</div>
 +<div class="section" id="the-bookmarklet">
- <h2>The bookmarklet<a class="headerlink" href="#the-bookmarklet" title="Permalink to this headline">¶</a></h2>
++<h2>The Bookmarklet<a class="headerlink" href="#the-bookmarklet" title="Permalink to this headline">¶</a></h2>
 +<div class="figure">
- <img alt="_images/bookmark_setting.jpg" src="_images/bookmark_setting.jpg" />
++<img alt="_images/bookmark_setting.png" src="_images/bookmark_setting.png" />
 +</div>
- <p>The creator of this app understand that people won’t come,
- open the ownCloud page to add the bookmark when the see a cool site.
++<p>Bookmarklet link</p>
++<p>The creator of this app understands that people won’t want to
++open the ownCloud boorkmarks page to add a bookmark every time they see a cool site.
 +This is why they have made this cool “bookmarklet”.</p>
 +<p>A bookmarklet is small button that you can drag and drop in your bookmarks.
- The next time you see a cool new site, press on this special bookmark,
- it will add the site to your ownCloud bookmarks.</p>
- <p>To find this bookmark go to your personnal preference and search for
- the “Bookmarklet” item.</p>
++The next time you see a cool new site, click on this special bookmark
++to add the site to your ownCloud bookmarks.</p>
++<p>To find this bookmark, click on the gear button at the bottom of the bookmarks app.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/contents.html
index a9aff4d,0000000..ce75317
mode 100644,000000..100644
--- a/core/doc/user/contents.html
+++ b/core/doc/user/contents.html
@@@ -1,241 -1,0 +1,263 @@@
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.0 documentation" href="index.html" />
 +    <link rel="next" title="User Documentation" href="index.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="#">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="#">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="owncloud-documentation-contents">
 +<span id="contents"></span><h1>ownCloud documentation contents<a class="headerlink" href="#owncloud-documentation-contents" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +</div>
 +<div class="toctree-wrapper compound">
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="webinterface.html#overview">Overview</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="files/files.html">Accessing your Files (WebDav)</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="files/filesweb.html">Accessing your Files (Web Interface)</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#navigating-inside-your-owncloud">Navigating inside your ownCloud</a></li>
++<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#creating-uploading-files">Creating/uploading files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#selecting-files">Selecting files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#viewing-files">Viewing files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#moving-files">Moving files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#sharing-files">Sharing files</a></li>
++</ul>
++</li>
++<li class="toctree-l2"><a class="reference internal" href="files/files.html">Accessing your Files (WebDAV)</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#linux">Linux</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#macos">MacOS</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#windows">Windows</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#sync-client">Sync Client</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#mobile">Mobile</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="files/versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="files/deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="files/sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files/sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="files/encryption.html">Files Encryption</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="files/encryption.html#what-gets-encrypted">What gets encrypted</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/encryption.html#decrypt-your-data-again">Decrypt your data again</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/encryption.html#settings">Settings</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="files/quota.html">Storage Quota</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="files/quota.html#checking-the-available-space">Checking the available space</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/quota.html#sharing">Sharing</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/quota.html#excluded-from-quota">Excluded from quota</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="files/configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="pim/contacts.html">Using the Contacts App</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#adding-contacts">Adding contacts</a></li>
- <li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#creating-new-address-books">Creating new address books</a></li>
- <li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#keeping-your-address-book-in-sync">Keeping your address book in sync</a></li>
++<li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#creating-new-addressbooks">Creating new addressbooks</a></li>
++<li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#keeping-your-addressbook-in-sync">Keeping your addressbook in sync</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/calendar.html">Using the Calendar App</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#creating-a-calendar">Creating a calendar</a></li>
- <li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#synchronising-calendars-with-caldav">Synchronising Calendars with CalDav</a></li>
++<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#synchronising-calendars-with-caldav">Synchronising Calendars with CalDAV</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#creating-events">Creating events</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#exporting-importing-events">Exporting / Importing events</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#why-is-the-calendar-app-asking-for-my-current-location">Why is the calendar app asking for my current location?</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/sync_ios.html">iOS - Synchronize iPhone/iPad</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/sync_ios.html#calendar">Calendar</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/sync_ios.html#address-book">Address book</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="pim/sync_thunderbird.html">Thunderbird - Synchronize Address Book</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="pim/sync_thunderbird.html#address-book">Address book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="pim/sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="pim/sync_thunderbird.html#addressbook">Addressbook</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/troubleshooting.html">Troubleshooting</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/troubleshooting.html#service-discovery">Service discovery</a></li>
 +</ul>
 +</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="bookmarks.html#the-main-interface">The main interface</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="bookmarks.html#add-a-bookmark">Add a bookmark</a></li>
- <li class="toctree-l3"><a class="reference internal" href="bookmarks.html#edit-delete-a-bookmark">Edit/delete a bookmark</a></li>
++<li class="toctree-l3"><a class="reference internal" href="bookmarks.html#edit-delete-a-bookmark">Edit/Delete a bookmark</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="bookmarks.html#search">Search</a></li>
 +</ul>
 +</li>
- <li class="toctree-l2"><a class="reference internal" href="bookmarks.html#the-bookmarklet">The bookmarklet</a></li>
++<li class="toctree-l2"><a class="reference internal" href="bookmarks.html#the-bookmarklet">The Bookmarklet</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="documents.html#the-main-interface">The main interface</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="documents.html#create-upload-a-document">Create/Upload a Document</a></li>
++<li class="toctree-l3"><a class="reference internal" href="documents.html#edit-a-document">Edit a Document</a></li>
++<li class="toctree-l3"><a class="reference internal" href="documents.html#delete-a-document">Delete a Document</a></li>
++<li class="toctree-l3"><a class="reference internal" href="documents.html#share-a-document">Share a Document</a></li>
++</ul>
++</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="migration.html#export">Export</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="migration.html#import">Import</a></li>
 +</ul>
 +</li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="external_storage/google_drive.html#google-drive">Google Drive</a></li>
 +</ul>
 +</li>
 +</ul>
 +</div>
 +<div class="section" id="indices-and-tables">
 +<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
 +<ul class="simple">
 +<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/documents.html
index 0000000,0000000..93a9aac
new file mode 100644
--- /dev/null
+++ b/core/doc/user/documents.html
@@@ -1,0 -1,0 +1,216 @@@
++
++<!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>Documents — ownCloud User Manual 6.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:    '',
++        VERSION:     '6.0',
++        COLLAPSE_INDEX: false,
++        FILE_SUFFIX: '.html',
++        HAS_SOURCE:  true
++      };
++    </script>
++    <script type="text/javascript" src="_static/jquery.js"></script>
++    <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 6.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">
++(function () {
++  /**
++   * Patch TOC list.
++   *
++   * Will mutate the underlying span to have a correct ul for nav.
++   *
++   * @param $span: Span containing nested UL's to mutate.
++   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
++   */
++  var patchToc = function ($ul, minLevel) {
++    var findA;
++
++    // Find all a "internal" tags, traversing recursively.
++    findA = function ($elem, level) {
++      var level = level || 0,
++        $items = $elem.find("> li > a.internal, > ul, > li > ul");
++
++      // Iterate everything in order.
++      $items.each(function (index, item) {
++        var $item = $(item),
++          tag = item.tagName.toLowerCase(),
++          pad = 15 + ((level - minLevel) * 10);
++
++        if (tag === 'a' && level >= minLevel) {
++          // Add to existing padding.
++          $item.css('padding-left', pad + "px");
++          console.log(level, $item, 'padding-left', pad + "px");
++        } else if (tag === 'ul') {
++          // Recurse.
++          findA($item, level + 1);
++        }
++      });
++    };
++
++    console.log("HERE");
++    findA($ul);
++  };
++
++  $(document).ready(function () {
++    // Add styling, structure to TOC's.
++    $(".dropdown-menu").each(function () {
++      $(this).find("ul").each(function (index, item){
++        var $item = $(item);
++        $item.addClass('unstyled');
++      });
++      $(this).find("li").each(function () {
++        $(this).parent().append(this);
++      });
++    });
++
++    // Patch in level.
++    patchToc($("ul.globaltoc"), 2);
++    patchToc($("ul.localtoc"), 2);
++
++    // Enable dropdown.
++    $('.dropdown-toggle').dropdown();
++  });
++}());
++</script>
++
++  </head>
++  <body>
++  
++
++<div class="container">
++  <div class="content">
++    <div class="page-header">
++      <h1><a href="contents.html">ownCloud User Manual</a></h1>
++
++    </div>
++    
++			<div class="row">
++				<div class="span3">
++					<div class="sidebar">
++						<div class="well">
++							<div class="menu-support-container">
++								<ul id="menu-support" class="menu">
++									<ul>
++										<li><a href="contents.html">Overview</a></li>
++									</ul>
++                  <ul>
++<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
++</ul>
++<ul class="current">
++<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
++<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
++<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
++<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1 current"><a class="current reference internal" href="">Documents</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="#the-main-interface">The main interface</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="#create-upload-a-document">Create/Upload a Document</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#edit-a-document">Edit a Document</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#delete-a-document">Delete a Document</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#share-a-document">Share a Document</a></li>
++</ul>
++</li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
++<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
++</ul>
++
++								</ul>
++							</div>
++						</div>
++					</div>
++				</div>
++        
++
++				<div class="span9">
++					<div class="page-content">
++						
++  <div class="section" id="documents">
++<h1>Documents<a class="headerlink" href="#documents" title="Permalink to this headline">¶</a></h1>
++<p>Document editing is one of the new features in ownCloud 6. With this app, multiple users
++can edit rich-text simultaneously. The documents can be created from within the
++web-interface or existing documents can be uploaded. Sharing and editing can be done
++securely in the browser and be shared inside ownCloud or via a public link. User that
++have an account on the same server can be invited or public invitations can also be
++sent be email. The editing works on top of normal ODF files that are stored in ownCloud.</p>
++<div class="section" id="the-main-interface">
++<h2>The main interface<a class="headerlink" href="#the-main-interface" title="Permalink to this headline">¶</a></h2>
++<div class="figure">
++<img alt="_images/oc_documents.png" src="_images/oc_documents.png" />
++</div>
++<div class="section" id="create-upload-a-document">
++<h3>Create/Upload a Document<a class="headerlink" href="#create-upload-a-document" title="Permalink to this headline">¶</a></h3>
++<p>In the documents application, click on the respective buttons to create or upload a document into your ownCloud. The <em>New document</em> button will create a document named “New document.odt”. The extension ODT is an OpenDocument format, which many major office applications let you create/edit/view.</p>
++<p>The <em>Upload</em> button allows you to upload any kind of document, but currently you can only edit ODT files within ownCloud.</p>
++</div>
++<div class="section" id="edit-a-document">
++<h3>Edit a Document<a class="headerlink" href="#edit-a-document" title="Permalink to this headline">¶</a></h3>
++<p>If ownCloud contains at least one ODT file, you can immediately start editing by clicking on
++the file within the documents app. Clicking on documents in files app will only display it. Below, you
++can see editing a newly created document file:</p>
++<div class="figure">
++<img alt="_images/oc_documents_edit.png" src="_images/oc_documents_edit.png" />
++</div>
++<p>Here is the explanation of each field in the image shown above:</p>
++<ol class="arabic simple">
++<li>Clicking on the file name allows you to change filename.</li>
++<li>Allows you to share the document to public, specific users or groups. Will be explained in detail in <a class="reference internal" href="#share-a-document"><em>Share a document</em></a> section.</li>
++<li>Formatting toolbar lets you change text styles.</li>
++<li>Zoom in/out</li>
++<li>Close document by saving changes</li>
++<li>Users currently editing this document</li>
++</ol>
++<div class="section" id="collaboratively-editing-a-document">
++<h4>Collaboratively Editing a Document<a class="headerlink" href="#collaboratively-editing-a-document" title="Permalink to this headline">¶</a></h4>
++<p>To edit a file collaboratively, it needs to be shared with at least one user by using the <em>Share</em> button. When multiple uses have permission to edit a document, they will be able to edit it at the same time. The cursor of all editing users will be the same color as the border color of their user picture.</p>
++<div class="figure">
++<img alt="_images/oc_documents_col_edit.png" src="_images/oc_documents_col_edit.png" />
++</div>
++<p>If a user is not a local user (e.g accessing the file using public link), he/she will be shown as guest in user list and they will type a nickname before editing.</p>
++</div>
++</div>
++<div class="section" id="delete-a-document">
++<h3>Delete a Document<a class="headerlink" href="#delete-a-document" title="Permalink to this headline">¶</a></h3>
++<p>A document can be deleted using the files app and following the same procedure as for other file types. Clicking on the cross icon deletes the selected document.</p>
++</div>
++<div class="section" id="share-a-document">
++<span id="id1"></span><h3>Share a Document<a class="headerlink" href="#share-a-document" title="Permalink to this headline">¶</a></h3>
++<p>Document sharing has the same options as when sharing other files. While editing a document, you can use the <em>Share</em> button to enable other users to edit the document. This button will display all available options to share:</p>
++<div class="figure">
++<img alt="_images/oc_documents_share.png" src="_images/oc_documents_share.png" />
++</div>
++<p>By default, you can enter local users or groups to share with. Checking <em>Share link</em> will enable sharing via a public link, for which you can set a password to prevent editing by unwanted users. Shares can also have an expiration date that will expire the link after a given date. ownCloud will send the public link to users by email by typing each email address into the email field.  Separate multiple email addresses with a space.</p>
++<p>To see all of the features of the ownCloud document app, watch the
++<a class="reference external" href="https://www.youtube.com/watch?v=70pCBnNPdew">video on YouTube</a>.</p>
++</div>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/user/external_storage/google_drive.html
index 21c3910,0000000..95835b1
mode 100644,000000..100644
--- a/core/doc/user/external_storage/google_drive.html
+++ b/core/doc/user/external_storage/google_drive.html
@@@ -1,204 -1,0 +1,206 @@@
 +
 +<!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>External storage — ownCloud User Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
-     <link rel="prev" title="User Account Migration" href="../migration.html" />
++    <link rel="prev" title="Changing Preferences" href="../userpreferences.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1 current"><a class="current reference internal" href="">External storage</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="#google-drive">Google Drive</a></li>
 +</ul>
 +</li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="external-storage">
 +<h1>External storage<a class="headerlink" href="#external-storage" title="Permalink to this headline">¶</a></h1>
 +<div class="section" id="google-drive">
 +<h2>Google Drive<a class="headerlink" href="#google-drive" title="Permalink to this headline">¶</a></h2>
 +<ol class="arabic">
 +<li><p class="first">All applications that access a Google API must be registered through the “Google Cloud Console” which can be accessed using the following URL:</p>
 +<div class="highlight-python"><pre>https://cloud.google.com/console</pre>
 +</div>
 +</li>
 +<li><p class="first">Enter your Google login credentials and press the <tt class="docutils literal"><span class="pre">Sign</span> <span class="pre">in</span></tt> button.</p>
 +<img alt="../_images/external_google_drive_1_sign_in.png" src="../_images/external_google_drive_1_sign_in.png" />
 +</li>
 +<li><p class="first">Enter your verification code which has been sent to you by SMS or the Authenticator App and press the <tt class="docutils literal"><span class="pre">Verify</span></tt> button.</p>
 +<img alt="../_images/external_google_drive_2_verify.png" src="../_images/external_google_drive_2_verify.png" />
 +</li>
 +<li><p class="first">Create a project, e.g. “ownCloud-Project”</p>
 +<img alt="../_images/external_google_drive_3_create_project.png" src="../_images/external_google_drive_3_create_project.png" />
 +</li>
 +<li><p class="first">Select the project and choose the “APIs & auth” menu entry.</p>
 +</li>
 +<li><p class="first">Make sure that the “Drive API” and “Drive SDK” status is set to “ON” in the APIs menu.</p>
 +<img alt="../_images/external_google_drive_4_enable_api.png" src="../_images/external_google_drive_4_enable_api.png" />
 +</li>
 +<li><p class="first">Click on the <tt class="docutils literal"><span class="pre">gear-wheel</span></tt> button behind “Drive API” or “Drive SDK” and choose the “API access” menu entry.</p>
 +</li>
 +<li><p class="first">Click on the <tt class="docutils literal"><span class="pre">Create</span> <span class="pre">another</span> <span class="pre">client</span> <span class="pre">ID...</span></tt> button and fill in the branding information.</p>
 +</li>
 +<li><p class="first">Click on the <tt class="docutils literal"><span class="pre">Next</span></tt> button and create a new client ID by selecting “Web application” as application type.</p>
 +</li>
 +<li><p class="first">Next to your site or hostname click on the <tt class="docutils literal"><span class="pre">Edit</span> <span class="pre">settings</span> <span class="pre">...</span></tt> button.</p>
 +</li>
 +<li><p class="first">Enter the following URLs to the “Authorized Redirect URIs” list and press the Update-button.</p>
 +</li>
 +</ol>
 +<div class="highlight-python"><pre>https://your-internet-domain/owncloud/index.php/settings/personal
 +https://your-internet-domain/owncloud/index.php/settings/admin</pre>
 +</div>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last"><strong>Attention:</strong> Make sure that the URLs contain a valid internet domain name and that this domain name is also used to access ownCloud, otherwise these URLs will not be accepted. This does not mean that ownCloud need to be accessible from the Internet, but that the domain name is send to Google to verify if the redirect URIs are valid.</p>
 +</div>
 +<ol class="arabic" start="12">
 +<li><p class="first">Login into ownCloud using the previously entered Internet domain.</p>
 +</li>
 +<li><p class="first">Click on the <tt class="docutils literal"><span class="pre">Add</span> <span class="pre">storage</span></tt> button in the ownCloud Admin or Personal settings dialog to add a Google Drive.</p>
 +</li>
 +<li><p class="first">Enter the folder name which should be used to access the share, e.g. “GDrive”, enter the Google OAuth 2.0 <strong>Client ID</strong> and <strong>Client secret</strong>. Additional for the admin settings you have to choose the <strong>user and/or group</strong> who/which should be allowed to access the Google Drive (Applicable).</p>
 +<img alt="../_images/external_google_drive_5_setup_ownCloud.png" src="../_images/external_google_drive_5_setup_ownCloud.png" />
 +</li>
 +<li><p class="first">Now press the <tt class="docutils literal"><span class="pre">Grant</span> <span class="pre">Access</span></tt> button and you will finally be redirected to a Google website.</p>
 +</li>
 +<li><p class="first">Click on the <tt class="docutils literal"><span class="pre">Accept</span></tt> button to confirm that you accept the Google data usage and data security policy.</p>
 +<img alt="../_images/external_google_drive_6_accept.png" src="../_images/external_google_drive_6_accept.png" />
 +</li>
 +</ol>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/configuring_big_file_upload.html
index 11d54bb,0000000..d792daa
mode 100644,000000..100644
--- a/core/doc/user/files/configuring_big_file_upload.html
+++ b/core/doc/user/files/configuring_big_file_upload.html
@@@ -1,166 -1,0 +1,169 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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="Storage Quota" href="quota.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="big-files">
 +<h1>Big Files<a class="headerlink" href="#big-files" title="Permalink to this headline">¶</a></h1>
 +<p>There are a few default configuration settings that you will want to change to enable ownCloud to operate
 +more effectively as a self hosted file sync and share server.
 +When uploading through the web client, ownCloud is governed by PHP and Apache.
 +As a default, PHP is configured for only 2 MB uploads.
 +This is not entirely useful, so it is important to increase these variables to the sizes you want to
 +support on your server.
- Ask your administrator to increase these variables for you or read the section in concern <a class="reference external" href="http://doc.owncloud.com/server/5.0EE/admin_manual/configuration/configuring_big_file_upload.html">within the
- Admin Documentation.</a></p>
++Ask your administrator to increase these variables for you or read the section in concern <a class="reference external" href="http://doc.owncloud.org/server/6.0/admin_manual/configuration/configuring_big_file_upload.html">within the
++Admin Documentation</a>.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/deletedfiles.html
index 1266b0b,0000000..4015f9e
mode 100644,000000..100644
--- a/core/doc/user/files/deletedfiles.html
+++ b/core/doc/user/files/deletedfiles.html
@@@ -1,172 -1,0 +1,177 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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="next" title="Desktop Synchronization" href="sync.html" />
 +    <link rel="prev" title="Version Control" href="versioncontrol.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="deleted-files">
 +<h1>Deleted Files<a class="headerlink" href="#deleted-files" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud keeps a copy of your deleted files in case you need them again. To
- make sure that the user doesn’t run out of memory the deleted files app
++make sure that the user doesn’t run out of memory, the deleted files app
 +manages the size of the deleted files for the user. The app takes care to never
 +use more that 50% of your currently available free space. If your deleted files
- exceed this limit ownCloud deletes the oldest versions until it meets the memory
++exceed this limit, ownCloud deletes the oldest versions until it meets the memory
 +usage limit again.</p>
- <p>Beside that ownCloud checks the age of the files every time a new files gets moved
- to the deleted files. By default deleted files stay in the trash bin for 180 days.
++<p>Deleted files can be found by clicking on the <em>Deleted files</em> button on files app of web interface.
++You can either restore or permanently delete using appropriate buttons.</p>
++<p>ownCloud also checks the age of deleted files every time new files are added
++to the deleted files. By default, deleted files stay in the trash bin for 180 days.
 +The Administrator can adjust this value in the config.php by setting the
 +<strong>*”trashbin_retention_obligation”*</strong> value. Files older than the
 +<strong>*”trashbin_retention_obligation”*</strong> will be deleted permanently.
- Additionally ownCloud calculates the maximum available space every time
- a new file was added. If the deleted files exceed the new maximum available space
- ownCloud will expire old deleted files until we meet the limit again.</p>
++Additionally, ownCloud calculates the maximum available space every time
++a new file is added. If the deleted files exceed the new maximum allowed space
++ownCloud will expire old deleted files until the limit is met once again.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/encryption.html
index ae364b1,0000000..0f12666
mode 100644,000000..100644
--- a/core/doc/user/files/encryption.html
+++ b/core/doc/user/files/encryption.html
@@@ -1,217 -1,0 +1,220 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Files & Synchronization" href="index.html" />
 +    <link rel="next" title="Storage Quota" href="quota.html" />
-     <link rel="prev" title="Desktop Synchronisation" href="sync.html" />
++    <link rel="prev" title="Desktop Synchronization" href="sync.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Files Encryption</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#what-gets-encrypted">What gets encrypted</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#decrypt-your-data-again">Decrypt your data again</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#settings">Settings</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="files-encryption">
 +<h1>Files Encryption<a class="headerlink" href="#files-encryption" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud ships a encryption app, which allows to encrypt all files stored in
 +your ownCloud. Once the encryption app was enabled by the admin all your files
 +will be encrypted automatically. Encryption and decryption always happens
 +server-side. This enables the user to continue to use all the other apps to
 +view and edit his data. But this also means that the server administrator could
 +intercept your data. Server-Side encryption is especially interesting if you
 +use external storages. This way you can make sure that the storage provider is
 +not able to read your data.</p>
 +<p>Please remember. Once the encryption app is enabled you need your log-in
 +password to decrypt and access your data. By default your data will be lost if
- you loss your log-in pasword. If you want to protect yourself against password
++you loss your log-in password. If you want to protect yourself against password
 +loss store your log-in password on a secure place or enable the recovery key
 +as described below.</p>
 +<div class="section" id="what-gets-encrypted">
 +<h2>What gets encrypted<a class="headerlink" href="#what-gets-encrypted" title="Permalink to this headline">¶</a></h2>
 +<p>The current version encrypts all your files stored in ownCloud.</p>
 +<p>At the moment we don’t encrypt:</p>
 +<ul class="simple">
 +<li>old files in the trash bin (files which were deleted before the encryption app was enabled)</li>
 +<li>image thumbnails from the gallery app and previews from the files app</li>
 +<li>search index from the full text search app</li>
 +</ul>
 +<p>All this data is stored directly on your ownCloud server, so you don’t have to worry to expose
 +your data to a third party storage provider.</p>
 +</div>
 +<div class="section" id="decrypt-your-data-again">
 +<h2>Decrypt your data again<a class="headerlink" href="#decrypt-your-data-again" title="Permalink to this headline">¶</a></h2>
 +<p>If the encryption app was disabled users can decrypt their files again in their
 +personal settings. After this was done they can continue to use their ownCloud
 +without encryption.</p>
 +</div>
 +<div class="section" id="settings">
 +<h2>Settings<a class="headerlink" href="#settings" title="Permalink to this headline">¶</a></h2>
 +<p>Once the encryption app is enabled you will find some additional settings on
 +your personal settings page.</p>
 +<div class="section" id="recovery-key">
 +<h3>Recovery Key<a class="headerlink" href="#recovery-key" title="Permalink to this headline">¶</a></h3>
 +<p>If the admin enabled the recovery-key you can decide by your own if you
 +want to use this feature for your account. If you enable “Password recovery”
 +the admin will be able to read your data with a special password. This allows
 +him to recover your files in case of password loss. If the recovery-key is not
 +enabled than there is no way to restore your files if you loss your log-in
 +password.</p>
 +</div>
 +<div class="section" id="change-private-key-password">
 +<h3>Change Private Key Password<a class="headerlink" href="#change-private-key-password" title="Permalink to this headline">¶</a></h3>
 +<p>This option will be only available if your log-in password but not your
 +encryption password was changed by your admin. This can happen if your ownCloud
 +provider uses a external user back-end, e.g. LDAP, and changed your log-in
 +password there. In this case you can set your encryption password to your new
 +log-in password by providing your old and new log-in password. The encryption
 +app only works if log-in password and encryption password is identical.</p>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/files.html
index e6334d3,0000000..a6b48cd
mode 100644,000000..100644
--- a/core/doc/user/files/files.html
+++ b/core/doc/user/files/files.html
@@@ -1,385 -1,0 +1,388 @@@
 +
 +<!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 6.0 documentation</title>
++    <title>Accessing your Files (WebDAV) — ownCloud User Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
++    <link rel="prev" title="Accessing your Files (Web Interface)" href="filesweb.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
- <li class="toctree-l2 current"><a class="current reference internal" href="">Accessing your Files (WebDav)</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2 current"><a class="current reference internal" href="">Accessing your Files (WebDAV)</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#linux">Linux</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#macos">MacOS</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#windows">Windows</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#sync-client">Sync Client</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#mobile">Mobile</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="accessing-your-files-webdav">
- <h1>Accessing your Files (WebDav)<a class="headerlink" href="#accessing-your-files-webdav" title="Permalink to this headline">¶</a></h1>
++<h1>Accessing your Files (WebDAV)<a class="headerlink" href="#accessing-your-files-webdav" title="Permalink to this headline">¶</a></h1>
 +<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>youraddress.com/</strong> to the URL of your ownCloud server installation</p>
++<p class="last">You will have to adjust <strong>example.org/</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/owncloud/remote.php/webdav</pre>
++<p>The URL that you have to use to connect to the ownCloud installation in nautilus is:</p>
++<div class="highlight-python"><pre>davs://example.org/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>
 +</div>
 +<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/owncloud/remote.php/webdav</pre>
++<p>Click in the address area and enter:</p>
++<div class="highlight-python"><pre>webdav://example.org/owncloud/remote.php/webdav</pre>
 +</div>
 +<img alt="../_images/dolphin_webdav.png" src="../_images/dolphin_webdav.png" />
 +<p>or:</p>
 +<ol class="arabic simple">
 +<li>Open Dolphin and click on where it says Network in the left hand Places column.</li>
 +<li>Click on the icon labeled <strong>Add a Network Folder</strong>.</li>
 +<li>It should come up with WebDAV already selected. Make sure it is and then click <strong>Next</strong>.</li>
 +<li>Enter the following settings:</li>
 +</ol>
 +<ul>
 +<li><p class="first">Name: The name you’ll see in the <strong>Places</strong> bookmark, for example ownCloud</p>
 +</li>
 +<li><p class="first">User: Your ownCloud username you use to log in, for example admin</p>
 +</li>
- <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><p class="first">Server: Your ownCloud domain name, for example <strong>example.org</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">remote</span><span class="o">.</span><span class="n">php</span><span class="o">/</span><span class="n">webdav</span>
 +</pre></div>
 +</div>
 +</li>
 +</ul>
 +<ol class="arabic simple" start="5">
 +<li>Create icon checkbox: Tick to get a bookmark in the Places column</li>
 +<li>Port & Encrypted checkbox: Leave as it is unless you have special settings or an SSL certificate.</li>
 +</ol>
 +</div>
 +<div class="section" id="mounting-from-command-line">
 +<h3>Mounting from command line<a class="headerlink" href="#mounting-from-command-line" title="Permalink to this headline">¶</a></h3>
 +<ol class="arabic">
 +<li><p class="first">Install the WebDAV support using the davfs package. On Debian/Ubuntu, you can use:</p>
 +<div class="highlight-python"><pre>sudo apt-get install davfs2</pre>
 +</div>
 +</li>
 +<li><p class="first">Reconfigure davfs2 to allow access to normal users (select Yes when prompted):</p>
 +<div class="highlight-python"><pre>sudo dpkg-reconfigure davfs2</pre>
 +</div>
 +</li>
 +<li><p class="first">Add the users you want to be able to mount the share to the davfs2 group:</p>
 +<div class="highlight-python"><pre>sudo usermod -aG davfs2 <user></pre>
 +</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>youraddress.com/owncloud/remote.php/webdav /home/<username>/owncloud davfs user,rw,noauto 0 0</pre>
++<div class="highlight-python"><pre>example.org/owncloud/remote.php/webdav /home/<username>/owncloud davfs user,rw,noauto 0 0</pre>
 +</div>
 +</li>
 +</ol>
 +<p>Then, as each user who wants to mount the folder:</p>
 +<ol class="arabic">
 +<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>youraddress.com/owncloud/remote.php/webdav <username> <password></pre>
++<div class="highlight-python"><pre>example.org/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>
 +<div class="highlight-python"><pre>chmod 600 ~/.davfs2/secrets</pre>
 +</div>
 +</li>
 +<li><p class="first">Run the command:</p>
 +<div class="highlight-python"><pre>mount ~/owncloud</pre>
 +</div>
 +</li>
 +<li><p class="first">To automatically mount the folder on login, add the command you used in step 4 to <tt class="file docutils literal"><span class="pre">./.bashrc</span></tt></p>
 +</li>
 +</ol>
 +<div class="section" id="known-issues">
 +<h4>Known Issues<a class="headerlink" href="#known-issues" title="Permalink to this headline">¶</a></h4>
 +<p><strong>Problem:</strong> Resource temporarily unavailable</p>
 +<p><strong>Solution:</strong> If you experience trouble when you create a file in the directory, edit <tt class="file docutils literal"><span class="pre">/etc/davfs2/davfs2.conf</span></tt> and add:</p>
 +<div class="highlight-python"><pre>use_locks 0</pre>
 +</div>
 +<p><strong>Problem:</strong> Certificate warnings</p>
 +<p><strong>Solution:</strong> If you use a self-signed certificate, you will get a warning. If you are willing to take the risk of a man in the middle attack, run this command instead:</p>
 +<div class="highlight-python"><pre>echo "y" | mount ~/owncloud > /dev/null 2>&1</pre>
 +</div>
 +</div>
 +</div>
 +</div>
 +<div class="section" id="macos">
 +<h2>MacOS<a class="headerlink" href="#macos" title="Permalink to this headline">¶</a></h2>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">Finder suffers from a <a class="reference external" href="http://code.google.com/p/sabredav/wiki/Finder">series of implementation problems</a> and should only be used if the ownCloud server runs on <strong>Apache</strong> and <strong>mod_php</strong></p>
 +</div>
 +<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/owncloud/remote.php/webdav</pre>
++<p>The URL that you have to use to connect to the ownCloud installation in finder is:</p>
++<div class="highlight-python"><pre>http://example.org/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>
 +</div>
 +<div class="section" id="windows">
 +<h2>Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h2>
- <p>For Windows a seperate webdav client is recommended to access the files from your server. Choose one from the <a class="reference external" href="http://www.webdav.org/projects/">WebDav Project page</a></p>
- <p>Should you have to use the native implementation then you can assign ownCloud a drive letter.  This allows you to browse files stored on an ownCloudserver the way you would files stored in a mapped network drive.</p>
++<p>For Windows a seperate WebDAV client is recommended to access the files from your server. Choose one from the <a class="reference external" href="http://www.webdav.org/projects/">WebDav Project page</a></p>
++<p>Should you have to use the native implementation then you can assign ownCloud a drive letter. This allows you to browse files stored on an ownCloudserver the way you would files stored in a mapped network drive.</p>
 +<p>Using this feature requires network connectivity. If you want to store
 +your files offline, use the ownCloud Client to sync all files on your
 +ownCloud to one or more directories of your local hard drive.</p>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">Prior to mapping your drive, you will need to permit the use of Basic Authentication in the Windows Registry. The procedure is documented in <a class="reference external" href="http://support.microsoft.com/kb/841215">KB841215</a> and differs between Windows XP/Server 2003 and Windows Vista/7. Please follow the Knowledge Base article before proceeding, and follow the Vista instructions if you run Windows 7.</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://youraddress.com/owncloud</strong>,
- that is, entering this URL in your webbrowser will bring up the login screen.
++<p>Suppose your ownCloud is installed at <strong>https://example.org/owncloud</strong>,
++that is, entering this URL in your web browser will bring up the login screen.
 +Running:</p>
- <div class="highlight-python"><pre>net use Z: https://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword</pre>
++<div class="highlight-python"><pre>net use Z: https://example.org/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: \\youraddress.com at ssl\owncloud\remote.php\webdav /user:youruser yourpassword</pre>
++<div class="highlight-python"><pre>net use Z: \\example.org 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://youraddress.com/owncloud/remote.php/webdav /user:youruser yourpassword
- net use Z: \\youraddress.com\owncloud\remote.php\webdav /user:youruser yourpassword</pre>
++<div class="highlight-python"><pre>net use Z: http://example.org/owncloud/remote.php/webdav /user:youruser yourpassword
++net use Z: \\example.org\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://youraddress.com/owncloud/remote.php/webdav</pre>
++<div class="highlight-python"><pre>https://example.org/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">
- <a class="reference internal image-reference" href="../_images/explorer_webdav.png"><img alt="../_images/explorer_webdav.png" src="../_images/explorer_webdav.png" /></a>
++<a class="reference internal image-reference" href="../_images/explorer_webdav.png"><img alt="../_images/explorer_webdav.png" src="../_images/explorer_webdav.png" style="width: 502.4px; height: 366.4px;" /></a>
 +<p class="caption">Mapping WebDAV on Windows Explorer.</p>
 +</div>
 +<p>After pressing <strong>Finish</strong>, Windows Explorer will map the network drive and your ownCloud instance should be available</p>
 +</div>
 +<div class="section" id="using-cyberduck-4-2-1">
 +<h3>Using Cyberduck (4.2.1)<a class="headerlink" href="#using-cyberduck-4-2-1" title="Permalink to this headline">¶</a></h3>
 +<p>Specify a server without any leading protocol information. e.g.:</p>
 +<dl class="docutils">
 +<dt>Server</dt>
- <dd>youraddress.com</dd>
++<dd>example.org</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">
 +<dt>Port</dt>
 +<dd>80 (for WebDAV)
 +443 (for WebDAV (HTTPS/SSL))</dd>
 +</dl>
- <p>Use the ‘More Options’ drop-down menu to add the rest of your webdav URL into the ‘Path’ field. e.g.:</p>
++<p>Use the ‘More Options’ drop-down menu to add the rest of your WebDAV URL into the ‘Path’ field. e.g.:</p>
 +<dl class="docutils">
 +<dt>Path</dt>
 +<dd>remote.php/webdav</dd>
 +</dl>
 +</div>
 +<div class="section" id="known-problems">
 +<h3>Known Problems<a class="headerlink" href="#known-problems" title="Permalink to this headline">¶</a></h3>
 +<dl class="docutils">
 +<dt>Problem</dt>
 +<dd>Windows refuses to connect via HTTPS</dd>
 +<dt>Solution</dt>
 +<dd>The Windows WebDAV Client does not support Server Name Indication (SNI) on
 +encrypted connections. If you encounter an error mounting an SSL-encrypted
 +ownCloud instance, please contact your provider about assigning a dedicated
 +IP address for your SSL-based server.</dd>
 +<dt>Problem</dt>
 +<dd>I receive the error <strong>Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved.</strong></dd>
 +<dt>Solution</dt>
 +<dd>Windows limits the maximum size a file transferred from or to  a WebDAV
 +share may have.  You can increase the value <strong>FileSizeLimitInBytes</strong> in
 +<strong>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesWebClientParameters</strong>.
 +by clicking on <strong>Modify</strong>. In order to increase the limit to the maximum
 +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">
 +<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>
 +</div>
 +</div>
 +<div class="section" id="sync-client">
 +<h2>Sync Client<a class="headerlink" href="#sync-client" title="Permalink to this headline">¶</a></h2>
 +<p>However, some applications only allow you to save to a local folder. To
- get around this issue, you can use the <a class="reference internal" href="index.html"><em>ownCloud sync clients</em></a></p>
++get around this issue, you can use the <a class="reference external" href="http://owncloud.org/documentation/sync-clients/">ownCloud sync clients</a></p>
 +</div>
 +<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">youraddress</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">example</span><span class="o">.</span><span class="n">org</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>
- <p>There are apps in development for both <a class="reference external" href="http://gitorious.org/owncloud/android">Android</a> and <a class="reference external" href="http://gitorious.org/owncloud/webos">webOS</a>. Feel
++<p>There are apps in development for both <a class="reference external" href="http://github.com/owncloud/android">Android</a> and <a class="reference external" href="http://github.com/owncloud/webos">webOS</a>. Feel
 +free to <a class="reference external" href="/contribute/">contribute, if you can</a>! Right now you can use other apps to
 +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>
++good (proprietary) app for <a class="reference external" href="https://play.google.com/store/apps/details?id=com.schimera.webdavnavlite">Android App</a> , <a class="reference external" href="https://itunes.apple.com/app/webdav-navigator/id382551345">iPhone</a> & <a class="reference external" href="http://appworld.blackberry.com/webstore/content/46816">BlackBerry</a>.</p>
 +<p>The URL for these is:</p>
- <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>
++<div class="highlight-python"><div class="highlight"><pre><span class="n">example</span><span class="o">.</span><span class="n">org</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>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/filesweb.html
index 0000000,0000000..84d4c52
new file mode 100644
--- /dev/null
+++ b/core/doc/user/files/filesweb.html
@@@ -1,0 -1,0 +1,244 @@@
++
++<!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 (Web Interface) — ownCloud User Manual 6.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:    '../',
++        VERSION:     '6.0',
++        COLLAPSE_INDEX: false,
++        FILE_SUFFIX: '.html',
++        HAS_SOURCE:  true
++      };
++    </script>
++    <script type="text/javascript" src="../_static/jquery.js"></script>
++    <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 6.0 documentation" href="../index.html" />
++    <link rel="up" title="Files & Synchronization" href="index.html" />
++    <link rel="next" title="Accessing your Files (WebDAV)" href="files.html" />
++    <link rel="prev" title="Files & Synchronization" href="index.html" />
++<script type="text/javascript">
++(function () {
++  /**
++   * Patch TOC list.
++   *
++   * Will mutate the underlying span to have a correct ul for nav.
++   *
++   * @param $span: Span containing nested UL's to mutate.
++   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
++   */
++  var patchToc = function ($ul, minLevel) {
++    var findA;
++
++    // Find all a "internal" tags, traversing recursively.
++    findA = function ($elem, level) {
++      var level = level || 0,
++        $items = $elem.find("> li > a.internal, > ul, > li > ul");
++
++      // Iterate everything in order.
++      $items.each(function (index, item) {
++        var $item = $(item),
++          tag = item.tagName.toLowerCase(),
++          pad = 15 + ((level - minLevel) * 10);
++
++        if (tag === 'a' && level >= minLevel) {
++          // Add to existing padding.
++          $item.css('padding-left', pad + "px");
++          console.log(level, $item, 'padding-left', pad + "px");
++        } else if (tag === 'ul') {
++          // Recurse.
++          findA($item, level + 1);
++        }
++      });
++    };
++
++    console.log("HERE");
++    findA($ul);
++  };
++
++  $(document).ready(function () {
++    // Add styling, structure to TOC's.
++    $(".dropdown-menu").each(function () {
++      $(this).find("ul").each(function (index, item){
++        var $item = $(item);
++        $item.addClass('unstyled');
++      });
++      $(this).find("li").each(function () {
++        $(this).parent().append(this);
++      });
++    });
++
++    // Patch in level.
++    patchToc($("ul.globaltoc"), 2);
++    patchToc($("ul.localtoc"), 2);
++
++    // Enable dropdown.
++    $('.dropdown-toggle').dropdown();
++  });
++}());
++</script>
++
++  </head>
++  <body>
++  
++
++<div class="container">
++  <div class="content">
++    <div class="page-header">
++      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
++
++    </div>
++    
++			<div class="row">
++				<div class="span3">
++					<div class="sidebar">
++						<div class="well">
++							<div class="menu-support-container">
++								<ul id="menu-support" class="menu">
++									<ul>
++										<li><a href="../contents.html">Overview</a></li>
++									</ul>
++                  <ul>
++<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
++</ul>
++<ul class="current">
++<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
++<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
++<li class="toctree-l2 current"><a class="current reference internal" href="">Accessing your Files (Web Interface)</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="#navigating-inside-your-owncloud">Navigating inside your ownCloud</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#creating-uploading-files">Creating/uploading files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#selecting-files">Selecting files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#viewing-files">Viewing files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#moving-files">Moving files</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#sharing-files">Sharing files</a></li>
++</ul>
++</li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
++<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
++<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
++<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
++<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
++</ul>
++
++								</ul>
++							</div>
++						</div>
++					</div>
++				</div>
++        
++
++				<div class="span9">
++					<div class="page-content">
++						
++  <div class="section" id="accessing-your-files-web-interface">
++<h1>Accessing your Files (Web Interface)<a class="headerlink" href="#accessing-your-files-web-interface" title="Permalink to this headline">¶</a></h1>
++<p>Your ownCloud files can be accessed from anywhere by using your ownCloud’s web interface. In the files app,
++you can view (if a common type), move, rename, download, share and delete your files easily. If versioning app is
++enabled, you can also revert a file to specific version. See <a class="reference internal" href="versioncontrol.html"><em>Version Control</em></a> for details.</p>
++<div class="figure">
++<img alt="../_images/oc_filesweb.png" src="../_images/oc_filesweb.png" />
++</div>
++<p>Files app on ownCloud web interface</p>
++<p>With ownCloud 6, you can now see file thumbnails next to the filenames. By hovering your cursor on a file, you
++will be provided with some file operations. You can use rename, download, share buttons to perform those actions
++or click on the cross icon at the rightmost location to remove the hovered file. If the file is an editable
++office file, it will also show <em>Edit</em> button to open the file in documents app (if this app is enabled).</p>
++<div class="section" id="navigating-inside-your-owncloud">
++<h2>Navigating inside your ownCloud<a class="headerlink" href="#navigating-inside-your-owncloud" title="Permalink to this headline">¶</a></h2>
++<p>To navigate through folders in your ownCloud, you can simply click on a folder name. The navigation bar
++will show your current directory:</p>
++<div class="figure">
++<img alt="../_images/oc_filesweb_navigate.png" src="../_images/oc_filesweb_navigate.png" />
++</div>
++<p>Navigation bar</p>
++<p>You can click on one of the upper directories to navigate up or use home icon to navigate back into your root
++folder.</p>
++</div>
++<div class="section" id="creating-uploading-files">
++<h2>Creating/uploading files<a class="headerlink" href="#creating-uploading-files" title="Permalink to this headline">¶</a></h2>
++<p>You can create files by simply clicking on <em>New</em> button on files app. The <em>New</em> button will provide three
++options to choose from:</p>
++<div class="figure">
++<img alt="../_images/oc_filesweb_new.png" src="../_images/oc_filesweb_new.png" />
++</div>
++<p>New button options</p>
++<ul class="simple">
++<li><em>Text file</em> will create a simple text file and add into the current folder in your ownCloud.</li>
++<li><em>Folder</em> will create a folder in current folder.</li>
++<li><em>From link</em> will download the file from the provided link and place it into the current folder.</li>
++</ul>
++</div>
++<div class="section" id="selecting-files">
++<h2>Selecting files<a class="headerlink" href="#selecting-files" title="Permalink to this headline">¶</a></h2>
++<p>You can select one or more files by clicking on small thumbnails or icons of the files. To select all files in
++the current directory, use the checkbox just above the first file/folder on the list.</p>
++<p>If you select multiple files, selected files can be deleted or downloaded as ZIP by using the buttons just above of the file list.
++If download button is not visible, this means that administrator had disabled this feature.</p>
++</div>
++<div class="section" id="viewing-files">
++<h2>Viewing files<a class="headerlink" href="#viewing-files" title="Permalink to this headline">¶</a></h2>
++<p>ownCloud can display uncompressed text files, OpenDocument files, PDFs, and image files by simply clicking on
++the file name. If displaying of a file is not possible, a download process will start.</p>
++</div>
++<div class="section" id="moving-files">
++<h2>Moving files<a class="headerlink" href="#moving-files" title="Permalink to this headline">¶</a></h2>
++<p>In ownCloud web interface, file(s) can be moved by dragging and dropping them into a sub-directory. If you would like move a directory to an upper directory, drag the file(s) into one of the folders shown in navigation bar.</p>
++</div>
++<div class="section" id="sharing-files">
++<h2>Sharing files<a class="headerlink" href="#sharing-files" title="Permalink to this headline">¶</a></h2>
++<p>Any file/folder on ownCloud can be shared to download with a local user, group or any person online with a public link. Shared files/folders will show a <em>Shared</em> text next to their names.</p>
++<p>To share a file/folder, hover your cursor on an item in the files app and click <em>Share</em>. You will be provided with some options:</p>
++<div class="figure">
++<img alt="../_images/oc_files_share.png" src="../_images/oc_files_share.png" />
++</div>
++<p>Share dialog</p>
++<ul class="simple">
++<li>The first field is to share this file/folder with local users/groups. This is very useful
++if you are in a company and want to create a quick share with a collegue.</li>
++<li>If you click on <em>Share link</em>, the other options will be visible. Since this link allows everyone
++to download this file/folder, you may want to protect this share with a password. To do that,
++click on <em>Password protect</em> and set a password.</li>
++<li>If this share is a folder, you will also have an option to enable uploads into this folder using
++the provided link. This is very useful to collect files from multiple users into same place easily.</li>
++<li>If your server is configured with a mail server, you can type e-mail addresses seperated with space to send the link to multiple users.</li>
++<li>Finally, setting an expiration date will expiry the share after the specified date.</li>
++</ul>
++<p>If you type a user and/or group to the <em>share with</em> field, you will be given extra sharing options such as informing via e-mail,
++letting users edit (create, update, delete, re-share) the share. To revoke permissions from users, simply click on cross icon
++on the same line with the users.</p>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/user/files/index.html
index c39e4ef,0000000..d872d0d
mode 100644,000000..100644
--- a/core/doc/user/files/index.html
+++ b/core/doc/user/files/index.html
@@@ -1,168 -1,0 +1,172 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
-     <link rel="next" title="Accessing your Files (WebDav)" href="files.html" />
++    <link rel="next" title="Accessing your Files (Web Interface)" href="filesweb.html" />
 +    <link rel="prev" title="The ownCloud Web Interface" href="../webinterface.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="current reference internal" href="">Files & Synchronization</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="files-synchronization">
 +<h1>Files & Synchronization<a class="headerlink" href="#files-synchronization" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +<ul>
- <li class="toctree-l1"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l1"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l1"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l1"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l1"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/quota.html
index 6c35cea,0000000..8843133
mode 100644,000000..100644
--- a/core/doc/user/files/quota.html
+++ b/core/doc/user/files/quota.html
@@@ -1,226 -1,0 +1,229 @@@
 +
 +<!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>Storage Quota — ownCloud User Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Files & Synchronization" href="index.html" />
 +    <link rel="next" title="Big Files" href="configuring_big_file_upload.html" />
 +    <link rel="prev" title="Files Encryption" href="encryption.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Storage Quota</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#checking-the-available-space">Checking the available space</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#sharing">Sharing</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#excluded-from-quota">Excluded from quota</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="storage-quota">
 +<h1>Storage Quota<a class="headerlink" href="#storage-quota" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud makes it possible to specify a storage quota for users which is the <strong>maximum space</strong> a user is allowed to use for files located in their individual home storage.</p>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">When setting a quota, administrators need to be aware that it <strong>only applies to actual files</strong>, not application metadata. This means that when allocating a quota, they need to make sure there at least 10% more space available for a given user.</p>
 +</div>
 +<div class="section" id="checking-the-available-space">
 +<h2>Checking the available space<a class="headerlink" href="#checking-the-available-space" title="Permalink to this headline">¶</a></h2>
 +<p>You can check your available space by going to the “Personal” page from the top-right menu.</p>
 +<p>The available space of a given user is calculated using the following formula:</p>
 +<div class="highlight-python"><div class="highlight"><pre><span class="n">available_space</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">quota</span><span class="p">,</span> <span class="n">disk_free_space</span><span class="p">)</span> <span class="o">-</span> <span class="n">used_space</span>
 +</pre></div>
 +</div>
 +<p><tt class="docutils literal"><span class="pre">disk_free_space</span></tt> is the space available on the partition on which the user’s home storage is located on the server. It could happen that the available space on that partition is less than the user’s quota.</p>
 +</div>
 +<div class="section" id="sharing">
 +<h2>Sharing<a class="headerlink" href="#sharing" title="Permalink to this headline">¶</a></h2>
 +<p>When sharing files or directories, their used space is counted in the owner’s quota.</p>
 +<div class="section" id="shared-files">
 +<h3>Shared files<a class="headerlink" href="#shared-files" title="Permalink to this headline">¶</a></h3>
 +<p>If user A shares a file F with user B, the size of F will be counted in user A’s storage, even if the file is modified or its size is increased by user B.</p>
 +</div>
 +<div class="section" id="shared-directories">
 +<h3>Shared directories<a class="headerlink" href="#shared-directories" title="Permalink to this headline">¶</a></h3>
 +<p>If user A shares a directory D with user B, any file that is modified or uploaded by user B inside of directory D will count in user A’s used space.</p>
 +</div>
 +<div class="section" id="resharing">
 +<h3>Resharing<a class="headerlink" href="#resharing" title="Permalink to this headline">¶</a></h3>
 +<p>When resharing a file or a directory, the used space is still counted in the quota of the owner who shared it initially.</p>
 +</div>
 +<div class="section" id="public-sharing-with-upload-permission">
 +<h3>Public sharing with upload permission<a class="headerlink" href="#public-sharing-with-upload-permission" title="Permalink to this headline">¶</a></h3>
 +<p>If user A publicly shares (share with link) a directory D and enables the “public upload” permission, people with the link will be able to upload files into D and their sizes will be counted in user A’s used space.</p>
 +</div>
 +</div>
 +<div class="section" id="excluded-from-quota">
 +<h2>Excluded from quota<a class="headerlink" href="#excluded-from-quota" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="metadata-and-cache">
 +<h3>Metadata and cache<a class="headerlink" href="#metadata-and-cache" title="Permalink to this headline">¶</a></h3>
 +<p>Application metadata and cached information are excluded from the total used space.</p>
 +<p>Such data could be thumbnails (icon previews, pictures app), temporary files, encryption keys, etc.</p>
 +<p>Some apps are also storing information directly in the database (not as files) like the <a class="reference internal" href="../pim/calendar.html"><em>calendar</em></a> and <a class="reference internal" href="../pim/contacts.html"><em>contacts</em></a> apps. This data is also excluded from the total used space.</p>
 +</div>
 +<div class="section" id="deleted-files">
 +<h3>Deleted files<a class="headerlink" href="#deleted-files" title="Permalink to this headline">¶</a></h3>
 +<p>When deleting files, these are moved/copied to the <a class="reference internal" href="deletedfiles.html"><em>trashbin</em></a> at first. These files do not count in the user’s used space.</p>
 +<p>For example with a quota of 10 GB, if the user has 4 GB used space and 5 GB in the trashbin, they will still see 6 GB free space. If the user uploads 6 GB of files at this point, the <a class="reference internal" href="deletedfiles.html"><em>trashbin app</em></a> will discard deleted files when necessary to make room for the new files.</p>
 +</div>
 +<div class="section" id="version-control">
 +<h3>Version Control<a class="headerlink" href="#version-control" title="Permalink to this headline">¶</a></h3>
 +<p>The size of older file versions does not count in the used space.</p>
 +<p>For example with a quota of 10 GB, if the user has 4 GB used space and 5 GB of older file versions, they will still see 6 GB free space. If the user uploads 6 GB of files at this point, the <a class="reference internal" href="versioncontrol.html"><em>versions app</em></a> will discard older versions when necessary to make room for the new files.</p>
 +<p>See <a class="reference internal" href="versioncontrol.html"><em>Version Control</em></a> for details about the version expiration behavior.</p>
 +</div>
 +<div class="section" id="encryption">
 +<h3>Encryption<a class="headerlink" href="#encryption" title="Permalink to this headline">¶</a></h3>
 +<p>When files are <a class="reference internal" href="encryption.html"><em>encrypted</em></a>, they take slightly more physical space than the original files. Only the original size will be counted in the used space.</p>
 +</div>
 +<div class="section" id="external-storage">
 +<h3>External storage<a class="headerlink" href="#external-storage" title="Permalink to this headline">¶</a></h3>
 +<p>When mounting external storage, either as administrator or as user, the space available on that storage is not taken into account for the user’s quota.
 +It is currently not possible to set a quota for external storage.</p>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/sync.html
index 74ea6b7,0000000..0594de5
mode 100644,000000..100644
--- a/core/doc/user/files/sync.html
+++ b/core/doc/user/files/sync.html
@@@ -1,170 -1,0 +1,173 @@@
 +
 +<!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 6.0 documentation</title>
++    <title>Desktop Synchronization — ownCloud User Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2 current"><a class="current reference internal" href="">Desktop Synchronisation</a></li>
++<li class="toctree-l2 current"><a class="current reference internal" href="">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
-   <div class="section" id="desktop-synchronisation">
- <h1>Desktop Synchronisation<a class="headerlink" href="#desktop-synchronisation" title="Permalink to this headline">¶</a></h1>
++  <div class="section" id="desktop-synchronization">
++<h1>Desktop Synchronization<a class="headerlink" href="#desktop-synchronization" title="Permalink to this headline">¶</a></h1>
 +<p>For synchronizing files with your desktop computer, we recommend using the
 +<a class="reference external" href="http://owncloud.org/sync-client/">ownCloud Client</a> for Windows, Mac OS X and Linux.</p>
 +<p>The ownCloud Desktop Client enables you to connect to your private ownCloud Server.
 +You can create folders in your home directory, and keep the contents of those
 +folders synced with your ownCloud server. Simply copy a file into the directory
 +and the ownCloud desktop client does the rest. Make a change to the files on one
 +computer, it will flow across the others using these desktop sync clients. Always
 +have your latest files with you wherever you are.</p>
- <p>Its usage is documented separately in the <a class="reference external" href="http://doc.owncloud.com/desktop/1.2/">ownCloud Desktop Client Manual</a>.</p>
++<p>Its usage is documented separately in the <a class="reference external" href="http://doc.owncloud.com/desktop">ownCloud Desktop Client Manual</a>.</p>
 +<p>Furthermore, It is possible to synchronize your ownCloud calendar and address book
 +with a variety of different operating systems and devices. It is also possible to
 +mount your ownCloud storage via WebDAV, which is also documented in the next chapters.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/files/versioncontrol.html
index 97eb298,0000000..046cb25
mode 100644,000000..100644
--- a/core/doc/user/files/versioncontrol.html
+++ b/core/doc/user/files/versioncontrol.html
@@@ -1,179 -1,0 +1,191 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
++    <link rel="prev" title="Accessing your Files (WebDAV)" href="files.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Files & Synchronization</a><ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDav)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="filesweb.html">Accessing your Files (Web Interface)</a></li>
++<li class="toctree-l2"><a class="reference internal" href="files.html">Accessing your Files (WebDAV)</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="deletedfiles.html">Deleted Files</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronisation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="encryption.html">Files Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="quota.html">Storage Quota</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="version-control">
 +<h1>Version Control<a class="headerlink" href="#version-control" title="Permalink to this headline">¶</a></h1>
- <p>ownCloud supports simple version control for files. Versioning is
- enabled by default, and creates backups of files which are accessible
- via the history tab. This tab also links to the history page, where you
- can roll back a file to any previous version. Changes made at intervals
- greater than two minutes are saved in data/[user]/versions, and made
- accessible using the above pages.</p>
++<p>ownCloud supports simple version control for files. Versioning creates backups
++of files which are accessible via the Versions link. This link contains the
++history of the file where you can roll back a file to any previous version. Changes
++made at intervals greater than two minutes are saved in data/[user]/versions,
++and made accessible using the above pages.</p>
++<p>Versioning is <strong>not</strong> enabled by default and needs to be enabled by administrator
++using App management page.</p>
++<p>To restore a specific version of a file, hover your cursor on a file and click
++<em>Versions</em> link. If any version is available, you should see a list like the image
++below:</p>
++<div class="figure">
++<img alt="../_images/files_versioning.png" src="../_images/files_versioning.png" />
++</div>
++<p>Clicking on <em>Restore</em> next to any version will revert the file to that
++version back.</p>
 +<p>The versioning app expires old versions automatically to make sure that
 +the user doesn’t run out of space. Following pattern is used to delete
 +old versions:</p>
 +<ul class="simple">
 +<li>For the first 10 seconds ownCloud keeps one version every 2 seconds</li>
 +<li>For the first hour ownCloud keeps one version every minute</li>
 +<li>For the first 24 hours ownCloud keeps one version every hour</li>
 +<li>For the first 30 days ownCloud keeps one version every day</li>
 +<li>After the first 30 days ownCloud keeps one version every week</li>
 +</ul>
 +<p>The versions are adjusted along this pattern every time a new version gets
 +created.</p>
 +<p>Beside that the version app takes care to never use more that 50% of the users
 +currently available free space. If the stored versions exceed this limit ownCloud
 +delete the oldest versions until it meets the memory usage limit again.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/genindex.html
index db9613a,0000000..d6a3789
mode 100644,000000..100644
--- a/core/doc/user/genindex.html
+++ b/core/doc/user/genindex.html
@@@ -1,151 -1,0 +1,153 @@@
 +
 +
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.0 documentation" href="index.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +
 +<h1 id="index">Index</h1>
 +
 +<div class="genindex-jumpbox">
 + 
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/index.html
index bdd7099,ede62f0..3aec767
--- a/core/doc/user/index.html
+++ b/core/doc/user/index.html
@@@ -1,219 -1,2 +1,230 @@@
 -Here goes the user documentation
 -In the meantime go to <a href="http://owncloud.org/support/" target="_blank">ownCloud.org/support</a>
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.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">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul class="current">
 +<li class="toctree-l1 current"><a class="current reference internal" href="">User Documentation</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="#webinterface">Webinterface</a></li>
++<li class="toctree-l2"><a class="reference internal" href="#web-interface">Web interface</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#files-synchronization">Files & Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#contacts-calendar">Contacts & Calendar</a></li>
++<li class="toctree-l2"><a class="reference internal" href="#documents">Documents</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#bookmarks">Bookmarks</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#backup">Backup</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#external-storage">External storage</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
 +</ul>
 +</li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="user-documentation">
 +<span id="index"></span><h1>User Documentation<a class="headerlink" href="#user-documentation" title="Permalink to this headline">¶</a></h1>
 +<p><strong>Welcome to ownCloud, your self-hosted file sync and share solution.</strong></p>
- <p>OwnCloud is open source file sync and share software for everyone from individuals operating the free Community Edition, to large enterprises and service providers operating ownCloud Enterprise Edition. ownCloud provides a safe, secure and compliant file sync and share solution on servers you control.</p>
++<p>ownCloud is open source file sync and share software for everyone from individuals operating the free Community Edition, to large enterprises and service providers operating ownCloud Enterprise Edition. ownCloud provides a safe, secure and compliant file sync and share solution on servers you control.</p>
 +<p>With ownCloud you can share one or more folders on your PC, and sync them with your ownCloud server. Place files in your local shared directories, and those files are immediately synced to the server, and then to other PCs via the desktop client. Not near a desktop client? No problem, simply log in with the web client and manage your files there. The Android and iOS mobile apps allow you to browse, download and upload photos and videos. On Android, you may also create, download, edit [...]
 +<p>Whether using a mobile device, a workstation, or a web client, ownCloud provides the ability to put the right files in the right hands at the right time on any device in one simple-to-use, secure, private and controlled solution. After all, with ownCloud, it’s Your Cloud, Your Data, Your Way.</p>
- <div class="section" id="webinterface">
- <h2>Webinterface<a class="headerlink" href="#webinterface" title="Permalink to this headline">¶</a></h2>
++<div class="section" id="web-interface">
++<h2>Web interface<a class="headerlink" href="#web-interface" title="Permalink to this headline">¶</a></h2>
 +<p>This chapter contains a general overview how you access ownCloud from a Browser like Firefox, Chrome or Internet Explorer</p>
 +<ul class="simple">
 +<li><a class="reference internal" href="webinterface.html"><em>The ownCloud Web Interface</em></a></li>
 +</ul>
 +</div>
 +<div class="section" id="files-synchronization">
 +<h2>Files & Synchronization<a class="headerlink" href="#files-synchronization" title="Permalink to this headline">¶</a></h2>
- <p>This chapter contains information about accessing your files via WebDav and Synchronization.</p>
++<p>This chapter contains information about accessing your files via WebDAV and Synchronization.</p>
 +<ul class="simple">
- <li><a class="reference internal" href="files/files.html"><em>Accessing your Files (WebDav)</em></a></li>
- <li><a class="reference internal" href="files/sync.html"><em>Desktop Synchronisation</em></a></li>
++<li><a class="reference internal" href="files/filesweb.html"><em>Accessing your Files (Web Interface)</em></a></li>
++<li><a class="reference internal" href="files/files.html"><em>Accessing your Files (WebDAV)</em></a></li>
++<li><a class="reference internal" href="files/sync.html"><em>Desktop Synchronization</em></a></li>
 +<li><a class="reference internal" href="files/versioncontrol.html"><em>Version Control</em></a></li>
 +<li><a class="reference internal" href="files/deletedfiles.html"><em>Deleted Files</em></a></li>
 +<li><a class="reference internal" href="files/encryption.html"><em>Files Encryption</em></a></li>
 +<li><a class="reference internal" href="files/quota.html"><em>Storage Quota</em></a></li>
 +<li><a class="reference internal" href="files/configuring_big_file_upload.html"><em>Big Files</em></a></li>
 +</ul>
 +</div>
 +<div class="section" id="contacts-calendar">
 +<h2>Contacts & Calendar<a class="headerlink" href="#contacts-calendar" title="Permalink to this headline">¶</a></h2>
 +<p>Contacts & Calendar web interface, export, import and synchronization.</p>
 +<ul class="simple">
 +<li><a class="reference internal" href="pim/calendar.html"><em>Using the Calendar App</em></a></li>
 +<li><a class="reference internal" href="pim/contacts.html"><em>Using the Contacts App</em></a></li>
 +<li><a class="reference internal" href="pim/sync_ios.html"><em>iOS - Synchronize iPhone/iPad</em></a></li>
 +<li><a class="reference internal" href="pim/sync_kde.html"><em>Synchronizing with KDE SC</em></a></li>
 +<li><a class="reference internal" href="pim/sync_osx.html"><em>Synchronizing with OS X</em></a></li>
 +</ul>
 +</div>
++<div class="section" id="documents">
++<h2>Documents<a class="headerlink" href="#documents" title="Permalink to this headline">¶</a></h2>
++<p>Documents allows users collaboratively edit rich-text documents at the same time.</p>
++<ul class="simple">
++<li><a class="reference internal" href="documents.html"><em>Documents</em></a></li>
++</ul>
++</div>
 +<div class="section" id="bookmarks">
 +<h2>Bookmarks<a class="headerlink" href="#bookmarks" title="Permalink to this headline">¶</a></h2>
 +<p>Web interface for managing your bookmarks.</p>
 +<ul class="simple">
 +<li><a class="reference internal" href="bookmarks.html"><em>Using the Bookmarks App</em></a></li>
 +</ul>
 +</div>
 +<div class="section" id="backup">
 +<h2>Backup<a class="headerlink" href="#backup" title="Permalink to this headline">¶</a></h2>
 +<p>Import and export your user account settings.</p>
 +<ul class="simple">
 +<li><a class="reference internal" href="migration.html"><em>User Account Migration</em></a></li>
 +</ul>
 +</div>
 +<div class="section" id="external-storage">
 +<h2>External storage<a class="headerlink" href="#external-storage" title="Permalink to this headline">¶</a></h2>
 +<p>Mount external storages into ownCloud.</p>
 +<ul class="simple">
 +<li><a class="reference internal" href="external_storage/google_drive.html"><em>External storage</em></a></li>
 +</ul>
 +</div>
 +<div class="section" id="indices-and-tables">
 +<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
 +<ul class="simple">
 +<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/migration.html
index 4c533cd,0000000..2026e22
mode 100644,000000..100644
--- a/core/doc/user/migration.html
+++ b/core/doc/user/migration.html
@@@ -1,171 -1,0 +1,173 @@@
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.0 documentation" href="index.html" />
-     <link rel="next" title="External storage" href="external_storage/google_drive.html" />
-     <link rel="prev" title="Using the Bookmarks App" href="bookmarks.html" />
++    <link rel="next" title="Changing Preferences" href="userpreferences.html" />
++    <link rel="prev" title="Documents" href="documents.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1 current"><a class="current reference internal" href="">User Account Migration</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="#export">Export</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="#import">Import</a></li>
 +</ul>
 +</li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="user-account-migration">
 +<h1>User Account Migration<a class="headerlink" href="#user-account-migration" title="Permalink to this headline">¶</a></h1>
- <p>User account migration support is provided by the user_migrate app. It is important to note that only data from apps that support migration will be migrated. While we encoruage all apps to support migration, it is not a requirement and it the responsibility of the app developer.</p>
++<p>User account migration support is provided by the user_migrate app. It is important to note that only data from apps that support migration will be migrated. While we encourage all apps to support migration, it is not a requirement and it the responsibility of the app developer.</p>
 +<div class="section" id="export">
 +<h2>Export<a class="headerlink" href="#export" title="Permalink to this headline">¶</a></h2>
 +<p>To export your user account, simply visit Settings > Personal and click on the ‘Export’ button. A compressed zip file will be generated on the fly and downloaded to your computer. This file includes all of your files and application data that was stored on your ownCloud account. You may use this as a method of backing up your personal account.</p>
 +</div>
 +<div class="section" id="import">
 +<h2>Import<a class="headerlink" href="#import" title="Permalink to this headline">¶</a></h2>
 +<p>To import your user account, you must first have an existing account on your new ownCloud install. Then follow this procedure:</p>
 +<ol class="arabic simple">
 +<li>Login to your new account on the new ownCloud instance</li>
 +<li>Navigate to the Settings > Personal page</li>
 +<li>Select the ‘Import’ button, and locate the zip file that you downloaded from your old ownCloud instance</li>
 +<li>Wait for the file to be uploaded and imported</li>
 +</ol>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">Your user account credentials will <strong>not</strong> be migrated.</p>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/objects.inv
index 08fad3b,0000000..7bd7fb3
mode 100644,000000..100644
--- a/core/doc/user/objects.inv
+++ b/core/doc/user/objects.inv
@@@ -1,6 -1,0 +1,6 @@@
 +# Sphinx inventory version 2
 +# Project: ownCloud User Manual
 +# Version: 6.0
 +# The remainder of this file is compressed using zlib.
- x�m�A
- �0E�9ŀn+�u�� 
 f��0��&�z�V�H
ݾy���� } D<�}Cs�����p��
�\�l$�
����K�$�ث��d#Ui)����uk1��=�p�-�環�+��t�3kB�娿f&s�\�
++x�m��
++�0
��}��^+x���0|�����6�vL�^K�a�[���!���O��lA��$����-�Op�~v�#F#^
��o��
�s����>^�6�}�-�P`����dV�.
W
X���g����+d�G+3}_�j*�8�F]��J�q]�׿�7�LsH
diff --cc core/doc/user/pim/calendar.html
index b907094,0000000..717d473
mode 100644,000000..100644
--- a/core/doc/user/pim/calendar.html
+++ b/core/doc/user/pim/calendar.html
@@@ -1,252 -1,0 +1,259 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Using the Calendar App</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#creating-a-calendar">Creating a calendar</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#synchronising-calendars-with-caldav">Synchronising Calendars with CalDav</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#synchronising-calendars-with-caldav">Synchronising Calendars with CalDAV</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#creating-events">Creating events</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#exporting-importing-events">Exporting / Importing events</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#why-is-the-calendar-app-asking-for-my-current-location">Why is the calendar app asking for my current location?</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="using-the-calendar-app">
 +<h1>Using the Calendar App<a class="headerlink" href="#using-the-calendar-app" title="Permalink to this headline">¶</a></h1>
 +<div class="section" id="creating-a-calendar">
 +<h2>Creating a calendar<a class="headerlink" href="#creating-a-calendar" title="Permalink to this headline">¶</a></h2>
 +<div class="figure">
- <a class="reference internal image-reference" href="../_images/calendar_manage-calendars.png"><img alt="../_images/calendar_manage-calendars.png" src="../_images/calendar_manage-calendars.png" /></a>
++<img alt="../_images/calendar_manage-calendars.png" src="../_images/calendar_manage-calendars.png" />
 +</div>
++<p>Calendar view</p>
 +<p>If you use the calendar the first time, there will be already a calendar called
 +“Default calendar”. You can manage your calendars with a click on the “Calendar”
 +button in the top right corner. In the dialog, which will appear, you can add,
 +edit, export, enable, disable and delete your calendars. There will be also a
- link for CalDav access.</p>
++link for CalDAV access.</p>
 +</div>
 +<div class="section" id="synchronising-calendars-with-caldav">
- <h2>Synchronising Calendars with CalDav<a class="headerlink" href="#synchronising-calendars-with-caldav" title="Permalink to this headline">¶</a></h2>
++<h2>Synchronising Calendars with CalDAV<a class="headerlink" href="#synchronising-calendars-with-caldav" title="Permalink to this headline">¶</a></h2>
 +<p>Assuming you access your web interface via an address like this:</p>
 +<div class="highlight-python"><pre>http://ADDRESS</pre>
 +</div>
 +<p>Then you can access your calendars with CalDAV-compatible programs like
 +Kontact, Evolution, Thunderbird using the following URL:</p>
 +<div class="highlight-python"><pre>http://ADDRESS/remote.php/caldav</pre>
 +</div>
 +<p>To use the ownCloud calendar with Apple iCal you will need to use the following
 +URL, including the trailing slash:</p>
 +<div class="highlight-python"><pre>http://ADDRESS/remote.php/caldav/principals/username/</pre>
 +</div>
 +<p>Mozilla Lightning users need to this URL scheme:</p>
 +<div class="highlight-python"><pre>https://ADDRESS/remote.php/caldav/calendars/USERNAME/CALENDARNAME
 +
 + Example for a simple calendar: The "Default calendar" is referred to as "defaultcalendar",
 + and the users' name here is "test".
 + The full URL (which on the picture can't be seen because of the
 + short edit field) is then::
 +
 +     https://localhost/owncloud/remote.php/caldav/calendars/test/defaultcalendar</pre>
 +</div>
 +</div>
 +<div class="section" id="creating-events">
 +<h2>Creating events<a class="headerlink" href="#creating-events" title="Permalink to this headline">¶</a></h2>
 +<p>To create an event just click on the date in the month view or choose the
 +timeframe in the weekview. In the dialog which will appear you can enter your
 +information like title, category, etc.</p>
 +<div class="figure">
- <a class="reference internal image-reference" href="../_images/calendar_createevent.png"><img alt="../_images/calendar_createevent.png" src="../_images/calendar_createevent.png" /></a>
++<img alt="../_images/calendar_createevent.png" src="../_images/calendar_createevent.png" />
 +</div>
++<p>New event window</p>
 +<p>With the advanced options you can set the
 +description, the location and the repetition rate of an event. If the repeating
 +should end you can choose between setting the end by date or by occurrences. If
 +you choose in the weekview all days from Monday to Friday it will automatically
 +set the repeat rule to “every weekday”. If the interval of the weekview can be
- devided by two it automatically set the repeat rule to “Bi-Weekly”.</p>
++divided by two it automatically set the repeat rule to “Bi-Weekly”.</p>
 +</div>
 +<div class="section" id="exporting-importing-events">
 +<h2>Exporting / Importing events<a class="headerlink" href="#exporting-importing-events" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="export">
 +<h3>Export<a class="headerlink" href="#export" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
- <a class="reference internal image-reference" href="../_images/calendar_export.png"><img alt="../_images/calendar_export.png" src="../_images/calendar_export.png" /></a>
++<img alt="../_images/calendar_export.png" src="../_images/calendar_export.png" />
 +</div>
++<p>Exporting an event</p>
 +<p>You can export either a single event or a whole calendar. If you want to export
 +a single event click on it and press the export button in the bottom right
 +corner. If you want to export a whole calendar use the “Calendar” button as
 +described in the chapter “Creating a calendar”.</p>
 +</div>
 +<div class="section" id="import">
 +<h3>Import<a class="headerlink" href="#import" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
- <a class="reference internal image-reference" href="../_images/calendar_import.png"><img alt="../_images/calendar_import.png" src="../_images/calendar_import.png" /></a>
++<img alt="../_images/calendar_import.png" src="../_images/calendar_import.png" />
 +</div>
- <p>Import your calendar as ical file using the files app. Just click on the
++<p>Importing events</p>
++<p>Import your calendar as iCal file using the files app. Just click on the
 +calendar file to open the import dialog. You can import the calendar into a new
 +calendar or into an already existing calendar.</p>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
- <p class="last">If the progressbar does not work properly, the folder
++<p class="last">If the progress bar does not work properly, the folder
 +<tt class="docutils literal"><span class="pre">apps/calendar/import_tmp/</span></tt> has probably no write permission.</p>
 +</div>
 +</div>
 +</div>
 +<div class="section" id="why-is-the-calendar-app-asking-for-my-current-location">
 +<h2>Why is the calendar app asking for my current location?<a class="headerlink" href="#why-is-the-calendar-app-asking-for-my-current-location" title="Permalink to this headline">¶</a></h2>
 +<div class="figure">
- <a class="reference internal image-reference" href="../_images/calendar_newtimezone1.png"><img alt="../_images/calendar_newtimezone1.png" src="../_images/calendar_newtimezone1.png" /></a>
++<img alt="../_images/calendar_newtimezone1.png" src="../_images/calendar_newtimezone1.png" />
 +</div>
++<p>Timezone set notification</p>
 +<p>The calendar needs your current position in order to detect your timezone.
 +Without the correct timezone there will be a time offset between the events in
 +ownCloud and your desktop calendar you synchronise with ownCloud. You can also
 +set the timezone manually in the personal settings.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/contacts.html
index 7cbac40,0000000..503cf70
mode 100644,000000..100644
--- a/core/doc/user/pim/contacts.html
+++ b/core/doc/user/pim/contacts.html
@@@ -1,277 -1,0 +1,285 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Using the Contacts App</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#adding-contacts">Adding contacts</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#creating-new-address-books">Creating new address books</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#keeping-your-address-book-in-sync">Keeping your address book in sync</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#creating-new-addressbooks">Creating new addressbooks</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#keeping-your-addressbook-in-sync">Keeping your addressbook in sync</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="using-the-contacts-app">
 +<h1>Using the Contacts App<a class="headerlink" href="#using-the-contacts-app" title="Permalink to this headline">¶</a></h1>
 +<p>The contacts app of ownCloud is like any other mobile contact app but with more functionality.
 +Just as you open your account you will get the a default addressbook available.
 +We will see later that Of course you can always add and remove addressbooks in here.</p>
 +<div class="section" id="adding-contacts">
 +<h2>Adding contacts<a class="headerlink" href="#adding-contacts" title="Permalink to this headline">¶</a></h2>
 +<p>There are two ways in which you can add contacts</p>
 +<ol class="arabic simple">
 +<li>Add them manually</li>
 +<li>Import a VCF file</li>
 +</ol>
 +<div class="section" id="importing">
 +<h3>Importing<a class="headerlink" href="#importing" title="Permalink to this headline">¶</a></h3>
 +<p>So first we’ll check out how to import all the VCF files as they are a lot
 +more faster way of creating contacts.
- Just below the contact list, 3 buttons: The middle one let you upload files.</p>
- <img alt="../_images/contact_bottombar.jpg" src="../_images/contact_bottombar.jpg" />
- <p>Once you’ve clicked it, the upload window let you choose your files.
- We can upload the files one by one or upload all of them at one go.</p>
- <p>Let me demonstrate.
++Just below the contact list, click on the gear button:</p>
++<img alt="../_images/contact_bottombar.png" src="../_images/contact_bottombar.png" />
++<p>Contact settings icon</p>
++<p>Once you’ve clicked it, an up arrow button which lets you upload files will be shown:</p>
++<img alt="../_images/contact_uploadbutton.png" src="../_images/contact_uploadbutton.png" />
++<p>Contact file upload icon</p>
++<p>After choosing an addressbook to import into, click on the arrow. The upload window will be opened and let you choose your files.
++You can upload the files one by one or upload all of them at one go.</p>
++<p>Let us demonstrate.
 +Open the directory in which you store all the files and then do the following
 +Keep pressing CTRL and select the files to upload.
 +After you are done just click on the open button
 +After the upload it should look something like this in which all the names and contacts will be sorted alphabetically</p>
 +<img alt="../_images/contact_vcfpick.jpg" src="../_images/contact_vcfpick.jpg" />
- <p>Then, the interface ask you where to put your imported contacts.
- You have the ability to choose an existing addressbook or to create a new one.
- Then click on “OK” and that’s all for the import of contacts.</p>
- <img alt="../_images/contact_import.jpg" src="../_images/contact_import.jpg" />
++<p>Picking VCF files</p>
++<p>After upload, the interface will automatically place your contacts into ownCloud.</p>
 +</div>
 +<div class="section" id="create-contacts-manually">
 +<h3>Create contacts manually<a class="headerlink" href="#create-contacts-manually" title="Permalink to this headline">¶</a></h3>
- <p>In the picture of the bottom bar, you could see the new contact button (first one).
++<p>On the left side of contacts app, you could see the new contact button (first one).
 +Click on it. You can now see an empty contact in the main part of the interface.
 +You have the ability to add all your informations about the contact:
- the name, the address, the e-mail, the telephone nr, ...</p>
++the name, the address, the e-mail, the telephone nr, etc.</p>
 +<p>Just click on a field and start typing the information.
 +You can use the “Add Field” button to add another types of information for this contact.</p>
- <img alt="../_images/contact_emptycontact.jpg" src="../_images/contact_emptycontact.jpg" />
++<img alt="../_images/contact_emptycontact.png" src="../_images/contact_emptycontact.png" />
++<p>Empty contact view</p>
 +<p>When you want to remove an information of your contact, just click on little delete icon
 +at the right of the field you want to remove.</p>
 +</div>
 +<div class="section" id="adding-picture-to-the-contact">
 +<h3>Adding picture to the contact<a class="headerlink" href="#adding-picture-to-the-contact" title="Permalink to this headline">¶</a></h3>
 +<p>There are two methods in which you can give a picture id to the specific contact</p>
 +<img alt="../_images/contact_picture.jpg" src="../_images/contact_picture.jpg" />
++<p>Contact picture options</p>
 +<ol class="arabic simple">
 +<li><strong>Direct upload</strong></li>
 +<li><strong>Select pics already uploaded in ownCloud files.</strong></li>
 +</ol>
 +<p>After you have selected the picture for the contact you get
 +an option to crop the picture to suit your requirements</p>
 +<img alt="../_images/contact_crop.jpg" src="../_images/contact_crop.jpg" />
++<p>Cropping contact picture</p>
 +<p>You can crop the picture however you wish and then press OK.</p>
 +<p>As you can see it is really easy to set things right in this app.
- It automatically pics up the First name, Middle name (if any) and the last name
++It automatically picks up the First name, Middle name (if any) and the last name
 +You may add or delete any section you want for your own convenience.</p>
 +</div>
 +</div>
- <div class="section" id="creating-new-address-books">
- <h2>Creating new address books<a class="headerlink" href="#creating-new-address-books" title="Permalink to this headline">¶</a></h2>
- <p>When you click on the third button of the bottom bar,
++<div class="section" id="creating-new-addressbooks">
++<h2>Creating new addressbooks<a class="headerlink" href="#creating-new-addressbooks" title="Permalink to this headline">¶</a></h2>
++<p>When you click on settings button on bottom bar,
 +you will have access to the application’s settings.
- Then, press on the “More button” to access the options of your Addressbooks.</p>
- <img alt="../_images/contact_del_ab.jpg" src="../_images/contact_del_ab.jpg" />
- <p>You have there the ability to add, delete, download or share your addressbooks.
++Then, you will be shown all available addressbooks to access the options.</p>
++<img alt="../_images/contact_del_ab.png" src="../_images/contact_del_ab.png" />
++<p>Addressbook options</p>
++<p>There, you have the ability to add, delete, download or share your addressbooks.
 +Hover your cursor on every icon to see what they mean.</p>
 +</div>
- <div class="section" id="keeping-your-address-book-in-sync">
- <h2>Keeping your address book in sync<a class="headerlink" href="#keeping-your-address-book-in-sync" title="Permalink to this headline">¶</a></h2>
++<div class="section" id="keeping-your-addressbook-in-sync">
++<h2>Keeping your addressbook in sync<a class="headerlink" href="#keeping-your-addressbook-in-sync" title="Permalink to this headline">¶</a></h2>
 +<p>One of the most important thing in any contact app is to keep it in Sync.
- You can sync this contact app to your phone which has the following OS’s- Android and IOS</p>
++You can sync this contact app to your phone which has the following OS’s- Android and iOS</p>
 +<div class="section" id="syncing-with-android">
 +<h3>Syncing with Android<a class="headerlink" href="#syncing-with-android" title="Permalink to this headline">¶</a></h3>
 +<ol class="arabic simple">
- <li>Install cardDav- Sync free from Google play store by visiting this link-  <a class="reference external" href="https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync">https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync</a></li>
- <li>This app supports auto- configuration which is a Boon- after installing visit this link- carddavs://owncloud.example.net/remote.php/carddav/  to auto configure the app.</li>
++<li>Install CardDAV- Sync free from Google play store by visiting <a class="reference external" href="https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync">this link</a>.</li>
++<li>This app supports auto- configuration which is a Boon- after installing visit this link - carddavs://example.org/remote.php/carddav/ to auto-configure the app.</li>
 +<li>Enter your login details</li>
 +<li>After the app has checked your login details you may just select- Sync server to phone option</li>
 +<li>That’s it there is nothing else to do for Android :)</li>
 +</ol>
 +<img alt="../_images/contact_syncopt.jpg" src="../_images/contact_syncopt.jpg" />
 +</div>
 +<div class="section" id="syncing-your-ios-device">
- <h3>Syncing your IOS device<a class="headerlink" href="#syncing-your-ios-device" title="Permalink to this headline">¶</a></h3>
++<h3>Syncing your iOS device<a class="headerlink" href="#syncing-your-ios-device" title="Permalink to this headline">¶</a></h3>
 +<p>Synchronizing the Address book</p>
 +<ol class="arabic simple">
 +<li>Open the settings application.</li>
 +<li>Select Mail, Contacts, Calendars.</li>
 +<li>Select Add Account.</li>
 +<li>Select other as account type.</li>
 +<li>Select Add CardDAV account.</li>
- <li>For server, type <a class="reference external" href="http://owncloud.example.net/remote.php/carddav/principals/username">http://owncloud.example.net/remote.php/carddav/principals/username</a></li>
++<li>For server, type <a class="reference external" href="http://example.org/remote.php/carddav/principals/username">http://example.org/remote.php/carddav/principals/username</a></li>
 +<li>Enter your user name and password.</li>
 +<li>Select Next.</li>
 +<li>If your server does not support SSL, a warning will be displayed. Select Continue.</li>
 +<li>If the iPhone is unable to verify the account information perform the following:</li>
 +</ol>
 +<ul class="simple">
 +<li>Select OK.</li>
 +<li>Select advanced settings.</li>
 +<li>Make sure Use SSL is set to OFF.</li>
 +<li>Change port to 80.</li>
 +<li>Go back to account information and hit Save.</li>
 +</ul>
- <p>Now should now find your contacts in the address book of your iPhone</p>
++<p>Now should now find your contacts in the address book of your iPhone.</p>
 +</div>
 +<div class="section" id="other-syncing-options-provided-by-owncloud">
 +<h3>Other Syncing options provided by ownCloud<a class="headerlink" href="#other-syncing-options-provided-by-owncloud" title="Permalink to this headline">¶</a></h3>
 +<ol class="arabic simple">
- <li>For android you may use their official android app-  <a class="reference external" href="https://owncloud.com/overview/mobileapps">https://owncloud.com/overview/mobileapps</a></li>
- <li>And for IOS(Iphone and Ipad) use their app - <a class="reference external" href="https://owncloud.com/overview/mobileapps">https://owncloud.com/overview/mobileapps</a></li>
++<li>For Android you may use official Android app which can be found <a class="reference external" href="https://owncloud.org/install/">here</a>.</li>
++<li>And for iOS (iPhone and iPad) use their app which can be found <a class="reference external" href="https://owncloud.org/install/">here</a>.</li>
 +</ol>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/index.html
index 7909a5a,0000000..f9c6555
mode 100644,000000..100644
--- a/core/doc/user/pim/index.html
+++ b/core/doc/user/pim/index.html
@@@ -1,168 -1,0 +1,170 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.0 documentation" href="../index.html" />
 +    <link rel="next" title="Using the Contacts App" href="contacts.html" />
 +    <link rel="prev" title="Big Files" href="../files/configuring_big_file_upload.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="current reference internal" href="">Contacts & Calendar</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="contacts-calendar">
 +<h1>Contacts & Calendar<a class="headerlink" href="#contacts-calendar" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l1"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l1"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/sync_ios.html
index 41b7628,0000000..051ec8d
mode 100644,000000..100644
--- a/core/doc/user/pim/sync_ios.html
+++ b/core/doc/user/pim/sync_ios.html
@@@ -1,214 -1,0 +1,216 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">iOS - Synchronize iPhone/iPad</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#calendar">Calendar</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#address-book">Address book</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="ios-synchronize-iphone-ipad">
 +<h1>iOS - Synchronize iPhone/iPad<a class="headerlink" href="#ios-synchronize-iphone-ipad" title="Permalink to this headline">¶</a></h1>
 +<div class="section" id="calendar">
 +<h2>Calendar<a class="headerlink" href="#calendar" title="Permalink to this headline">¶</a></h2>
 +<ol class="arabic simple">
 +<li>Open the settings application.</li>
 +<li>Select Mail, Contacts, Calendars.</li>
 +<li>Select Add Account.</li>
 +<li>Select Other as account type.</li>
 +<li>Select Add CalDAV account.</li>
 +<li>For server, type <tt class="docutils literal"><span class="pre">ADDRESS/remote.php/caldav/principals/username</span></tt></li>
 +<li>Enter your user name and password.</li>
 +<li>Select Next.</li>
 +<li>If your server does not support SSL, a warning will be displayed.
 +Select Continue.</li>
 +<li>If the iPhone is unable to verify the account information perform the
 +following:<ul>
 +<li>Select OK.</li>
 +<li>Select advanced settings.</li>
 +<li>Make sure Use SSL is set to OFF.</li>
 +<li>Change port to 80.</li>
 +<li>Go back to account information and hit Save.</li>
 +</ul>
 +</li>
 +</ol>
 +<p>Your calendar should now be visible in the Calendar application</p>
 +</div>
 +<div class="section" id="address-book">
 +<h2>Address book<a class="headerlink" href="#address-book" title="Permalink to this headline">¶</a></h2>
 +<ol class="arabic simple">
 +<li>Open the settings application.</li>
 +<li>Select Mail, Contacts, Calendars.</li>
 +<li>Select Add Account.</li>
 +<li>Select Other as account type.</li>
 +<li>Select Add CardDAV account.</li>
 +<li>For server, type <tt class="docutils literal"><span class="pre">ADDRESS/remote.php/carddav/principals/username</span></tt></li>
 +<li>Enter your user name and password.</li>
 +<li>Select Next.</li>
 +<li>If your server does not support SSL, a warning will be displayed.
 +Select Continue.</li>
 +<li>If the iPhone is unable to verify the account information perform the
 +following:<ul>
 +<li>Select OK.</li>
 +<li>Select advanced settings.</li>
 +<li>Make sure Use SSL is set to OFF.</li>
 +<li>Change port to 80.</li>
 +<li>Go back to account information and hit Save.</li>
 +</ul>
 +</li>
 +</ol>
 +<p>Now should now find your contacts in the address book of your
 +iPhone.
 +If it’s still not working, have a look at the <a class="reference internal" href="troubleshooting.html"><em>Troubleshooting</em></a> guide.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/sync_kde.html
index cbba5db,0000000..7dc4be2
mode 100644,000000..100644
--- a/core/doc/user/pim/sync_kde.html
+++ b/core/doc/user/pim/sync_kde.html
@@@ -1,182 -1,0 +1,184 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
++    <link rel="prev" title="Thunderbird - Synchronize Addressbook" href="sync_thunderbird.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="synchronizing-with-kde-sc">
 +<h1>Synchronizing with KDE SC<a class="headerlink" href="#synchronizing-with-kde-sc" title="Permalink to this headline">¶</a></h1>
 +<img alt="../_images/kdes1.png" src="../_images/kdes1.png" />
 +<p>From KDE SC 4.8 and forward setting up ownCloud is very easy. From System
 +Settings Personal Information/Akonadi Resources Configuration select DAV
 +Groupware resource.</p>
 +<img alt="../_images/kdes2.png" src="../_images/kdes2.png" />
 +<p>Enter your ownCloud username and password and click “Next”.</p>
 +<img alt="../_images/kdes3.png" src="../_images/kdes3.png" />
 +<p>Select ownCloud in the drop down list and click “Next”.</p>
 +<img alt="../_images/kdes4.png" src="../_images/kdes4.png" />
 +<p>Enter the host name and installation path. If you do not use SSL
 +remember to de-select “Use secure connection”.</p>
 +<img alt="../_images/kdes5.png" src="../_images/kdes5.png" />
 +<p>Test the connection. If everything went well you should see a message
 +like the one below.</p>
 +<img alt="../_images/kdes6.png" src="../_images/kdes6.png" />
 +<p>Click “Finish” and you will be able to change the display name and
 +refresh interval.</p>
 +<img alt="../_images/kdes7.png" src="../_images/kdes7.png" />
 +<p>Now you should see the Akonadi resource doing the first
 +synchronization.</p>
 +<p>You can find the Contacts and Calendars in Kontact (or
 +KOrganizer/KAddressbook if you run the programs separately.)</p>
 +<img alt="../_images/kdes9.png" src="../_images/kdes9.png" />
 +<img alt="../_images/kdes.png" src="../_images/kdes.png" />
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/sync_osx.html
index 03abb4f,0000000..6707a9e
mode 100644,000000..100644
--- a/core/doc/user/pim/sync_osx.html
+++ b/core/doc/user/pim/sync_osx.html
@@@ -1,192 -1,0 +1,196 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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="next" title="Thunderbird - Synchronize Addressbook" href="sync_thunderbird.html" />
 +    <link rel="prev" title="iOS - Synchronize iPhone/iPad" href="sync_ios.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="synchronizing-with-os-x">
 +<h1>Synchronizing with OS X<a class="headerlink" href="#synchronizing-with-os-x" title="Permalink to this headline">¶</a></h1>
- <p>To use ownCloud with iCal you will need to use the following URL: <a class="reference external" href="http://ADDRESS/remote.php/caldav/principals/username/">http://ADDRESS/remote.php/caldav/principals/username/</a></p>
++<p>To use ownCloud with iCal you will need to use the following URL:</p>
++<div class="highlight-python"><pre>http://ADDRESS/remote.php/caldav/principals/username/</pre>
++</div>
 +<p>The setup is basically the same as with iOS using the path <strong>ADDRESS/remote.php/caldav/principals/username/</strong> to sync with ownCloud. For OS X 10.7 Lion and 10.8 Mountain Lion everything works fine, but OS X 10.6 (Snow Leopard) and older needs some fiddling to work. A user contributed the following:</p>
 +<ol class="arabic">
- <li><p class="first">Make sure, Addressbook is not running. If it is, select the windows and press Command + Q to terminate it.</p>
++<li><p class="first">Make sure, addressbook is not running. If it is, select the windows and press Command + Q to terminate it.</p>
 +</li>
- <li><p class="first">Navigate to <strong>/Users/YOUR_USERNAME/Library/Application Support/AddressBook/Sources</strong>. If you have all ready some kind of address book setup, it is likely you will see some folders named like this <strong>BEA92826-FBF3-4E53-B5C6-ED7C2B454430</strong>. Note down what folders there are now and leave the window open.</p>
++<li><p class="first">Navigate to <strong>/Users/YOUR_USERNAME/Library/Application Support/AddressBook/Sources</strong>. If you have all ready some kind of addressbook setup, it is likely you will see some folders named like this <strong>BEA92826-FBF3-4E53-B5C6-ED7C2B454430</strong>. Note down what folders there are now and leave the window open.</p>
 +</li>
- <li><p class="first">Open addressbook and try to add a new CardDav addressbook. At this point, it does not matter what information you enter. It will come up with the same error message you mentioned before when you click “Create”. Ignore it and click “Create” again. A non-functional address book will be added.</p>
++<li><p class="first">Open addressbook and try to add a new CardDav addressbook. At this point, it does not matter what information you enter. It will come up with the same error message you mentioned before when you click “Create”. Ignore it and click “Create” again. A non-functional addressbook will be added.</p>
 +</li>
- <li><p class="first">Close Address-Book again using Command + Q</p>
++<li><p class="first">Close addressbook again using Command + Q</p>
 +</li>
 +<li><p class="first">Go back to the folder window from step 2. You will now see a newly created folder with another long string as its name.</p>
 +</li>
 +<li><p class="first">Navigate to the newly created folder and edit the <strong>Configuration.plist</strong> with your favorite text editor.</p>
 +</li>
 +<li><p class="first">Search for a section looking like this:</p>
 +<div class="highlight-python"><pre><key>servername</key> <string>http://:0(null)</string> <key>username</key> <string>Whatever_you_entered_before</string></pre>
 +</div>
 +</li>
 +</ol>
 +<ol class="arabic" start="8">
 +<li><p class="first">Make it look like this. Please note that the :80 after <strong>YOUR_DOMAIN</strong> is important:</p>
 +<div class="highlight-python"><pre><key>servername</key <string>http://YOUR_DOMAIN:80/owncloud/remote.php/carddav/principals/username</string> <key>username</key <string>username</string></pre>
 +</div>
 +</li>
- <li><p class="first">Save the file and open Address Book again. It will not work yet.</p>
++<li><p class="first">Save the file and open addressbook again. It will not work yet.</p>
 +</li>
 +<li><p class="first">Open the preferences for your ownCloud CardDAV-Account and enter your password.</p>
 +</li>
- <li><p class="first">You may have to restart Address Book once more. After this, it should work.</p>
++<li><p class="first">You may have to restart addressbook once more. After this, it should work.</p>
 +</li>
 +</ol>
 +<p>If it’s still not working, have a look at the <a class="reference internal" href="troubleshooting.html"><em>Troubleshooting</em></a> guide.</p>
 +<p>There is also an easy <a class="reference external" href="http://forum.owncloud.org/viewtopic.php?f=3&t=132">HOWTO</a> in the forum.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/sync_thunderbird.html
index 38bcac9,0000000..ea1eeb2
mode 100644,000000..100644
--- a/core/doc/user/pim/sync_thunderbird.html
+++ b/core/doc/user/pim/sync_thunderbird.html
@@@ -1,188 -1,0 +1,190 @@@
 +
 +<!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 6.0 documentation</title>
++    <title>Thunderbird - Synchronize Addressbook — ownCloud User Manual 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2 current"><a class="current reference internal" href="">Thunderbird - Synchronize Address Book</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="#address-book">Address book</a></li>
++<li class="toctree-l2 current"><a class="current reference internal" href="">Thunderbird - Synchronize Addressbook</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="#addressbook">Addressbook</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
-   <div class="section" id="thunderbird-synchronize-address-book">
- <h1>Thunderbird - Synchronize Address Book<a class="headerlink" href="#thunderbird-synchronize-address-book" title="Permalink to this headline">¶</a></h1>
- <div class="section" id="address-book">
- <h2>Address book<a class="headerlink" href="#address-book" title="Permalink to this headline">¶</a></h2>
- <p>As someone who is new to OwnCloud, New to SoGo Connector, and new to Thunderbird Addressbook... here is what you need in excruciating pithy detail I needed to make this work (for all the other lost souls out there).</p>
++  <div class="section" id="thunderbird-synchronize-addressbook">
++<h1>Thunderbird - Synchronize Addressbook<a class="headerlink" href="#thunderbird-synchronize-addressbook" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="addressbook">
++<h2>Addressbook<a class="headerlink" href="#addressbook" title="Permalink to this headline">¶</a></h2>
++<p>As someone who is new to ownCloud, New to SoGo Connector, and new to Thunderbird Addressbook... here is what you need in excruciating pithy detail you need to make this work (for all the other lost souls out there):</p>
 +<ol class="arabic simple">
- <li><a class="reference external" href="http://www.mozilla.org/en-US/thunderbird/">http://www.mozilla.org/en-US/thunderbird/</a> <strong>Thunderbird</strong> for your OS unless it comes with your OS distribution (Linux)</li>
- <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>
++<li><a class="reference external" href="http://www.mozilla.org/en-US/thunderbird/">Thunderbird</a> for your OS unless it comes with your OS distribution (Linux)</li>
++<li><a class="reference external" href="http://www.sogo.nu/english/downloads/frontends.html">Sogo Connector</a> (latest release)</li>
 +</ol>
 +<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>
 +<li>“File > New > <strong>Remote Addressbook</strong>” (SoGo Connector added this)</li>
 +<li>“<strong>Name:</strong>” is the name you want to give your Addressbook in the Thunderbird addressbook bar area</li>
 +<li>“<strong>URL:</strong>” is found in your OwnCloud Contacts area, that little Gear symbol</li>
 +</ul>
 +</li>
 +</ol>
 +<img alt="../_images/contact_thunderbird-Symbol_Gear.jpg" src="../_images/contact_thunderbird-Symbol_Gear.jpg" />
 +<p>in the -bottom left- of the Contacts View (same symbol as found in the -top right- in the Calendar view). Then look for a little impeller symbol</p>
 +<img alt="../_images/contact_thunderbird-Symbol_Impeller.jpg" src="../_images/contact_thunderbird-Symbol_Impeller.jpg" />
 +<p>which will display the URL you need for your installation to work.</p>
 +<img alt="../_images/contact_thunderbird-URL_config.jpg" src="../_images/contact_thunderbird-URL_config.jpg" />
- <p>Once installed, synchronize (right click on your newly made remote addressbook and select “Synchronize”). You’ll see your addressbook populate from OwnCloud! Don’t click “read only” above unless you don’t want to modify your OwnCloud server addressbook, like it contains a listing of corporate contacts and is shared with lots of people, and you don’t want a new user dragging it somewhere unintended.</p>
- <p>The rest of the details of dealing with Thunderbird addressbook are left to the reader... First thing I learned is dragging a contact to a different addressbook is a “move” operation. If you are worried about losing the contact, save it to a VCF file using OwnCloud (Or LDIF using Thunderbird Addressbook) first! Like dragging from “OwnCloud Addressbook” to “Personal Address Book” removes the contact from OwnCloud Server (<em>deleting it from all the [...]
++<p>Once installed, synchronize (right click on your newly made remote addressbook and select “Synchronize”). You’ll see your addressbook populate from ownCloud! Don’t click “read only” above unless you don’t want to modify your ownCloud server addressbook, like it contains a listing of corporate contacts and is shared with lots of people, and you don’t want a new user dragging it somewhere unintended.</p>
++<p>The rest of the details of dealing with Thunderbird addressbook are left to the reader... First thing I learned is dragging a contact to a different addressbook is a “move” operation. If you are worried about losing the contact, save it to a VCF file using ownCloud (Or LDIF using Thunderbird Addressbook) first! Like dragging from “ownCloud Addressbook” to “Personal Address Book” removes the contact from ownCloud Server (<em>deleting it from all the [...]
 +<p>Contact <em>Pictures</em> are also sync’ed!</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/troubleshooting.html
index eba6d71,0000000..c42075e
mode 100644,000000..100644
--- a/core/doc/user/pim/troubleshooting.html
+++ b/core/doc/user/pim/troubleshooting.html
@@@ -1,187 -1,0 +1,189 @@@
 +
 +<!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 6.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:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <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 6.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" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
- <li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Address Book</a></li>
++<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Troubleshooting</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#service-discovery">Service discovery</a></li>
 +</ul>
 +</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="troubleshooting">
 +<h1>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permalink to this headline">¶</a></h1>
 +<div class="section" id="service-discovery">
 +<h2>Service discovery<a class="headerlink" href="#service-discovery" title="Permalink to this headline">¶</a></h2>
 +<p>Some clients - especially iOS - have problems finding the proper sync URL, even when explicitly
 +configured to use it.</p>
 +<p>There are several techniques to remedy this, which are described extensively at the
 +<a class="reference external" href="http://code.google.com/p/sabredav/wiki/ServiceDiscovery">Sabre DAV website</a>.</p>
 +<p>Below is what have proven to work with iOS including iOS 7.</p>
 +<p>If your ownCloud instance is installed in a sub-folder under the web servers document root, and
 +the client has difficulties finding the Cal- or CardDAV end-points, configure your web server to
 +redirect from a “well-know” URL to the one used by ownCloud.
 +When using the Apache web server this is easily achieved using a <tt class="file docutils literal"><span class="pre">.htaccess</span></tt> file in the document
 +root of your site.</p>
 +<p>Say your instance is located in the <tt class="docutils literal"><span class="pre">owncloud</span></tt> folder, so the URL to it is <tt class="docutils literal"><span class="pre">ADDRESS/owncloud</span></tt>,
 +create or edit the <tt class="file docutils literal"><span class="pre">.htaccess</span></tt> file and add the following lines:</p>
 +<div class="highlight-python"><pre>Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
 +Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav</pre>
 +</div>
 +<p>If you use Nginx as web server, the setting looks something like:</p>
 +<div class="highlight-python"><pre>url.redirect = (
 +    "^/.well-known/carddav" => "/owncloud/remote.php/carddav",
 +    "^/.well-known/caldav" => "/owncloud/remote.php/caldav",
 +)</pre>
 +</div>
 +<p>Now change the URL in the client settings to just use <tt class="docutils literal"><span class="pre">ADDRESS</span></tt> instead of e.g. <tt class="docutils literal"><span class="pre">ADDRESS/remote.php/carddav/principals/username</span></tt>.</p>
 +<p>This problem is being discussed in the <a class="reference external" href="http://forum.owncloud.org/viewtopic.php?f=3&t=71&p=2211#p2197">forum</a>.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/search.html
index be04500,0000000..3f26308
mode 100644,000000..100644
--- a/core/doc/user/search.html
+++ b/core/doc/user/search.html
@@@ -1,171 -1,0 +1,173 @@@
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <script type="text/javascript" src="_static/underscore.js"></script>
 +    <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 6.0 documentation" href="index.html" />
 +  <script type="text/javascript">
 +    jQuery(function() { Search.loadIndex("searchindex.js"); });
 +  </script>
 +  
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <h1 id="search-documentation">Search</h1>
 +  <div id="fallback" class="admonition warning">
 +  <script type="text/javascript">$('#fallback').hide();</script>
 +  <p>
 +    Please activate JavaScript to enable the search
 +    functionality.
 +  </p>
 +  </div>
 +  <p>
 +    From here you can search these documents. Enter your search
 +    words into the box below and click "search". Note that the search
 +    function will automatically search for all of the words. Pages
 +    containing fewer words won't appear in the result list.
 +  </p>
 +  <form action="" method="get">
 +    <input type="text" name="q" value="" />
 +    <input type="submit" value="search" />
 +    <span id="search-progress" style="padding-left: 10px"></span>
 +  </form>
 +  
 +  <div id="search-results">
 +  
 +  </div>
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/userpreferences.html
index 4c533cd,0000000..c381c99
mode 100644,000000..100644
--- a/core/doc/user/userpreferences.html
+++ b/core/doc/user/userpreferences.html
@@@ -1,171 -1,0 +1,172 @@@
 +
 +<!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 6.0 documentation</title>
++    <title>Changing Preferences — ownCloud User Manual 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.0 documentation" href="index.html" />
 +    <link rel="next" title="External storage" href="external_storage/google_drive.html" />
-     <link rel="prev" title="Using the Bookmarks App" href="bookmarks.html" />
++    <link rel="prev" title="User Account Migration" href="migration.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
- <li class="toctree-l1 current"><a class="current reference internal" href="">User Account Migration</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="#export">Export</a></li>
- <li class="toctree-l2"><a class="reference internal" href="#import">Import</a></li>
- </ul>
- </li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1 current"><a class="current reference internal" href="">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
-   <div class="section" id="user-account-migration">
- <h1>User Account Migration<a class="headerlink" href="#user-account-migration" title="Permalink to this headline">¶</a></h1>
- <p>User account migration support is provided by the user_migrate app. It is important to note that only data from apps that support migration will be migrated. While we encoruage all apps to support migration, it is not a requirement and it the responsibility of the app developer.</p>
- <div class="section" id="export">
- <h2>Export<a class="headerlink" href="#export" title="Permalink to this headline">¶</a></h2>
- <p>To export your user account, simply visit Settings > Personal and click on the ‘Export’ button. A compressed zip file will be generated on the fly and downloaded to your computer. This file includes all of your files and application data that was stored on your ownCloud account. You may use this as a method of backing up your personal account.</p>
- </div>
- <div class="section" id="import">
- <h2>Import<a class="headerlink" href="#import" title="Permalink to this headline">¶</a></h2>
- <p>To import your user account, you must first have an existing account on your new ownCloud install. Then follow this procedure:</p>
- <ol class="arabic simple">
- <li>Login to your new account on the new ownCloud instance</li>
- <li>Navigate to the Settings > Personal page</li>
- <li>Select the ‘Import’ button, and locate the zip file that you downloaded from your old ownCloud instance</li>
- <li>Wait for the file to be uploaded and imported</li>
- </ol>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">Your user account credentials will <strong>not</strong> be migrated.</p>
- </div>
++  <div class="section" id="changing-preferences">
++<h1>Changing Preferences<a class="headerlink" href="#changing-preferences" title="Permalink to this headline">¶</a></h1>
++<div class="figure">
++<img alt="_images/oc_user_preferences.png" src="_images/oc_user_preferences.png" />
 +</div>
++<p>As a user, you can change your personal settings by clicking on your username
++on the top-right of ownCloud instance and choosing <em>Personal</em>.</p>
++<p>If you are an administrator, you can also manage users and administer the server
++by using the related links. Those links will not be shown to a normal user.</p>
++<p>This document will explain the default items on this page. Depending on the enabled
++applications, you may have more options listed.</p>
++<ul class="simple">
++<li>In the beginning of the page, you will see your usage and available quota.</li>
++<li>You can change your password. For that, you need to enter your current and new password in the field
++named <em>Password</em>. If you would like to able to recover your password via e-mail, fill the e-mail field
++with the one that you currently using.</li>
++<li>By default, your image will have the initial of your username. This image is currently used in editing documents.
++You can either upload a new image or choose one from the existing images on your ownCloud to set.</li>
++<li>In this page, you can also change your web interface language if you want to override the browser settings.</li>
++<li>WebDAV link will allow you to only view and download your ownCloud files using a browser. You will still need
++your username and password to access this page.</li>
++<li>Documents app will have an option to specify the folder for newly created documents. You can set the folder here.</li>
++<li>This page will have more options if you have e.g. external storage app enabled.</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/webinterface.html
index b6524b9,0000000..d12229d
mode 100644,000000..100644
--- a/core/doc/user/webinterface.html
+++ b/core/doc/user/webinterface.html
@@@ -1,197 -1,0 +1,200 @@@
 +
 +<!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 6.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:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <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 6.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">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1 current"><a class="current reference internal" href="">The ownCloud Web Interface</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="#overview">Overview</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
++<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="the-owncloud-web-interface">
 +<h1>The ownCloud Web Interface<a class="headerlink" href="#the-owncloud-web-interface" title="Permalink to this headline">¶</a></h1>
 +<p>You can connect to ownCloud with your web browser by pointing
 +it to the address that you have received from your service
 +provider. In case you are administering the server yourself,
- have a look at ownCloud Administrators Manual.</p>
++have a look at <a class="reference external" href="http://doc.owncloud.org/server/6.0/admin_manual/">ownCloud Administrators Manual</a>.</p>
 +<p>When you enter the URL, you will receive a page that is similar
 +to the one depicted below:</p>
 +<div class="figure">
- <a class="reference internal image-reference" href="_images/oc_connect.png"><img alt="_images/oc_connect.png" src="_images/oc_connect.png" /></a>
++<img alt="_images/oc_connect.png" src="_images/oc_connect.png" />
 +<p class="caption">The ownCloud login screen</p>
 +</div>
 +<p>Login with the user name and password with you have received from
 +your service provider. If you have set up the server yourself,
 +log in with the user name which you have created during the
 +setup process. You can add further users through the settings,
 +or by hooking up a user backend, such as LDAP.</p>
 +<div class="section" id="overview">
 +<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
 +<p>After clicking the <em class="guilabel">Log in</em> button, you will be redirected
 +to ownCloud’s main web interface:</p>
- <div class="figure">
- <a class="reference internal image-reference" href="_images/oc_ui.png"><img alt="_images/oc_ui.png" src="_images/oc_ui.png" /></a>
++<div class="figure align-center">
++<img alt="_images/oc_ui.png" src="_images/oc_ui.png" />
 +<p class="caption">The ownCloud main interface with the essential elements numbered</p>
 +</div>
 +<p>The web interface comprises of the following items:</p>
 +<ol class="arabic simple">
 +<li><strong>Navigation bar</strong>: Allows navigation between different parts of ownCloud,
- provided by apps. Not all apps depicted in this screen shot are installed
++provided by apps. Not all apps depicted in this screenshot are installed
 +and enabled by default.</li>
 +<li><strong>Application view</strong>: This is where apps show their content. By default, this
 +will show the files and directory (file view) of your user on the ownCloud
 +installation.</li>
- <li><strong>Upload/Create button</strong>: This allows you to create new files or upload
++<li><strong>New/Upload button</strong>: This allows you to create new files or upload
 +existing ones from your device. Note that you can also drop files from
 +Explorer or Finder onto the ownCloud file view and they will get uploaded to
- ownCloud.</li>
- <li><strong>Search/Logout</strong>: Search allows you to look for files and
- directories. Currently, ownCloud does not provide a full text search, but
- this may change in future releases.</li>
- <li><strong>Settings</strong>: This button provides access to the settings menu, where you can
++ownCloud. With <em>New</em> button, you can create a text file, folder or download
++a file from the provided URL.</li>
++<li><strong>Search/Settings</strong>: Search allows you to look for files and
++directories. Currently, ownCloud provides a full text search. If full text seach does
++not work, administrators need to enable this app from app settings.
++Settings menu provides access to the settings menu, where you can
 +change your personal settings, such as the interface language or your
 +password. You can also retrieve the WebDAV URL (see next chapter) and show
 +your quota. Administrators will also get access to user management
- (<em class="guilabel">Users</em>), the apps settings (<em class="guilabel">Apps</em>) and administrative
- settings (<em class="guilabel">Admin</em>) including access to ownCloud’s log.</li>
++(<em class="guilabel">Users</em>), the apps settings (<em class="guilabel">Apps</em>) and administrative settings (<em class="guilabel">Admin</em>) including access to ownCloud’s log. You will also find logout button in this menu.</li>
++<li><strong>Apps</strong>: This button is only visible to administrators. Using this button allows administrators to enable/disable apps.</li>
 +</ol>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/skeleton/ownCloudUserManual.pdf
index 58ba99f,0000000..8e8a1d1
mode 100644,000000..100644
Binary files differ
diff --cc lib/private/request.php
index b2afda3,d9d5ae0..d9d5ae0
mode 100644,100755..100644
--- a/lib/private/request.php
+++ b/lib/private/request.php
diff --cc lib/private/util.php
index a73564b,a4b3761..a4b3761
mode 100644,100755..100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
diff --cc version.php
index 1a0ad48,b2d4201..7864e62
--- a/version.php
+++ b/version.php
@@@ -1,6 -1,17 +1,6 @@@
 -<?php
 -
 -// We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel when updating major/minor version number.
 -$OC_Version=array(6, 00, 0, 15);
 -
 -// The human readable string
 -$OC_VersionString='6.0.1 RC1';
 -
 -// The ownCloud edition
 -$OC_Edition='';
 -
 -// The ownCloud channel
 -$OC_Channel='git';
 -
 -// The build number
 -$OC_Build='';
 -
 +<?php 
- $OC_Version = array(6,0,0,14);
- $OC_VersionString = '6.0.0a';
++$OC_Version = array(6,0,0,15);
++$OC_VersionString = '6.0.1 RC1';
 +$OC_Edition = '';
- $OC_Channel = 'stable';
- $OC_Build = '2013-12-14T19:49:13+00:00';
++$OC_Channel = 'testing';
++$OC_Build = '2014-01-16T17:11:41+00:00';

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