[Pkg-owncloud-commits] [owncloud] 26/32: Imported Upstream version 6.0.0.a+dfsg

David Prévot taffit at moszumanska.debian.org
Sun Dec 15 01:47:33 UTC 2013


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

taffit pushed a commit to branch master
in repository owncloud.

commit 4c9d9d4d5647de7f094d114987616449bd27ff4f
Merge: 2fe69f3 0d24b22
Author: David Prévot <taffit at debian.org>
Date:   Sat Dec 14 20:18:14 2013 -0400

    Imported Upstream version 6.0.0.a+dfsg

 .../Doctrine/DBAL/Platforms/AbstractPlatform.php   |    2 +-
 .../Doctrine/DBAL/Platforms/PostgreSqlPlatform.php |    4 +-
 3rdparty/fullcalendar/GPL-LICENSE.txt              |  278 -
 3rdparty/fullcalendar/MIT-LICENSE.txt              |   20 -
 3rdparty/fullcalendar/css/fullcalendar.css         |  579 ---
 3rdparty/fullcalendar/css/fullcalendar.print.css   |   32 -
 3rdparty/fullcalendar/js/fullcalendar.js           | 5378 --------------------
 3rdparty/fullcalendar/js/fullcalendar.min.js       |    7 -
 3rdparty/fullcalendar/js/gcal.js                   |  107 -
 3rdparty/openid/class.openid.v3.php                |  326 --
 3rdparty/openid/phpmyid.php                        | 1707 -------
 3rdparty/smb4php/smb.php                           |  484 --
 apps/activity/js/script.js                         |    2 +-
 apps/contacts/js/app.js                            |    2 +-
 apps/contacts/lib/contact.php                      |   10 +-
 apps/contacts/lib/controller/importcontroller.php  |    1 +
 apps/documents/appinfo/database.xml                |   17 -
 apps/documents/templates/public.php                |    2 +-
 apps/files_encryption/appinfo/database.xml         |    5 +-
 apps/files_trashbin/js/trash.js                    |    8 +
 apps/search_lucene/appinfo/preupdate.php           |   36 +
 apps/search_lucene/appinfo/update.php              |   18 +-
 apps/search_lucene/lib/indexer.php                 |    4 +-
 apps/user_ldap/lib/configuration.php               |   11 +-
 apps/user_ldap/templates/part.wizard-server.php    |    4 +-
 .../admin/_images/ldap-advanced-1-connection.png   |  Bin 0 -> 24086 bytes
 .../admin/_images/ldap-advanced-2-directory.png    |  Bin 0 -> 30870 bytes
 .../admin/_images/ldap-advanced-3-attributes.png   |  Bin 0 -> 17336 bytes
 ...p-advanced-settings-connection-settings-oc5.png |  Bin 28795 -> 0 bytes
 ...ap-advanced-settings-directory-settings-oc5.png |  Bin 31710 -> 0 bytes
 .../admin/_images/ldap-advanced-settings-oc5.png   |  Bin 28234 -> 0 bytes
 ...ap-advanced-settings-special-attributes-oc5.png |  Bin 11241 -> 0 bytes
 core/doc/admin/_images/ldap-basic-settings-oc5.png |  Bin 25805 -> 0 bytes
 .../doc/admin/_images/ldap-expert-settings-oc5.png |  Bin 148150 -> 0 bytes
 core/doc/admin/_images/ldap-expert.png             |  Bin 0 -> 101261 bytes
 core/doc/admin/_images/ldap-fetched-avatar.png     |  Bin 0 -> 33049 bytes
 core/doc/admin/_images/ldap-wizard-1-server.png    |  Bin 0 -> 21101 bytes
 core/doc/admin/_images/ldap-wizard-2-user.png      |  Bin 0 -> 30654 bytes
 core/doc/admin/_images/ldap-wizard-3-login.png     |  Bin 0 -> 27824 bytes
 core/doc/admin/_images/ldap-wizard-4-group.png     |  Bin 0 -> 30865 bytes
 .../doc/admin/_sources/configuration/auth_ldap.txt |  349 +-
 .../configuration/configuration_3rdparty.txt       |    4 +-
 .../_sources/configuration/configuration_apps.txt  |   10 +-
 .../configuration/configuration_automation.txt     |   17 +-
 .../configuration/configuration_database.txt       |   38 +-
 .../configuration/configuration_encryption.txt     |    2 +-
 .../configuration/configuration_knowledgebase.txt  |    9 +-
 .../configuration/configuration_logging.txt        |    2 +-
 .../_sources/configuration/configuration_mail.txt  |    7 +-
 .../configuration/configuring_big_file_upload.txt  |   13 +-
 .../configuration/custom_mount_config_gui.txt      |    4 +-
 .../doc/admin/_sources/configuration/xsendfile.txt |   16 +-
 core/doc/admin/_sources/index.txt                  |   46 +-
 .../installation/installation_appliance.txt        |   13 +-
 .../_sources/installation/installation_linux.txt   |  121 +-
 .../_sources/installation/installation_macos.txt   |    2 +-
 .../_sources/installation/installation_others.txt  |  172 +-
 .../_sources/installation/installation_source.txt  |  300 +-
 .../_sources/installation/installation_ucs.txt     |    4 +-
 .../_sources/installation/installation_windows.txt |   20 +-
 core/doc/admin/_sources/maintenance/backup.txt     |    4 +-
 core/doc/admin/_sources/maintenance/restore.txt    |    4 +-
 core/doc/admin/_sources/maintenance/update.txt     |   16 +-
 core/doc/admin/configuration/auth_ldap.html        |  361 +-
 .../configuration/configuration_3rdparty.html      |    4 +-
 .../admin/configuration/configuration_apps.html    |    8 +-
 .../configuration/configuration_automation.html    |   17 +-
 .../configuration/configuration_database.html      |   37 +-
 .../configuration/configuration_encryption.html    |    2 +-
 .../configuration/configuration_knowledgebase.html |    7 +-
 .../admin/configuration/configuration_logging.html |    2 +-
 .../admin/configuration/configuration_mail.html    |    7 +-
 .../configuration/configuring_big_file_upload.html |   13 +-
 .../configuration/custom_mount_config_gui.html     |    4 +-
 core/doc/admin/configuration/index.html            |    2 +-
 core/doc/admin/configuration/xsendfile.html        |   16 +-
 core/doc/admin/contents.html                       |   29 +-
 core/doc/admin/index.html                          |   51 +-
 core/doc/admin/installation/index.html             |    6 +-
 .../admin/installation/installation_appliance.html |   10 +-
 .../doc/admin/installation/installation_linux.html |  129 +-
 .../doc/admin/installation/installation_macos.html |    5 +-
 .../admin/installation/installation_others.html    |  179 +-
 .../admin/installation/installation_source.html    |  291 +-
 core/doc/admin/installation/installation_ucs.html  |    7 +-
 .../admin/installation/installation_windows.html   |   24 +-
 core/doc/admin/maintenance/backup.html             |    3 +-
 core/doc/admin/maintenance/restore.html            |    3 +-
 core/doc/admin/maintenance/update.html             |   16 +-
 core/js/js.js                                      |    9 +-
 core/skeleton/ownCloudUserManual.pdf               |  Bin 1393293 -> 1393287 bytes
 lib/base.php                                       |   94 +-
 lib/private/db.php                                 |    3 +
 lib/private/db/mdb2schemareader.php                |    5 +-
 lib/private/user/session.php                       |   34 +
 lib/public/backgroundjob.php                       |    8 +-
 lib/public/share.php                               |    5 +-
 version.php                                        |    6 +-
 98 files changed, 1466 insertions(+), 10148 deletions(-)

diff --cc 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
index 0814501,0000000..e53b5f6
mode 100644,000000..100644
--- a/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+++ b/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@@ -1,2857 -1,0 +1,2857 @@@
 +<?php
 +/*
 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 + *
 + * This software consists of voluntary contributions made by many individuals
 + * and is licensed under the MIT license. For more information, see
 + * <http://www.doctrine-project.org>.
 + */
 +
 +namespace Doctrine\DBAL\Platforms;
 +
 +use Doctrine\DBAL\DBALException,
 +    Doctrine\DBAL\Connection,
 +    Doctrine\DBAL\Types,
 +    Doctrine\DBAL\Schema\Constraint,
 +    Doctrine\DBAL\Schema\Sequence,
 +    Doctrine\DBAL\Schema\Table,
 +    Doctrine\DBAL\Schema\Index,
 +    Doctrine\DBAL\Schema\ForeignKeyConstraint,
 +    Doctrine\DBAL\Schema\TableDiff,
 +    Doctrine\DBAL\Schema\Column,
 +    Doctrine\DBAL\Schema\ColumnDiff,
 +    Doctrine\DBAL\Types\Type,
 +    Doctrine\DBAL\Events,
 +    Doctrine\Common\EventManager,
 +    Doctrine\DBAL\Event\SchemaCreateTableEventArgs,
 +    Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs,
 +    Doctrine\DBAL\Event\SchemaDropTableEventArgs,
 +    Doctrine\DBAL\Event\SchemaAlterTableEventArgs,
 +    Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs,
 +    Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs,
 +    Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs,
 +    Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs;
 +
 +/**
 + * Base class for all DatabasePlatforms. The DatabasePlatforms are the central
 + * point of abstraction of platform-specific behaviors, features and SQL dialects.
 + * They are a passive source of information.
 + *
 + *
 + * @link    www.doctrine-project.org
 + * @since   2.0
 + * @author  Guilherme Blanco <guilhermeblanco at hotmail.com>
 + * @author  Jonathan Wage <jonwage at gmail.com>
 + * @author  Roman Borschel <roman at code-factory.org>
 + * @author  Lukas Smith <smith at pooteeweet.org> (PEAR MDB2 library)
 + * @author  Benjamin Eberlei <kontakt at beberlei.de>
 + * @todo Remove any unnecessary methods.
 + */
 +abstract class AbstractPlatform
 +{
 +    /**
 +     * @var integer
 +     */
 +    const CREATE_INDEXES = 1;
 +
 +    /**
 +     * @var integer
 +     */
 +    const CREATE_FOREIGNKEYS = 2;
 +
 +    /**
 +     * @var integer
 +     */
 +    const TRIM_UNSPECIFIED = 0;
 +
 +    /**
 +     * @var integer
 +     */
 +    const TRIM_LEADING = 1;
 +
 +    /**
 +     * @var integer
 +     */
 +    const TRIM_TRAILING = 2;
 +
 +    /**
 +     * @var integer
 +     */
 +    const TRIM_BOTH = 3;
 +
 +    /**
 +     * @var array
 +     */
 +    protected $doctrineTypeMapping = null;
 +
 +    /**
 +     * Contains a list of all columns that should generate parseable column comments for type-detection
 +     * in reverse engineering scenarios.
 +     *
 +     * @var array
 +     */
 +    protected $doctrineTypeComments = null;
 +
 +    /**
 +     * @var Doctrine\Common\EventManager
 +     */
 +    protected $_eventManager;
 +
 +    /**
 +     * Holds the KeywordList instance for the current platform.
 +     *
 +     * @var \Doctrine\DBAL\Platforms\Keywords\KeywordList
 +     */
 +    protected $_keywords;
 +
 +    /**
 +     * Constructor.
 +     */
 +    public function __construct() {}
 +
 +    /**
 +     * Sets the EventManager used by the Platform.
 +     *
 +     * @param \Doctrine\Common\EventManager
 +     */
 +    public function setEventManager(EventManager $eventManager)
 +    {
 +        $this->_eventManager = $eventManager;
 +    }
 +
 +    /**
 +     * Gets the EventManager used by the Platform.
 +     *
 +     * @return \Doctrine\Common\EventManager
 +     */
 +    public function getEventManager()
 +    {
 +        return $this->_eventManager;
 +    }
 +
 +    /**
 +     * Gets the SQL snippet that declares a boolean column.
 +     *
 +     * @param array $columnDef
 +     *
 +     * @return string
 +     */
 +    abstract public function getBooleanTypeDeclarationSQL(array $columnDef);
 +
 +    /**
 +     * Gets the SQL snippet that declares a 4 byte integer column.
 +     *
 +     * @param array $columnDef
 +     *
 +     * @return string
 +     */
 +    abstract public function getIntegerTypeDeclarationSQL(array $columnDef);
 +
 +    /**
 +     * Gets the SQL snippet that declares an 8 byte integer column.
 +     *
 +     * @param array $columnDef
 +     *
 +     * @return string
 +     */
 +    abstract public function getBigIntTypeDeclarationSQL(array $columnDef);
 +
 +    /**
 +     * Gets the SQL snippet that declares a 2 byte integer column.
 +     *
 +     * @param array $columnDef
 +     *
 +     * @return string
 +     */
 +    abstract public function getSmallIntTypeDeclarationSQL(array $columnDef);
 +
 +    /**
 +     * Gets the SQL snippet that declares common properties of an integer column.
 +     *
 +     * @param array $columnDef
 +     * @return string
 +     */
 +    abstract protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef);
 +
 +    /**
 +     * Lazy load Doctrine Type Mappings
 +     *
 +     * @return void
 +     */
 +    abstract protected function initializeDoctrineTypeMappings();
 +
 +    /**
 +     * Initialize Doctrine Type Mappings with the platform defaults
 +     * and with all additional type mappings.
 +     */
 +    private function initializeAllDoctrineTypeMappings()
 +    {
 +        $this->initializeDoctrineTypeMappings();
 +
 +        foreach (Type::getTypesMap() as $typeName => $className) {
 +            foreach (Type::getType($typeName)->getMappedDatabaseTypes($this) as $dbType) {
 +                $this->doctrineTypeMapping[$dbType] = $typeName;
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Gets the SQL snippet used to declare a VARCHAR column type.
 +     *
 +     * @param array $field
 +     *
 +     * @return string
 +     */
 +    public function getVarcharTypeDeclarationSQL(array $field)
 +    {
 +        if ( !isset($field['length'])) {
 +            $field['length'] = $this->getVarcharDefaultLength();
 +        }
 +
 +        $fixed = (isset($field['fixed'])) ? $field['fixed'] : false;
 +
 +        if ($field['length'] > $this->getVarcharMaxLength()) {
 +            return $this->getClobTypeDeclarationSQL($field);
 +        }
 +
 +        return $this->getVarcharTypeDeclarationSQLSnippet($field['length'], $fixed);
 +    }
 +
 +    /**
 +     * Get the SQL Snippet to create a GUID/UUID field.
 +     *
 +     * By default this maps directly to a VARCHAR and only maps to more
 +     * special datatypes when the underlying databases support this datatype.
 +     *
 +     * @param array $field
 +     *
 +     * @return string
 +     */
 +    public function getGuidTypeDeclarationSQL(array $field)
 +    {
 +        return $this->getVarcharTypeDeclarationSQL($field);
 +    }
 +
 +    /**
 +     * @param integer $length
 +     * @param boolean $fixed
 +     *
 +     * @return string
 +     *
 +     * @throws \Doctrine\DBAL\DBALException
 +     */
 +    protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
 +    {
 +        throw DBALException::notSupported('VARCHARs not supported by Platform.');
 +    }
 +
 +    /**
 +     * Gets the SQL snippet used to declare a CLOB column type.
 +     *
 +     * @param array $field
 +     *
 +     * @return string
 +     */
 +    abstract public function getClobTypeDeclarationSQL(array $field);
 +
 +    /**
 +     * Gets the SQL Snippet used to declare a BLOB column type.
 +     *
 +     * @param array $field
 +     *
 +     * @return string
 +     */
 +    abstract public function getBlobTypeDeclarationSQL(array $field);
 +
 +    /**
 +     * Gets the name of the platform.
 +     *
 +     * @return string
 +     */
 +    abstract public function getName();
 +
 +    /**
 +     * Register a doctrine type to be used in conjunction with a column type of this platform.
 +     *
 +     * @param string $dbType
 +     * @param string $doctrineType
 +     *
 +     * @throws \Doctrine\DBAL\DBALException if the type is not found
 +     */
 +    public function registerDoctrineTypeMapping($dbType, $doctrineType)
 +    {
 +        if ($this->doctrineTypeMapping === null) {
 +            $this->initializeAllDoctrineTypeMappings();
 +        }
 +
 +        if (!Types\Type::hasType($doctrineType)) {
 +            throw DBALException::typeNotFound($doctrineType);
 +        }
 +
 +        $dbType = strtolower($dbType);
 +        $this->doctrineTypeMapping[$dbType] = $doctrineType;
 +    }
 +
 +    /**
 +     * Get the Doctrine type that is mapped for the given database column type.
 +     *
 +     * @param  string $dbType
 +     *
 +     * @return string
 +     */
 +    public function getDoctrineTypeMapping($dbType)
 +    {
 +        if ($this->doctrineTypeMapping === null) {
 +            $this->initializeAllDoctrineTypeMappings();
 +        }
 +
 +        $dbType = strtolower($dbType);
 +
 +        if (!isset($this->doctrineTypeMapping[$dbType])) {
 +            throw new \Doctrine\DBAL\DBALException("Unknown database type ".$dbType." requested, " . get_class($this) . " may not support it.");
 +        }
 +
 +        return $this->doctrineTypeMapping[$dbType];
 +    }
 +
 +    /**
 +     * Check if a database type is currently supported by this platform.
 +     *
 +     * @param string $dbType
 +     *
 +     * @return boolean
 +     */
 +    public function hasDoctrineTypeMappingFor($dbType)
 +    {
 +        if ($this->doctrineTypeMapping === null) {
 +            $this->initializeAllDoctrineTypeMappings();
 +        }
 +
 +        $dbType = strtolower($dbType);
 +        return isset($this->doctrineTypeMapping[$dbType]);
 +    }
 +
 +    /**
 +     * Initialize the Doctrine Type comments instance variable for in_array() checks.
 +     *
 +     * @return void
 +     */
 +    protected function initializeCommentedDoctrineTypes()
 +    {
 +        $this->doctrineTypeComments = array();
 +
 +        foreach (Type::getTypesMap() as $typeName => $className) {
 +            $type = Type::getType($typeName);
 +
 +            if ($type->requiresSQLCommentHint($this)) {
 +                $this->doctrineTypeComments[] = $typeName;
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?
 +     *
 +     * @param Type $doctrineType
 +     *
 +     * @return boolean
 +     */
 +    public function isCommentedDoctrineType(Type $doctrineType)
 +    {
 +        if ($this->doctrineTypeComments === null) {
 +            $this->initializeCommentedDoctrineTypes();
 +        }
 +
 +        return in_array($doctrineType->getName(), $this->doctrineTypeComments);
 +    }
 +
 +    /**
 +     * Mark this type as to be commented in ALTER TABLE and CREATE TABLE statements.
 +     *
 +     * @param string|Type $doctrineType
 +     *
 +     * @return void
 +     */
 +    public function markDoctrineTypeCommented($doctrineType)
 +    {
 +        if ($this->doctrineTypeComments === null) {
 +            $this->initializeCommentedDoctrineTypes();
 +        }
 +
 +        $this->doctrineTypeComments[] = $doctrineType instanceof Type ? $doctrineType->getName() : $doctrineType;
 +    }
 +
 +    /**
 +     * Get the comment to append to a column comment that helps parsing this type in reverse engineering.
 +     *
 +     * @param Type $doctrineType
 +     * @return string
 +     */
 +    public function getDoctrineTypeComment(Type $doctrineType)
 +    {
 +        return '(DC2Type:' . $doctrineType->getName() . ')';
 +    }
 +
 +    /**
 +     * Return the comment of a passed column modified by potential doctrine type comment hints.
 +     *
 +     * @param Column $column
 +     * @return string
 +     */
 +    protected function getColumnComment(Column $column)
 +    {
 +        $comment = $column->getComment();
 +
 +        if ($this->isCommentedDoctrineType($column->getType())) {
 +            $comment .= $this->getDoctrineTypeComment($column->getType());
 +        }
 +
 +        return $comment;
 +    }
 +
 +    /**
 +     * Gets the character used for identifier quoting.
 +     *
 +     * @return string
 +     */
 +    public function getIdentifierQuoteCharacter()
 +    {
 +        return '"';
 +    }
 +
 +    /**
 +     * Gets the string portion that starts an SQL comment.
 +     *
 +     * @return string
 +     */
 +    public function getSqlCommentStartString()
 +    {
 +        return "--";
 +    }
 +
 +    /**
 +     * Gets the string portion that ends an SQL comment.
 +     *
 +     * @return string
 +     */
 +    public function getSqlCommentEndString()
 +    {
 +        return "\n";
 +    }
 +
 +    /**
 +     * Gets the maximum length of a varchar field.
 +     *
 +     * @return integer
 +     */
 +    public function getVarcharMaxLength()
 +    {
 +        return 4000;
 +    }
 +
 +    /**
 +     * Gets the default length of a varchar field.
 +     *
 +     * @return integer
 +     */
 +    public function getVarcharDefaultLength()
 +    {
 +        return 255;
 +    }
 +
 +    /**
 +     * Gets all SQL wildcard characters of the platform.
 +     *
 +     * @return array
 +     */
 +    public function getWildcards()
 +    {
 +        return array('%', '_');
 +    }
 +
 +    /**
 +     * Returns the regular expression operator.
 +     *
 +     * @return string
 +     */
 +    public function getRegexpExpression()
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Returns global unique identifier
 +     *
 +     * @return string to get global unique identifier
 +     */
 +    public function getGuidExpression()
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Returns the average value of a column
 +     *
 +     * @param string $column    the column to use
 +     *
 +     * @return string           generated sql including an AVG aggregate function
 +     */
 +    public function getAvgExpression($column)
 +    {
 +        return 'AVG(' .  $column . ')';
 +    }
 +
 +    /**
 +     * Returns the number of rows (without a NULL value) of a column
 +     *
 +     * If a '*' is used instead of a column the number of selected rows
 +     * is returned.
 +     *
 +     * @param string|integer $column    the column to use
 +     *
 +     * @return string                   generated sql including a COUNT aggregate function
 +     */
 +    public function getCountExpression($column)
 +    {
 +        return 'COUNT(' . $column . ')';
 +    }
 +
 +    /**
 +     * Returns the highest value of a column
 +     *
 +     * @param string $column    the column to use
 +     * @return string           generated sql including a MAX aggregate function
 +     */
 +    public function getMaxExpression($column)
 +    {
 +        return 'MAX(' . $column . ')';
 +    }
 +
 +    /**
 +     * Returns the lowest value of a column
 +     *
 +     * @param string $column the column to use
 +     * @return string
 +     */
 +    public function getMinExpression($column)
 +    {
 +        return 'MIN(' . $column . ')';
 +    }
 +
 +    /**
 +     * Returns the total sum of a column
 +     *
 +     * @param string $column the column to use
 +     * @return string
 +     */
 +    public function getSumExpression($column)
 +    {
 +        return 'SUM(' . $column . ')';
 +    }
 +
 +    // scalar functions
 +
 +    /**
 +     * Returns the md5 sum of a field.
 +     *
 +     * Note: Not SQL92, but common functionality
 +     *
 +     * @param string $column
 +     * @return string
 +     */
 +    public function getMd5Expression($column)
 +    {
 +        return 'MD5(' . $column . ')';
 +    }
 +
 +    /**
 +     * Returns the length of a text field.
 +     *
 +     * @param string $column
 +     *
 +     * @return string
 +     */
 +    public function getLengthExpression($column)
 +    {
 +        return 'LENGTH(' . $column . ')';
 +    }
 +
 +    /**
 +     * Returns the squared value of a column
 +     *
 +     * @param string $column    the column to use
 +     *
 +     * @return string           generated sql including an SQRT aggregate function
 +     */
 +    public function getSqrtExpression($column)
 +    {
 +        return 'SQRT(' . $column . ')';
 +    }
 +
 +    /**
 +     * Rounds a numeric field to the number of decimals specified.
 +     *
 +     * @param string $column
 +     * @param integer $decimals
 +     *
 +     * @return string
 +     */
 +    public function getRoundExpression($column, $decimals = 0)
 +    {
 +        return 'ROUND(' . $column . ', ' . $decimals . ')';
 +    }
 +
 +    /**
 +     * Returns the remainder of the division operation
 +     * $expression1 / $expression2.
 +     *
 +     * @param string $expression1
 +     * @param string $expression2
 +     *
 +     * @return string
 +     */
 +    public function getModExpression($expression1, $expression2)
 +    {
 +        return 'MOD(' . $expression1 . ', ' . $expression2 . ')';
 +    }
 +
 +    /**
 +     * Trim a string, leading/trailing/both and with a given char which defaults to space.
 +     *
 +     * @param string $str
 +     * @param integer $pos
 +     * @param string $char has to be quoted already
 +     *
 +     * @return string
 +     */
 +    public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = false)
 +    {
 +        $posStr = '';
 +        $trimChar = ($char != false) ? $char . ' FROM ' : '';
 +
 +        switch ($pos) {
 +            case self::TRIM_LEADING:
 +                $posStr = 'LEADING '.$trimChar;
 +                break;
 +
 +            case self::TRIM_TRAILING:
 +                $posStr = 'TRAILING '.$trimChar;
 +                break;
 +
 +            case self::TRIM_BOTH:
 +                $posStr = 'BOTH '.$trimChar;
 +                break;
 +        }
 +
 +        return 'TRIM(' . $posStr . $str . ')';
 +    }
 +
 +    /**
 +     * rtrim
 +     * returns the string $str with proceeding space characters removed
 +     *
 +     * @param string $str       literal string or column name
 +     *
 +     * @return string
 +     */
 +    public function getRtrimExpression($str)
 +    {
 +        return 'RTRIM(' . $str . ')';
 +    }
 +
 +    /**
 +     * ltrim
 +     * returns the string $str with leading space characters removed
 +     *
 +     * @param string $str       literal string or column name
 +     *
 +     * @return string
 +     */
 +    public function getLtrimExpression($str)
 +    {
 +        return 'LTRIM(' . $str . ')';
 +    }
 +
 +    /**
 +     * upper
 +     * Returns the string $str with all characters changed to
 +     * uppercase according to the current character set mapping.
 +     *
 +     * @param string $str       literal string or column name
 +     *
 +     * @return string
 +     */
 +    public function getUpperExpression($str)
 +    {
 +        return 'UPPER(' . $str . ')';
 +    }
 +
 +    /**
 +     * lower
 +     * Returns the string $str with all characters changed to
 +     * lowercase according to the current character set mapping.
 +     *
 +     * @param string $str       literal string or column name
 +     *
 +     * @return string
 +     */
 +    public function getLowerExpression($str)
 +    {
 +        return 'LOWER(' . $str . ')';
 +    }
 +
 +    /**
 +     * returns the position of the first occurrence of substring $substr in string $str
 +     *
 +     * @param string  $str       literal string
 +     * @param string  $substr    literal string to find
 +     * @param integer $startPos  position to start at, beginning of string by default
 +     *
 +     * @return string
 +     */
 +    public function getLocateExpression($str, $substr, $startPos = false)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Returns the current system date.
 +     *
 +     * @return string
 +     */
 +    public function getNowExpression()
 +    {
 +        return 'NOW()';
 +    }
 +
 +    /**
 +     * return string to call a function to get a substring inside an SQL statement
 +     *
 +     * Note: Not SQL92, but common functionality.
 +     *
 +     * SQLite only supports the 2 parameter variant of this function
 +     *
 +     * @param  string $value         an sql string literal or column name/alias
 +     * @param  integer $from         where to start the substring portion
 +     * @param  integer $length       the substring portion length
 +     *
 +     * @return string
 +     */
 +    public function getSubstringExpression($value, $from, $length = null)
 +    {
 +        if ($length === null) {
 +            return 'SUBSTRING(' . $value . ' FROM ' . $from . ')';
 +        }
 +
 +        return 'SUBSTRING(' . $value . ' FROM ' . $from . ' FOR ' . $length . ')';
 +    }
 +
 +    /**
 +     * Returns a series of strings concatinated
 +     *
 +     * concat() accepts an arbitrary number of parameters. Each parameter
 +     * must contain an expression
 +     *
 +     * @param string $arg1, $arg2 ... $argN     strings that will be concatenated.
 +     *
 +     * @return string
 +     */
 +    public function getConcatExpression()
 +    {
 +        return join(' || ' , func_get_args());
 +    }
 +
 +    /**
 +     * Returns the SQL for a logical not.
 +     *
 +     * Example:
 +     * <code>
 +     * $q = new Doctrine_Query();
 +     * $e = $q->expr;
 +     * $q->select('*')->from('table')
 +     *   ->where($e->eq('id', $e->not('null'));
 +     * </code>
 +     *
 +     * @param string $expression
 +     *
 +     * @return string a logical expression
 +     */
 +    public function getNotExpression($expression)
 +    {
 +        return 'NOT(' . $expression . ')';
 +    }
 +
 +    /**
 +     * Returns the SQL to check if a value is one in a set of
 +     * given values.
 +     *
 +     * in() accepts an arbitrary number of parameters. The first parameter
 +     * must always specify the value that should be matched against. Successive
 +     * must contain a logical expression or an array with logical expressions.
 +     * These expressions will be matched against the first parameter.
 +     *
 +     * @param string $column                the value that should be matched against
 +     * @param string|array<string> $values  values that will be matched against $column
 +     *
 +     * @return string logical expression
 +     */
 +    public function getInExpression($column, $values)
 +    {
 +        if ( ! is_array($values)) {
 +            $values = array($values);
 +        }
 +
 +        // TODO: fix this code: the method does not exist
 +        $values = $this->getIdentifiers($values);
 +
 +        if (count($values) == 0) {
 +            throw new \InvalidArgumentException('Values must not be empty.');
 +        }
 +
 +        return $column . ' IN (' . implode(', ', $values) . ')';
 +    }
 +
 +    /**
 +     * Returns SQL that checks if a expression is null.
 +     *
 +     * @param string $expression the expression that should be compared to null
 +     *
 +     * @return string logical expression
 +     */
 +    public function getIsNullExpression($expression)
 +    {
 +        return $expression . ' IS NULL';
 +    }
 +
 +    /**
 +     * Returns SQL that checks if a expression is not null.
 +     *
 +     * @param string $expression the expression that should be compared to null
 +     *
 +     * @return string logical expression
 +     */
 +    public function getIsNotNullExpression($expression)
 +    {
 +        return $expression . ' IS NOT NULL';
 +    }
 +
 +    /**
 +     * Returns SQL that checks if an expression evaluates to a value between
 +     * two values.
 +     *
 +     * The parameter $expression is checked if it is between $value1 and $value2.
 +     *
 +     * Note: There is a slight difference in the way BETWEEN works on some databases.
 +     * http://www.w3schools.com/sql/sql_between.asp. If you want complete database
 +     * independence you should avoid using between().
 +     *
 +     * @param string $expression the value to compare to
 +     * @param string $value1 the lower value to compare with
 +     * @param string $value2 the higher value to compare with
 +     *
 +     * @return string logical expression
 +     */
 +    public function getBetweenExpression($expression, $value1, $value2)
 +    {
 +        return $expression . ' BETWEEN ' .$value1 . ' AND ' . $value2;
 +    }
 +
 +    public function getAcosExpression($value)
 +    {
 +        return 'ACOS(' . $value . ')';
 +    }
 +
 +    public function getSinExpression($value)
 +    {
 +        return 'SIN(' . $value . ')';
 +    }
 +
 +    public function getPiExpression()
 +    {
 +        return 'PI()';
 +    }
 +
 +    public function getCosExpression($value)
 +    {
 +        return 'COS(' . $value . ')';
 +    }
 +
 +    /**
 +     * Calculate the difference in days between the two passed dates.
 +     *
 +     * Computes diff = date1 - date2
 +     *
 +     * @param string $date1
 +     * @param string $date2
 +     *
 +     * @return string
 +     */
 +    public function getDateDiffExpression($date1, $date2)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Add the number of given days to a date.
 +     *
 +     * @param string $date
 +     * @param integer $days
 +     *
 +     * @return string
 +     */
 +    public function getDateAddDaysExpression($date, $days)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Substract the number of given days to a date.
 +     *
 +     * @param string $date
 +     * @param integer $days
 +     *
 +     * @return string
 +     */
 +    public function getDateSubDaysExpression($date, $days)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Add the number of given months to a date.
 +     *
 +     * @param string $date
 +     * @param integer $months
 +     *
 +     * @return string
 +     */
 +    public function getDateAddMonthExpression($date, $months)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Substract the number of given months to a date.
 +     *
 +     * @param string $date
 +     * @param integer $months
 +     *
 +     * @return string
 +     */
 +    public function getDateSubMonthExpression($date, $months)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Gets SQL bit AND comparison  expression
 +     *
 +     * @param   string $value1
 +     * @param   string $value2
 +     *
 +     * @return  string
 +     */
 +    public function getBitAndComparisonExpression($value1, $value2)
 +    {
 +        return '(' . $value1 . ' & ' . $value2 . ')';
 +    }
 +
 +    /**
 +     * Gets SQL bit OR comparison expression
 +     *
 +     * @param   string $value1
 +     * @param   string $value2
 +     *
 +     * @return  string
 +     */
 +    public function getBitOrComparisonExpression($value1, $value2)
 +    {
 +        return '(' . $value1 . ' | ' . $value2 . ')';
 +    }
 +
 +    public function getForUpdateSQL()
 +    {
 +        return 'FOR UPDATE';
 +    }
 +
 +    /**
 +     * Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.
 +     *
 +     * @param  string $fromClause
 +     * @param  integer $lockMode
 +     *
 +     * @return string
 +     */
 +    public function appendLockHint($fromClause, $lockMode)
 +    {
 +        return $fromClause;
 +    }
 +
 +    /**
 +     * Get the sql snippet to append to any SELECT statement which locks rows in shared read lock.
 +     *
 +     * This defaults to the ASNI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
 +     * vendors allow to lighten this constraint up to be a real read lock.
 +     *
 +     * @return string
 +     */
 +    public function getReadLockSQL()
 +    {
 +        return $this->getForUpdateSQL();
 +    }
 +
 +    /**
 +     * Get the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.
 +     *
 +     * The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ASNI SQL standard.
 +     *
 +     * @return string
 +     */
 +    public function getWriteLockSQL()
 +    {
 +        return $this->getForUpdateSQL();
 +    }
 +
 +    /**
 +     * Get the SQL snippet to drop an existing database
 +     *
 +     * @param string $database name of the database that should be dropped
 +     *
 +     * @return string
 +     */
 +    public function getDropDatabaseSQL($database)
 +    {
 +        return 'DROP DATABASE ' . $database;
 +    }
 +
 +    /**
 +     * Drop a Table
 +     *
 +     * @throws \InvalidArgumentException
 +     *
 +     * @param  Table|string $table
 +     *
 +     * @return string
 +     */
 +    public function getDropTableSQL($table)
 +    {
 +        $tableArg = $table;
 +
 +        if ($table instanceof Table) {
 +            $table = $table->getQuotedName($this);
 +        } else if(!is_string($table)) {
 +            throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
 +        }
 +
 +        if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaDropTable)) {
 +            $eventArgs = new SchemaDropTableEventArgs($tableArg, $this);
 +            $this->_eventManager->dispatchEvent(Events::onSchemaDropTable, $eventArgs);
 +
 +            if ($eventArgs->isDefaultPrevented()) {
 +                return $eventArgs->getSql();
 +            }
 +        }
 +
 +        return 'DROP TABLE ' . $table;
 +    }
 +
 +    /**
 +     * Get SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.
 +     *
 +     * @param Table|string $table
 +     *
 +     * @return string
 +     */
 +    public function getDropTemporaryTableSQL($table)
 +    {
 +        return $this->getDropTableSQL($table);
 +    }
 +
 +    /**
 +     * Drop index from a table
 +     *
 +     * @param Index|string $name
 +     * @param string|Table $table
 +     *
 +     * @return string
 +     */
 +    public function getDropIndexSQL($index, $table = null)
 +    {
 +        if ($index instanceof Index) {
 +            $index = $index->getQuotedName($this);
 +        } else if(!is_string($index)) {
 +            throw new \InvalidArgumentException('AbstractPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.');
 +        }
 +
 +        return 'DROP INDEX ' . $index;
 +    }
 +
 +    /**
 +     * Get drop constraint sql
 +     *
 +     * @param  \Doctrine\DBAL\Schema\Constraint $constraint
 +     * @param  string|Table $table
 +     *
 +     * @return string
 +     */
 +    public function getDropConstraintSQL($constraint, $table)
 +    {
 +        if ($constraint instanceof Constraint) {
 +            $constraint = $constraint->getQuotedName($this);
 +        }
 +
 +        if ($table instanceof Table) {
 +            $table = $table->getQuotedName($this);
 +        }
 +
 +        return 'ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $constraint;
 +    }
 +
 +    /**
 +     * @param  ForeignKeyConstraint|string $foreignKey
 +     * @param  Table|string $table
 +     *
 +     * @return string
 +     */
 +    public function getDropForeignKeySQL($foreignKey, $table)
 +    {
 +        if ($foreignKey instanceof ForeignKeyConstraint) {
 +            $foreignKey = $foreignKey->getQuotedName($this);
 +        }
 +
 +        if ($table instanceof Table) {
 +            $table = $table->getQuotedName($this);
 +        }
 +
 +        return 'ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $foreignKey;
 +    }
 +
 +    /**
 +     * Gets the SQL statement(s) to create a table with the specified name, columns and constraints
 +     * on this platform.
 +     *
 +     * @param string $table The name of the table.
 +     * @param integer $createFlags
 +     *
 +     * @return array The sequence of SQL statements.
 +     */
 +    public function getCreateTableSQL(Table $table, $createFlags = self::CREATE_INDEXES)
 +    {
 +        if ( ! is_int($createFlags)) {
 +            throw new \InvalidArgumentException("Second argument of AbstractPlatform::getCreateTableSQL() has to be integer.");
 +        }
 +
 +        if (count($table->getColumns()) === 0) {
 +            throw DBALException::noColumnsSpecifiedForTable($table->getName());
 +        }
 +
 +        $tableName = $table->getQuotedName($this);
 +        $options = $table->getOptions();
 +        $options['uniqueConstraints'] = array();
 +        $options['indexes'] = array();
 +        $options['primary'] = array();
 +
 +        if (($createFlags&self::CREATE_INDEXES) > 0) {
 +            foreach ($table->getIndexes() as $index) {
 +                /* @var $index Index */
 +                if ($index->isPrimary()) {
 +                    $platform = $this;
 +                    $options['primary'] = array_map(function ($columnName) use ($table, $platform) {
 +                        return $table->getColumn($columnName)->getQuotedName($platform);
 +                    }, $index->getColumns());
 +                    $options['primary_index'] = $index;
 +                } else {
 +                    $options['indexes'][$index->getName()] = $index;
 +                }
 +            }
 +        }
 +
 +        $columnSql = array();
 +        $columns = array();
 +
 +        foreach ($table->getColumns() as $column) {
 +            /* @var \Doctrine\DBAL\Schema\Column $column */
 +
 +            if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaCreateTableColumn)) {
 +                $eventArgs = new SchemaCreateTableColumnEventArgs($column, $table, $this);
 +                $this->_eventManager->dispatchEvent(Events::onSchemaCreateTableColumn, $eventArgs);
 +
 +                $columnSql = array_merge($columnSql, $eventArgs->getSql());
 +
 +                if ($eventArgs->isDefaultPrevented()) {
 +                    continue;
 +                }
 +            }
 +
 +            $columnData = array();
 +            $columnData['name'] = $column->getQuotedName($this);
 +            $columnData['type'] = $column->getType();
 +            $columnData['length'] = $column->getLength();
 +            $columnData['notnull'] = $column->getNotNull();
 +            $columnData['fixed'] = $column->getFixed();
 +            $columnData['unique'] = false; // TODO: what do we do about this?
 +            $columnData['version'] = $column->hasPlatformOption("version") ? $column->getPlatformOption('version') : false;
 +
 +            if (strtolower($columnData['type']) == "string" && $columnData['length'] === null) {
 +                $columnData['length'] = 255;
 +            }
 +
 +            $columnData['unsigned'] = $column->getUnsigned();
 +            $columnData['precision'] = $column->getPrecision();
 +            $columnData['scale'] = $column->getScale();
 +            $columnData['default'] = $column->getDefault();
 +            $columnData['columnDefinition'] = $column->getColumnDefinition();
 +            $columnData['autoincrement'] = $column->getAutoincrement();
 +            $columnData['comment'] = $this->getColumnComment($column);
 +
 +            if (in_array($column->getName(), $options['primary'])) {
 +                $columnData['primary'] = true;
 +            }
 +
 +            $columns[$columnData['name']] = $columnData;
 +        }
 +
 +        if (($createFlags&self::CREATE_FOREIGNKEYS) > 0) {
 +            $options['foreignKeys'] = array();
 +            foreach ($table->getForeignKeys() as $fkConstraint) {
 +                $options['foreignKeys'][] = $fkConstraint;
 +            }
 +        }
 +
 +        if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaCreateTable)) {
 +            $eventArgs = new SchemaCreateTableEventArgs($table, $columns, $options, $this);
 +            $this->_eventManager->dispatchEvent(Events::onSchemaCreateTable, $eventArgs);
 +
 +            if ($eventArgs->isDefaultPrevented()) {
 +                return array_merge($eventArgs->getSql(), $columnSql);
 +            }
 +        }
 +
 +        $sql = $this->_getCreateTableSQL($tableName, $columns, $options);
 +        if ($this->supportsCommentOnStatement()) {
 +            foreach ($table->getColumns() as $column) {
 +                if ($this->getColumnComment($column)) {
-                     $sql[] = $this->getCommentOnColumnSQL($tableName, $column->getQuotedName($this), $this->getColumnComment($column));
++                    $sql[] = $this->getCommentOnColumnSQL($tableName, $column->getName(), $this->getColumnComment($column));
 +                }
 +            }
 +        }
 +
 +        return array_merge($sql, $columnSql);
 +    }
 +
 +    public function getCommentOnColumnSQL($tableName, $columnName, $comment)
 +    {
 +        return "COMMENT ON COLUMN " . $tableName . "." . $columnName . " IS '" . $comment . "'";
 +    }
 +
 +    /**
 +     * Gets the SQL used to create a table.
 +     *
 +     * @param string $tableName
 +     * @param array $columns
 +     * @param array $options
 +     *
 +     * @return array
 +     */
 +    protected function _getCreateTableSQL($tableName, array $columns, array $options = array())
 +    {
 +        $columnListSql = $this->getColumnDeclarationListSQL($columns);
 +
 +        if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) {
 +            foreach ($options['uniqueConstraints'] as $name => $definition) {
 +                $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition);
 +            }
 +        }
 +
 +        if (isset($options['primary']) && ! empty($options['primary'])) {
 +            $columnListSql .= ', PRIMARY KEY(' . implode(', ', array_unique(array_values($options['primary']))) . ')';
 +        }
 +
 +        if (isset($options['indexes']) && ! empty($options['indexes'])) {
 +            foreach($options['indexes'] as $index => $definition) {
 +                $columnListSql .= ', ' . $this->getIndexDeclarationSQL($index, $definition);
 +            }
 +        }
 +
 +        $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql;
 +
 +        $check = $this->getCheckDeclarationSQL($columns);
 +        if ( ! empty($check)) {
 +            $query .= ', ' . $check;
 +        }
 +        $query .= ')';
 +
 +        $sql[] = $query;
 +
 +        if (isset($options['foreignKeys'])) {
 +            foreach ((array) $options['foreignKeys'] as $definition) {
 +                $sql[] = $this->getCreateForeignKeySQL($definition, $tableName);
 +            }
 +        }
 +
 +        return $sql;
 +    }
 +
 +    public function getCreateTemporaryTableSnippetSQL()
 +    {
 +        return "CREATE TEMPORARY TABLE";
 +    }
 +
 +    /**
 +     * Gets the SQL to create a sequence on this platform.
 +     *
 +     * @param \Doctrine\DBAL\Schema\Sequence $sequence
 +     *
 +     * @return string
 +     *
 +     * @throws DBALException
 +     */
 +    public function getCreateSequenceSQL(Sequence $sequence)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Gets the SQL statement to change a sequence on this platform.
 +     *
 +     * @param \Doctrine\DBAL\Schema\Sequence $sequence
 +     *
 +     * @return string
 +     */
 +    public function getAlterSequenceSQL(Sequence $sequence)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Gets the SQL to create a constraint on a table on this platform.
 +     *
 +     * @param \Doctrine\DBAL\Schema\Constraint $constraint
 +     * @param string|Table $table
 +     *
 +     * @return string
 +     */
 +    public function getCreateConstraintSQL(Constraint $constraint, $table)
 +    {
 +        if ($table instanceof Table) {
 +            $table = $table->getQuotedName($this);
 +        }
 +
 +        $query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $constraint->getQuotedName($this);
 +
 +        $columns = array();
 +        foreach ($constraint->getColumns() as $column) {
 +            $columns[] = $column;
 +        }
 +        $columnList = '('. implode(', ', $columns) . ')';
 +
 +        $referencesClause = '';
 +        if ($constraint instanceof Index) {
 +            if($constraint->isPrimary()) {
 +                $query .= ' PRIMARY KEY';
 +            } elseif ($constraint->isUnique()) {
 +                $query .= ' UNIQUE';
 +            } else {
 +                throw new \InvalidArgumentException(
 +                    'Can only create primary or unique constraints, no common indexes with getCreateConstraintSQL().'
 +                );
 +            }
 +        } else if ($constraint instanceof ForeignKeyConstraint) {
 +            $query .= ' FOREIGN KEY';
 +
 +            $foreignColumns = array();
 +            foreach ($constraint->getForeignColumns() as $column) {
 +                $foreignColumns[] = $column;
 +            }
 +
 +            $referencesClause = ' REFERENCES '.$constraint->getForeignTableName(). ' ('.implode(', ', $foreignColumns).')';
 +        }
 +        $query .= ' '.$columnList.$referencesClause;
 +
 +        return $query;
 +    }
 +
 +    /**
 +     * Gets the SQL to create an index on a table on this platform.
 +     *
 +     * @param Index $index
 +     * @param string|Table $table name of the table on which the index is to be created
 +     *
 +     * @return string
 +     */
 +    public function getCreateIndexSQL(Index $index, $table)
 +    {
 +        if ($table instanceof Table) {
 +            $table = $table->getQuotedName($this);
 +        }
 +        $name = $index->getQuotedName($this);
 +        $columns = $index->getColumns();
 +
 +        if (count($columns) == 0) {
 +            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
 +        }
 +
 +        if ($index->isPrimary()) {
 +            return $this->getCreatePrimaryKeySQL($index, $table);
 +        }
 +
 +        $query = 'CREATE ' . $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name . ' ON ' . $table;
 +        $query .= ' (' . $this->getIndexFieldDeclarationListSQL($columns) . ')';
 +
 +        return $query;
 +    }
 +
 +    /**
 +     * Adds additional flags for index generation
 +     *
 +     * @param Index $index
 +     *
 +     * @return string
 +     */
 +    protected function getCreateIndexSQLFlags(Index $index)
 +    {
 +        return $index->isUnique() ? 'UNIQUE ' : '';
 +    }
 +
 +    /**
 +     * Get SQL to create an unnamed primary key constraint.
 +     *
 +     * @param Index $index
 +     * @param string|Table $table
 +     *
 +     * @return string
 +     */
 +    public function getCreatePrimaryKeySQL(Index $index, $table)
 +    {
 +        return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY (' . $this->getIndexFieldDeclarationListSQL($index->getColumns()) . ')';
 +    }
 +
 +    /**
 +     * Quotes a string so that it can be safely used as a table or column name,
 +     * even if it is a reserved word of the platform. This also detects identifier
 +     * chains separated by dot and quotes them independently.
 +     *
 +     * NOTE: Just because you CAN use quoted identifiers doesn't mean
 +     * you SHOULD use them.  In general, they end up causing way more
 +     * problems than they solve.
 +     *
 +     * @param string $str           identifier name to be quoted
 +     *
 +     * @return string               quoted identifier string
 +     */
 +    public function quoteIdentifier($str)
 +    {
 +        if (strpos($str, ".") !== false) {
 +            $parts = array_map(array($this, "quoteIdentifier"), explode(".", $str));
 +
 +            return implode(".", $parts);
 +        }
 +
 +        return $this->quoteSingleIdentifier($str);
 +    }
 +
 +    /**
 +     * Quote a single identifier (no dot chain separation)
 +     *
 +     * @param string $str
 +     *
 +     * @return string
 +     */
 +    public function quoteSingleIdentifier($str)
 +    {
 +        $c = $this->getIdentifierQuoteCharacter();
 +
 +        return $c . str_replace($c, $c.$c, $str) . $c;
 +    }
 +
 +    /**
 +     * Create a new foreign key
 +     *
 +     * @param ForeignKeyConstraint  $foreignKey    ForeignKey instance
 +     * @param string|Table          $table         name of the table on which the foreign key is to be created
 +     *
 +     * @return string
 +     */
 +    public function getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, $table)
 +    {
 +        if ($table instanceof Table) {
 +            $table = $table->getQuotedName($this);
 +        }
 +
 +        $query = 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclarationSQL($foreignKey);
 +
 +        return $query;
 +    }
 +
 +    /**
 +     * Gets the sql statements for altering an existing table.
 +     *
 +     * The method returns an array of sql statements, since some platforms need several statements.
 +     *
 +     * @param TableDiff $diff
 +     *
 +     * @return array
 +     */
 +    public function getAlterTableSQL(TableDiff $diff)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * @param Column $column
 +     * @param TableDiff $diff
 +     * @param array $columnSql
 +     *
 +     * @return boolean
 +     */
 +    protected function onSchemaAlterTableAddColumn(Column $column, TableDiff $diff, &$columnSql)
 +    {
 +        if (null === $this->_eventManager) {
 +            return false;
 +        }
 +
 +        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableAddColumn)) {
 +            return false;
 +        }
 +
 +        $eventArgs = new SchemaAlterTableAddColumnEventArgs($column, $diff, $this);
 +        $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableAddColumn, $eventArgs);
 +
 +        $columnSql = array_merge($columnSql, $eventArgs->getSql());
 +
 +        return $eventArgs->isDefaultPrevented();
 +    }
 +
 +    /**
 +     * @param Column $column
 +     * @param TableDiff $diff
 +     * @param array $columnSql
 +     *
 +     * @return boolean
 +     */
 +    protected function onSchemaAlterTableRemoveColumn(Column $column, TableDiff $diff, &$columnSql)
 +    {
 +        if (null === $this->_eventManager) {
 +            return false;
 +        }
 +
 +        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRemoveColumn)) {
 +            return false;
 +        }
 +
 +        $eventArgs = new SchemaAlterTableRemoveColumnEventArgs($column, $diff, $this);
 +        $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableRemoveColumn, $eventArgs);
 +
 +        $columnSql = array_merge($columnSql, $eventArgs->getSql());
 +
 +        return $eventArgs->isDefaultPrevented();
 +    }
 +
 +    /**
 +     * @param ColumnDiff $columnDiff
 +     * @param TableDiff $diff
 +     * @param array $columnSql
 +     *
 +     * @return boolean
 +     */
 +    protected function onSchemaAlterTableChangeColumn(ColumnDiff $columnDiff, TableDiff $diff, &$columnSql)
 +    {
 +        if (null === $this->_eventManager) {
 +            return false;
 +        }
 +
 +        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableChangeColumn)) {
 +            return false;
 +        }
 +
 +        $eventArgs = new SchemaAlterTableChangeColumnEventArgs($columnDiff, $diff, $this);
 +        $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableChangeColumn, $eventArgs);
 +
 +        $columnSql = array_merge($columnSql, $eventArgs->getSql());
 +
 +        return $eventArgs->isDefaultPrevented();
 +    }
 +
 +    /**
 +     * @param string $oldColumnName
 +     * @param Column $column
 +     * @param TableDiff $diff
 +     * @param array $columnSql
 +     *
 +     * @return boolean
 +     */
 +    protected function onSchemaAlterTableRenameColumn($oldColumnName, Column $column, TableDiff $diff, &$columnSql)
 +    {
 +        if (null === $this->_eventManager) {
 +            return false;
 +        }
 +
 +        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRenameColumn)) {
 +            return false;
 +        }
 +
 +        $eventArgs = new SchemaAlterTableRenameColumnEventArgs($oldColumnName, $column, $diff, $this);
 +        $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableRenameColumn, $eventArgs);
 +
 +        $columnSql = array_merge($columnSql, $eventArgs->getSql());
 +
 +        return $eventArgs->isDefaultPrevented();
 +    }
 +
 +    /**
 +     * @param TableDiff $diff
 +     * @param array $sql
 +     *
 +     * @return boolean
 +     */
 +    protected function onSchemaAlterTable(TableDiff $diff, &$sql)
 +    {
 +        if (null === $this->_eventManager) {
 +            return false;
 +        }
 +
 +        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTable)) {
 +            return false;
 +        }
 +
 +        $eventArgs = new SchemaAlterTableEventArgs($diff, $this);
 +        $this->_eventManager->dispatchEvent(Events::onSchemaAlterTable, $eventArgs);
 +
 +        $sql = array_merge($sql, $eventArgs->getSql());
 +
 +        return $eventArgs->isDefaultPrevented();
 +    }
 +
 +    protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff)
 +    {
 +        $tableName = $diff->name;
 +
 +        $sql = array();
 +        if ($this->supportsForeignKeyConstraints()) {
 +            foreach ($diff->removedForeignKeys as $foreignKey) {
 +                $sql[] = $this->getDropForeignKeySQL($foreignKey, $tableName);
 +            }
 +            foreach ($diff->changedForeignKeys as $foreignKey) {
 +                $sql[] = $this->getDropForeignKeySQL($foreignKey, $tableName);
 +            }
 +        }
 +
 +        foreach ($diff->removedIndexes as $index) {
 +            $sql[] = $this->getDropIndexSQL($index, $tableName);
 +        }
 +        foreach ($diff->changedIndexes as $index) {
 +            $sql[] = $this->getDropIndexSQL($index, $tableName);
 +        }
 +
 +        return $sql;
 +    }
 +
 +    protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff)
 +    {
 +        $tableName = false !== $diff->newName ? $diff->newName : $diff->name;
 +
 +        $sql = array();
 +        if ($this->supportsForeignKeyConstraints()) {
 +            foreach ($diff->addedForeignKeys as $foreignKey) {
 +                $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableName);
 +            }
 +            foreach ($diff->changedForeignKeys as $foreignKey) {
 +                $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableName);
 +            }
 +        }
 +
 +        foreach ($diff->addedIndexes as $index) {
 +            $sql[] = $this->getCreateIndexSQL($index, $tableName);
 +        }
 +        foreach ($diff->changedIndexes as $index) {
 +            $sql[] = $this->getCreateIndexSQL($index, $tableName);
 +        }
 +
 +        return $sql;
 +    }
 +
 +    /**
 +     * Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.
 +     *
 +     * @param TableDiff $diff
 +     *
 +     * @return array
 +     */
 +    protected function _getAlterTableIndexForeignKeySQL(TableDiff $diff)
 +    {
 +        return array_merge($this->getPreAlterTableIndexForeignKeySQL($diff), $this->getPostAlterTableIndexForeignKeySQL($diff));
 +    }
 +
 +    /**
 +     * Get declaration of a number of fields in bulk
 +     *
 +     * @param array $fields  a multidimensional associative array.
 +     *      The first dimension determines the field name, while the second
 +     *      dimension is keyed with the name of the properties
 +     *      of the field being declared as array indexes. Currently, the types
 +     *      of supported field properties are as follows:
 +     *
 +     *      length
 +     *          Integer value that determines the maximum length of the text
 +     *          field. If this argument is missing the field should be
 +     *          declared to have the longest length allowed by the DBMS.
 +     *
 +     *      default
 +     *          Text value to be used as default for this field.
 +     *
 +     *      notnull
 +     *          Boolean flag that indicates whether this field is constrained
 +     *          to not be set to null.
 +     *      charset
 +     *          Text value with the default CHARACTER SET for this field.
 +     *      collation
 +     *          Text value with the default COLLATION for this field.
 +     *      unique
 +     *          unique constraint
 +     *
 +     * @return string
 +     */
 +    public function getColumnDeclarationListSQL(array $fields)
 +    {
 +        $queryFields = array();
 +
 +        foreach ($fields as $fieldName => $field) {
 +            $queryFields[] = $this->getColumnDeclarationSQL($fieldName, $field);
 +        }
 +
 +        return implode(', ', $queryFields);
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to declare a generic type
 +     * field to be used in statements like CREATE TABLE.
 +     *
 +     * @param string $name   name the field to be declared.
 +     * @param array  $field  associative array with the name of the properties
 +     *      of the field being declared as array indexes. Currently, the types
 +     *      of supported field properties are as follows:
 +     *
 +     *      length
 +     *          Integer value that determines the maximum length of the text
 +     *          field. If this argument is missing the field should be
 +     *          declared to have the longest length allowed by the DBMS.
 +     *
 +     *      default
 +     *          Text value to be used as default for this field.
 +     *
 +     *      notnull
 +     *          Boolean flag that indicates whether this field is constrained
 +     *          to not be set to null.
 +     *      charset
 +     *          Text value with the default CHARACTER SET for this field.
 +     *      collation
 +     *          Text value with the default COLLATION for this field.
 +     *      unique
 +     *          unique constraint
 +     *      check
 +     *          column check constraint
 +     *      columnDefinition
 +     *          a string that defines the complete column
 +     *
 +     * @return string  DBMS specific SQL code portion that should be used to declare the column.
 +     */
 +    public function getColumnDeclarationSQL($name, array $field)
 +    {
 +        if (isset($field['columnDefinition'])) {
 +            $columnDef = $this->getCustomTypeDeclarationSQL($field);
 +        } else {
 +            $default = $this->getDefaultValueDeclarationSQL($field);
 +
 +            $charset = (isset($field['charset']) && $field['charset']) ?
 +                    ' ' . $this->getColumnCharsetDeclarationSQL($field['charset']) : '';
 +
 +            $collation = (isset($field['collation']) && $field['collation']) ?
 +                    ' ' . $this->getColumnCollationDeclarationSQL($field['collation']) : '';
 +
 +            $notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';
 +
 +            $unique = (isset($field['unique']) && $field['unique']) ?
 +                    ' ' . $this->getUniqueFieldDeclarationSQL() : '';
 +
 +            $check = (isset($field['check']) && $field['check']) ?
 +                    ' ' . $field['check'] : '';
 +
 +            $typeDecl = $field['type']->getSqlDeclaration($field, $this);
 +            $columnDef = $typeDecl . $charset . $default . $notnull . $unique . $check . $collation;
 +        }
 +
 +        if ($this->supportsInlineColumnComments() && isset($field['comment']) && $field['comment']) {
 +            $columnDef .= " COMMENT '" . $field['comment'] . "'";
 +        }
 +
 +        return $name . ' ' . $columnDef;
 +    }
 +
 +    /**
 +     * Gets the SQL snippet that declares a floating point column of arbitrary precision.
 +     *
 +     * @param array $columnDef
 +     *
 +     * @return string
 +     */
 +    public function getDecimalTypeDeclarationSQL(array $columnDef)
 +    {
 +        $columnDef['precision'] = ( ! isset($columnDef['precision']) || empty($columnDef['precision']))
 +            ? 10 : $columnDef['precision'];
 +        $columnDef['scale'] = ( ! isset($columnDef['scale']) || empty($columnDef['scale']))
 +            ? 0 : $columnDef['scale'];
 +
 +        return 'NUMERIC(' . $columnDef['precision'] . ', ' . $columnDef['scale'] . ')';
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set a default value
 +     * declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param array $field      field definition array
 +     *
 +     * @return string           DBMS specific SQL code portion needed to set a default value
 +     */
 +    public function getDefaultValueDeclarationSQL($field)
 +    {
 +        $default = empty($field['notnull']) ? ' DEFAULT NULL' : '';
 +
 +        if (isset($field['default'])) {
 +            $default = " DEFAULT '".$field['default']."'";
 +            if (isset($field['type'])) {
 +                if (in_array((string)$field['type'], array("Integer", "BigInteger", "SmallInteger"))) {
 +                    $default = " DEFAULT ".$field['default'];
 +                } else if ((string)$field['type'] == 'DateTime' && $field['default'] == $this->getCurrentTimestampSQL()) {
 +                    $default = " DEFAULT ".$this->getCurrentTimestampSQL();
 +                } else if ((string) $field['type'] == 'Boolean') {
 +                    $default = " DEFAULT '" . $this->convertBooleans($field['default']) . "'";
 +                }
 +            }
 +        }
 +        return $default;
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set a CHECK constraint
 +     * declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param array $definition     check definition
 +     *
 +     * @return string               DBMS specific SQL code portion needed to set a CHECK constraint
 +     */
 +    public function getCheckDeclarationSQL(array $definition)
 +    {
 +        $constraints = array();
 +        foreach ($definition as $field => $def) {
 +            if (is_string($def)) {
 +                $constraints[] = 'CHECK (' . $def . ')';
 +            } else {
 +                if (isset($def['min'])) {
 +                    $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')';
 +                }
 +
 +                if (isset($def['max'])) {
 +                    $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')';
 +                }
 +            }
 +        }
 +
 +        return implode(', ', $constraints);
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set a unique
 +     * constraint declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param string $name          name of the unique constraint
 +     * @param Index $index          index definition
 +     *
 +     * @return string               DBMS specific SQL code portion needed
 +     *                              to set a constraint
 +     */
 +    public function getUniqueConstraintDeclarationSQL($name, Index $index)
 +    {
 +        if (count($index->getColumns()) === 0) {
 +            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
 +        }
 +
 +        return 'CONSTRAINT ' . $name . ' UNIQUE ('
 +             . $this->getIndexFieldDeclarationListSQL($index->getColumns())
 +             . ')';
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set an index
 +     * declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param string $name          name of the index
 +     * @param Index $index          index definition
 +     *
 +     * @return string               DBMS specific SQL code portion needed to set an index
 +     */
 +    public function getIndexDeclarationSQL($name, Index $index)
 +    {
 +        $type = '';
 +
 +        if ($index->isUnique()) {
 +            $type = 'UNIQUE ';
 +        }
 +
 +        if (count($index->getColumns()) === 0) {
 +            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
 +        }
 +
 +        return $type . 'INDEX ' . $name . ' ('
 +             . $this->getIndexFieldDeclarationListSQL($index->getColumns())
 +             . ')';
 +    }
 +
 +    /**
 +     * getCustomTypeDeclarationSql
 +     * Obtail SQL code portion needed to create a custom column,
 +     * e.g. when a field has the "columnDefinition" keyword.
 +     * Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.
 +     *
 +     * @param array $columnDef
 +     *
 +     * @return string
 +     */
 +    public function getCustomTypeDeclarationSQL(array $columnDef)
 +    {
 +        return $columnDef['columnDefinition'];
 +    }
 +
 +    /**
 +     * getIndexFieldDeclarationList
 +     * Obtain DBMS specific SQL code portion needed to set an index
 +     * declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param array $fields
 +     *
 +     * @return string
 +     */
 +    public function getIndexFieldDeclarationListSQL(array $fields)
 +    {
 +        $ret = array();
 +
 +        foreach ($fields as $field => $definition) {
 +            if (is_array($definition)) {
 +                $ret[] = $field;
 +            } else {
 +                $ret[] = $definition;
 +            }
 +        }
 +
 +        return implode(', ', $ret);
 +    }
 +
 +    /**
 +     * A method to return the required SQL string that fits between CREATE ... TABLE
 +     * to create the table as a temporary table.
 +     *
 +     * Should be overridden in driver classes to return the correct string for the
 +     * specific database type.
 +     *
 +     * The default is to return the string "TEMPORARY" - this will result in a
 +     * SQL error for any database that does not support temporary tables, or that
 +     * requires a different SQL command from "CREATE TEMPORARY TABLE".
 +     *
 +     * @return string The string required to be placed between "CREATE" and "TABLE"
 +     *                to generate a temporary table, if possible.
 +     */
 +    public function getTemporaryTableSQL()
 +    {
 +        return 'TEMPORARY';
 +    }
 +
 +    /**
 +     * Some vendors require temporary table names to be qualified specially.
 +     *
 +     * @param  string $tableName
 +     *
 +     * @return string
 +     */
 +    public function getTemporaryTableName($tableName)
 +    {
 +        return $tableName;
 +    }
 +
 +    /**
 +     * Get sql query to show a list of database.
 +     *
 +     * @return string
 +     */
 +    public function getShowDatabasesSQL()
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
 +     * of a field declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey
 +     *
 +     * @return string  DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
 +     *                 of a field declaration.
 +     */
 +    public function getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey)
 +    {
 +        $sql  = $this->getForeignKeyBaseDeclarationSQL($foreignKey);
 +        $sql .= $this->getAdvancedForeignKeyOptionsSQL($foreignKey);
 +
 +        return $sql;
 +    }
 +
 +    /**
 +     * Return the FOREIGN KEY query section dealing with non-standard options
 +     * as MATCH, INITIALLY DEFERRED, ON UPDATE, ...
 +     *
 +     * @param ForeignKeyConstraint $foreignKey     foreign key definition
 +     *
 +     * @return string
 +     */
 +    public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey)
 +    {
 +        $query = '';
 +        if ($this->supportsForeignKeyOnUpdate() && $foreignKey->hasOption('onUpdate')) {
 +            $query .= ' ON UPDATE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onUpdate'));
 +        }
 +        if ($foreignKey->hasOption('onDelete')) {
 +            $query .= ' ON DELETE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete'));
 +        }
 +        return $query;
 +    }
 +
 +    /**
 +     * returns given referential action in uppercase if valid, otherwise throws
 +     * an exception
 +     *
 +     * @throws \InvalidArgumentException if unknown referential action given
 +     *
 +     * @param string $action    foreign key referential action
 +     *
 +     * @return string
 +     */
 +    public function getForeignKeyReferentialActionSQL($action)
 +    {
 +        $upper = strtoupper($action);
 +        switch ($upper) {
 +            case 'CASCADE':
 +            case 'SET NULL':
 +            case 'NO ACTION':
 +            case 'RESTRICT':
 +            case 'SET DEFAULT':
 +                return $upper;
 +            default:
 +                throw new \InvalidArgumentException('Invalid foreign key action: ' . $upper);
 +        }
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
 +     * of a field declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param ForeignKeyConstraint $foreignKey
 +     *
 +     * @return string
 +     */
 +    public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey)
 +    {
 +        $sql = '';
 +        if (strlen($foreignKey->getName())) {
 +            $sql .= 'CONSTRAINT ' . $foreignKey->getQuotedName($this) . ' ';
 +        }
 +        $sql .= 'FOREIGN KEY (';
 +
 +        if (count($foreignKey->getLocalColumns()) === 0) {
 +            throw new \InvalidArgumentException("Incomplete definition. 'local' required.");
 +        }
 +        if (count($foreignKey->getForeignColumns()) === 0) {
 +            throw new \InvalidArgumentException("Incomplete definition. 'foreign' required.");
 +        }
 +        if (strlen($foreignKey->getForeignTableName()) === 0) {
 +            throw new \InvalidArgumentException("Incomplete definition. 'foreignTable' required.");
 +        }
 +
 +        $sql .= implode(', ', $foreignKey->getLocalColumns())
 +              . ') REFERENCES '
 +              . $foreignKey->getQuotedForeignTableName($this) . ' ('
 +              . implode(', ', $foreignKey->getForeignColumns()) . ')';
 +
 +        return $sql;
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint
 +     * of a field declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @return string  DBMS specific SQL code portion needed to set the UNIQUE constraint
 +     *                 of a field declaration.
 +     */
 +    public function getUniqueFieldDeclarationSQL()
 +    {
 +        return 'UNIQUE';
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET
 +     * of a field declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param string $charset   name of the charset
 +     *
 +     * @return string  DBMS specific SQL code portion needed to set the CHARACTER SET
 +     *                 of a field declaration.
 +     */
 +    public function getColumnCharsetDeclarationSQL($charset)
 +    {
 +        return '';
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL code portion needed to set the COLLATION
 +     * of a field declaration to be used in statements like CREATE TABLE.
 +     *
 +     * @param string $collation   name of the collation
 +     *
 +     * @return string  DBMS specific SQL code portion needed to set the COLLATION
 +     *                 of a field declaration.
 +     */
 +    public function getColumnCollationDeclarationSQL($collation)
 +    {
 +        return '';
 +    }
 +
 +    /**
 +     * Whether the platform prefers sequences for ID generation.
 +     * Subclasses should override this method to return TRUE if they prefer sequences.
 +     *
 +     * @return boolean
 +     */
 +    public function prefersSequences()
 +    {
 +        return false;
 +    }
 +
 +    /**
 +     * Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
 +     * Subclasses should override this method to return TRUE if they prefer identity columns.
 +     *
 +     * @return boolean
 +     */
 +    public function prefersIdentityColumns()
 +    {
 +        return false;
 +    }
 +
 +    /**
 +     * Some platforms need the boolean values to be converted.
 +     *
 +     * The default conversion in this implementation converts to integers (false => 0, true => 1).
 +     *
 +     * @param mixed $item
 +     *
 +     * @return mixed
 +     */
 +    public function convertBooleans($item)
 +    {
 +        if (is_array($item)) {
 +            foreach ($item as $k => $value) {
 +                if (is_bool($value)) {
 +                    $item[$k] = (int) $value;
 +                }
 +            }
 +        } else if (is_bool($item)) {
 +            $item = (int) $item;
 +        }
 +
 +        return $item;
 +    }
 +
 +    /**
 +     * Gets the SQL specific for the platform to get the current date.
 +     *
 +     * @return string
 +     */
 +    public function getCurrentDateSQL()
 +    {
 +        return 'CURRENT_DATE';
 +    }
 +
 +    /**
 +     * Gets the SQL specific for the platform to get the current time.
 +     *
 +     * @return string
 +     */
 +    public function getCurrentTimeSQL()
 +    {
 +        return 'CURRENT_TIME';
 +    }
 +
 +    /**
 +     * Gets the SQL specific for the platform to get the current timestamp
 +     *
 +     * @return string
 +     */
 +    public function getCurrentTimestampSQL()
 +    {
 +        return 'CURRENT_TIMESTAMP';
 +    }
 +
 +    /**
 +     * Get sql for transaction isolation level Connection constant
 +     *
 +     * @param integer $level
 +     *
 +     * @return string
 +     */
 +    protected function _getTransactionIsolationLevelSQL($level)
 +    {
 +        switch ($level) {
 +            case Connection::TRANSACTION_READ_UNCOMMITTED:
 +                return 'READ UNCOMMITTED';
 +            case Connection::TRANSACTION_READ_COMMITTED:
 +                return 'READ COMMITTED';
 +            case Connection::TRANSACTION_REPEATABLE_READ:
 +                return 'REPEATABLE READ';
 +            case Connection::TRANSACTION_SERIALIZABLE:
 +                return 'SERIALIZABLE';
 +            default:
 +                throw new \InvalidArgumentException('Invalid isolation level:' . $level);
 +        }
 +    }
 +
 +    public function getListDatabasesSQL()
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getListSequencesSQL($database)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getListTableConstraintsSQL($table)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getListTableColumnsSQL($table, $database = null)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getListTablesSQL()
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getListUsersSQL()
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Get the SQL to list all views of a database or user.
 +     *
 +     * @param string $database
 +     *
 +     * @return string
 +     */
 +    public function getListViewsSQL($database)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Get the list of indexes for the current database.
 +     *
 +     * The current database parameter is optional but will always be passed
 +     * when using the SchemaManager API and is the database the given table is in.
 +     *
 +     * Attention: Some platforms only support currentDatabase when they
 +     * are connected with that database. Cross-database information schema
 +     * requests may be impossible.
 +     *
 +     * @param string $table
 +     * @param string $currentDatabase
 +     *
 +     * @return string
 +     */
 +    public function getListTableIndexesSQL($table, $currentDatabase = null)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getListTableForeignKeysSQL($table)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getCreateViewSQL($name, $sql)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getDropViewSQL($name)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Get the SQL snippet to drop an existing sequence
 +     *
 +     * @param  \Doctrine\DBAL\Schema\Sequence $sequence
 +     *
 +     * @return string
 +     */
 +    public function getDropSequenceSQL($sequence)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getSequenceNextValSQL($sequenceName)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * create a new database
 +     *
 +     * @param string $database name of the database that should be created
 +     *
 +     * @return string
 +     */
 +    public function getCreateDatabaseSQL($database)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Get sql to set the transaction isolation level
 +     *
 +     * @param integer $level
 +     *
 +     * @return string
 +     */
 +    public function getSetTransactionIsolationSQL($level)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL to be used to create datetime fields in
 +     * statements like CREATE TABLE
 +     *
 +     * @param array $fieldDeclaration
 +     *
 +     * @return string
 +     */
 +    public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL to be used to create datetime with timezone offset fields.
 +     *
 +     * @param array $fieldDeclaration
 +     *
 +     * @return string
 +     */
 +    public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        return $this->getDateTimeTypeDeclarationSQL($fieldDeclaration);
 +    }
 +
 +
 +    /**
 +     * Obtain DBMS specific SQL to be used to create date fields in statements
 +     * like CREATE TABLE.
 +     *
 +     * @param array $fieldDeclaration
 +     *
 +     * @return string
 +     */
 +    public function getDateTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    /**
 +     * Obtain DBMS specific SQL to be used to create time fields in statements
 +     * like CREATE TABLE.
 +     *
 +     * @param array $fieldDeclaration
 +     *
 +     * @return string
 +     */
 +    public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +
 +    public function getFloatDeclarationSQL(array $fieldDeclaration)
 +    {
 +        return 'DOUBLE PRECISION';
 +    }
 +
 +    /**
 +     * Gets the default transaction isolation level of the platform.
 +     *
 +     * @return integer The default isolation level.
 +     *
 +     * @see Doctrine\DBAL\Connection\TRANSACTION_* constants.
 +     */
 +    public function getDefaultTransactionIsolationLevel()
 +    {
 +        return Connection::TRANSACTION_READ_COMMITTED;
 +    }
 +
 +    /* supports*() methods */
 +
 +    /**
 +     * Whether the platform supports sequences.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsSequences()
 +    {
 +        return false;
 +    }
 +
 +    /**
 +     * Whether the platform supports identity columns.
 +     * Identity columns are columns that recieve an auto-generated value from the
 +     * database on insert of a row.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsIdentityColumns()
 +    {
 +        return false;
 +    }
 +
 +    /**
 +     * Whether the platform supports indexes.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsIndexes()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Whether the platform supports altering tables.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsAlterTable()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Whether the platform supports transactions.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsTransactions()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Whether the platform supports savepoints.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsSavepoints()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Whether the platform supports releasing savepoints.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsReleaseSavepoints()
 +    {
 +        return $this->supportsSavepoints();
 +    }
 +
 +    /**
 +     * Whether the platform supports primary key constraints.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsPrimaryConstraints()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Does the platform supports foreign key constraints?
 +     *
 +     * @return boolean
 +     */
 +    public function supportsForeignKeyConstraints()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Does this platform supports onUpdate in foreign key constraints?
 +     *
 +     * @return boolean
 +     */
 +    public function supportsForeignKeyOnUpdate()
 +    {
 +        return ($this->supportsForeignKeyConstraints() && true);
 +    }
 +
 +    /**
 +     * Whether the platform supports database schemas.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsSchemas()
 +    {
 +        return false;
 +    }
 +
 +    /**
 +     * Can this platform emulate schemas?
 +     *
 +     * Platforms that either support or emulate schemas don't automatically
 +     * filter a schema for the namespaced elements in {@link
 +     * AbstractManager#createSchema}.
 +     *
 +     * @return boolean
 +     */
 +    public function canEmulateSchemas()
 +    {
 +        return false;
 +    }
 +
 +    /**
 +     * Some databases don't allow to create and drop databases at all or only with certain tools.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsCreateDropDatabase()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Whether the platform supports getting the affected rows of a recent
 +     * update/delete type query.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsGettingAffectedRows()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Does this plaform support to add inline column comments as postfix.
 +     *
 +     * @return boolean
 +     */
 +    public function supportsInlineColumnComments()
 +    {
 +        return false;
 +    }
 +
 +    /**
 +     * Does this platform support the propriortary synatx "COMMENT ON asset"
 +     *
 +     * @return boolean
 +     */
 +    public function supportsCommentOnStatement()
 +    {
 +        return false;
 +    }
 +
 +    public function getIdentityColumnNullInsertSQL()
 +    {
 +        return "";
 +    }
 +
 +    /**
 +     * Does this platform views ?
 +     *
 +     * @return boolean
 +     */
 +    public function supportsViews()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Gets the format string, as accepted by the date() function, that describes
 +     * the format of a stored datetime value of this platform.
 +     *
 +     * @return string The format string.
 +     */
 +    public function getDateTimeFormatString()
 +    {
 +        return 'Y-m-d H:i:s';
 +    }
 +
 +    /**
 +     * Gets the format string, as accepted by the date() function, that describes
 +     * the format of a stored datetime with timezone value of this platform.
 +     *
 +     * @return string The format string.
 +     */
 +    public function getDateTimeTzFormatString()
 +    {
 +        return 'Y-m-d H:i:s';
 +    }
 +
 +    /**
 +     * Gets the format string, as accepted by the date() function, that describes
 +     * the format of a stored date value of this platform.
 +     *
 +     * @return string The format string.
 +     */
 +    public function getDateFormatString()
 +    {
 +        return 'Y-m-d';
 +    }
 +
 +    /**
 +     * Gets the format string, as accepted by the date() function, that describes
 +     * the format of a stored time value of this platform.
 +     *
 +     * @return string The format string.
 +     */
 +    public function getTimeFormatString()
 +    {
 +        return 'H:i:s';
 +    }
 +
 +    /**
 +     * Modify limit query
 +     *
 +     * @param string $query
 +     * @param integer $limit
 +     * @param integer $offset
 +     *
 +     * @return string
 +     */
 +    final public function modifyLimitQuery($query, $limit, $offset = null)
 +    {
 +        if ($limit !== null) {
 +            $limit = (int)$limit;
 +        }
 +
 +        if ($offset !== null) {
 +            $offset = (int)$offset;
 +
 +            if ($offset < 0) {
 +                throw new DBALException("LIMIT argument offset=$offset is not valid");
 +            }
 +            if ($offset > 0 && ! $this->supportsLimitOffset()) {
 +                throw new DBALException(sprintf("Platform %s does not support offset values in limit queries.", $this->getName()));
 +            }
 +        }
 +
 +        return $this->doModifyLimitQuery($query, $limit, $offset);
 +    }
 +
 +    /**
 +     * Adds an driver-specific LIMIT clause to the query
 +     *
 +     * @param string $query
 +     * @param integer $limit
 +     * @param integer $offset
 +     *
 +     * @return string
 +     */
 +    protected function doModifyLimitQuery($query, $limit, $offset)
 +    {
 +        if ($limit !== null) {
 +            $query .= ' LIMIT ' . $limit;
 +        }
 +
 +        if ($offset !== null) {
 +            $query .= ' OFFSET ' . $offset;
 +        }
 +
 +        return $query;
 +    }
 +
 +    /**
 +     * Does the database platform support offsets in modify limit clauses?
 +     *
 +     * @return boolean
 +     */
 +    public function supportsLimitOffset()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * Gets the character casing of a column in an SQL result set of this platform.
 +     *
 +     * @param string $column The column name for which to get the correct character casing.
 +     *
 +     * @return string The column name in the character casing used in SQL result sets.
 +     */
 +    public function getSQLResultCasing($column)
 +    {
 +        return $column;
 +    }
 +
 +    /**
 +     * Makes any fixes to a name of a schema element (table, sequence, ...) that are required
 +     * by restrictions of the platform, like a maximum length.
 +     *
 +     * @param string $schemaElementName
 +     *
 +     * @return string
 +     */
 +    public function fixSchemaElementName($schemaElementName)
 +    {
 +        return $schemaElementName;
 +    }
 +
 +    /**
 +     * Maximum length of any given databse identifier, like tables or column names.
 +     *
 +     * @return integer
 +     */
 +    public function getMaxIdentifierLength()
 +    {
 +        return 63;
 +    }
 +
 +    /**
 +     * Get the insert sql for an empty insert statement
 +     *
 +     * @param string $tableName
 +     * @param string $identifierColumnName
 +     *
 +     * @return string $sql
 +     */
 +    public function getEmptyIdentityInsertSQL($tableName, $identifierColumnName)
 +    {
 +        return 'INSERT INTO ' . $tableName . ' (' . $identifierColumnName . ') VALUES (null)';
 +    }
 +
 +    /**
 +     * Generate a Truncate Table SQL statement for a given table.
 +     *
 +     * Cascade is not supported on many platforms but would optionally cascade the truncate by
 +     * following the foreign keys.
 +     *
 +     * @param  string $tableName
 +     * @param  boolean $cascade
 +     *
 +     * @return string
 +     */
 +    public function getTruncateTableSQL($tableName, $cascade = false)
 +    {
 +        return 'TRUNCATE '.$tableName;
 +    }
 +
 +    /**
 +     * This is for test reasons, many vendors have special requirements for dummy statements.
 +     *
 +     * @return string
 +     */
 +    public function getDummySelectSQL()
 +    {
 +        return 'SELECT 1';
 +    }
 +
 +    /**
 +     * Generate SQL to create a new savepoint
 +     *
 +     * @param string $savepoint
 +     *
 +     * @return string
 +     */
 +    public function createSavePoint($savepoint)
 +    {
 +        return 'SAVEPOINT ' . $savepoint;
 +    }
 +
 +    /**
 +     * Generate SQL to release a savepoint
 +     *
 +     * @param string $savepoint
 +     *
 +     * @return string
 +     */
 +    public function releaseSavePoint($savepoint)
 +    {
 +        return 'RELEASE SAVEPOINT ' . $savepoint;
 +    }
 +
 +    /**
 +     * Generate SQL to rollback a savepoint
 +     *
 +     * @param string $savepoint
 +     *
 +     * @return string
 +     */
 +    public function rollbackSavePoint($savepoint)
 +    {
 +        return 'ROLLBACK TO SAVEPOINT ' . $savepoint;
 +    }
 +
 +    /**
 +     * Return the keyword list instance of this platform.
 +     *
 +     * Throws exception if no keyword list is specified.
 +     *
 +     * @throws DBALException
 +     *
 +     * @return \Doctrine\DBAL\Platforms\Keywords\KeywordList
 +     */
 +    final public function getReservedKeywordsList()
 +    {
 +        // Check for an existing instantiation of the keywords class.
 +        if ($this->_keywords) {
 +            return $this->_keywords;
 +        }
 +
 +        $class = $this->getReservedKeywordsClass();
 +        $keywords = new $class;
 +        if ( ! $keywords instanceof \Doctrine\DBAL\Platforms\Keywords\KeywordList) {
 +            throw DBALException::notSupported(__METHOD__);
 +        }
 +
 +        // Store the instance so it doesn't need to be generated on every request.
 +        $this->_keywords = $keywords;
 +
 +        return $keywords;
 +    }
 +
 +    /**
 +     * The class name of the reserved keywords list.
 +     *
 +     * @return string
 +     */
 +    protected function getReservedKeywordsClass()
 +    {
 +        throw DBALException::notSupported(__METHOD__);
 +    }
 +}
diff --cc 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
index 6318302,0000000..5f5bbe2
mode 100644,000000..100644
--- a/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+++ b/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
@@@ -1,788 -1,0 +1,790 @@@
 +<?php
 +/*
 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 + *
 + * This software consists of voluntary contributions made by many individuals
 + * and is licensed under the MIT license. For more information, see
 + * <http://www.doctrine-project.org>.
 + */
 +
 +namespace Doctrine\DBAL\Platforms;
 +
 +use Doctrine\DBAL\Schema\TableDiff,
 +    Doctrine\DBAL\Schema\Table;
 +
 +/**
 + * PostgreSqlPlatform.
 + *
 + * @since 2.0
 + * @author Roman Borschel <roman at code-factory.org>
 + * @author Lukas Smith <smith at pooteeweet.org> (PEAR MDB2 library)
 + * @author Benjamin Eberlei <kontakt at beberlei.de>
 + * @todo Rename: PostgreSQLPlatform
 + */
 +class PostgreSqlPlatform extends AbstractPlatform
 +{
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getSubstringExpression($value, $from, $length = null)
 +    {
 +        if ($length === null) {
 +            return 'SUBSTR(' . $value . ', ' . $from . ')';
 +        }
 +
 +        return 'SUBSTR(' . $value . ', ' . $from . ', ' . $length . ')';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getNowExpression()
 +    {
 +        return 'LOCALTIMESTAMP(0)';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getRegexpExpression()
 +    {
 +        return 'SIMILAR TO';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getLocateExpression($str, $substr, $startPos = false)
 +    {
 +        if ($startPos !== false) {
 +            $str = $this->getSubstringExpression($str, $startPos);
 +
 +            return 'CASE WHEN (POSITION('.$substr.' IN '.$str.') = 0) THEN 0 ELSE (POSITION('.$substr.' IN '.$str.') + '.($startPos-1).') END';
 +        }
 +
 +        return 'POSITION('.$substr.' IN '.$str.')';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateDiffExpression($date1, $date2)
 +    {
 +        return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateAddDaysExpression($date, $days)
 +    {
 +        return "(" . $date ." + (" . $days . " || ' day')::interval)";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateSubDaysExpression($date, $days)
 +    {
 +        return "(" . $date ." - (" . $days . " || ' day')::interval)";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateAddMonthExpression($date, $months)
 +    {
 +        return "(" . $date ." + (" . $months . " || ' month')::interval)";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateSubMonthExpression($date, $months)
 +    {
 +        return "(" . $date ." - (" . $months . " || ' month')::interval)";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function supportsSequences()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function supportsSchemas()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function supportsIdentityColumns()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function supportsCommentOnStatement()
 +    {
 +        return true;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function prefersSequences()
 +    {
 +        return true;
 +    }
 +
 +    public function getListDatabasesSQL()
 +    {
 +        return 'SELECT datname FROM pg_database';
 +    }
 +
 +    public function getListSequencesSQL($database)
 +    {
 +        return "SELECT
 +                    c.relname, n.nspname AS schemaname
 +                FROM
 +                   pg_class c, pg_namespace n
 +                WHERE relkind = 'S' AND n.oid = c.relnamespace AND
 +                    (n.nspname NOT LIKE 'pg_%' AND n.nspname != 'information_schema')";
 +    }
 +
 +    public function getListTablesSQL()
 +    {
 +        return "SELECT tablename AS table_name, schemaname AS schema_name
 +                FROM pg_tables WHERE schemaname NOT LIKE 'pg_%' AND schemaname != 'information_schema' AND tablename != 'geometry_columns' AND tablename != 'spatial_ref_sys'";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getListViewsSQL($database)
 +    {
 +        return 'SELECT viewname, definition FROM pg_views';
 +    }
 +
 +    public function getListTableForeignKeysSQL($table, $database = null)
 +    {
 +        return "SELECT r.conname, pg_catalog.pg_get_constraintdef(r.oid, true) as condef
 +                  FROM pg_catalog.pg_constraint r
 +                  WHERE r.conrelid =
 +                  (
 +                      SELECT c.oid
 +                      FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
 +                      WHERE " .$this->getTableWhereClause($table) ." AND n.oid = c.relnamespace
 +                  )
 +                  AND r.contype = 'f'";
 +    }
 +
 +    public function getCreateViewSQL($name, $sql)
 +    {
 +        return 'CREATE VIEW ' . $name . ' AS ' . $sql;
 +    }
 +
 +    public function getDropViewSQL($name)
 +    {
 +        return 'DROP VIEW '. $name;
 +    }
 +
 +    public function getListTableConstraintsSQL($table)
 +    {
 +        return "SELECT
 +                    relname
 +                FROM
 +                    pg_class
 +                WHERE oid IN (
 +                    SELECT indexrelid
 +                    FROM pg_index, pg_class
 +                    WHERE pg_class.relname = '$table'
 +                        AND pg_class.oid = pg_index.indrelid
 +                        AND (indisunique = 't' OR indisprimary = 't')
 +                        )";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     *
 +     * @license New BSD License
 +     * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html
 +     */
 +    public function getListTableIndexesSQL($table, $currentDatabase = null)
 +    {
 +        return "SELECT relname, pg_index.indisunique, pg_index.indisprimary,
 +                       pg_index.indkey, pg_index.indrelid
 +                 FROM pg_class, pg_index
 +                 WHERE oid IN (
 +                    SELECT indexrelid
 +                    FROM pg_index si, pg_class sc, pg_namespace sn
 +                    WHERE " . $this->getTableWhereClause($table, 'sc', 'sn')." AND sc.oid=si.indrelid AND sc.relnamespace = sn.oid
 +                 ) AND pg_index.indexrelid = oid";
 +    }
 +
 +    /**
 +     * @param string $table
 +     * @param string $classAlias
 +     * @param string $namespaceAlias
 +     *
 +     * @return string
 +     */
 +    private function getTableWhereClause($table, $classAlias = 'c', $namespaceAlias = 'n')
 +    {
 +        $whereClause = $namespaceAlias.".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND ";
 +        if (strpos($table, ".") !== false) {
 +            list($schema, $table) = explode(".", $table);
 +            $schema = "'" . $schema . "'";
 +        } else {
 +            $schema = "ANY(string_to_array((select replace(setting,'\"\$user\"',user) from pg_catalog.pg_settings where name = 'search_path'),','))";
 +        }
 +        $whereClause .= "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = $schema";
 +
 +        return $whereClause;
 +    }
 +
 +    public function getListTableColumnsSQL($table, $database = null)
 +    {
 +        return "SELECT
 +                    a.attnum,
 +                    a.attname AS field,
 +                    t.typname AS type,
 +                    format_type(a.atttypid, a.atttypmod) AS complete_type,
 +                    (SELECT t1.typname FROM pg_catalog.pg_type t1 WHERE t1.oid = t.typbasetype) AS domain_type,
 +                    (SELECT format_type(t2.typbasetype, t2.typtypmod) FROM
 +                      pg_catalog.pg_type t2 WHERE t2.typtype = 'd' AND t2.oid = a.atttypid) AS domain_complete_type,
 +                    a.attnotnull AS isnotnull,
 +                    (SELECT 't'
 +                     FROM pg_index
 +                     WHERE c.oid = pg_index.indrelid
 +                        AND pg_index.indkey[0] = a.attnum
 +                        AND pg_index.indisprimary = 't'
 +                    ) AS pri,
 +                    (SELECT pg_attrdef.adsrc
 +                     FROM pg_attrdef
 +                     WHERE c.oid = pg_attrdef.adrelid
 +                        AND pg_attrdef.adnum=a.attnum
 +                    ) AS default,
 +                    (SELECT pg_description.description
 +                        FROM pg_description WHERE pg_description.objoid = c.oid AND a.attnum = pg_description.objsubid
 +                    ) AS comment
 +                    FROM pg_attribute a, pg_class c, pg_type t, pg_namespace n
 +                    WHERE ".$this->getTableWhereClause($table, 'c', 'n') ."
 +                        AND a.attnum > 0
 +                        AND a.attrelid = c.oid
 +                        AND a.atttypid = t.oid
 +                        AND n.oid = c.relnamespace
 +                    ORDER BY a.attnum";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getCreateDatabaseSQL($name)
 +    {
 +        return 'CREATE DATABASE ' . $name;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey)
 +    {
 +        $query = '';
 +
 +        if ($foreignKey->hasOption('match')) {
 +            $query .= ' MATCH ' . $foreignKey->getOption('match');
 +        }
 +
 +        $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey);
 +
 +        if ($foreignKey->hasOption('deferrable') && $foreignKey->getOption('deferrable') !== false) {
 +            $query .= ' DEFERRABLE';
 +        } else {
 +            $query .= ' NOT DEFERRABLE';
 +        }
 +
 +        if ($foreignKey->hasOption('feferred') && $foreignKey->getOption('feferred') !== false) {
 +            $query .= ' INITIALLY DEFERRED';
 +        } else {
 +            $query .= ' INITIALLY IMMEDIATE';
 +        }
 +
 +        return $query;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getAlterTableSQL(TableDiff $diff)
 +    {
 +        $sql = array();
 +        $commentsSQL = array();
 +        $columnSql = array();
 +
 +        foreach ($diff->addedColumns as $column) {
 +            if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) {
 +                continue;
 +            }
 +
 +            $query = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());
 +            $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
 +            if ($comment = $this->getColumnComment($column)) {
 +                $commentsSQL[] = $this->getCommentOnColumnSQL($diff->name, $column->getName(), $comment);
 +            }
 +        }
 +
 +        foreach ($diff->removedColumns as $column) {
 +            if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) {
 +                continue;
 +            }
 +
 +            $query = 'DROP ' . $column->getQuotedName($this);
 +            $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
 +        }
 +
 +        foreach ($diff->changedColumns as $columnDiff) {
 +            /** @var $columnDiff \Doctrine\DBAL\Schema\ColumnDiff */
 +            if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) {
 +                continue;
 +            }
 +
 +            $oldColumnName = $columnDiff->fromColumn->getQuotedName($this);
 +            $column = $columnDiff->column;
 +
 +            if ($columnDiff->hasChanged('type')) {
 +                $type = $column->getType();
 +
 +                // here was a server version check before, but DBAL API does not support this anymore.
 +                $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $type->getSqlDeclaration($column->toArray(), $this);
 +                $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
 +            }
 +
 +            if ($columnDiff->hasChanged('default')) {
-                 $query = 'ALTER ' . $oldColumnName . ' SET ' . $this->getDefaultValueDeclarationSQL($column->toArray());
++                $query = 'ALTER ' . $oldColumnName . ((null !== $column->getDefault())
++                       ? ' SET ' . $this->getDefaultValueDeclarationSQL($column->toArray())
++                       : ' DROP DEFAULT');
 +                $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
 +            }
 +
 +            if ($columnDiff->hasChanged('notnull')) {
 +                $query = 'ALTER ' . $oldColumnName . ' ' . ($column->getNotNull() ? 'SET' : 'DROP') . ' NOT NULL';
 +                $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
 +            }
 +
 +            if ($columnDiff->hasChanged('autoincrement')) {
 +                if ($column->getAutoincrement()) {
 +                    // add autoincrement
 +                    $seqName = $diff->name . '_' . $oldColumnName . '_seq';
 +
 +                    $sql[] = "CREATE SEQUENCE " . $seqName;
 +                    $sql[] = "SELECT setval('" . $seqName . "', (SELECT MAX(" . $oldColumnName . ") FROM " . $diff->name . "))";
 +                    $query = "ALTER " . $oldColumnName . " SET DEFAULT nextval('" . $seqName . "')";
 +                    $sql[] = "ALTER TABLE " . $diff->name . " " . $query;
 +                } else {
 +                    // Drop autoincrement, but do NOT drop the sequence. It might be re-used by other tables or have
 +                    $query = "ALTER " . $oldColumnName . " " . "DROP DEFAULT";
 +                    $sql[] = "ALTER TABLE " . $diff->name . " " . $query;
 +                }
 +            }
 +
 +            if ($columnDiff->hasChanged('comment') && $comment = $this->getColumnComment($column)) {
 +                $commentsSQL[] = $this->getCommentOnColumnSQL($diff->name, $column->getName(), $comment);
 +            }
 +
 +            if ($columnDiff->hasChanged('length')) {
 +                $query = 'ALTER ' . $column->getName() . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
 +                $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
 +            }
 +        }
 +
 +        foreach ($diff->renamedColumns as $oldColumnName => $column) {
 +            if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) {
 +                continue;
 +            }
 +
 +            $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME COLUMN ' . $oldColumnName . ' TO ' . $column->getQuotedName($this);
 +        }
 +
 +        $tableSql = array();
 +
 +        if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
 +            if ($diff->newName !== false) {
 +                $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME TO ' . $diff->newName;
 +            }
 +
 +            $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff), $commentsSQL);
 +        }
 +
 +        return array_merge($sql, $tableSql, $columnSql);
 +    }
 +
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff)
 +    {
 +        $sql = array();
 +        $table = $diff->name;
 +        foreach ($diff->changedIndexes as $changedKey => $changedIndex) {
 +
 +                    $sql[] = $this->getDropConstraintSQL('IF EXISTS '. $changedIndex->getName(), $table);
 +                    $sql[] = $this->getDropIndexSQL('IF EXISTS '. $changedIndex->getName(), $table);
 +                    $diff->addedIndexes[$changedKey] = $diff->changedIndexes[$changedKey];
 +                    unset($diff->changedIndexes[$changedKey]);
 +        }
 +
 +        $sql = array_merge($sql, parent::getPreAlterTableIndexForeignKeySQL($diff));
 +
 +        return $sql;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence)
 +    {
 +        return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) .
 +               ' INCREMENT BY ' . $sequence->getAllocationSize() .
 +               ' MINVALUE ' . $sequence->getInitialValue() .
 +               ' START ' . $sequence->getInitialValue();
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getAlterSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence)
 +    {
 +        return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) .
 +               ' INCREMENT BY ' . $sequence->getAllocationSize();
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDropSequenceSQL($sequence)
 +    {
 +        if ($sequence instanceof \Doctrine\DBAL\Schema\Sequence) {
 +            $sequence = $sequence->getQuotedName($this);
 +        }
 +        return 'DROP SEQUENCE ' . $sequence . ' CASCADE';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDropForeignKeySQL($foreignKey, $table)
 +    {
 +        return $this->getDropConstraintSQL($foreignKey, $table);
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    protected function _getCreateTableSQL($tableName, array $columns, array $options = array())
 +    {
 +        $queryFields = $this->getColumnDeclarationListSQL($columns);
 +
 +        if (isset($options['primary']) && ! empty($options['primary'])) {
 +            $keyColumns = array_unique(array_values($options['primary']));
 +            $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')';
 +        }
 +
 +        $query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')';
 +
 +        $sql[] = $query;
 +
 +        if (isset($options['indexes']) && ! empty($options['indexes'])) {
 +            foreach ($options['indexes'] as $index) {
 +                $sql[] = $this->getCreateIndexSQL($index, $tableName);
 +            }
 +        }
 +
 +        if (isset($options['foreignKeys'])) {
 +            foreach ((array) $options['foreignKeys'] as $definition) {
 +                $sql[] = $this->getCreateForeignKeySQL($definition, $tableName);
 +            }
 +        }
 +
 +        return $sql;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     *
 +     * Postgres wants boolean values converted to the strings 'true'/'false'.
 +     */
 +    public function convertBooleans($item)
 +    {
 +        if (is_array($item)) {
 +            foreach ($item as $key => $value) {
 +                if (is_bool($value) || is_numeric($item)) {
 +                    $item[$key] = ($value) ? 'true' : 'false';
 +                }
 +            }
 +        } else {
 +           if (is_bool($item) || is_numeric($item)) {
 +               $item = ($item) ? 'true' : 'false';
 +           }
 +        }
 +
 +        return $item;
 +    }
 +
 +    public function getSequenceNextValSQL($sequenceName)
 +    {
 +        return "SELECT NEXTVAL('" . $sequenceName . "')";
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getSetTransactionIsolationSQL($level)
 +    {
 +        return 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL '
 +                . $this->_getTransactionIsolationLevelSQL($level);
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getBooleanTypeDeclarationSQL(array $field)
 +    {
 +        return 'BOOLEAN';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getIntegerTypeDeclarationSQL(array $field)
 +    {
 +        if ( ! empty($field['autoincrement'])) {
 +            return 'SERIAL';
 +        }
 +
 +        return 'INT';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getBigIntTypeDeclarationSQL(array $field)
 +    {
 +        if ( ! empty($field['autoincrement'])) {
 +            return 'BIGSERIAL';
 +        }
 +        return 'BIGINT';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getSmallIntTypeDeclarationSQL(array $field)
 +    {
 +        return 'SMALLINT';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getGuidTypeDeclarationSQL(array $field)
 +    {
 +        return 'UUID';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        return 'TIMESTAMP(0) WITHOUT TIME ZONE';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        return 'TIMESTAMP(0) WITH TIME ZONE';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        return 'DATE';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
 +    {
 +        return 'TIME(0) WITHOUT TIME ZONE';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
 +    {
 +        return '';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
 +    {
 +        return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)')
 +                : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)');
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getClobTypeDeclarationSQL(array $field)
 +    {
 +        return 'TEXT';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getName()
 +    {
 +        return 'postgresql';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     *
 +     * PostgreSQL returns all column names in SQL result sets in lowercase.
 +     */
 +    public function getSQLResultCasing($column)
 +    {
 +        return strtolower($column);
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getDateTimeTzFormatString()
 +    {
 +        return 'Y-m-d H:i:sO';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getEmptyIdentityInsertSQL($quotedTableName, $quotedIdentifierColumnName)
 +    {
 +        return 'INSERT INTO ' . $quotedTableName . ' (' . $quotedIdentifierColumnName . ') VALUES (DEFAULT)';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getTruncateTableSQL($tableName, $cascade = false)
 +    {
 +        return 'TRUNCATE '.$tableName.' '.(($cascade)?'CASCADE':'');
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getReadLockSQL()
 +    {
 +        return 'FOR SHARE';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    protected function initializeDoctrineTypeMappings()
 +    {
 +        $this->doctrineTypeMapping = array(
 +            'smallint'      => 'smallint',
 +            'int2'          => 'smallint',
 +            'serial'        => 'integer',
 +            'serial4'       => 'integer',
 +            'int'           => 'integer',
 +            'int4'          => 'integer',
 +            'integer'       => 'integer',
 +            'bigserial'     => 'bigint',
 +            'serial8'       => 'bigint',
 +            'bigint'        => 'bigint',
 +            'int8'          => 'bigint',
 +            'bool'          => 'boolean',
 +            'boolean'       => 'boolean',
 +            'text'          => 'text',
 +            'varchar'       => 'string',
 +            'interval'      => 'string',
 +            '_varchar'      => 'string',
 +            'char'          => 'string',
 +            'bpchar'        => 'string',
 +            'date'          => 'date',
 +            'datetime'      => 'datetime',
 +            'timestamp'     => 'datetime',
 +            'timestamptz'   => 'datetimetz',
 +            'time'          => 'time',
 +            'timetz'        => 'time',
 +            'float'         => 'float',
 +            'float4'        => 'float',
 +            'float8'        => 'float',
 +            'double'        => 'float',
 +            'double precision' => 'float',
 +            'real'          => 'float',
 +            'decimal'       => 'decimal',
 +            'money'         => 'decimal',
 +            'numeric'       => 'decimal',
 +            'year'          => 'date',
 +            'uuid'          => 'guid',
 +            'bytea'         => 'blob',
 +        );
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getVarcharMaxLength()
 +    {
 +        return 65535;
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    protected function getReservedKeywordsClass()
 +    {
 +        return 'Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords';
 +    }
 +
 +    /**
 +     * {@inheritDoc}
 +     */
 +    public function getBlobTypeDeclarationSQL(array $field)
 +    {
 +        return 'BYTEA';
 +    }
 +}
diff --cc apps/activity/js/script.js
index d11847b,0000000..1b46160
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: 'http://i.imgur.com/6RMhx.gif'
++				img: OC.filePath('activity', 'img', 'load-circle.png') 
 +			}
 +		},
 +		// 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/js/app.js
index dce48fd,0000000..06fdb79
mode 100644,000000..100644
--- a/apps/contacts/js/app.js
+++ b/apps/contacts/js/app.js
@@@ -1,1594 -1,0 +1,1594 @@@
 +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);
++			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 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;
 +		});
 +
 +		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/lib/contact.php
index 5b5c769,0000000..414df4b
mode 100644,000000..100644
--- a/apps/contacts/lib/contact.php
+++ b/apps/contacts/lib/contact.php
@@@ -1,777 -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':
- 							$this->props['displayname'] = $value;
- 							$this->FN = $value;
- 							// Set it to saved again as we're not actually changing anything
- 							$this->setSaved();
++							if($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;
 +			}
 +			$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/importcontroller.php
index 38fe2c7,0000000..a5be1dc
mode 100644,000000..100644
--- a/apps/contacts/lib/controller/importcontroller.php
+++ b/apps/contacts/lib/controller/importcontroller.php
@@@ -1,290 -1,0 +1,291 @@@
 +<?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,
 +	Sabre\VObject;
 +
 +/**
 + * Controller importing contacts
 + */
 +class ImportController extends Controller {
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function upload() {
 +		$request = $this->request;
 +		$params = $this->request->urlParams;
 +		$response = new JSONResponse();
 +
 +		$view = \OCP\Files::getStorage('contacts');
 +		if(!$view->file_exists('imports')) {
 +			$view->mkdir('imports');
 +		}
 +
 +		if (!isset($request->files['file'])) {
 +			$response->bailOut(App::$l10n->t('No file was uploaded. Unknown error'));
 +			return $response;
 +		}
 +
 +		$file=$request->files['file'];
 +
 +		if($file['error'] !== UPLOAD_ERR_OK) {
++			$error = $file['error'];
 +			$errors = array(
 +				UPLOAD_ERR_OK			=> App::$l10n->t("There is no error, the file uploaded with success"),
 +				UPLOAD_ERR_INI_SIZE		=> App::$l10n->t("The uploaded file exceeds the upload_max_filesize directive in php.ini")
 +					.ini_get('upload_max_filesize'),
 +				UPLOAD_ERR_FORM_SIZE	=> App::$l10n->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"),
 +				UPLOAD_ERR_PARTIAL		=> App::$l10n->t("The uploaded file was only partially uploaded"),
 +				UPLOAD_ERR_NO_FILE		=> App::$l10n->t("No file was uploaded"),
 +				UPLOAD_ERR_NO_TMP_DIR	=> App::$l10n->t('Missing a temporary folder'),
 +				UPLOAD_ERR_CANT_WRITE	=> App::$l10n->t('Failed to write to disk'),
 +			);
 +			$response->bailOut($errors[$error]);
 +			return $response;
 +		}
 +
 +		$maxUploadFilesize = \OCP\Util::maxUploadFilesize('/');
 +		$maxHumanFilesize = \OCP\Util::humanFileSize($maxUploadFilesize);
 +
 +		$totalSize = $file['size'];
 +		if ($maxUploadFilesize >= 0 and $totalSize > $maxUploadFilesize) {
 +			$response->bailOut(App::$l10n->t('Not enough storage available'));
 +			return $response;
 +		}
 +
 +		$tmpname = $file['tmp_name'];
 +		$filename = strtr($file['name'], array('/' => '', "\\" => ''));
 +		if(is_uploaded_file($tmpname)) {
 +			if(\OC\Files\Filesystem::isFileBlacklisted($filename)) {
 +				$response->bailOut(App::$l10n->t('Attempt to upload blacklisted file:') . $filename);
 +			return $response;
 +			}
 +			$content = file_get_contents($tmpname);
 +			$proxyStatus = \OC_FileProxy::$enabled;
 +			\OC_FileProxy::$enabled = false;
 +			if($view->file_put_contents('/imports/'.$filename, $content)) {
 +				\OC_FileProxy::$enabled = $proxyStatus;
 +				$count = substr_count($content, 'BEGIN:');
 +				$progresskey = 'contacts-import-' . rand();
 +				$response->setParams(
 +					array(
 +						'filename'=>$filename,
 +						'count' => $count,
 +						'progresskey' => $progresskey,
 +						'backend' => $params['backend'],
 +						'addressBookId' => $params['addressBookId']
 +					)
 +				);
 +				\OC_Cache::set($progresskey, '10', 300);
 +			} else {
 +				\OC_FileProxy::$enabled = $proxyStatus;
 +				$response->bailOut(App::$l10n->t('Error uploading contacts to storage.'));
 +			return $response;
 +			}
 +		} else {
 +			$response->bailOut('Temporary file: \''.$tmpname.'\' has gone AWOL?');
 +			return $response;
 +		}
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function prepare() {
 +		$request = $this->request;
 +		$params = $this->request->urlParams;
 +		$response = new JSONResponse();
 +		$filename = $request->post['filename'];
 +		$path = $request->post['path'];
 +
 +		$view = \OCP\Files::getStorage('contacts');
 +		if(!$view->file_exists('imports')) {
 +			$view->mkdir('imports');
 +		}
 +
 +		$proxyStatus = \OC_FileProxy::$enabled;
 +		\OC_FileProxy::$enabled = false;
 +		$content = \OC_Filesystem::file_get_contents($path . '/' . $filename);
 +		//$content = file_get_contents('oc://' . $path . '/' . $filename);
 +		if($view->file_put_contents('/imports/' . $filename, $content)) {
 +			\OC_FileProxy::$enabled = $proxyStatus;
 +			$count = substr_count($content, 'BEGIN:');
 +			$progresskey = 'contacts-import-' . rand();
 +			$response->setParams(
 +				array(
 +					'filename'=>$filename,
 +					'count' => $count,
 +					'progresskey' => $progresskey,
 +					'backend' => $params['backend'],
 +					'addressBookId' => $params['addressBookId']
 +				)
 +			);
 +			\OC_Cache::set($progresskey, '10', 300);
 +		} else {
 +			\OC_FileProxy::$enabled = $proxyStatus;
 +			$response->bailOut(App::$l10n->t('Error moving file to imports folder.'));
 +		}
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function start() {
 +		$request = $this->request;
 +		$response = new JSONResponse();
 +		$params = $this->request->urlParams;
 +		$app = new App($this->api->getUserId());
 +
 +		$addressBook = $app->getAddressBook($params['backend'], $params['addressBookId']);
 +		if(!$addressBook->hasPermission(\OCP\PERMISSION_CREATE)) {
 +			$response->setStatus('403');
 +			$response->bailOut(App::$l10n->t('You do not have permissions to import into this address book.'));
 +			return $response;
 +		}
 +
 +		$filename = isset($request->post['filename']) ? $request->post['filename'] : null;
 +		$progresskey = isset($request->post['progresskey']) ? $request->post['progresskey'] : null;
 +
 +		if(is_null($filename)) {
 +			$response->bailOut(App::$l10n->t('File name missing from request.'));
 +			return $response;
 +		}
 +
 +		if(is_null($progresskey)) {
 +			$response->bailOut(App::$l10n->t('Progress key missing from request.'));
 +			return $response;
 +		}
 +
 +		$filename = strtr($filename, array('/' => '', "\\" => ''));
 +		if(\OC\Files\Filesystem::isFileBlacklisted($filename)) {
 +			$response->bailOut(App::$l10n->t('Attempt to access blacklisted file:') . $filename);
 +			return $response;
 +		}
 +		$view = \OCP\Files::getStorage('contacts');
 +		$proxyStatus = \OC_FileProxy::$enabled;
 +		\OC_FileProxy::$enabled = false;
 +		$file = $view->file_get_contents('/imports/' . $filename);
 +		\OC_FileProxy::$enabled = $proxyStatus;
 +
 +		$writeProgress = function($pct) use ($progresskey) {
 +			\OC_Cache::set($progresskey, $pct, 300);
 +		};
 +
 +		$cleanup = function() use ($view, $filename, $progresskey) {
 +			if(!$view->unlink('/imports/' . $filename)) {
 +				$response->debug('Unable to unlink /imports/' . $filename);
 +			}
 +			\OC_Cache::remove($progresskey);
 +		};
 +
 +		$writeProgress('20');
 +		$nl = "\n";
 +		$file = str_replace(array("\r","\n\n"), array("\n","\n"), $file);
 +		$lines = explode($nl, $file);
 +
 +		$inelement = false;
 +		$parts = array();
 +		$card = array();
 +		foreach($lines as $line) {
 +			if(strtoupper(trim($line)) == 'BEGIN:VCARD') {
 +				$inelement = true;
 +			} elseif (strtoupper(trim($line)) == 'END:VCARD') {
 +				$card[] = $line;
 +				$parts[] = implode($nl, $card);
 +				$card = array();
 +				$inelement = false;
 +			}
 +			if ($inelement === true && trim($line) != '') {
 +				$card[] = $line;
 +			}
 +		}
 +		if(count($parts) === 0) {
 +			$response->bailOut(App::$l10n->t('No contacts found in: ') . $filename);
 +			$cleanup();
 +			return $response;
 +		}
 +		//import the contacts
 +		$imported = 0;
 +		$failed = 0;
 +		$partially = 0;
 +		$processed = 0;
 +
 +		// TODO: Add a new group: "Imported at {date}"
 +		foreach($parts as $part) {
 +			try {
 +				$vcard = VObject\Reader::read($part);
 +			} catch (VObject\ParseException $e) {
 +				try {
 +					$vcard = VObject\Reader::read($part, VObject\Reader::OPTION_IGNORE_INVALID_LINES);
 +					$partially += 1;
 +					$response->debug('Import: Retrying reading card. Error parsing VCard: ' . $e->getMessage());
 +				} catch (\Exception $e) {
 +					$failed += 1;
 +					$response->debug('Import: skipping card. Error parsing VCard: ' . $e->getMessage());
 +					continue; // Ditch cards that can't be parsed by Sabre.
 +				}
 +			}
 +			/**
 +			 * TODO
 +			 * - Check if a contact with identical UID exists.
 +			 * - If so, fetch that contact and call $contact->mergeFromVCard($vcard);
 +			 * - Increment $updated var (not present yet.)
 +			 * - continue
 +			 */
 +			try {
 +				if($addressBook->addChild($vcard)) {
 +					$imported += 1;
 +				} else {
 +					$failed += 1;
 +				}
 +			} catch (\Exception $e) {
 +				$response->debug('Error importing vcard: ' . $e->getMessage() . $nl . $vcard->serialize());
 +				$failed += 1;
 +			}
 +			$processed += 1;
 +			$writeProgress($processed);
 +		}
 +		//done the import
 +		sleep(3); // Give client side a chance to read the progress.
 +		$response->setParams(
 +			array(
 +				'backend' => $params['backend'],
 +				'addressBookId' => $params['addressBookId'],
 +				'imported' => $imported,
 +				'partially' => $partially,
 +				'failed' => $failed,
 +			)
 +		);
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function status() {
 +		$request = $this->request;
 +		$response = new JSONResponse();
 +
 +		$progresskey = isset($request->get['progresskey']) ? $request->get['progresskey'] : null;
 +		if(is_null($progresskey)) {
 +			$response->bailOut(App::$l10n->t('Progress key missing from request.'));
 +			return $response;
 +		}
 +
 +		$response->setParams(array('progress' => \OC_Cache::get($progresskey)));
 +		return $response;
 +	}
 +}
diff --cc apps/documents/appinfo/database.xml
index 864fb29,0000000..8d4433e
mode 100644,000000..100644
--- a/apps/documents/appinfo/database.xml
+++ b/apps/documents/appinfo/database.xml
@@@ -1,255 -1,0 +1,238 @@@
 +<?xml version="1.0" encoding="ISO-8859-1" ?>
 +<database>
 +	<name>*dbname*</name>
 +	<create>true</create>
 +	<overwrite>false</overwrite>
 +	<charset>utf8</charset>
 +	<table>
 +		<name>*dbprefix*documents_session</name>
 +		<declaration>
 +			
 +			<field>
 +				<name>es_id</name>
 +				<type>text</type>
 +				<notnull>true</notnull>
 +				<length>64</length>
- 				<comments>Editing session id</comments>
 +			</field>
 +			<field>
 +				<name>genesis_url</name>
 +				<type>text</type>
 +				<length>512</length>
- 				<comments>Relative to owner documents storage /welcome.odt</comments>
 +			</field>
 +			<field>
 +				<name>genesis_hash</name>
 +				<type>text</type>
 +				<length>128</length>
 +				<notnull>true</notnull>
- 				<comments>To be sure the genesis did not change</comments>
 +			</field>
 +			<field>
 +				<name>file_id</name>
 +				<type>text</type>
 +				<length>512</length>
- 				<comments>Relative to storage e.g. /welcome.odt</comments>
 +			</field>
 +			<field>
 +				<name>owner</name>
 +				<type>text</type>
 +				<notnull>true</notnull>
 +				<length>64</length>
- 				<comments>oC user who created the session</comments>
 +			</field>
 +			
 +			<index>
 +				<name>documents_session_ei_idx</name>
 +				<primary>true</primary>
 +				<unique>true</unique>
 +				<field>
 +					<name>es_id</name>
 +					<sorting>ascending</sorting>
 +				</field>
 +			</index>
 +			
 +		</declaration>
 +	</table>
 +	
 +	<table>
 +		<name>*dbprefix*documents_member</name>
 +		<declaration>
 +			
 +			<field>
 +				<name>member_id</name>
 +				<type>integer</type>
 +				<notnull>true</notnull>
 +				<autoincrement>1</autoincrement>
 +				<unsigned>true</unsigned>
 +				<length>4</length>
- 				<comments>Unique per user and session</comments>
 +			</field>
 +			<field>
 +				<name>es_id</name>
 +				<type>text</type>
 +				<notnull>true</notnull>
 +				<length>64</length>
- 				<comments>Related editing session id</comments>
 +			</field>
 +			<field>
 +				<name>uid</name>
 +				<type>text</type>
 +				<length>64</length>
 +			</field>
 +			<field>
 +				<name>color</name>
 +				<type>text</type>
 +				<length>32</length>
 +			</field>
 +			<field>
 +				<name>last_activity</name>
 +				<type>integer</type>
 +				<unsigned>true</unsigned>
 +				<length>4</length>
 +			</field>
 +			<field>
 +				<name>status</name>
 +				<type>integer</type>
 +				<default>1</default>
 +				<notnull>true</notnull>
 +				<unsigned>true</unsigned>
 +				<length>1</length>
 +			</field>
 +			
 +		</declaration>
 +	</table>
 +		
 +	<table>
 +		<name>*dbprefix*documents_op</name>
 +		<declaration>
 +			
 +			<field>
 +				<name>seq</name>
 +				<type>integer</type>
 +				<notnull>true</notnull>
 +				<autoincrement>1</autoincrement>
 +				<unsigned>true</unsigned>
 +				<length>4</length>
- 				<comments>Sequence number</comments>
 +			</field>
 +			<field>
 +				<name>es_id</name>
 +				<type>text</type>
 +				<notnull>true</notnull>
 +				<length>64</length>
- 				<comments>Editing session id</comments>
 +			</field>
 +			<field>
 +				<name>member</name>
 +				<type>integer</type>
 +				<default>1</default>
 +				<notnull>true</notnull>
 +				<unsigned>true</unsigned>
 +				<length>4</length>
- 				<comments>User and time specific</comments>
 +			</field>
 +			<field>
 +				<name>opspec</name>
 +				<type>clob</type>
 +				<notnull>false</notnull>
- 				<comments>json-string</comments>
 +			</field>
 +			
 +			<index>
 +				<name>seq_pKey</name>
 +				<primary>true</primary>
 +				<field>
 +					<name>seq</name>
 +					<sorting>ascending</sorting>
 +				</field>
 +			</index>
 +			<index>
 +				<name>documents_op_eis_idx</name>
 +				<unique>true</unique>
 +				<field>
 +					<name>es_id</name>
 +					<sorting>ascending</sorting>
 +				</field>
 +				<field>
 +					<name>seq</name>
 +					<sorting>ascending</sorting>
 +				</field>
 +			</index>
 +			
 +		</declaration>
 +	</table>
 +	<table>
 +		<name>*dbprefix*documents_invite</name>
 +		<declaration>
 +			
 +			<field>
 +				<name>es_id</name>
 +				<type>text</type>
 +				<notnull>true</notnull>
 +				<length>64</length>
- 				<comments>Related editing session id</comments>
 +			</field>
 +			<field>
 +				<name>uid</name>
 +				<type>text</type>
 +				<length>64</length>
 +			</field>
 +			<field>
 +				<name>status</name>
 +				<type>integer</type>
 +				<default>0</default>
 +				<length>2</length>
 +			</field>
 +			<field>
 +				<name>sent_on</name>
 +				<type>integer</type>
 +				<default></default>
 +				<notnull>false</notnull>
 +				<unsigned>true</unsigned>
 +				<length>4</length>
 +			</field>
 +			
 +		</declaration>
 +	</table>
 +	<table>
 +		<name>*dbprefix*documents_revisions</name>
 +		<declaration>
 +			
 +			<field>
 +				<name>es_id</name>
 +				<type>text</type>
 +				<notnull>true</notnull>
 +				<length>64</length>
- 				<comments>Related editing session id</comments>
 +			</field>
 +			<field>
 +				<name>seq_head</name>
 +				<type>integer</type>
 +				<notnull>true</notnull>
 +				<unsigned>true</unsigned>
 +				<length>4</length>
- 				<comments>Sequence head number</comments>
 +			</field>
 +			<field>
 +				<name>member_id</name>
 +				<type>integer</type>
 +				<notnull>true</notnull>
 +				<unsigned>true</unsigned>
 +				<length>4</length>
- 				<comments>the member that saved the revision</comments>
 +			</field>
 +			<field>
 +				<name>file_id</name>
 +				<type>text</type>
 +				<length>512</length>
- 				<comments>Relative to storage e.g. /welcome.odt</comments>
 +			</field>
 +			<field>
 +				<name>save_hash</name>
 +				<type>text</type>
 +				<length>128</length>
 +				<notnull>true</notnull>
- 				<comments>used to lookup revision in documents folder of member, eg hash.odt</comments>
 +			</field>
 +			
 +			<index>
 +				<name>documents_rev_eis_idx</name>
 +				<unique>true</unique>
 +				<field>
 +					<name>es_id</name>
 +					<sorting>ascending</sorting>
 +				</field>
 +				<field>
 +					<name>seq_head</name>
 +					<sorting>ascending</sorting>
 +				</field>
 +			</index>
 +			
 +		</declaration>
 +	</table>
 +	
 +</database>
diff --cc apps/documents/templates/public.php
index f46e777,0000000..cc9efbf
mode 100644,000000..100644
--- a/apps/documents/templates/public.php
+++ b/apps/documents/templates/public.php
@@@ -1,26 -1,0 +1,26 @@@
 +<div id="notification-container">
 +	<div id="notification" style="display: none;"></div>
 +</div>
 +<div id="documents-content">
 +	<?php if (isset($_['hasPassword'])): ?>
 +		<?php if (isset($_['wrongpw'])): ?>
 +			<div class="push"></div>
 +			<div class="warning"><?php p($l->t('Wrong password. Please retry.')) ?></div>
 +		<?php endif; ?>
 +		<form method="post">
- 			<input type="text" name="password" placeholder="<?php p($l->t('Password')) ?>" />
++			<input type="password" name="password" placeholder="<?php p($l->t('Password')) ?>" />
 +			<input type="submit" name="submit" value="<?php p($l->t('OK')) ?>" />
 +		</form>
 +	<?php endif; ?>
 +	<?php if (isset($_['document'])): ?>
 +		<form>
 +			<input type="text" name="memberName" placeholder="<?php p($l->t('Please enter your nickname')) ?>" />
 +			<button id="odf-join"><?php p($l->t('Join')) ?></button>
 +		</form>
 +		<input type="hidden" name="document" value ="<?php p($_['document']) ?>" />
 +	<?php endif; ?>
 +	<?php if (isset($_['notFound'])): ?>
 +		<div class="push"></div>
 +		<div class="warning"><?php p($l->t('This link has been expired or is never existed. Please contact the person who shared it with you for details.')) ?></div>
 +	<?php endif; ?>
 +</div>
diff --cc apps/search_lucene/appinfo/preupdate.php
index 0000000,0000000..b650b09
new file mode 100644
--- /dev/null
+++ b/apps/search_lucene/appinfo/preupdate.php
@@@ -1,0 -1,0 +1,36 @@@
++<?php
++
++$currentVersion=OC_Appconfig::getValue('search_lucene', 'installed_version');
++
++if (version_compare($currentVersion, '0.5.2', '<')) {
++	
++	//delete duplicate id entries
++	
++	$dbtype = \OCP\Config::getSystemValue('dbtype', 'sqlite3');
++	
++	if ($dbtype === 'mysql') {
++		// fix MySQL ERROR 1093 (HY000), see http://stackoverflow.com/a/12969601
++		$sql = 'DELETE FROM `*PREFIX*lucene_status`
++				WHERE `fileid` IN (
++					SELECT `fileid` FROM (
++						SELECT `fileid`
++						FROM `*PREFIX*lucene_status`
++						GROUP BY `fileid`
++						HAVING count(`status`) > 1
++					) AS `mysqlerr1093hack`
++				)
++			';
++	} else {
++		$sql = 'DELETE FROM `*PREFIX*lucene_status`
++				WHERE `fileid` IN (
++					SELECT `fileid`
++					FROM `*PREFIX*lucene_status`
++					GROUP BY `fileid`
++					HAVING count(`status`) > 1
++				)
++			';
++	}
++	
++	$stmt = OCP\DB::prepare($sql);
++	$stmt->execute();
++}
diff --cc apps/search_lucene/appinfo/update.php
index 4cb29e8,0000000..ef86992
mode 100644,000000..100644
--- a/apps/search_lucene/appinfo/update.php
+++ b/apps/search_lucene/appinfo/update.php
@@@ -1,28 -1,0 +1,12 @@@
 +<?php
 +
 +$currentVersion=OC_Appconfig::getValue('search_lucene', 'installed_version');
++
 +if (version_compare($currentVersion, '0.5.0', '<')) {
 +	//force reindexing of files
 +	$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*lucene_status` WHERE 1=1');
 +	$stmt->execute();
 +	//clear old background jobs
 +	$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*queuedtasks` WHERE `app`=?');
 +	$stmt->execute(array('search_lucene'));
- }
- 
- if (version_compare($currentVersion, '0.5.2', '<')) {
- 	//delete duplicate id entries
- 	$stmt = OCP\DB::prepare('
- 		DELETE FROM `*PREFIX*lucene_status`
- 		WHERE `fileid` IN (
- 			SELECT `fileid`
- 			FROM (
- 				SELECT `fileid`
- 				FROM `*PREFIX*lucene_status`
- 				GROUP BY `fileid`
- 				HAVING count(`status`) > 1
- 			) AS `mysqlerr1093hack`
- 		)
- 	');
- 	$stmt->execute();
 +}
diff --cc apps/search_lucene/lib/indexer.php
index 0ac0092,0000000..62e62b8
mode 100644,000000..100644
--- a/apps/search_lucene/lib/indexer.php
+++ b/apps/search_lucene/lib/indexer.php
@@@ -1,304 -1,0 +1,304 @@@
 +<?php
 +
 +namespace OCA\Search_Lucene;
 +
 +use \OC\Files\Filesystem;
 +use OCA\Search_Lucene\Document\Ods;
 +use OCA\Search_Lucene\Document\Odt;
 +use OCA\Search_Lucene\Document\Pdf;
 +use \OCP\Util;
 +
 +/**
 + * @author Jörn Dreyer <jfd at butonic.de>
 + */
 +class Indexer {
 +
 +	/**
 +	 * classname which used for hooks handling
 +	 * used as signalclass in OC_Hooks::emit()
 +	 */
 +	const CLASSNAME = 'Indexer';
 +
 +	/**
 +	 * index a file
 +	 *
 +	 * @author Jörn Dreyer <jfd at butonic.de>
 +	 *
 +	 * @param string $path the path of the file
 +	 *
 +	 * @return bool
 +	 */
 +	static public function indexFile($path = '', $user = null) {
 +
 +		if (!Filesystem::isValidPath($path)) {
 +			return;
 +		}
 +		if ($path === '') {
 +			//ignore the empty path element
 +			return false;
 +		}
 +
 +		if (is_null($user)) {
 +			$view = Filesystem::getView();
 +			$user = \OCP\User::getUser();
 +		} else {
 +			$view = new \OC\Files\View('/' . $user . '/files');
 +		}
 +
 +		if ( ! $view ) {
 +			Util::writeLog('search_lucene',
 +				'could not resolve filesystem view',
 +				Util::WARN);
 +			return false;
 +		}
 +		
 +		if(!$view->file_exists($path)) {
 +			Util::writeLog('search_lucene',
 +				'file vanished, ignoring',
 +				Util::DEBUG);
 +			return true;
 +		}
 +
 +		$root = $view->getRoot();
 +		$pk = md5($root . $path);
 +
 +		// the cache already knows mime and other basic stuff
 +		$data = $view->getFileInfo($path);
 +		if (isset($data['mimetype'])) {
 +			$mimeType = $data['mimetype'];
 +
 +			// initialize plain lucene document
 +			$doc = new \Zend_Search_Lucene_Document();
 +
 +			// index content for local files only
 +			$localFile = $view->getLocalFile($path);
 +
 +			if ( $localFile ) {
 +				//try to use special lucene document types
 +
 +				if ('text/plain' === $mimeType) {
 +
 +					$body = $view->file_get_contents($path);
 +
 +					if ($body != '') {
 +						$doc->addField(\Zend_Search_Lucene_Field::UnStored('body', $body));
 +					}
 +
 +				} else if ('text/html' === $mimeType) {
 +
 +					//TODO could be indexed, even if not local
 +					$doc = \Zend_Search_Lucene_Document_Html::loadHTML($view->file_get_contents($path));
 +
 +				} else if ('application/pdf' === $mimeType) {
 +
 +					$doc = Pdf::loadPdf($view->file_get_contents($path));
 +
 +				// commented the mimetype checks, as the zend classes only understand docx and not doc files.
 +				// FIXME distinguish doc and docx, xls and xlsx, ppt and pptx, in oc core mimetype helper ...
 +				//} else if ('application/msword' === $mimeType) {
 +				} else if (strtolower(substr($data['name'], -5)) === '.docx') {
 +
 +					$doc = \Zend_Search_Lucene_Document_Docx::loadDocxFile($localFile);
 +
 +				//} else if ('application/msexcel' === $mimeType) {
 +				} else if (strtolower(substr($data['name'], -5)) === '.xlsx') {
 +
 +					$doc = \Zend_Search_Lucene_Document_Xlsx::loadXlsxFile($localFile);
 +
 +				//} else if ('application/mspowerpoint' === $mimeType) {
 +				} else if (strtolower(substr($data['name'], -5)) === '.pptx') {
 +
 +					$doc = \Zend_Search_Lucene_Document_Pptx::loadPptxFile($localFile);
 +
 +				} else if (strtolower(substr($data['name'], -4)) === '.odt') {
 +
 +					$doc = Odt::loadOdtFile($localFile);
 +
 +				} else if (strtolower(substr($data['name'], -4)) === '.ods') {
 +
 +					$doc = Ods::loadOdsFile($localFile);
 +
 +				}
 +			}
 +
 +
 +			// Store filecache id as unique id to lookup by when deleting
 +			$doc->addField(\Zend_Search_Lucene_Field::Keyword('pk', $pk));
 +
 +			// Store filename
 +			$doc->addField(\Zend_Search_Lucene_Field::Text('filename', $data['name'], 'UTF-8'));
 +
 +			// Store document path to identify it in the search results
 +			$doc->addField(\Zend_Search_Lucene_Field::Text('path', $path, 'UTF-8'));
 +
 +			$doc->addField(\Zend_Search_Lucene_Field::unIndexed('size', $data['size']));
 +
 +			$doc->addField(\Zend_Search_Lucene_Field::unIndexed('mimetype', $mimeType));
 +
 +			//self::extractMetadata($doc, $path, $view, $mimeType);
 +
 +			Lucene::updateFile($doc, $path, $user);
 +
 +			return true;
 +
 +		} else {
 +			Util::writeLog(
 +				'search_lucene',
 +				'need mimetype for content extraction',
 +				Util::ERROR
 +			);
 +			return false;
 +		}
 +	}
 +
 +
 +	/**
 +	 * extract the metadata from a file
 +	 *
 +	 * uses getid3 to extract metadata.
 +	 * if possible also adds content (currently only for plain text files)
 +	 * hint: use OC\Files\Filesystem::getFileInfo($path) to get metadata for the last param
 +	 *
 +	 * @author Jörn Dreyer <jfd at butonic.de>
 +	 *
 +	 * @param Zend_Search_Lucene_Document $doc      to add the metadata to
 +	 * @param string                      $path     path of the file to extract metadata from
 +	 * @param string                      $mimetype depending on the mimetype different extractions are performed
 +	 *
 +	 * @return void
 +	 */
 +	private static function extractMetadata(
 +		\Zend_Search_Lucene_Document $doc,
 +		$path,
 +		\OC\Files\View $view,
 +		$mimetype
 +	) {
 +
 +		$file = $view->getLocalFile($path);
 +		if (is_dir($file)) {
 +			// Don't lose time analizing a directory for file-specific metadata
 +			return;
 +		}
 +		$getID3 = new \getID3();
 +		$getID3->encoding = 'UTF-8';
 +		$data = $getID3->analyze($file);
 +
 +		// TODO index meta information from media files?
 +
 +		//show me what you got
 +		/*foreach ($data as $key => $value) {
 +			Util::writeLog('search_lucene',
 +						'getid3 extracted '.$key.': '.$value,
 +						Util::DEBUG);
 +			if (is_array($value)) {
 +				foreach ($value as $k => $v) {
 +					Util::writeLog('search_lucene',
 +							'  ' . $value .'-' .$k.': '.$v,
 +							Util::DEBUG);
 +				}
 +			}
 +		}*/
 +
 +		if ('application/pdf' === $mimetype) {
 +			try {
 +				$zendpdf = \Zend_Pdf::parse($view->file_get_contents($path));
 +
 +				//we currently only display the filename, so we only index metadata here
 +				if (isset($zendpdf->properties['Title'])) {
 +					$doc->addField(\Zend_Search_Lucene_Field::UnStored('title', $zendpdf->properties['Title']));
 +				}
 +				if (isset($zendpdf->properties['Author'])) {
 +					$doc->addField(\Zend_Search_Lucene_Field::UnStored('author', $zendpdf->properties['Author']));
 +				}
 +				if (isset($zendpdf->properties['Subject'])) {
 +					$doc->addField(\Zend_Search_Lucene_Field::UnStored('subject', $zendpdf->properties['Subject']));
 +				}
 +				if (isset($zendpdf->properties['Keywords'])) {
 +					$doc->addField(\Zend_Search_Lucene_Field::UnStored('keywords', $zendpdf->properties['Keywords']));
 +				}
 +				//TODO handle PDF 1.6 metadata Zend_Pdf::getMetadata()
 +
 +				//do the content extraction
 +				$pdfParse = new \App_Search_Helper_PdfParser();
 +				$body = $pdfParse->pdf2txt($zendpdf->render());
 +
 +			} catch (Exception $e) {
 +				Util::writeLog('search_lucene',
 +					$e->getMessage() . ' Trace:\n' . $e->getTraceAsString(),
 +					Util::ERROR);
 +			}
 +
 +		}
 +
 +		if ($body != '') {
 +			$doc->addField(\Zend_Search_Lucene_Field::UnStored('body', $body));
 +		}
 +
 +		if (isset($data['error'])) {
 +			Util::writeLog(
 +				'search_lucene',
 +				'failed to extract meta information for ' . $view->getAbsolutePath($path) . ': ' . $data['error']['0'],
 +				Util::WARN
 +			);
 +
 +			return;
 +		}
 +	}
 +
 +	/**
 +	 * get the list of all unindexed files for the user
 +	 *
 +	 * @return array
 +	 */
 +	static public function getUnindexed() {
 +		$files = array();
 +		$absoluteRoot = Filesystem::getView()->getAbsolutePath('/');
 +		$mounts = Filesystem::getMountPoints($absoluteRoot);
 +		$mount = Filesystem::getMountPoint($absoluteRoot);
 +		if (!in_array($mount, $mounts)) {
 +			$mounts[] = $mount;
 +		}
 +
 +		$query = \OC_DB::prepare('
 +			SELECT `*PREFIX*filecache`.`fileid`
 +			FROM `*PREFIX*filecache`
 +			LEFT JOIN `*PREFIX*lucene_status`
 +			ON `*PREFIX*filecache`.`fileid` = `*PREFIX*lucene_status`.`fileid`
 +			WHERE `storage` = ?
- 			AND `status` is null OR `status` = \'N\'
++			AND `status` IS NULL OR `status` = ?
 +		');
 +
 +		foreach ($mounts as $mount) {
 +			if (is_string($mount)) {
 +				$storage = Filesystem::getStorage($mount);
 +			} else if ($mount instanceof \OC\Files\Mount\Mount) {
 +				$storage = $mount->getStorage();
 +			} else {
 +				$storage = null;
 +				Util::writeLog('search_lucene',
 +					'expected string or instance of \OC\Files\Mount\Mount got ' . json_encode($mount),
 +					Util::DEBUG);
 +			}
 +			//only index local files for now
 +			if ($storage instanceof \OC\Files\Storage\Local) {
 +				$cache = $storage->getCache();
 +				$numericId = $cache->getNumericStorageId();
 +
- 				$result = $query->execute(array($numericId));
++				$result = $query->execute(array($numericId, 'N'));
 +				if (\OC_DB::isError($result)) {
 +					Util::writeLog(
 +						'search_lucene',
 +						'failed to find unindexed files: '.\OC_DB::getErrorMessage($result),
 +						Util::WARN
 +					);
 +					return false;
 +				}
 +				while ($row = $result->fetchRow()) {
 +					$files[] = $row['fileid'];
 +				}
 +			}
 +		}
 +		return $files;
 +	}
 +
 +}
diff --cc core/doc/admin/_images/ldap-advanced-1-connection.png
index 0000000,0000000..3ef12bd
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-advanced-2-directory.png
index 0000000,0000000..35837fa
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-advanced-3-attributes.png
index 0000000,0000000..f0810d6
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-expert.png
index 0000000,0000000..59d19ba
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-fetched-avatar.png
index 0000000,0000000..9d25c60
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-wizard-1-server.png
index 0000000,0000000..ed72717
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-wizard-2-user.png
index 0000000,0000000..6998262
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-wizard-3-login.png
index 0000000,0000000..1e54d46
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/ldap-wizard-4-group.png
index 0000000,0000000..08741a6
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_sources/configuration/auth_ldap.txt
index d95af56,0000000..94bdcae
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/auth_ldap.txt
+++ b/core/doc/admin/_sources/configuration/auth_ldap.txt
@@@ -1,464 -1,0 +1,607 @@@
 +User Authentication with LDAP
 +=============================
 +
 +ownCloud ships an LDAP backend, which allows full use of ownCloud for user
 +logging in with LDAP credentials including:
 +
 +* LDAP group support
 +* File sharing with users and groups
 +* Access via WebDAV and of course ownCloud Desktop Client
- * Versioning, external Storages and all other ownCloud Goodies
++* Versioning, external Storages and all other ownCloud goodies
 +
 +To connect to an LDAP server the configuration needs to be set up properly.
- Once the LDAP backend is activated (Settings→Apps, choose **LDAP user and group
- backend**, click on **Enable**) the configuration can be found on
++Once the LDAP backend is activated (Apps Sidebar→Apps, choose **LDAP user and
++group backend**, click on **Enable**) the configuration can be found on
 +Settings→Admin. Read on for a detailed description of the configuration fields.
 +
- Basic Settings
- --------------
++Configuration
++-------------
 +
- The basic settings are all you need. However, if you have a larger directory,
- custom requirements or need to connect to Active Directory (AD) you want to have
- a look on the advanced settings afterwards. The basic part allows you to set up
- a working connection to your LDAP server and use it with ownCloud.
++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.
 +
- .. figure:: ../images/ldap-basic-settings-oc5.png
++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.
 +
-    LDAP Basic Settings
++The other tabs can be navigated by clicking the tabs or by using the *Continue*
++and *Back* buttons. They are located on the lower right, next to the status
++indicator.
 +
- Note that a hint will be shown on the right hand side, when hovering with the
- mouse over an input field. This gives you more context information while
- filling out the settings.
++Server
++~~~~~~
 +
- Settings Details
- ~~~~~~~~~~~~~~~~
++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.
++
++.. figure:: ../images/ldap-wizard-1-server.png
 +
 +Server configuration:
 +  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 **Delete Configuration** deletes the current configuration.
 +
-   * *Example: 1. Server*
- 
 +Host:
 +  The host name of the LDAP server. It can also be a **ldaps://** URI, for
 +  instance.
 +
-   * Example: *directory.my-company.com*
++  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.
 +
- Base DN:
-   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.
++  Examples:
 +
-   * Example: *dc=my-company,dc=com*
++  * *directory.my-company.com*
++  * *ldaps://directory.my-company.com*
++  * *directory.my-company.com:9876*
++
++Port:
++  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.
++
++  Example:
++
++  * *389*
 +
 +User DN:
 +  The name as DN of a user who is able to do searches in the LDAP
-   directory. Let it empty for anonymous access. It is recommended to have a
++  directory. Leave it empty for anonymous access. It is recommended to have a
 +  special system user for ownCloud.
 +
-   * Example: *uid=owncloudsystemuser,cn=sysusers,dc=my-company,dc=com*
++  Example:
++
++  * *uid=owncloudsystemuser,cn=sysusers,dc=my-company,dc=com*
 +
 +Password:
 +  The password for the user given above. Empty for anonymous access.
 +
- User Login Filter:
-   The filter to use when a users tries to login. Use **%uid** as placeholder
-   for the user name. Note, that login applies this filter only, but not User
-   List Filter. This may change in future.
++Base DN:
++  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.
++
++  Example:
++
++  * *dc=my-company,dc=com*
++
++User Filter
++~~~~~~~~~~~
++
++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.
++
++.. figure:: ../images/ldap-wizard-2-user.png
++
++only those object classes:
++  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.
++
++only from those groups:
++  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.
++
++  If your LDAP server does not support the member-of-overlay in LDAP filters,
++  the input field is disabled. Please contact your LDAP administrator.
++
++Edit raw filter instead:
++  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.
++
++  Example:
++
++  * *objectClass=inetOrgPerson*
++
++x users found:
++  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.
++
++Login Filter
++~~~~~~~~~~~~
++
++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.
++
++The user limitation as set up in the previous tab is in effect, unless you
++manually configure the filter in raw mode.
++
++.. figure:: ../images/ldap-wizard-3-login.png
++
++LDAP Username:
++  If this value is checked, the login value will be compared to the username in
++  the LDAP directory. The corresponding attribute, usually *uid* or
++  *samaccountname* will be detected automatically by ownCloud.
++
++LDAP Email Address:
++  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
++  *mailPrimaryAddress* and *mail* attributes.
++
++Other Attributes:
++  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.
++
++Edit raw filter instead:
++  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.
++
++  The **%uid** placeholder will be replaced with the login name entered by the user
++  upon login. When you enter the filter manually.
++
++  Examples:
++
++  * only username: *uid=%uid*
++  * username or email address: *(|(uid=%uid)(mail=$uid))*
++
++Group Filter
++~~~~~~~~~~~~
++
++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.
 +
-   * Example (allows login with user name and email address): *(|(uid=%uid)(email=$uid))*
++By default, no groups will be availalble in ownCloud. You actively need to
++enable groups.
 +
- User List Filter:
-   The filter to use when a search for users will be executed.
++.. figure:: ../images/ldap-wizard-4-group.png
 +
-   * Example: *objectClass=posixAccount*
++only those object classes:
++  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".
 +
- Group Filter:
-   The filter to use when a search for groups will be executed. In
-   case you do not want to use LDAP groups in ownCloud, leave it empty.
++only from those groups:
++  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.
++
++Edit raw filter instead:
++  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.
++
++  Example:
++
++  * *objectClass=group*
++  * *objectClass=posixGroup*
++
++y groups found:
++  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.
 +
-   * Example: *objectClass=posixGroup*
 +
 +Advanced Settings
 +-----------------
 +
 +In the LDAP Advanced settings section you can define options, that are less
- common to set. They are not needed for a working connection, unless you use a
- non-standard Port, e.g. It can also have a positive effect on the performance
- to specify distinguished bases for user and group searches.
++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.
 +
 +The Advanced Settings are structured into three parts:
++
 +* Connection Settings
 +* Directory Settings
 +* Special Attributes
 +
- .. figure:: ../images/ldap-advanced-settings-oc5.png
- 
-    LDAP Advanced Settings
- 
 +Connection Settings
 +~~~~~~~~~~~~~~~~~~~
 +
- .. figure:: ../images/ldap-advanced-settings-connection-settings-oc5.png
++.. figure:: ../images/ldap-advanced-1-connection.png
 +
 +   LDAP Advanced Settings, section Connection Settings
 +
 +Configuration Active:
 +  Enables or Disables the current configuration. Disabled configuration will not
 +  connect to the LDAP server.
 +
-   * Example: *[X]*
- 
- Port:
-   The port on which to connect to the LDAP server.
- 
-   * Example: *389*
++  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.
 +
 +Backup (Replica) Host:
 +  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.
 +
-   * Example: *directory2.my-company.com*
++  Example:
++
++  * *directory2.my-company.com*
 +
 +Backup (Replica) Port:
 +  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.
 +
-   * Example: *389*
++  Example:
++
++  * *389*
 +
 +Disable Main Server:
 +  You can manually override the main server and make ownCloud only connect to
 +  the backup server. It may be handy for planned downtimes.
 +
-   * Example: *[ ]*
- 
- Use TLS:
-   Whether to use TLS encrypted connection to the LDAP server.  This will be
-   ignored when "ldaps://" protocol is specified in the host entries.
- 
-   * Example: *[ ]*
- 
 +Case insensitive LDAP server (Windows):
-   Whether the LDAP server is running on a Windows Host
- 
-   * Example: *[ ]*
++  Whether the LDAP server is running on a Windows Host. Usually, it is not
++  necessary to check it, however.
 +
 +Turn off SSL certificate validation:
 +  Turns of check of valid SSL certificates. Use it – if needed –
 +  for testing, only!
 +
-   * Example: *[ ]*
- 
 +Cache Time-To-Live:
 +  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.
 +
 +  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.
 +
-   * Example (10 min): *600*
++  Examples:
++
++  * ten minutes: *600*
++  * one hour: *3600*
 +
 +Directory Settings
 +~~~~~~~~~~~~~~~~~~~
 +
- .. figure:: ../images/ldap-advanced-settings-directory-settings-oc5.png
++.. figure:: ../images/ldap-advanced-2-directory.png
 +
 +   LDAP Advanced Settings, section Directory Settings
 +
 +User Display Name Field:
-   The attribute that should be used as display name in ownCloud. Prior to
-   ownCloud 5 it was used as internal user name. This is not the case anymore.
-   It also means that display names are not permanent in ownCloud, i.e. if the
-   attribute value changes in LDAP, it changes in ownCloud too. Display names
-   to not need to be unique, but you rather want to specify a more or less unique
-   attribute here to avoid confusion.
++  The attribute that should be used as display name in ownCloud.
 +
 +  *  Example: *displayName*
 +
 +Base User Tree:
 +  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.
 +
 +  * Example:
 +
 +    | *cn=programmers,dc=my-company,dc=com*
 +    | *cn=designers,dc=my-company,dc=com*
 +
 +User Search Attributes:
-   These attributes are used when a search for users with a search string 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.
++  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.
++
++  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.
 +
 +  * Example:
 +
 +    | *displayName*
 +    | *mail*
 +
 +Group Display Name Field:
 +  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.
 +
 +  * Example: *cn*
 +
 +Base Group Tree:
 +  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.
 +
 +  * Example:
 +
 +    | *cn=barcelona,dc=my-company,dc=com*
 +    | *cn=madrid,dc=my-company,dc=com*
 +
 +Group Search Attributes:
-   These attributes are used when a search for groups with a search string 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.
++  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.
++
++  If you override the default, the group display name attribute will not be
++  taken into account, unless you specify it as well.
 +
 +  * Example:
 +
 +    | *cn*
 +    | *description*
 +
 +Group Member association:
 +  The attribute that is used to indicate group memberships, i.e. the attribute
 +  used by LDAP groups to refer to their users.
 +
++  ownCloud detects the value automatically, you should only change it, if you
++  have a very valid reason and know what you are doing.
++
 +  * Example: *uniquemember*
 +
 +Special Attributes
 +~~~~~~~~~~~~~~~~~~
 +
- .. figure:: ../images/ldap-advanced-settings-special-attributes-oc5.png
++.. figure:: ../images/ldap-advanced-3-attributes.png
 +
 +   LDAP Advanced Settings, section Special Attributes
 +
 +Quota Field:
 +  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".
 +
 +  * Example: *ownCloudQuota*
 +
 +Quota Default:
 +  Override ownCloud default quota for LDAP users who do not
 +  have a quota set in the attribute given above.
 +
 +  * Example: *15 GB*
 +
 +Email Field:
 +  ownCloud can read an LDAP attribute and set the user email
 +  there from. Specify the attribute here, otherwise keep it empty.
 +
++  Although the wizard offers you to check login by email, the correct email
++  attribute is not detected and you need to specify it manually.
++
 +  * Example: *mail*
 +
 +User Home Folder Naming Rule:
 +  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.
 +  ``/mnt/storage43/alice``. Leave it empty for default behavior.
 +
 +  * Example: *cn*
 +
- Expert Settings (>= ownCloud 5.0.7)
- ---------------------------------------
++Expert Settings
++---------------
 +
- .. figure:: ../images/ldap-expert-settings-oc5.png
++.. figure:: ../images/ldap-expert.png
 +
 +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.
 +
 +Internal Username:
 +  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_. at -]. Other characters are replaced with
 +  their ASCII correspondence or are simply omitted.
 +
 +  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".
 +
 +  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. To achieve a similar
-   behaviour as before ownCloud 5 enter the user display name attribute in the
-   following field.
++  With this setting the default behaviour can be overridden.
 +
 +  Leave it empty for default behaviour. Changes will have effect only on newly
 +  mapped (added) LDAP users.
 +
 +  * Example: *uid*
 +
 +Override UUID detection
 +  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.
 +
 +  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).
 +
-   The default behaviour does not differ from ownCloud 4.5. You do not want to
-   change this after upgrading from ownCloud 4.5 unless you update the mapping
-   tables yourself.
- 
 +  * Example: *cn*
 +
 +Username-LDAP User Mapping
 +  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.
 +
 +  The same is valid for groups.
 +
 +  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.
 +
 +  **Clearing the Mappings is not configuration sensitive, it affects all LDAP
 +  configurations!**
 +
- 
- 
 +Testing the configuration
 +-------------------------
 +
 +In this version we introduced the **Test Configuration** 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:
 +
 +.. figure:: ../images/ldap-settings-invalid-oc45.png
 +
 +   Failure
 +
 +In case the configuration fails, you can see details in ownCloud's log, which
 +is in the data directory and called **owncloud.log** or on the bottom the
 +**Settings →  Admin page**. Unfortunately it requires a reload – sorry for the
 +inconvenience.
 +
 +.. figure:: ../images/ldap-settings-valid-oc45.png
 +
 +   Success
 +
 +In this case, Save the settings. You can check if the users and groups are
 +fetched correctly on the Settings → Users page.
 +
++ownCloud Avatar integration
++---------------------------
++
++ownCloud 6 incorporates a user profile picture feature, called Avatar. If a user
++has a photo stored in the *jpegPhoto* 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.
++
++.. figure:: ../images/ldap-fetched-avatar.png
++
++   Profile picture fetched from LDAP, Personal Settings
++
++If the *jpegPhoto* 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.
++
++The *jpegPhoto* 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
++*jpegPhoto* attribute is deleted later, the last profile picture in ownCloud
++will still be used.
++
++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.
++
 +Troubleshooting, Tips and Tricks
 +--------------------------------
 +
 +SSL Certificate Verification (LDAPS, TLS)
 +-----------------------------------------
 +
 +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
 +
 +* you have the certificate of the server installed on the ownCloud server
 +* the certificate is announced in the system's LDAP configuration file (usually
 +  */etc/ldap/ldap.conf* on Linux, *C:\\openldap\\sysconf\\ldap.conf* or
 +  *C:\\ldap.conf* on Windows) using a **TLS_CACERT /path/to/cert** line.
 +* Using LDAPS, also make sure that the port is correctly configured (by default
 +  686)
 +
 +Microsoft Active Directory
 +--------------------------
 +
- In case you want to connect to a Windows AD, you must change some values in the Advanced tab.
- 
- * The default login filter will not work with AD. Use “samaccountname=%uid” instead.
- * The default in User Display Name Field will not work with Active Directory.
- * The Group Member association must be set to “member (AD)”
- * Check Case insensitive LDAP server (Windows)
++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.
 +
 +Duplicating Server Configurations
 +---------------------------------
 +
 +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:
 +
- #. Go to the **LDAP Basic** tab
++#. Go to the **Server** tab
 +#. On **Server Configuration** choose *Add Server Configuration*
 +#. Answer the question *Take over settings from recent server configuration?*
 +   with *yes*.
 +#. (optional) Switch to **Advanced** tab and uncheck **Configuration Active**
 +   in the *Connection Settings*, so the new configuration is not used on Save
 +#. Click on **Save**
 +
 +Now you can modify the configuration and enable it if you wish.
 +
 +ownCloud LDAP Internals
 +-----------------------
 +
 +Some parts of how the LDAP backend works are described here. May it be helpful.
 +
 +User and Group Mapping
 +----------------------
 +
 +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.
 +
 +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 *User Home Folder Naming Rule*), which
 +contains files and meta data.
 +
 +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.
 +
 +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.
 +
 +Caching
 +-------
 +
 +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.
 +
 +Handling with Backup Server
 +---------------------------
 +
 +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
 +**Cache Time-To-Live**. If a backup server is configured, it will be connected
 +instead. If you plan a maintained downtime, check **Disable Main Server** for
 +the time being to avoid unnecessary connection attempts every now and then.
diff --cc core/doc/admin/_sources/configuration/configuration_3rdparty.txt
index 83f46f9,0000000..a2bceac
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_3rdparty.txt
+++ b/core/doc/admin/_sources/configuration/configuration_3rdparty.txt
@@@ -1,18 -1,0 +1,20 @@@
 +3rd-Party Configuration
 +=======================
 +
 +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 **/3rdparty** folder.
 +
 +Parameters
 +----------
 +
- If you want to change the default location of the 3rd-party folder you can use the **3rdpartyroot** parameter to define the absolute file system path to the folder. The **3rdpartyurl** parameter is used to define the http web path to that folder, starting at the ownCloud web root.
++If you want to change the default location of the 3rd-party folder you can use the **3rdpartyroot** parameter to define
++the absolute file system path to the folder. The **3rdpartyurl** parameter is used to define the http web path to that
++folder, starting at the ownCloud web root.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +  "3rdpartyroot" => OC::$SERVERROOT."/3rdparty",
 +  "3rdpartyurl"  => "/3rdparty",
diff --cc core/doc/admin/_sources/configuration/configuration_apps.txt
index d563d1c,0000000..cdd157d
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_apps.txt
+++ b/core/doc/admin/_sources/configuration/configuration_apps.txt
@@@ -1,65 -1,0 +1,67 @@@
 +Apps Configuration
 +==================
 +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.
++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.
 +
 +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
++.. 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 writeable. 
++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,
++    "appcodechecker" => false,
diff --cc core/doc/admin/_sources/configuration/configuration_automation.txt
index 3ba0ebc,0000000..b9f6af5
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_automation.txt
+++ b/core/doc/admin/_sources/configuration/configuration_automation.txt
@@@ -1,108 -1,0 +1,115 @@@
 +Automatic Configuration
 +=======================
 +
 +If you need to install ownCloud on multiple servers you normally do not want
- to set-up each instance separately as described in the :doc:`configuration_database`. For this reason the automatic configuration feature has been introduced.
++to set-up each instance separately as described in the :doc:`configuration_database`.
++For this reason the automatic configuration feature has been introduced.
 +
- To take advantage of this feature you need to create a configuration file, called :file:`../owncloud/config/autoconfig.php` and set the parameters as required. 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.
++To take advantage of this feature you need to create a configuration file, called
++:file:`../owncloud/config/autoconfig.php` and set the parameters as required.
++You can provide all parameters or just part of them - parameters which haven't been provided (if any) will be asked
++at "Finish setup" screen at first run of ownCloud.
 +
 +The :file:`../owncloud/config/autoconfig.php` will be automatically removed after the initial configuration has been applied.
 +
 +Parameters
 +----------
 +You need to keep in mind that two parameters are named differently in this
 +configuration file compared to the normal :file:`config.php`.
 +
 ++----------------+---------------+
 +| autoconfig.php | config.php    |
 ++================+===============+
 +| directory      | datadirectory |
 ++----------------+---------------+
 +| dbpass         | dbpassword    |
 ++----------------+---------------+
 +
 +Sample Automatic Configurations
 +-------------------------------
 +
 +Data Directory
 +~~~~~~~~~~~~~~
 +With the configuration below the "Finish setup" screen still will ask for database and admin credentials settings.
 +
 +.. code-block:: php
 +
 +    <?php
 +    $AUTOCONFIG = array(
 +      "directory"     => "/www/htdocs/owncloud/data",
 +    );
 +
 +
 +SQLite Database
 +~~~~~~~~~~~~~~~
 +With the configuration below the "Finish setup" screen still will ask for data directory and admin credentials settings.
 +
 +.. code-block:: php
 +
 +    <?php
 +    $AUTOCONFIG = array(
 +      "dbtype"        => "sqlite",
 +      "dbname"        => "owncloud",
 +      "dbtableprefix" => "",
 +    );
 +
 +MySQL Database
 +~~~~~~~~~~~~~~
- Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in :doc:`configuration_database`.
++Keep in mind that the automatic configuration does not unburden you from creating the database user and database
++in advance, as described in :doc:`configuration_database`.
 +
 +With the configuration below the "Finish setup" screen still will ask for data directory and admin credentials settings.
 +
 +.. code-block:: php
 +
 +    <?php
 +    $AUTOCONFIG = array(
 +      "dbtype"        => "mysql",
 +      "dbname"        => "owncloud",
 +      "dbuser"        => "username",
 +      "dbpass"        => "password",
 +      "dbhost"        => "localhost",
 +      "dbtableprefix" => "",
 +    );
 +
 +PostgreSQL Database
 +~~~~~~~~~~~~~~~~~~~
- Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in :doc:`configuration_database`.
++Keep in mind that the automatic configuration does not unburden you from creating the database user and database
++in advance, as described in :doc:`configuration_database`.
 +
 +With the configuration below the "Finish setup" screen still will ask for data directory and admin credentials settings.
 +
 +.. code-block:: php
 +
 +    <?php
 +    $AUTOCONFIG = array(
 +      "dbtype"        => "pgsql",
 +      "dbname"        => "owncloud",
 +      "dbuser"        => "username",
 +      "dbpass"        => "password",
 +      "dbhost"        => "localhost",
 +      "dbtableprefix" => "",
 +    );
 +    
 +All Parameters
 +~~~~~~~~~~~~~~
- Keep in mind that the automatic configuration does not unburden you from creating the database user and database in advance, as described in :doc:`configuration_database`.
++Keep in mind that the automatic configuration does not unburden you from creating the database user and database
++in advance, as described in :doc:`configuration_database`.
 +
 +With the configuration below "Finish setup" will be skipped at first ownCloud run since all parameters are already preconfigured.
 +
 +.. code-block:: php
 +
 +    <?php
 +    $AUTOCONFIG = array(
 +      "dbtype"        => "mysql",
 +      "dbname"        => "owncloud",
 +      "dbuser"        => "username",
 +      "dbpass"        => "password",
 +      "dbhost"        => "localhost",
 +      "dbtableprefix" => "",
 +      "adminlogin"    => "root",
 +      "adminpass"     => "root-password",
 +      "directory"     => "/www/htdocs/owncloud/data",
 +    );
 +
diff --cc core/doc/admin/_sources/configuration/configuration_database.txt
index 4e83a72,0000000..3e4c247
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_database.txt
+++ b/core/doc/admin/_sources/configuration/configuration_database.txt
@@@ -1,345 -1,0 +1,359 @@@
 +Database Configuration
 +======================
 +
- Owncloud requires a database where administrative data will be held. Four different database types are currently
- supported, `MySQL <http://www.mysql.com/>`_, `MariaDB <https://mariadb.org/>`_, `SQLite <http://www.sqlite.org/>`_, and `PostgreSQL <http://www.postgresql.org/>`_. MySQL or MariaDB are the recommended database engines. By default SQLite is choosen because it is a file based database with the least administrative overhead.
++ownCloud requires a database where administrative data will be held. Four different database types are currently
++supported, `MySQL <http://www.mysql.com/>`_, `MariaDB <https://mariadb.org/>`_, `SQLite <http://www.sqlite.org/>`_,
++and `PostgreSQL <http://www.postgresql.org/>`_. 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.
 +
 +.. note:: Because SQLite handles multiple users very badly SQLite is only recommended for single user ownCloud installations
 +
 +Requirements
 +------------
 +
 +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.
 +
 +Parameters
 +----------
 +
 +MySQL/MariaDB Database
 +~~~~~~~~~~~~~~~~~~~~~~
 +
 +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 **mysql.default_socket**
 +points to the correct socket (if the database runs on same server as ownCloud).
 +
- 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.
++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.
 +
 +The PHP configuration in :file:`/etc/php5/conf.d/mysql.ini` could look like this:
 +
 +.. code-block:: ini
 +
 +  # configuration for PHP MySQL module
 +  extension=pdo_mysql.so
 +  extension=mysql.so
 +
 +  [mysql]
 +  mysql.allow_local_infile=On
 +  mysql.allow_persistent=On
 +  mysql.cache_size=2000
 +  mysql.max_persistent=-1
 +  mysql.max_links=-1
 +  mysql.default_port=
-   mysql.default_socket=/var/lib/mysql/mysql.sock  # debian squeeze: /var/run/mysqld/mysqld.sock
++  mysql.default_socket=/var/lib/mysql/mysql.sock  # Debian squeeze: /var/run/mysqld/mysqld.sock
 +  mysql.default_host=
 +  mysql.default_user=
 +  mysql.default_password=
 +  mysql.connect_timeout=60
 +  mysql.trace_mode=Off
 +
 +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.
 +
 +To start the MySQL command line mode use::
 +
 +  mysql -uroot -p
 +
 +Then a **mysql>** or **MariaDB [root]>** prompt will appear. Now enter the following lines and confirm them with the enter key:
 +
 +.. code-block:: sql
 +
 +  CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
 +  CREATE DATABASE IF NOT EXISTS owncloud;
 +  GRANT ALL PRIVILEGES ON owncloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';
 +
 +You can quit the prompt by entering::
 +
 +  quit
 +
 +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.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "dbtype"        => "mysql",
 +    "dbname"        => "owncloud",
 +    "dbuser"        => "username",
 +    "dbpassword"    => "password",
 +    "dbhost"        => "localhost",
 +    "dbtableprefix" => "",
 +
 +SQLite Database
 +~~~~~~~~~~~~~~~
 +
 +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 :file:`/etc/php5/conf.d/sqlite3.ini` could look like this:
 +
 +.. code-block:: ini
 +
 +  # configuration for PHP SQLite3 module
 +  extension=pdo_sqlite.so
 +  extension=sqlite3.so
 +
 +It is not necessary to create a database and a database user in advance
 +because this will automatically be done by ownCloud when you login for the
 +first time.
 +
- In the ownCloud counfiguration in :file:`config/config.php` you need to set at least the **datadirectory** parameter to the directory where your data and database should be stored. 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:
++In the ownCloud configuration in :file:`config/config.php` you need to set at least the **datadirectory** parameter to
++the directory where your data and database should be stored. Note that for the PDO SQLite driver this directory must
++be writable (this is recommended for ownCloud anyway).  No authentication is required to access the database therefore
++most of the default parameters could be taken as is:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "dbtype"        => "sqlite",
 +    "dbname"        => "owncloud",
 +    "dbuser"        => "",
 +    "dbpassword"    => "",
 +    "dbhost"        => "",
 +    "dbtableprefix" => "",
 +    "datadirectory" => "/www/htdocs/owncloud/data",
 +
 +PostgreSQL Database
 +~~~~~~~~~~~~~~~~~~~
 +
 +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 :file:`/etc/php5/conf.d/pgsql.ini` could look
 +like this:
 +
 +.. code-block:: ini
 +
 +  # configuration for PHP PostgreSQL module
 +  extension=pdo_pgsql.so
 +  extension=pgsql.so
 +
 +  [PostgresSQL]
 +  pgsql.allow_persistent = On
 +  pgsql.auto_reset_persistent = Off
 +  pgsql.max_persistent = -1
 +  pgsql.max_links = -1
 +  pgsql.ignore_notice = 0
 +  pgsql.log_notice = 0
 +
 +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.
 +
 +To start the postgres command line mode use::
 +
 +  psql -hlocalhost -Upostgres
 +
 +Then a **postgres=#** prompt will appear. Now enter the following lines and confirm them with the enter key:
 +
 +.. code-block:: sql
 +
 +  CREATE USER username WITH PASSWORD 'password';
 +  CREATE DATABASE owncloud TEMPLATE template0 ENCODING 'UNICODE';
 +  ALTER DATABASE owncloud OWNER TO username;
 +  GRANT ALL PRIVILEGES ON DATABASE owncloud TO username;
 +
 +You can quit the prompt by entering::
 +
 +  \q
 +
 +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.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "dbtype"        => "pgsql",
 +    "dbname"        => "owncloud",
 +    "dbuser"        => "username",
 +    "dbpassword"    => "password",
 +    "dbhost"        => "localhost",
 +    "dbtableprefix" => "",
 +
 +Oracle Database
 +~~~~~~~~~~~~~~~
 +
 +If you are deploying to an Oracle database make sure that you have installed
- and enabled the `Oracle extension <http://php.net/manual/en/book.oci8.php>`_ in PHP. The PHP configuration in :file:`/etc/php5/conf.d/oci8.ini` could look like this:
++and enabled the `Oracle extension <http://php.net/manual/en/book.oci8.php>`_ in PHP. The PHP configuration in
++:file:`/etc/php5/conf.d/oci8.ini` could look like this:
 +
 +.. code-block:: ini
 +
 +  # configuration for PHP Oracle extension
 +  extension=oci8.so
 +
- 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 :file:`/etc/apache2/envvars` for Apache)
++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 :file:`/etc/apache2/envvars` for Apache)
 +
 +.. code-block:: bash
 +
 +  export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
 +  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
 +
- Installing and configuring Oracle support for PHP is way out of scope for this document. The official Oracle documentation called `The Underground PHP and Oracle Manual <http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html>`_ should help you through the process.
++Installing and configuring Oracle support for PHP is way out of scope for this document.
++The official Oracle documentation called `The Underground PHP and Oracle Manual <http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html>`_
++should help you through the process.
 +
- 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.
++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.
 +
 +To start the Oracle command line mode with a DBA account use::
 +
 +  sqlplus system AS SYSDBA
 +
 +After entering the password a **SQL>** prompt will appear. Now enter the following lines and confirm them with the enter key:
 +
 +.. code-block:: sql
 +
 +  CREATE USER owncloud IDENTIFIED BY password;
 +  ALTER USER owncloud DEFAULT TABLESPACE users
 +                      TEMPORARY TABLESPACE temp
 +                      QUOTA unlimited ON users;
 +  GRANT create session
 +      , create table
 +      , create procedure
 +      , create sequence
 +      , create trigger
 +      , create view
 +      , create synonym
 +      , alter session
 +     TO owncloud;
 +
 +.. note:: In Oracle creating a user is the same as creating a database in other RDBMs, so no ``CREATE DATABASE`` statement is necessary.
 +
 +You can quit the prompt by entering::
 +
 +  exit
 +
 +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:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "dbtype"        => "oci",
 +    "dbname"        => "XE",
 +    "dbuser"        => "owncloud",
 +    "dbpassword"    => "password",
 +    "dbhost"        => "localhost",
 +
- .. note:: This example assumes you are running an Oracle Express Edition on ``localhost``. The ``dbname`` is the name of the Oracle instance. For Oracle Express Edition it is always ``XE``. 
++.. note:: This example assumes you are running an Oracle Express Edition on ``localhost``. The ``dbname`` is the name
++of the Oracle instance. For Oracle Express Edition it is always ``XE``.
 +
 +Trouble Shooting
 +----------------
 +
 +How can I find out if my MySQL/PostgreSQL  server is reachable?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Use the ping command to check the server availability::
 +
 +  ping db.server.dom
 +
 +::
 +
 +  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
 +
 +How can I find out if a created user can access a database?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
- The easiet way to test if a database can be accessed is by starting the
++The easiest way to test if a database can be accessed is by starting the
 +command line interface:
 +
 +**SQLite**::
 +
 +  sqlite3 /www/htdocs/owncloud/data/owncloud.db
 +
 +::
 +
 +  sqlite> .version
 +  SQLite 3.7.15.1 2012-12-19 20:39:10 6b85b767d0ff7975146156a99ad673f2c1a23318
 +  sqlite> .quit
 +
 +**MySQL**::
 +
 +  mysql -uUSERNAME -p
 +
 +::
 +
 +  mysql> SHOW VARIABLES LIKE "version";
 +  +---------------+--------+
 +  | Variable_name | Value  |
 +  +---------------+--------+
 +  | version       | 5.1.67 |
 +  +---------------+--------+
 +  1 row in set (0.00 sec)
 +  mysql> quit
 +
 +**PostgreSQL**::
 +
 +  psql -Uusername -downcloud
 +
 +::
 +
 +  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
 +
 +**Oracle**::
 +
 +  sqlplus username
 +
 +::
 +
 +  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
 +
 +Useful SQL commands
 +~~~~~~~~~~~~~~~~~~~
 +
 +**Show Database Users**::
 +
 +  SQLite    : No database user is required.
 +  MySQL     : SELECT User,Host FROM mysql.user;
 +  PostgreSQL: SELECT * FROM pg_user;
 +  Oracle    : SELECT * FROM all_users;
 +
 +**Show available Databases**::
 +
 +  SQLite    : .databases (normally one database per file!)
 +  MySQL     : SHOW DATABASES;
 +  PostgreSQL: \l
 +  Oracle    : SELECT name FROM v$database; (requires DBA privileges)
 +
 +**Show ownCloud Tables in Database**::
 +
 +  SQLite    : .tables
 +  MySQL     : USE owncloud; SHOW TABLES;
 +  PostgreSQL: \c owncloud; \d
 +  Oracle    : SELECT table_name FROM user_tables;
 +
 +**Quit Database**::
 +
 +  SQLite    : .quit
 +  MySQL     : quit
 +  PostgreSQL: \q
 +  Oracle    : quit
++
diff --cc core/doc/admin/_sources/configuration/configuration_encryption.txt
index 86b0d39,0000000..754dcce
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_encryption.txt
+++ b/core/doc/admin/_sources/configuration/configuration_encryption.txt
@@@ -1,57 -1,0 +1,57 @@@
 +Use Server-Side Encryption
 +==========================
 +
 +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.
 +
 +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.
 +
 +It might be a good idea to make regular backups of all encryption keys. The
 +encryption keys are stored in following folders:
 +
 +* data/owncloud_private_key (recovery key, if enabled and public share key)
 +* data/public-keys (public keys from all users)
 +* data/<user>/files_encryption (users' private keys and all other keys necessary to
 +  decrypt the users' files)
 +
 +Enable File Recovery Feature
 +----------------------------
 +
 +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.
 +
 +Once the recovery key was enabled every user can choose in his personal
 +settings to enable this feature or not.
 +
 +Recover User Files
 +------------------
 +
 +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.
 +
 +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.
 +
 +LDAP and other external user back-ends
 +--------------------------------------
 +
 +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 matchs after his next log-in. In this case the user will be
++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.
diff --cc core/doc/admin/_sources/configuration/configuration_knowledgebase.txt
index 959de06,0000000..420cc15
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_knowledgebase.txt
+++ b/core/doc/admin/_sources/configuration/configuration_knowledgebase.txt
@@@ -1,18 -1,0 +1,21 @@@
 +Knowledge Base Configuration
 +============================
 +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.
++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.
 +
 +Parameters
 +----------
 +
- If you want to disable the ownCloud help menu item you can use the **knowledgebaseenabled** parameter inside the :file:`config/config.php`. The **knowledgebaseurl** parameter is used to set the http path to the ownCloud help page. The server should support :abbr:`OCS (Open Collaboration Services)`.
++If you want to disable the ownCloud help menu item you can use the **knowledgebaseenabled** parameter inside the
++:file:`config/config.php`. The **knowledgebaseurl** parameter is used to set the http path to the ownCloud help page.
++The server should support :abbr:`OCS (Open Collaboration Services)`.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "knowledgebaseenabled" => true,
 +    "knowledgebaseurl"     => "http://api.apps.owncloud.com/v1",
 +
- .. note:: Disabling the help menu item might increase the number of support request you have to answer in the future
++.. note:: Disabling the help menu item might increase the number of support request you have to answer in the future
diff --cc core/doc/admin/_sources/configuration/configuration_logging.txt
index 1d75808,0000000..effe2e0
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_logging.txt
+++ b/core/doc/admin/_sources/configuration/configuration_logging.txt
@@@ -1,62 -1,0 +1,62 @@@
 +Logging Configuration
 +=====================
 +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.
 +
 +Parameters
 +----------
 +First you need to decide in which way logging should be done. You can
 +choose between the two options **owncloud** and **syslog**. Then you need
 +to configure the log level which directly influences how much information
 +will be logged. You can choose between:
 +
 +* **0**: DEBUG
 +* **1**: INFO
 +* **2**: WARN
 +* **3**: ERROR
 +
 +The most detailed information will be written if **0** (DEBUG) is set, the
 +least information will be written if **3** (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 **2** (WARN).
 +
 +This parameters can be set in the :file:`config/config.php`
 +
 +ownCloud
 +~~~~~~~~
 +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 **owncloud.log** will be created in the directory which has
 +been configured by the **datadirectory** parameter.
 +
 +The desired date format can optionally be defined using the **logdateformat**.
 +By default the `PHP date function`_ parameter "*c*" is used and therefore the
 +date/time is written in the format "*2013-01-10T15:20:25+02:00*". By using the
 +date format in the example the date/time format will be written in the format
 +"*January 10, 2013 15:20:25*".
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "log_type" => "owncloud",
 +    "logfile" => "owncloud.log",
 +    "loglevel" => "3",
 +    "logdateformat" => "F d, Y H:i:s",
 +
 +syslog
 +~~~~~~
- All log information will be send to the default syslog deamon of a system.
++All log information will be send to the default syslog daemon of a system.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "log_type" => "syslog",
 +    "logfile" => "",
 +    "loglevel" => "3",
 +
 +
 +.. _PHP date function: http://www.php.net/manual/en/function.date.php
 +
diff --cc core/doc/admin/_sources/configuration/configuration_mail.txt
index a52d641,0000000..3ff6b62
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuration_mail.txt
+++ b/core/doc/admin/_sources/configuration/configuration_mail.txt
@@@ -1,321 -1,0 +1,322 @@@
 +Mail Configuration
 +==================
 +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 `PHPMailer library <http://sourceforge.net/projects/phpmailer/>`_. To
 +take advantage of this function it needs to be configured properly.
 +
 +
 +Requirements
 +------------
 +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
 +**SMTP**, **PHP mail**, **Sendmail** and **qmail**.
 +
 +Parameters
 +----------
 +
 +All parameters need to be set in :file:`config/config.php`
 +
 +SMTP
 +~~~~
 +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. **:425**. If this value is not given the default
 +port 25/tcp will be used unless you will change that by modifying the
 +**mail_smtpport** parameter. Multiple server can be entered separated by
 +semicolon:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpmode"     => "smtp",
 +    "mail_smtphost"     => "smtp-1.server.dom;smtp-2.server.dom:425",
 +    "mail_smtpport"     => 25,
 +
 +or
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpmode"     => "smtp",
 +    "mail_smtphost"     => "smtp.server.dom",
 +    "mail_smtpport"     => 425,
 +
 +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:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtptimeout"  => 30,
 +
- If the SMTP server accepts unsecure connections, the default setting can be
++If the SMTP server accepts insecure connections, the default setting can be
 +used:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +  "mail_smtpsecure"   => '',
 +
 +If the SMTP server only accepts secure connections you can choose between
 +the following two variants:
 +
 +SSL
 +^^^
 +A secure connection will be initiated using the outdated SMTPS protocol
 +which uses the port 465/tcp:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtphost"     => "smtp.server.dom:465",
 +    "mail_smtpsecure"   => 'ssl',
 +
 +TLS
 +^^^
 +A secure connection will be initiated using the STARTTLS protocol which
 +uses the default port 25/tcp:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtphost"     => "smtp.server.dom",
 +    "mail_smtpsecure"   => 'tls',
 +
 +And finally it is necessary to configure if the SMTP server requires
 +authentication, if not, the default values can be taken as it.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpauth"     => false,
 +    "mail_smtpname"     => "",
 +    "mail_smtppassword" => "",
 +
 +If SMTP authentication is required you have to set the required username
 +and password and can optionally choose between the authentication types
 +**LOGIN** (default) or **PLAIN**.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpauth"     => true,
 +    "mail_smtpauthtype" => "LOGIN",
 +    "mail_smtpname"     => "username",
 +    "mail_smtppassword" => "password",
 +
 +PHP mail
 +~~~~~~~~
 +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 **php.ini** file. (On \*nix
 +systems this will most likely be Sendmail.) ownCloud should be able to send
 +email out of the box.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpmode"     => "php",
 +    "mail_smtphost"     => "127.0.0.1",
 +    "mail_smtpport"     => 25,
 +    "mail_smtptimeout"  => 10,
 +    "mail_smtpsecure"   => "",
 +    "mail_smtpauth"     => false,
 +    "mail_smtpauthtype" => "LOGIN",
 +    "mail_smtpname"     => "",
 +    "mail_smtppassword" => "",
 +
 +Sendmail
 +~~~~~~~~
 +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 (**/usr/sbin/sendmail**) is ususally part of that system.
++The sendmail binary (**/usr/sbin/sendmail**) is usually part of that system.
 +ownCloud should be able to send email out of the box.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpmode"     => "sendmail",
 +    "mail_smtphost"     => "127.0.0.1",
 +    "mail_smtpport"     => 25,
 +    "mail_smtptimeout"  => 10,
 +    "mail_smtpsecure"   => "",
 +    "mail_smtpauth"     => false,
 +    "mail_smtpauthtype" => "LOGIN",
 +    "mail_smtpname"     => "",
 +    "mail_smtppassword" => "",
 +
 +qmail
 +~~~~~
 +
 +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
 +(**/var/qmail/bin/sendmail**) will then be used to send email. ownCloud should
 +be able to send email out of the box.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpmode"     => "qmail",
 +    "mail_smtphost"     => "127.0.0.1",
 +    "mail_smtpport"     => 25,
 +    "mail_smtptimeout"  => 10,
 +    "mail_smtpsecure"   => "",
 +    "mail_smtpauth"     => false,
 +    "mail_smtpauthtype" => "LOGIN",
 +    "mail_smtpname"     => "",
 +    "mail_smtppassword" => "",
 +
 +Send a Test Email
 +-----------------
 +
 +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.
 +
 +First make sure that you are using a full qualified domain and not an ip address in the ownCloud URL, like::
 +
 +  http://my-owncloud-server.domain.dom/owncloud/
 +
 +The password reset function fetches the domain name from that URL to build the
 +email sender address, e.g.::
 +
 +  john at domain.dom
 +
 +Next you need to enter your login and an *invalid* password. As soon as you
- press the login button the login mask reappears and a **I’ve forgotten my password** link will be shown above the login field. Click on that link, re-enter your login and press the **Reset password** button - that's all.
++press the login button the login mask reappears and a **I’ve forgotten my password** link will be shown above the login
++field. Click on that link, re-enter your login and press the **Reset password** button - that's all.
 +
 +Trouble shooting
 +----------------
 +
 +My web domain is different from my mail domain?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +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:
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_domain" => "example.com",
 +
 +Now every mail send by ownCloud e.g. password reset email, will have the domain part of the sender address look like::
 +  
 +  no-reply at example.com
 +
 +How can I find out if a SMTP server is reachable?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Use the ping command to check the server availability::
 +
 +  ping smtp.server.dom
 +
 +::
 +
 +  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
 +
 +How can I find out if the SMTP server is listening on a specific tcp port?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +A SMTP server is usually listening on port **25/tcp** (smtp) and/or in
 +rare circumstances is also listening on the outdated port **465/tcp** (smtps).
 +You can use the telnet command to check if a port is available::
 +
 +  telnet smtp.domain.dom 25
 +
 +::
 +
 +  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
 +
 +How can I find out if a SMTP server supports the outdated SMTPS protocol?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +A good indication that a SMTP server supports the SMTPS protocol is that it
 +is listening on port **465/tcp**. How this can be checked has been described
 +previously.
 +
 +How can I find out if a SMTP server supports the TLS protocol?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +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::
 +
 +  telnet smtp.domain.dom 25
 +
 +::
 +
 +  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.
 +
 +How can I find out which authentication types/methods a SMTP server supports?
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +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::
 +
 +  telnet smtp.domain.dom 25
 +
 +::
 +
 +  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.
 +
 +
 +Enable Debug Mode
 +~~~~~~~~~~~~~~~~~
 +
 +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 **Reset password** button, as described before, a
 +lot of **SMTP -> get_lines(): ...** messages will be written on the
 +screen.
 +
 +.. code-block:: php
 +
 +  <?php
 +
 +    "mail_smtpdebug" => true;
 +
diff --cc core/doc/admin/_sources/configuration/configuring_big_file_upload.txt
index 709cc12,0000000..05e5d03
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/configuring_big_file_upload.txt
+++ b/core/doc/admin/_sources/configuration/configuring_big_file_upload.txt
@@@ -1,44 -1,0 +1,45 @@@
 +Uploading big files > 512MB (as set by default)
 +===============================================
 +It's usefull to know limiting factors, that make it impossible to exceed the values given by the ownCloud-system:
 +
 +Not outnumberable upload limits:
 +--------------------------------
 +* < 2GB on 32Bit OS-architecture
 +* < 2GB with Server Version 4.5 or older
 +* < 2GB with IE6 - IE8
 +* < 4GB with IE9 - IE10
 +
 +Other recommendable preconditions:
 +----------------------------------
 +
 +* Make sure, that the latest version of php (at least 5.4.9) is installed
- * Disable user quota. This means: set the user quota of the account, you are currently logged in, to "unlimited". This is important, because you possibly could not watch otherwise, whether the desired changes take effect.
++* Disable user quota. This means: set the user quota of the account, you are currently logged in, to "unlimited".
++This is important, because you possibly could not watch otherwise, whether the desired changes take effect.
 +
 +Enabling uploading big files
 +============================
- Note: The order of the following steps is important! If you swap steps or substeps described below, the settings may fail.
++Note: The order of the following steps is important! If you swap steps described below, the settings may fail.
 +
 +**Go to the admin section in the ownCloud-WebUI and do the following:**
 +
 +* Under "File handling" set the Maximum upload size to the desired value (e.g. 16GB)
- * Klick the "save"-Button
++* Click the "save"-Button
 +
 +**Open the php.ini - file**
 +
- * Under Debian or Suse and their derivates this file lies at /etc/php5/apache2/php.ini
++* Under Debian or SUSE and their derivatives this file lies at /etc/php5/apache2/php.ini
 +* On Windows, you can find this file within C:/Program Files (x86)/PHP/PHP.ini 
 +
 +**Do the following:**
 +
- * Set the following three parameters inside th php.ini to the same value as choosen inside the admin-section one step before:
++* Set the following three parameters inside th php.ini to the same value as chosen inside the admin-section one step before:
 +* upload_max_filesize = 16G   (e.g., to stay consistent with the example value above)
 +* post_max_size = 16G   (e.g., to stay consistent with the example value above)
 +* output_buffering = 16384	(e.g., to stay consistent with the example value above)
 +
 +whereas the "output_buffering" has to be given in MegaBytes but as a plain figure (without size-units as 'M' or 'G')
 +
- These client configurations have been prooven by test up to filesizes of 16 GigaBytes:
++These client configurations have been proven by testing maximum file sizes of 16 GB:
 +
 +* Linux 32 Bit: Ubuntu, Firefox => 16GB 
 +* Windows 8  64 Bit: Google Chrome => 8GB
diff --cc core/doc/admin/_sources/configuration/custom_mount_config_gui.txt
index d3b7a9c,0000000..661f88f
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/custom_mount_config_gui.txt
+++ b/core/doc/admin/_sources/configuration/custom_mount_config_gui.txt
@@@ -1,64 -1,0 +1,66 @@@
 +Custom Mount Configuration Web-GUI
 +==================================
 +
 +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 *Settings* -> *Admin* or *Personal*. 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.
 +
 +.. figure:: ../images/custom_mount_config_gui-1.png
 +
 +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:
 +
 +.. figure:: ../images/custom_mount_config_gui-2.png
 +
 +-  Local file system (mount local storage that is outside ownCloud's data
 +   directory)
 +-  FTP (or FTPS)
 +-  SFTP
 +-  SMB
 +-  WebDAV
 +-  `Amazon S3`_
 +-  `Dropbox`_
 +-  `Google Drive`_
 +-  `OpenStack Swift`_
 +
 +Please keep in mind, that users are not allowed to mount local file storage for
 +security purposes.
 +
 +.. figure:: ../images/custom_mount_config_gui-3.png
 +.. figure:: ../images/custom_mount_config_gui-4.png
 +
 +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:
 +
 +-  **host**: the hostname of the ftp server
 +-  **user**: the username used to login to the ftp server
 +-  **password**: the password to login to the ftp server
 +-  **secure**: whether to use ftps:// (FTP over TLS) to connect to the ftp
 +   server instead of ftp:// (optional, defaults to false)
 +-  **root**: the name of the folder inside the ftp server to mount (optional,
 +   defaults to ‘/’)
 +
 +.. _Amazon S3: http://aws.amazon.com/de/s3/
 +.. _Dropbox: https://www.dropbox.com/
 +.. _Google Drive: https://drive.google.com/start
 +.. _OpenStack Swift: http://openstack.org/projects/storage/
 +
 +Dropbox
 +~~~~~~~
- 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 *Full Dropbox* access level. Copy the app key and app secret and paste them into the corresponding fields for the Dropbox storage.
++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 *Full Dropbox* access
++level. Copy the app key and app secret and paste them into the corresponding fields for the Dropbox storage.
 +
 +Click the *Grant access* button and you will be redirected to a Dropbox website to give ownCloud permission to access your account.
 +
 +
 +Google Drive
 +~~~~~~~~~~~~
 +For a detailed step-by-step guide read `User Manual <../../user_manual/external_storage/google_drive.html>`_
diff --cc core/doc/admin/_sources/configuration/xsendfile.txt
index 5e4aa89,0000000..fd5e75d
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/xsendfile.txt
+++ b/core/doc/admin/_sources/configuration/xsendfile.txt
@@@ -1,116 -1,0 +1,120 @@@
 +Serving static files via web server
 +===================================
 +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).
++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).
 +
- .. note :: This feature can currently only be activated for local files, i.e. files inside the **data/** directory and local mounts. Controlled file serving **does not work for generated zip files**. This is due to how temporary files are created.
++.. note :: This feature can currently only be activated for local files, i.e. files inside the **data/** directory
++and local mounts. Controlled file serving **does not work for generated zip files**. This is due to how temporary files are created.
 +
 +Apache2 (X-Sendfile)
 +--------------------
 +It is possible to let Apache handle static file serving via `mod_xsendfile <https://tn123.org/mod_xsendfile/>`_.
 +
 +Installation
 +~~~~~~~~~~~~
 +On Debian and Ubuntu systems use:
 +
 +.. code-block:: bash
 +
 +   apt-get install libapache2-mod-xsendfile
 +
 +
 +Configuration
 +~~~~~~~~~~~~~
 +Configuration of mod_xsendfile for ownCloud depends on its version.
 +For versions below 0.10 (Debian squeeze ships with 0.9)
 +
 +.. code-block:: xml
 +
 +    <Directory /var/www/owncloud>
 +        ...
 +        SetEnv MOD_X_SENDFILE_ENABLED 1
 +        XSendFile On
 +        XSendFileAllowAbove On
 +    </Directory>
 +
 +For versions >=0.10 (e.g. Ubuntu 12.10)
 +
 +.. code-block:: xml
 +
 +    <Directory /var/www/owncloud>
 +        ...
 +        SetEnv MOD_X_SENDFILE_ENABLED 1
 +        XSendFile On
 +        XSendFilePath /tmp/oc-noclean
 +        XSendFilePath /home/valerio
 +    </Directory>
 +
 +* **SetEnv MOD_X_SENDFILE_ENABLED**: tells ownCloud scripts that they should add the X-Sendfile header when serving files
 +* **XSendFile**: enables web server handling of X-Sendfile headers (and therefore file serving) for the specified Directory
 +* **XSendFileAllowAbove (<0.10)**: 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
- * **XSendFilePath (>=0.10)**: 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 *oc-noclean* 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 aswell. For a more in-dept documentation of this directive refer to mod_xsendfile website linked above
++* **XSendFilePath (>=0.10)**: 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 *oc-noclean* 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 above
 +
 +
 +LigHTTPd (X-Sendfile2)
 +----------------------
- 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.
++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.
 +
 +Installation
 +~~~~~~~~~~~~
 +X-Sendfile and X-Sendfile2 are supported by default in LigHTTPd and no additional operation should be needed to install it.
 +
 +Configuration
 +~~~~~~~~~~~~~
 +Your server configuration should include the following statements::
 +
 +      fastcgi.server          = ( ".php" => ((
 +         ...
 +         "allow-x-send-file" => "enable",
 +         "bin-environment" => (
 +            "MOD_X_SENDFILE2_ENABLED" => "1",
 +         ),
 +      )))
 +
 +* **allow-x-send-file**: enables LigHTTPd to use X-Sendfile and X-Sendfile2 headers to serve files
 +* **bin-environment**: 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
 +
 +
 +Nginx (X-Accel-Redirect)
 +------------------------
- Nginx supports handling of static files differently from Apache. Documentation can be found in the Nginx Wiki section `Mod X-Sendfile <http://wiki.nginx.org/XSendfile>`_ and section `X-Accell <http://wiki.nginx.org/X-accel>`_. The header used by Nginx is X-Accel-Redirect.
++Nginx supports handling of static files differently from Apache. Documentation can be found in the Nginx Wiki
++section `Mod X-Sendfile <http://wiki.nginx.org/XSendfile>`_ and section `X-Accell <http://wiki.nginx.org/X-accel>`_.
++The header used by Nginx is X-Accel-Redirect.
 +
 +Installation
 +~~~~~~~~~~~~
 +X-Accel-Redirect is supported by default in Nginx and no additional operation should be needed to install it.
 +
 +Configuration
 +~~~~~~~~~~~~~
 +Configuration is similar to Apache::
 +
 +    location ~ \.php$ {
 +        ...
 +        fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
 +    }
 +
 +    location ~ ^/home/valerio/(owncloud/)?data {
 +        internal;
 +        root /;
 +    }
 +
 +    location ~ ^/tmp/oc-noclean/.+$ {
 +        internal;
 +        root /;
 +    }
 +
 +
 +* **fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED:** tells ownCloud scripts that they should add the X-Accel-Redirect header when serving files
 +
 +* **internal location:** each directory that contains local user data should correspond to an internal location. In the example uses the following directories:
 +
 +  * **/home/valerio/owncloud/data**: ownCloud data directory
 +  * **/home/valerio/data**: a local mount
 +  * **/tmp/oc-noclean**: PHP temporary directory concatenated with *oc-noclean*. Temporary zip files will be created inside this directory when using X-Accel-Redirect
 +
 +How to check if it's working?
 +-----------------------------
 +You are still able to download stuff via the web interface and single, local file downloads can be paused and resumed.
diff --cc core/doc/admin/_sources/index.txt
index 2601037,0000000..0207aa2
mode 100644,000000..100644
--- a/core/doc/admin/_sources/index.txt
+++ b/core/doc/admin/_sources/index.txt
@@@ -1,84 -1,0 +1,80 @@@
 +===================
 +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.
++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.
++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_appliance`
- * :doc:`installation/installation_linux`
- * :doc:`installation/installation_macos`
++* :doc:`installation/installation_linux` (recommended)
 +* :doc:`installation/installation_windows`
- * :doc:`installation/installation_ucs`
 +* :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 Webserver configuration.
++This chapter covers ownCloud and web server configuration.
 +
- * :doc:`configuration/configuration_3rdparty`
- * :doc:`configuration/configuration_apps`
- * :doc:`configuration/configuration_automation`
 +* :doc:`configuration/configuration_database`
- * :doc:`configuration/configuration_knowledgebase`
- * :doc:`configuration/configuration_logging`
++* :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/custom_mount_config`
- * :doc:`configuration/custom_mount_config_gui` 	
- * :doc:`configuration/custom_user_backend`
- * :doc:`configuration/auth_ldap`
 +* :doc:`configuration/xsendfile`
- * :doc:`configuration/background_jobs`
++* :doc:`configuration/configuration_3rdparty`
++* :doc:`configuration/custom_user_backend`
 +* :doc:`configuration/configuration_custom_clients`
- * :doc:`configuration/configuration_encryption`
- * :doc:`configuration/configuration_language`
 +* :doc:`configuration/configuration_maintenance`
- * :doc:`configuration/configuring_big_file_upload`
++* :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`
 +
 +
- Indices and tables
- ==================
- 
- * :ref:`genindex`
diff --cc core/doc/admin/_sources/installation/installation_appliance.txt
index ef6be08,0000000..b1996f7
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_appliance.txt
+++ b/core/doc/admin/_sources/installation/installation_appliance.txt
@@@ -1,34 -1,0 +1,33 @@@
 +Appliances
 +----------
 +
 +If you are looking for virtual machine images, check the Software Appliances
 +section.  The Hardware Appliances section is of interest for people seeking to
 +run ownCloud on appliance hardware (i.e. NAS filers, routers, etc.).
 +
 +
 +Software Appliances
 +~~~~~~~~~~~~~~~~~~~
 +
 +There are number of pre-made virtual machine-based appliances:
 +
 +-  `SUSE Studio, ownCloud on openSuSE`_, runnable directly from an USB stick.
- -  `Ubuntu charm, ownCloud 4.5`_
- -  `PCLinuxOS based appliance`_
- -  `Fedora based appliance`_
++-  `Ubuntu charm, ownCloud`_
++
 +
 +ownCloud on Hardware Appliances
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +These are tutorials provided by the user communities of the respective appliances:
 +
 +-  `QNAP Guide`_ for QNAP NAS appliances
 +-  `OpenWrt Guide`_ for the popular embedded distribution for routers and NAS devices.
++-  `Synology Package`_ for Synology NAS products
 +
- .. todo:: Tutorials for running owncloud on Synology and Dreamplug.
++.. todo:: Tutorials for running ownCloud on Dreamplug.
 +
 +.. _OpenWrt Guide: http://wiki.openwrt.org/doc/howto/owncloud
 +.. _SUSE Studio, ownCloud on openSuSE: http://susestudio.com/a/TadMax/owncloud-in-a-box
- .. _Ubuntu charm, ownCloud 4.5: http://jujucharms.com/charms/precise/owncloud
- .. _PCLinuxOS based appliance: http://www.pclinuxos.com/forum/index.php/topic,100875.0.html
- .. _Fedora based appliance: http://echorand.me/2012/02/26/owncloud-boxgrinder-pagekite-owncloud-appliance/
++.. _Ubuntu charm, ownCloud: http://jujucharms.com/charms/precise/owncloud
 +.. _QNAP Guide: http://wiki.qnap.com/wiki/Category:OwnCloud
++.. _Synology Package: http://www.cphub.net/index.php?id=40&pid=213
diff --cc core/doc/admin/_sources/installation/installation_linux.txt
index d4478a3,0000000..4a3b95f
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_linux.txt
+++ b/core/doc/admin/_sources/installation/installation_linux.txt
@@@ -1,123 -1,0 +1,28 @@@
 +Linux Distributions
 +-------------------
 +
- This section describes the installation process for different
- distributions. If there are pre-made packages from ownCloud,
- you are encouraged to prefer those over the vendor-provided
- ones, since they usually are more up-to-date.
++Supported Distribution Packages
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
- Archlinux
- ~~~~~~~~~
- There are two AUR packages for ownCloud:
++Ready-to-use packages are available at `openSUSE Build Service`_ for a variety of Linux distributions.
 +
- -  `stable version`_
- -  `development version`_
++If your distribution is not listed please follow :doc:`installation_source`.
 +
- .. _stable version: http://aur.archlinux.org/packages.php?ID=47585
- .. _development version: http://aur.archlinux.org/packages.php?ID=38767
- 
- openSUSE
- ~~~~~~~~
- 
- .. note:: ready-to-use SLES and openSUSE RPM packages are available in the openSUSE Build Service `ownCloud repository`_.
- 
- #. Copy ownCloud to Apache's server directory : **/srv/www/htdocs**
- #. Give the web server the necessary permissions:
- 
- ::
- 
-   sudo chown -R wwwrun owncloud
- 
- 3. Open the folder in a browser and complete the setup wizard
- 
- If have followed the steps above and want to try it out, run this
- command in a terminal to start Apache if it’s not already running::
- 
-   sudo /etc/init.d/apache2 start
- 
- Go to http://servername/owncloud and walk through the setup.
- 
- Fedora
- ~~~~~~
- 
- .. note:: ready-to-use RPM packages are available in the openSUSE Build Service `ownCloud repository`_.
- 
- Make sure `SELinux is disabled <https://fedoraproject.org/wiki/SELinux_FAQ#How_do_I_enable_or_disable_SELinux_.3F>`_ or else the installation process will fail with the following message::
- 
-   Config file (config/config.php) is not writable for the webserver
- 
- Configure Apache:
- 
- #. If you already have a website running from Document Root but would still like to install OwnCloud you can use a Name-based virtual host entry and subdomain.
- #. Edit your DNS record following this example: **point owncloud.foo.com > ip.ip.ip.ip**
++.. _openSUSE Build Service: http://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud
 +
 +
- CentOS 5 & 6
- ~~~~~~~~~~~~
++Additional installation guides and notes
++****************************************
 +
- .. note:: ready-to-use CentOS RPM packages are available
-           in the openSUSE Build Service `ownCloud repository`_.
++**Fedora:** Make sure `SELinux is disabled <https://fedoraproject.org/wiki/SELinux_FAQ#How_do_I_enable_or_disable_SELinux_.3F>`_
++or else the installation process might fail.
 +
- 1. Create a new file in **/etc/httpd/conf/** and call it **owncloud.conf**.
- 2. You can use the following as an example:
++**Archlinux:** There are two AUR packages for ownCloud: `stable version`_ and `development version`_.
 +
- .. code-block:: xml
- 
-     <IfModule mod_alias.c>
-     Alias /owncloud /var/www/owncloud/
-     </IfModule>
-     <Directory /var/www/owncloud/>
-        Options None
-        Order allow,deny
-        allow from all
-     </Directory>
-     <VirtualHost *:80>
-         ServerAdmin foo at foofarm.com
-         DocumentRoot /var/www/html/owncloud
-         ServerName owncloud.foo.com
-         ErrorLog logs/owncloud.foo.info-error_log
-         CustomLog logs/owncloud.foo.info-access_log common
- 
-     </VirtualHost>
- 
- 3. Now edit your httpd.conf file which is usually located in :file:`/etc/httpd/conf/httpd.conf`
- 4. Add the following to the bottom
- 
- ::
- 
-   Include /etc/httpd/conf/owncloud.conf
- 
- 5. Restart apache and now when you point your browser to http://owncloud.foo.com it should properly load without affecting http://foo.com
- 
- Gentoo
- ~~~~~~
- Set up a standard web server (see instructions above). Then change permissions::
- 
-   chown -R apache:apache owncloud
- 
- Allow .htaccess, modify :file:`/etc/apache2/vhosts.d/00_default_vhost.conf` and
- make sure it contains the following section
- 
- .. code-block:: xml
- 
-     <Directory /var/www/localhost/htdocs/owncloud>
-         Options Indexes FollowSymLinks MultiViews
-         AllowOverride All
-         Order allow,deny
-         allow from all
-     </Directory>
- 
- PCLinuxOS
- ~~~~~~~~~
- 
- Follow the Tutorial `ownCloud, installation and setup`_ on the PCLinuxOS web site.
- 
- Ubuntu / Debian
- ~~~~~~~~~~~~~~~
- Go to the `linux package sources`_ page and execute the steps as described there for your distribution.
++.. _stable version: http://aur.archlinux.org/packages.php?ID=47585
++.. _development version: http://aur.archlinux.org/packages.php?ID=38767
 +
 +
++**PCLinuxOS:** Follow the Tutorial `ownCloud, installation and setup`_ on the PCLinuxOS web site.
 +
- .. _ownCloud repository: http://software.opensuse.org/search?q=owncloud&baseproject=ALL&lang=de
 +.. _ownCloud, installation and setup: http://pclinuxoshelp.com/index.php/Owncloud,_installation_and_setup
- .. _linux package sources: http://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud
diff --cc core/doc/admin/_sources/installation/installation_macos.txt
index 8d2afce,0000000..42cdae5
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_macos.txt
+++ b/core/doc/admin/_sources/installation/installation_macos.txt
@@@ -1,7 -1,0 +1,7 @@@
 +Mac OS X
 +--------
 +
- .. note:: Due to an issue_ with Mac OS Unicode support, installing ownCloud Server 5.0 on
++.. note:: Due to an issue_ with Mac OS Unicode support, installing ownCloud Server 6.0 on
 +          Mac OS is currently not supported.
 +
 +.. _issue: https://github.com/owncloud/core/issues/2377
diff --cc core/doc/admin/_sources/installation/installation_others.txt
index 2bea011,0000000..135fb00
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_others.txt
+++ b/core/doc/admin/_sources/installation/installation_others.txt
@@@ -1,180 -1,0 +1,16 @@@
- Other Web Servers
- =================
- The most popular server choice for ownCloud is Apache, which is why
- it is also the combinations tested best. However, it is also possible
- to run ownCloud on other web servers. This section does not cover
- Microsoft Internet Information Services (IIS), it is covered
- in the :doc:`installation_windows` section.
- 
- 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
- 
-     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;'
-             }
- 
-             # 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
-     }
 +
 +
 +PageKite Configuration
- ----------------------
++**********************
 +
 +You can use this `PageKite how to`_ to make your local ownCloud accessible from the
 +internet using PageKite.
 +
 +Open Wrt
- --------
++********
++
 +Here you can find a `tutorial for open Wrt`_
 +
- .. _github gist for further instructions: https://gist.github.com/2200407
 +.. _PageKite how to: https://pagekite.net/wiki/Howto/GNULinux/OwnCloud/
 +
- .. _`http://wiki.nginx.org/HttpSslModule`: http://wiki.nginx.org/HttpSslModule
- .. _tuorial for open Wrt: http://wiki.openwrt.org/doc/howto/owncloud
++.. _tutorial for open Wrt: http://wiki.openwrt.org/doc/howto/owncloud
diff --cc core/doc/admin/_sources/installation/installation_source.txt
index 61a9354,0000000..5fe4fb0
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_source.txt
+++ b/core/doc/admin/_sources/installation/installation_source.txt
@@@ -1,132 -1,0 +1,334 @@@
 +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 webserver must have the following installed:
- 
- * php5 (>= 5.3)
- * php5-gd
- * php-xml-parser
++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 GD
++* PHP module zlib
++* PHP module iconv
++* PHP module SimpleXML
 +
 +And as *optional* dependencies:
 +
- * php5-intl
- * php5-sqlite (>= 3)
- * php5-mysql
- * php5-pgsql (or php-pgsql depending on your distro)
- * smbclient
- * php5-curl
++* PHP module intl
++* PHP module mcrypt
++* PHP module bz2
++* PHP module openssl
++* PHP module sqlite (>= 3)
++* PHP module mysql
++* PHP module pgsql
++* PHP module exif (for image rotation in pictures app)
++* PHP module ldap (for ldap integration)
++* PHP module curl
 +* curl
 +* libcurl3
 +
- You have to install at least one of php5-sqlite, php5-pgsql or php5-mysql, depending
- on which of the three database systems (SQLite, PostgreSQL or MySQL) you want to use
- and activate its PDO module in the **php.ini**.
++For performance increase (*optional* / select one of the following):
 +
- smbclient is only used if you want to mount SMB shares to your ownCloud.
- The curl packages are needed for some apps (e.g. http user authentication)
++* PHP module apc
++* PHP module apcu
++* PHP module xcache
 +
++For preview generation (*optional*):
 +
- Commands for Ubuntu and Debian (run as root):
++* PHP module imagick
++* avconv or ffmpeg
++* OpenOffice or libreOffice
 +
- ::
++For external storage (*optional*):
++
++* smbclient (for SMB storage)
++* php5-ftp (for FTP storage)
 +
-   apt-get install apache2 php5 php5-gd php-xml-parser php5-intl
-   apt-get install php5-sqlite php5-mysql php5-pgsql smbclient curl libcurl3 php5-curl
++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
 +
- .. todo:: Document other distributions.
 +
- You don’t need any WebDAV support of your webserver (i.e. apache’s mod_webdav)
++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 webserver
++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 Webserver
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++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 webserver must own the apps/, data/ and config/ directories
++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 distros like Ubuntu, Debian or Linux Mint and Gentoo use::
++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.
 +
- Enable .htaccess and mod_rewrite if Running Apache
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++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>
++
 +
- If you are running the apache webserver, it is recommended that you enable
- **.htaccess** files as ownCloud uses them to enhance security and allows you to
- use webfinger. To enable .htaccess files you need to ensure that
- **AllowOverride** is set to **All** in the **Directory /var/www/** section of
- your virtual host file. This is usually in :file:`/etc/apache2/sites-enabled/000-default`.  If your distro supports **a2enmod** run the following commands::
++Enable mod_rewrite::
 +
 +	a2enmod rewrite
 +
- In distros that do not come with a2enmod the :file:`/etc/httpd/httpd.conf` needs to be changed to enable **mod_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 distros using updstart) use::
++Then restart apache. For Ubuntu systems (or distributions using upstartd) use::
 +
 +	service apache2 restart
 +
- For systemd systems (fedora, ArchLinux, Fedora, OpenSuse) use::
++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
++
++    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;'
++            }
++
++            # 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 webserver, please set the data directory to a location outside of the document root. See the advanced
++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.
 +
- Test your Installation
- ~~~~~~~~~~~~~~~~~~~~~~
- 
- Login and start using ownCloud. Check your web servers errror log. If it shows
- error, you might have missed a dependency or hit a bug with your particular
- configuration.
- 
- If you plan on using the Webfinger app and
- your ownCloud installation is not in the webroot then you’ll have to manually
- link :file:`/var/www/.well-known` to :file:`/path/to/your/owncloud/.well-known`.
 +
 +.. _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/installation/installation_ucs.txt
index 0923c14,0000000..06564f7
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_ucs.txt
+++ b/core/doc/admin/_sources/installation/installation_ucs.txt
@@@ -1,169 -1,0 +1,169 @@@
 +Univention Corporate Server
 +---------------------------
 +
 +Subscribers to the ownCloud Enterprise edition can also integrate with
 +:abbr:`UCS (Univention Corporate Server)`.
 +
 +.. _preconfig:
 +
 +Pre configuration
 +^^^^^^^^^^^^^^^^^
 +
 +ownCloud makes use of the UCR, the Univention Configuration Registry. The values
 +are being read during installation, most of them can be changed later, too.
 +Changes done directly via ownCloud are not taken over to UCR. We think we found
 +sane defaults, nevertheless you might have your own requirements. The
 +installation script will listen to the UCR keys listed below. In case you want
 +to override any default setting, simply add the key in question to the UCR and
 +assign your required value.
 +
 +.. tabularcolumns:: |l|p{5cm}|p{5cm}|l|
 +.. cssclass:: longtable
 +.. csv-table::
 +  :header: Key, Default, Description, Introduced
 +  :widths: 20, 30, 30, 20
 +
 +  "owncloud/directory/data", "/var/lib/owncloud", "Specifies where the file storage will be placed", "2012.0.1"
 +  "owncloud/db/name",   "owncloud",	"Name of the MySQL database. ownCloud will create an own user for it.",	2012.0.1
 +  "owncloud/user/quota",	"(empty)",	"The default quota, when a user is being added. Assign values in human readable strings, e.g. “2 GB”. Unlimited if empty.",	2012.0.1
 +  "owncloud/user/enabled",	0,	"Wether a new user is allowed to use ownCloud by default.",	2012.0.1
 +  "owncloud/group/enabled",	"0",	"Wether a new group is allowed to be used in ownCloud by default.",	2012.4.0.4
 +  "owncloud/ldap/base/users",	"cn=users,$ldap_base",	"The users-subtree in the LDAP directory. If left blank it will fall back to the LDAP base.",	2012.4.0.4
 +  "owncloud/ldap/base/groups",	"cn=groups,$ldap_base",	"The groups-subtree in the LDAP directory. If left blank it will fall back to the LDAP base.",	2012.4.0.4
 +  "owncloud/ldap/groupMemberAssoc",	"uniqueMember",	"The LDAP attribute showing the group-member relationship. Possible values: uniqueMember, memberUid and member",	2012.4.0.4
 +  "owncloud/ldap/tls",	1,	"Whether to talk to the LDAP server via TLS.",	2012.0.1
 +  "owncloud/ldap/disableMainServer",	0,	"Deactivates the (first) LDAP Configuration",	5.0.9
 +  "owncloud/ldap/cacheTTL",	600,	"Lifetime of the ownCloud LDAP Cache in seconds",	5.0.9
 +  "owncloud/ldap/UUIDAttribute",	"(empty)",	"Attribute that provides a unique value for each user and group entry. Empty value for autodetection.",	5.0.9
 +  "owncloud/ldap/loginFilter",	"(&(\|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0)) (!(uid=*$)) (&(uid=%uid) (ownCloudEnabled=1)))",	"The LDAP filter that shall be used when a user tries to log in.",	2012.0.1
 +  "owncloud/ldap/userlistFilter",	"(&(\|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0))(!(uid=*$)) (&(ownCloudEnabled=1)))",	"The LDAP filter that shall be used when the user list is being retrieved (e.g. for sharing)",	2012.0.1
 +  "owncloud/ldap/groupFilter",	"(&(objectClass=posixGroup) (ownCloudEnabled=1))",	"The LDAP filter that shall be used when the group list is being retrieved (e.g. for sharing)",	2012.4.0.4
 +  "owncloud/ldap/internalNameAttribute",	"uid",	"Attribute that should be used to create the user's owncloud internal name",	5.0.9
 +  "owncloud/ldap/displayName",	"uid", "The LDAP attribute that should be displayed as name in ownCloud",	2012.0.1
 +  "owncloud/ldap/user/searchAttributes",	"uid,givenName,sn,description,employeeNumber,mailPrimaryAddress",	"Attributes taken into consideration when searching for users (comma separated)",	5.0.9
 +  "owncloud/ldap/user/quotaAttribute",	"ownCloudQuota",	"Name of the quota attribute. The default attribute is provided by owncloud-schema.",	5.0.9
 +  "owncloud/ldap/user/homeAttribute",	"(empty)",	"Attribute that should be used to create the user's owncloud internal home folder",	5.0.9
 +  "owncloud/ldap/group/displayName",	"cn",	"The LDAP attribute that should be used as groupname in ownCloud",	2012.4.0.4
 +  "owncloud/ldap/group/searchAttributes",	"cn,description, mailPrimaryAddress",	"Attributes taken into consideration when searching for groups (comma separated)",	5.0.9
 +  "owncloud/join/users/update",	"yes",	"Wether ownCloud LDAP schema should be applied to existing users",	2012.0.1
 +  "owncloud/group/enableDomainUsers",	"1",	"Wether the group “Domain Users” shall be enabled for ownCloud on install",	2012.4.0.4
 +  "owncloud/join/users/filter",	"(&(\|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0)) (!(\|(uid=*$) (uid=owncloudsystemuser) (uid=join-backup) (uid=join-slave))) (!(objectClass=ownCloudUser)))",	"Filters, on which LDAP users the ownCloud schema should be applied to. The default exc [...]
 +  "owncloud/join/groups/filter",	"(empty)",	"Filters which LDAP groups will be en/disabled for ownCloud when running the script /usr/share/owncloud/update-groups.sh",	2012.4.0.4
 +
 +If you want to override the default settings, simply create the key in
 +question in the UCR and assign your required value, for example::
 +
 +  ucr set owncloud/user/enabled=1
 +
 +or via UMC:
 +
 +.. image:: /images/ucsint2.png
 +
 +
 +Installation
 +^^^^^^^^^^^^
 +
 +Now, we are ready to install ownCloud. This can be either done through the UCS
 +App Center (recommended) or by downloading the packages.
 +
 +UCS App Center
 +""""""""""""""
 +
 +Open the Univention Management Console and choose the App Center module. You
 +will see a variety of available applications, including ownCloud.
 +
 +.. image:: /images/ucs-app-center-module.png
 +
 +Click on ownCloud 5 and follow the instructions.
 +
 +.. image:: /images/ucs-app-center-install.png
 +
 +In the UCS App Center, you can also upgrade from ownCloud 4.5 by installing
- ownCloud 5.0. They are provided as seperate apps. It is only possible to have
++ownCloud 5.0. They are provided as separate apps. It is only possible to have
 +one version of ownCloud installed.
 +
 +Manually by download
 +""""""""""""""""""""
 +
 +Download the integration packages `from our website`_ and install them from
 +within your download folder (note: the package owncloud-unsupported is
 +optional) via command line:
 +
 +::
 +
 +	dpkg -i owncloud*.deb
 +
 +ownCloud will be configured to fully work with LDAP.
 +
 +
 +Reinstallation
 +""""""""""""""
 +
 +When ownCloud was installed before and uninstalled via AppCenter or via command
 +line using apt-get remove, ownCloud can be simply installed again. The old
 +configuration will be used again.
 +
 +When an older ownCloud was installed and has been purged (only possible via
 +command line using apt-get purge) the old configuration is gone, but data is
 +left. This blocks an installation. You can either install the old version and
 +upgrade to ownCloud 5 or (re)move the old data. This is done by removing the
 +MySQL database "ownCloud" using the command line:
 +
 +::
 +
 +	mysql -u root -e "DROP DATABASE owncloud" -p`tail /etc/mysql.secret
 +
 +In this case you probably also want to remove the data directory
 +**/var/lib/owncloud** although this is not mandatory.
 +
 +Postconfiguration (optional)
 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 +
 +There is only one local admin user “owncloudadmin”, you can find his password in
- :file:`/etc/owncloudadmin.secret`. Use this account, if you want to change basic
++`/etc/owncloudadmin.secret`. Use this account, if you want to change basic
 +ownCloud settings.
 +
 +In the installation process a virtual host is set up (Apache is required
 +therefore). If you want to modify the settings, edit
 +:file:`/etc/apache2/sites-available/owncloud` and restart the web server. You
 +might want to do it to enable HTTPS connections. Besides that, you can edit the
 +**.htaccess-File in /var/www/owncloud/**. In the latter file there are also the
 +PHP limits for file transfer specified.
 +
 +Using ownCloud
 +^^^^^^^^^^^^^^
 +If you decided to enable every user by default to use ownCloud, simply
 +open up http://myserver.com/owncloud/ and log in with your LDAP
 +credentials and enjoy.
 +
 +If you did not, go to the UMC and enable the users who shall have access
 +(see picture below). Then, login at http://myserver.com/owncloud/ with
 +your LDAP credentials.
 +
 +.. image:: /images/ucsint1.png
 +
 +Updating users can also be done by the script
 +:file:`/usr/share/owncloud/update-users.sh` . It takes the following UCR
 +variables as parameters: **owncloud/user/enabled** for enabling or disabling,
 +**owncloud/user/quota** as the Quota value and **owncloud/join/users/filter** as
 +LDAP filter to select the users to update.
 +
 +Groups 2012.4.0.4
 +"""""""""""""""""
 +
 +Since ownCloud Enterprise 2012.4.0.4 group support is enabled. Groups,
 +that are activated for ownCloud usage, can be used to share files to
 +instead of single users, for example. It is also important to note, that
 +users can only share within groups where they belong to. Groups can be
 +enabled and disabled via UCM as shown in the screen shot below.
 +
 +.. image:: /images/ucsint.png
 +
 +Another way to enable or disable groups is to use the script
 +:file:`/usr/share/owncloud/update-groups.sh`. Currently, it takes an argument
 +which can be 1=enable groups or 0=disable groups. The filter applied is being
 +taken from the UCR variable **owncloud/join/groups/filter**. In case it is
 +empty, a message will be displayed.
 +
 +
 +.. _from our website: https://owncloud.com/download
diff --cc core/doc/admin/_sources/installation/installation_windows.txt
index 72c2115,0000000..5cad510
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_windows.txt
+++ b/core/doc/admin/_sources/installation/installation_windows.txt
@@@ -1,275 -1,0 +1,275 @@@
 +Windows 7 and Windows Server 2008
 +---------------------------------
 +
 +.. note:: You must move the data directory outside of your public root (See
 +          advanced install settings)
 +
 +This section describes how to install ownCloud on Windows with :abbr:`IIS
 +(Internet Information Services)`.
 +
 +It assumes that you have a vanilla, non-IIS enabled Windows
 +machine – Windows 7 or Server 2008. After enabling IIS, the steps are
 +essentially identical for Windows 7 and Windows Server 2008.
 +
 +For installing ownCloud physical access or a remote desktop connection is
 +required. You should leverage MySQL as the backend database for ownCloud. If you
 +do not want to use MySQL, it is possible to use Postgres or SQLite instead.
 +Microsoft SQL Server is not yet support.
 +
 +Enabling SSL is not yet covered by this section.
 +
 +.. note:: If you make your desktop machine or server available outside of your
- LAN, you must maintain it. Monitor the logs, manage the access, apply patches to
- avoid compromising the system at large.
++          LAN, you must maintain it. Monitor the logs, manage the access, apply patches to
++          avoid compromising the system at large.
 +
 +There are 4 primary steps to the installation, and then a 5th step
 +required for configuring everything to allow files larger than the
 +default 2MB.
 +
 +#. Install IIS with CGI support – enable IIS on your Windows machine.
 +#. Install PHP – Grab, download and install PHP.
 +#. Install MySQL – Setup the MySQL server manager and enable ownCloud to create
 +   an instance.
 +#. Install ownCloud – The whole reason we are here!
 +#. Configure upload sizes and timeouts to enable large file uploads – So that
 +   you can upload larger files.
 +
 +Activate IIS with CGI Support
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Windows 7
 +^^^^^^^^^
 +
 +#. Go to :guilabel:`Start --> Control Panel --> Programs`.
 +#. Under Programs and Features, there is link titled :guilabel:`Turn Windows Features on
 +   and Off`. Click on it.
 +#. There is a box labeled Internet Information Services, expand it.
 +#. Expand World Wide Web Services and all the folders underneath.
 +#. Select the folders as illustrated in the picture below to get your IIS
 +   server up and running.
 +
 +.. figure:: ../images/win7features.jpg
 +    :width: 250px
 +    :align: center
 +    :alt: Windows features required for ownCloud on Windows 7
 +    :figclass: align-center
 +
 +    Windows Features required for ownCloud on Windows 7
 +
 +You do not need an FTP server running, so you should tune
 +that feature off for your server. You definitely need the IIS Management
 +Console, as that is the easiest way to start, stop, restart you server,
 +as well as where you change certificate options and manage items like
 +file upload size. You must check the CGI box under Application
 +Development Features, because CGI is how you enable PHP on IIS.
 +
 +You have to turn off WebDAV publishing or the Windows WebDAV
 +conflicts with the ownCloud WebDAV interface. This might already be
 +turned off for you, just make sure it stays that way. The common HTTP
 +features are the features you would expect from a web server.
 +With the selections on this page, IIS will now serve up a web page for you.
 +
 +Restart IIS by going to the IIS manager (:guilabel:`Start --> IIS Manager`).
 +
 +Select your website, and on the far right side is a section titled
 +:guilabel:`Manage Server`. Make sure that the service is started, or click
 +:guilabel:`Start` to start the services selected. Once this is complete, you
 +should be able to go to a web browser and navigate to http://localhost.
 +
 +This should open the standard IIS 7 splash page, which is just a static image
 +that says your web server is running. Assuming you were able to get the
 +splash page, it is safe to say your web server is now up and running.
 +
 +
 +Windows Server 2008
 +^^^^^^^^^^^^^^^^^^^
 +
 +#. Go to :guilabel:`Start --> Control Panel --> Programs`.
 +#. Under Programs and Features, there is link titled
 +   :guilabel:`Turn Windows Features on and Off`. Click on it.
 +#. This will bring up the Server Manager.
 +#. In the server manager, Click on Roles, and then click Add Roles.
 +#. Use the :guilabel:`Add Roles Wizard` to add the web server role.
 +
 +.. figure:: ../images/winserverroles.jpg
 +    :width: 300px
 +    :align: center
 +    :alt: server roles required for owncloud
 +    :figclass: align-center
 +
 +    Server roles required for ownCloud
 +
 +6. Make sure that, at a minimum, the same boxes are checked in this wizard that
 +   are checked in the Windows 7 Section. For example, make sure that the CGI box
 +   is checked under Application Development Features, and that WebDAV Publishing
 +   is turned off. With Remote Desktop Sharing turned on, the detailed role
 +   service list looks like the figure “Role Services”.
 +7. Restart IIS by going to the IIS manager (:guilabel:`Start --> IIS Manager`).
 +8. Select your website, and on the far right side is a section titled Manage
 +   server. Make sure that the service is started, or click “Start” to start the
 +   services selected.
 +
 +9. Once this is complete, you should be able to go to a web browser and type
 +   `localhost`. This should open the standard IIS 7 splash page, which is just a
 +   static image that says your web server is running.Assuming you were able to get
 +   the splash page, it is safe to say your web server is now up and running. The
 +   next part of this “how to” installs PHP on the server.
 +
 +Installing PHP
 +~~~~~~~~~~~~~~
 +
 +This part is also straightforward, but it is necessary to remind you that this
 +is for IIS only.
 +
 +1. Go to the following link and grab the `PHP installer
 +   <http://windows.php.net/download/>`_ for version "VC9 Non Thread Safe" 32 or
 +   64 bit based on your system.
 +
 +.. note:: If you are using Apache, make sure you grab VC6 instead, lower on the page.
 +
 +2. Once through that login, select the location that is closest to you
 +   geographically.
 +3. Run that install wizard once it is downloaded. Read the license agreement,
 +   agree, select an install directory.
 +4. Then select IIS FastCGI as the install server. 
 +5. Take the default selections for the items to install, and click next.
 +   Then click `install`.
 +6. After a few minutes, PHP will be installed. On to MySQL.
 +
 +Installing MySQL
 +~~~~~~~~~~~~~~~~
 +
 +This part installs MySQL on your Windows machine.
 +
 +#. Point your browser to http://dev.mysql.com/downloads/ and download the latest
 +   community edition for your OS – the 32 or 64 bit version. Please download the
 +   **MSI Installer** as it will make life easier.
 +#. Once downloaded, install MySQL (5.5 at the time of writing). Select the
 +   Typical installation.
 +#. When that finishes, check the box to launch the MySQL Instance Configuration
 +   Wizard and click Finish.
 +#. Select a standard configuration, as this will be the only version of MySQL on
 +   this machine.
 +#. Select to install as a windows service, and Check the Launch the MySQL Server
 +   Automatically button.
 +#. Select the modify security settings box on the next page, and enter a
 +   password you will remember. You will need this password when you configure
 +   ownCloud.
 +#. Uncheck **enable** root access from remote machines” for security reasons.
 +#. Click execute, and wait while the instance is created and launched.
 +#. Click Finish when this is all complete.
 +
 +.. You can make some pretty good educated guesses on the type of install needed for ownCloud. %% That's not really useful, clarify!
 +
 +Take particular note of your MySQL password, as the user name **root**
 +and the password you select will be necessary later on in the ownCloud
 +installation. As an aside, this link is an excellent resource for questions on
 +how to configure your MySQL instance, and also to configure PHP to work with
 +MySQL. This, however, is not strictly necessary as much of this is handled when
 +you download ownCloud.
 +
 +More information in this topic can be found in a `tutorial on the IIS web site`_.
 +
 +.. _tutorial on the IIS web site:
 +   http://learn.iis.net/page.aspx/353/install-and-configure-mysql-for-php-applications-on-iis-7-and-above/
 +
 +Installing ownCloud
 +~~~~~~~~~~~~~~~~~~~
 +
 +1. Download the latest version of ownCloud from http://owncloud.org/download.
 +2. It will arrive as a tar.bz2 file, and I recommend something like jZip for a
 +   free utility to unzip it.
 +3. Once you have the ownCloud directory unzipped and saved locally, copy it into
 +   your wwwroot directory (probably **C:\\inetpub\\wwwroot**).
 +
 +.. note:: You cannot install directly into the directory **wwwroot** from jzip,
- as only the administrator can unzip into the **wwwroot** directory. If you save
- it in a different folder, and then move the files into **wwwroot** in windows
- explorer, it works. This will install ownCloud locally in your root web
- directory. You can use a subdirectory called owncloud, or whatever you want –
- the www root, or something else.
++          as only the administrator can unzip into the **wwwroot** directory. If you save
++          it in a different folder, and then move the files into **wwwroot** in windows
++          explorer, it works. This will install ownCloud locally in your root web
++          directory. You can use a subdirectory called owncloud, or whatever you want –
++          the www root, or something else.
 +
 +4. It is now time to give write access to the ownCloud directory to the ownCloud
 +   server: Navigate your windows explorer over to  **inetpub/wwwroot/owncloud** (or
 +   your installation directory if you selected something different).
 +5. Right click and select properties. Click on the security tab, and click the
 +   button “to change permissions, click edit”.
 +6. Select the “users” user from the list, and check the box “write”.
 +7. Apply these settings and close out.
 +8. Now open your browser and go to http://localhost/owncloud (or localhost if it
 +   is installed in the root www directory). This should bring up the ownCloud
 +   configuration page.
 +9. At this page, you enter your desired ownCloud user name and password for the
 +   administrator, and expand the little arrow.
 +10. Select MySQL as the database, and enter your MySQL database user name,
-    password and desired instance name – use the user name and password you setup
-    for MySQL earlier in step 3, and pick any name for the database instance.
++    password and desired instance name – use the user name and password you setup
++    for MySQL earlier in step 3, and pick any name for the database instance.
 +
- .. note:: The owncloud admin password and the MySQL password CANNOT be the same
++.. note:: The ownCloud admin password and the MySQL password CANNOT be the same
 +          in any way.
 +
 +11. Click next, and ownCloud should have you logged in as the admin user, and
 +    you can get started exploring ownCloud, creating other users and more!
 +
 +Ensure Proper HTTP-Verb handling
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +IIS must pass all HTTP and WebDAV verbs to the PHP/CGI handler, and must not try
 +to handle them by itself. If it does, syncing with the Desktop and Mobile
 +Clients will fail. Here is how to ensure your configuration is correct:
 +
 +#. Open IIS Manager7.
 +#. In the `Connections` bar, pick your site below `Sites`, or choose the top
 +   level entry if you want to modify the machine-wide settings.
 +#. Choose the `Handler Mappings` feature click `PHP_via_fastCGI`.
 +#. Choose `Request Restrictions` and find the `Verbs` tab.
 +#. Ensure `All Verbs` is checked.
 +#. Click `OK`.
 +#. Next, choose `Request Filtering` feature from IIS Manager.
 +#. Ensure that all verbs are permitted (or none are forbidden) in the `Verbs`
 +   tab.
 +
 +Also, ensure that you did not enable the WebDAV authoring module, since ownCloud
 +needs to be able to handle WebDAV on the application level.
 +
 +
 +Configuring ownCloud, PHP and IIS for Large File Uploads
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Before going too nuts on ownCloud, it is important to do a couple of
 +configuration changes to make this a useful service for you. You will probably
 +want to increase the **max upload size**, for example. The default upload is
 +set to **2MB**, which is too small for even most MP3 files.
 +
 +To do that, simply go into your **PHP.ini** file, which can be found in your
 +**C:\\Program Files (x86)\\PHP** folder. In here, you will find a **PHP.ini**
 +file. Open this in a text editor, and look for a few key attributes to
 +change:
 +
 ++ **upload_max_filesize** – change this to something good, like 1G, and you
 +  will get to upload much larger files.
 ++ **post_max_size** – also change this size, and make it larger than the max
 +  upload size you chose, like 1G.
 +
 +There are other changes you can make, such as the timeout duration for
 +uploads, but for now you should be all set in the **PHP.ini** file.
 +
 +Now you have to go back to IIS manager and make one last change to enable file
 +uploads on the web server larger than 30MB.
 +
 +1. Go to the start menu, and type **iis manager**.
 +2. Open IIS Manager Select the website you want enable to accept large file
 +   uploads.
 +3. In the main window in the middle double click on the icon **Request
 +   filtering**.
 +4. Once the window is opened you will see a bunch of tabs across the top of the
 +   far right,
 +
 +   Select :guilabel:`Edit Feature Settings` and modify the :guilabel:`Maximum
 +   allowed content length (bytes)`
 +
 +5. In here, you can change this to up to 4.1 GB.
 +
 +.. note:: This entry is in BYTES, not KB.
 +
 +You should now have ownCloud configured and ready for use.
diff --cc core/doc/admin/_sources/maintenance/backup.txt
index 2091f76,0000000..674e243
mode 100644,000000..100644
--- a/core/doc/admin/_sources/maintenance/backup.txt
+++ b/core/doc/admin/_sources/maintenance/backup.txt
@@@ -1,37 -1,0 +1,39 @@@
 +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::
++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/restore.txt
index fb6b24e,0000000..1b586aa
mode 100644,000000..100644
--- a/core/doc/admin/_sources/maintenance/restore.txt
+++ b/core/doc/admin/_sources/maintenance/restore.txt
@@@ -1,41 -1,0 +1,43 @@@
 +Restoring ownCloud
 +==================
 +
 +To restore an ownCloud installation there are three main things you need to restore:
 +
 +#. The config folder
 +#. The data folder
 +#. The database
 +
 +Restore Folders
 +---------------
 +
 +.. note:: This guide assumes that your previous backup is called "owncloud-dirbkp"
 +
- 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::
++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-dirbkp/ owncloud/
 +
 +Restore Database
 +----------------
 +
 +.. note:: This guide assumes that your previous backup is called "owncloud-sqlbkp.bak"
 +
 +MySQL
 +^^^^^
 +
 +MySQL is the recommended database engine. To backup MySQL::
 +
 +    mysql -h [server] -u [username] -p[password] < owncloud-sqlbkp.bak
 +
 +SQLite
 +^^^^^^
 +::
 +
 +    sqlite3 data/owncloud.db .dump < owncloud-sqlbkp.bak
 +
 +PostgreSQL
 +^^^^^^^^^^
 +::
 +
 +    PGPASSWORD="password" pg_restore -c -d owncloud -h [server] -U [username] owncloud-sqlbkp.bak
++
diff --cc core/doc/admin/_sources/maintenance/update.txt
index 9f556b4,0000000..9be291c
mode 100644,000000..100644
--- a/core/doc/admin/_sources/maintenance/update.txt
+++ b/core/doc/admin/_sources/maintenance/update.txt
@@@ -1,48 -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.**
++.. 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.
++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 lastest point release (see below).
++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:
 +    
 +    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:
 +    
-     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:
++#. 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:
 +   
 +    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 1d9a5e0,0000000..de1d298
mode 100644,000000..100644
--- a/core/doc/admin/configuration/auth_ldap.html
+++ b/core/doc/admin/configuration/auth_ldap.html
@@@ -1,665 -1,0 +1,774 @@@
 +
 +<!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" />
 +<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 current"><a class="current reference internal" href="">User Authentication with LDAP</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="#basic-settings">Basic Settings</a></li>
++<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-owncloud-5-0-7">Expert Settings (>= ownCloud 5.0.7)</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>
++<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 (Settings→Apps, choose <strong>LDAP user and group
- backend</strong>, click on <strong>Enable</strong>) the configuration can be found on
++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="basic-settings">
- <h2>Basic Settings<a class="headerlink" href="#basic-settings" title="Permalink to this headline">¶</a></h2>
- <p>The basic settings are all you need. However, if you have a larger directory,
- custom requirements or need to connect to Active Directory (AD) you want to have
- a look on the advanced settings afterwards. The basic part allows you to set up
- a working connection to your LDAP server and use it with ownCloud.</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-basic-settings-oc5.png" src="../_images/ldap-basic-settings-oc5.png" />
- <p class="caption">LDAP Basic Settings</p>
++<img alt="../_images/ldap-wizard-1-server.png" src="../_images/ldap-wizard-1-server.png" />
 +</div>
- <p>Note that a hint will be shown on the right hand side, when hovering with the
- mouse over an input field. This gives you more context information while
- filling out the settings.</p>
- <div class="section" id="settings-details">
- <h3>Settings Details<a class="headerlink" href="#settings-details" title="Permalink to this headline">¶</a></h3>
 +<dl class="docutils">
 +<dt>Server configuration:</dt>
- <dd><p class="first">ownCloud can be configured to connect to multiple LDAP servers. Using this
++<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.</p>
- <ul class="last simple">
- <li><em>Example: 1. Server</em></li>
- </ul>
- </dd>
++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>Example: <em>directory.my-company.com</em></li>
++<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>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.</p>
++<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>Example: <em>dc=my-company,dc=com</em></li>
++<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. Let it empty for anonymous access. It is recommended to have a
++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>Example: <em>uid=owncloudsystemuser,cn=sysusers,dc=my-company,dc=com</em></li>
++<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>User Login Filter:</dt>
- <dd><p class="first">The filter to use when a users tries to login. Use <strong>%uid</strong> as placeholder
- for the user name. Note, that login applies this filter only, but not User
- List Filter. This may change in future.</p>
++<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>Example (allows login with user name and email address): <em>(|(uid=%uid)(email=$uid))</em></li>
++<li><em>objectClass=inetOrgPerson</em></li>
 +</ul>
 +</dd>
- <dt>User List Filter:</dt>
- <dd><p class="first">The filter to use when a search for users will be executed.</p>
++<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>Example: <em>objectClass=posixAccount</em></li>
++<li>only username: <em>uid=%uid</em></li>
++<li>username or email address: <em>(|(uid=%uid)(mail=$uid))</em></li>
 +</ul>
 +</dd>
- <dt>Group Filter:</dt>
- <dd><p class="first">The filter to use when a search for groups will be executed. In
- case you do not want to use LDAP groups in ownCloud, leave it empty.</p>
++</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>Example: <em>objectClass=posixGroup</em></li>
++<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, unless you use a
- non-standard Port, e.g. 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:
- * Connection Settings
- * Directory Settings
- * Special Attributes</p>
- <div class="figure">
- <img alt="../_images/ldap-advanced-settings-oc5.png" src="../_images/ldap-advanced-settings-oc5.png" />
- <p class="caption">LDAP Advanced Settings</p>
- </div>
++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-settings-connection-settings-oc5.png" src="../_images/ldap-advanced-settings-connection-settings-oc5.png" />
++<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>
- <ul class="last simple">
- <li>Example: <em>[X]</em></li>
- </ul>
- </dd>
- <dt>Port:</dt>
- <dd><p class="first">The port on which to connect to the LDAP server.</p>
- <ul class="last simple">
- <li>Example: <em>389</em></li>
- </ul>
++<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>Example: <em>directory2.my-company.com</em></li>
++<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>Example: <em>389</em></li>
++<li><em>389</em></li>
 +</ul>
 +</dd>
 +<dt>Disable Main Server:</dt>
- <dd><p class="first">You can manually override the main server and make ownCloud only connect to
- the backup server. It may be handy for planned downtimes.</p>
- <ul class="last simple">
- <li>Example: <em>[ ]</em></li>
- </ul>
- </dd>
- <dt>Use TLS:</dt>
- <dd><p class="first">Whether to use TLS encrypted connection to the LDAP server.  This will be
- ignored when “ldaps://” protocol is specified in the host entries.</p>
- <ul class="last simple">
- <li>Example: <em>[ ]</em></li>
- </ul>
- </dd>
++<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><p class="first">Whether the LDAP server is running on a Windows Host</p>
- <ul class="last simple">
- <li>Example: <em>[ ]</em></li>
- </ul>
- </dd>
++<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><p class="first">Turns of check of valid SSL certificates. Use it – if needed –
- for testing, only!</p>
- <ul class="last simple">
- <li>Example: <em>[ ]</em></li>
- </ul>
- </dd>
++<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>Example (10 min): <em>600</em></li>
++<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-settings-directory-settings-oc5.png" src="../_images/ldap-advanced-settings-directory-settings-oc5.png" />
++<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. Prior to
- ownCloud 5 it was used as internal user name. This is not the case anymore.
- It also means that display names are not permanent in ownCloud, i.e. if the
- attribute value changes in LDAP, it changes in ownCloud too. Display names
- to not need to be unique, but you rather want to specify a more or less unique
- attribute here to avoid confusion.</p>
++<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 with a search string 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>
++<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 with a search string 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>
++<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-settings-special-attributes-oc5.png" src="../_images/ldap-advanced-settings-special-attributes-oc5.png" />
++<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-owncloud-5-0-7">
- <h2>Expert Settings (>= ownCloud 5.0.7)<a class="headerlink" href="#expert-settings-owncloud-5-0-7" title="Permalink to this headline">¶</a></h2>
++<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-settings-oc5.png" src="../_images/ldap-expert-settings-oc5.png" />
++<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. To achieve a similar
- behaviour as before ownCloud 5 enter the user display name attribute in the
- following field.</p>
++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>
- <p>The default behaviour does not differ from ownCloud 4.5. You do not want to
- change this after upgrading from ownCloud 4.5 unless you update the mapping
- tables yourself.</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>In case you want to connect to a Windows AD, you must change some values in the Advanced tab.</p>
- <ul class="simple">
- <li>The default login filter will not work with AD. Use “samaccountname=%uid” instead.</li>
- <li>The default in User Display Name Field will not work with Active Directory.</li>
- <li>The Group Member association must be set to “member (AD)”</li>
- <li>Check Case insensitive LDAP server (Windows)</li>
- </ul>
++<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>LDAP Basic</strong> tab</li>
++<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/configuration_3rdparty.html
index 8889c1c,0000000..15696f6
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_3rdparty.html
+++ b/core/doc/admin/configuration/configuration_3rdparty.html
@@@ -1,186 -1,0 +1,188 @@@
 +
 +<!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="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="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>
++<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 504df5e,0000000..b6b4bb2
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_apps.html
+++ b/core/doc/admin/configuration/configuration_apps.html
@@@ -1,232 -1,0 +1,234 @@@
 +
 +<!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" />
 +<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_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
 +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>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>
 +<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>
++<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 writeable.</p>
++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 6618c0d,0000000..6f36fcb
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_automation.html
+++ b/core/doc/admin/configuration/configuration_automation.html
@@@ -1,278 -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>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" />
 +<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"><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>
++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>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>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>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_database.html
index 9c5472e,0000000..11e60d6
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_database.html
+++ b/core/doc/admin/configuration/configuration_database.html
@@@ -1,472 -1,0 +1,485 @@@
 +
 +<!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="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 choosen because it is a file based database with the least administrative overhead.</p>
++<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>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_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 counfiguration in <tt class="file docutils literal"><span class="pre">config/config.php</span></tt> you need to set at least the <strong>datadirectory</strong> parameter to the directory where your data and database should be stored. Note that for the PDO SQLite driver this directory must be writable (this is recommended for ownCloud anyway).  No authentication is required to access the database therefore most of the default parameters could be taken as is:</p>
++<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>
++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>
++<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>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 of the Oracle instance. For Oracle Express Edition it is always <tt class="docutils literal"><span class="pre">XE</span></tt>.</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 easiet way to test if a database can be accessed is by starting the
++<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 083dcfd,0000000..d393c7c
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,223 @@@
 +
 +<!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="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 matchs after his next log-in. In this case the user will be
++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 421a0d5,0000000..246dc12
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_knowledgebase.html
+++ b/core/doc/admin/configuration/configuration_knowledgebase.html
@@@ -1,189 -1,0 +1,192 @@@
 +
 +<!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="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>
++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>
++<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_logging.html
index b3c26b0,0000000..76e4325
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,225 @@@
 +
 +<!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="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 deamon of a system.</p>
++<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 d9e894d,0000000..57fee30
mode 100644,000000..100644
--- a/core/doc/admin/configuration/configuration_mail.html
+++ b/core/doc/admin/configuration/configuration_mail.html
@@@ -1,454 -1,0 +1,455 @@@
 +
 +<!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="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 unsecure connections, the default setting can be
++<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 ususally part of that system.
++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>
++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/configuring_big_file_upload.html
index ca31f2f,0000000..3926b85
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,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>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="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”. This is important, because you possibly could not watch otherwise, whether the desired changes take effect.</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 or substeps described below, the settings may fail.</p>
++<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>Klick the “save”-Button</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 derivates this file lies at /etc/php5/apache2/php.ini</li>
++<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 choosen inside the admin-section one step before:</li>
++<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 prooven by test up to filesizes of 16 GigaBytes:</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_gui.html
index 56bc396,0000000..4fb9687
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,232 -1,0 +1,234 @@@
 +
 +<!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="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>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/index.html
index f22ded0,0000000..08be5fd
mode 100644,000000..100644
--- a/core/doc/admin/configuration/index.html
+++ b/core/doc/admin/configuration/index.html
@@@ -1,194 -1,0 +1,194 @@@
 +
 +<!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="prev" title="Other Web Servers" href="../installation/installation_others.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="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="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 f6f0587,0000000..aff2572
mode 100644,000000..100644
--- a/core/doc/admin/configuration/xsendfile.html
+++ b/core/doc/admin/configuration/xsendfile.html
@@@ -1,285 -1,0 +1,289 @@@
 +
 +<!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="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>
++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 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>
++<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 aswell. For a more in-dept documentation of this directive refer to mod_xsendfile website linked ab [...]
++<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>
++<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>
++<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 6f8aafc,0000000..84b6e30
mode 100644,000000..100644
--- a/core/doc/admin/contents.html
+++ b/core/doc/admin/contents.html
@@@ -1,343 -1,0 +1,330 @@@
 +
 +<!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#archlinux">Archlinux</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#opensuse">openSUSE</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#fedora">Fedora</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#centos-5-6">CentOS 5 & 6</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#gentoo">Gentoo</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#pclinuxos">PCLinuxOS</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#ubuntu-debian">Ubuntu / Debian</a></li>
++<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-webserver">Extract ownCloud and Copy to Your Webserver</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#enable-htaccess-and-mod-rewrite-if-running-apache">Enable .htaccess and mod_rewrite if Running Apache</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>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#test-your-installation">Test your Installation</a></li>
- </ul>
- </li>
- <li class="toctree-l2"><a class="reference internal" href="installation/installation_others.html">Other Web Servers</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_others.html#nginx-configuration">Nginx Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_others.html#lighttpd-configuration">Lighttpd Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_others.html#yaws-configuration">Yaws Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_others.html#hiawatha-configuration">Hiawatha Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_others.html#pagekite-configuration">PageKite Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_others.html#open-wrt">Open Wrt</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/auth_ldap.html">User Authentication with LDAP</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#basic-settings">Basic Settings</a></li>
++<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-owncloud-5-0-7">Expert Settings (>= ownCloud 5.0.7)</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-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 e538b35,7785f2c..2eee209
--- a/core/doc/admin/index.html
+++ b/core/doc/admin/index.html
@@@ -1,232 -1,2 +1,225 @@@
 -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>
- <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="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>
++<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_appliance.html"><em>Appliances</em></a></li>
- <li><a class="reference internal" href="installation/installation_linux.html"><em>Linux Distributions</em></a></li>
- <li><a class="reference internal" href="installation/installation_macos.html"><em>Mac OS X</em></a></li>
++<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_ucs.html"><em>Univention Corporate Server</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>Other Web Servers</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 Webserver configuration.</p>
++<p>This chapter covers ownCloud and web server configuration.</p>
 +<ul class="simple">
- <li><a class="reference internal" href="configuration/configuration_3rdparty.html"><em>3rd-Party Configuration</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_automation.html"><em>Automatic Configuration</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/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/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/custom_mount_config.html"><em>Custom Mount Configuration</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_user_backend.html"><em>Custom User Backend 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/xsendfile.html"><em>Serving static files via web server</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_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_encryption.html"><em>Use Server-Side Encryption</em></a></li>
- <li><a class="reference internal" href="configuration/configuration_language.html"><em>Language 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/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_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 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/installation/index.html
index 15b6e79,0000000..58c5e27
mode 100644,000000..100644
--- a/core/doc/admin/installation/index.html
+++ b/core/doc/admin/installation/index.html
@@@ -1,166 -1,0 +1,168 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Installation — ownCloud Administrators Manual 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="Appliances" href="installation_appliance.html" />
 +    <link rel="prev" 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="../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="current reference internal" href="">Installation</a><ul>
 +<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"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html">Other Web Servers</a></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="installation">
 +<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="installation_appliance.html">Appliances</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="installation_linux.html">Linux Distributions</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="installation_macos.html">Mac OS X</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="installation_windows.html">Windows 7 and Windows Server 2008</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="installation_ucs.html">Univention Corporate Server</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l1"><a class="reference internal" href="installation_others.html">Other Web Servers</a></li>
++<li class="toctree-l1"><a class="reference internal" href="installation_others.html">PageKite Configuration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_appliance.html
index 5005eaa,0000000..b6d1514
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_appliance.html
+++ b/core/doc/admin/installation/installation_appliance.html
@@@ -1,185 -1,0 +1,185 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Appliances — ownCloud Administrators Manual 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="Linux Distributions" href="installation_linux.html" />
 +    <link rel="prev" title="Installation" 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 current"><a class="reference internal" href="index.html">Installation</a><ul class="current">
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Appliances</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#software-appliances">Software Appliances</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#owncloud-on-hardware-appliances">ownCloud on Hardware Appliances</a></li>
 +</ul>
 +</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"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html">Other Web Servers</a></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="appliances">
 +<h1>Appliances<a class="headerlink" href="#appliances" title="Permalink to this headline">¶</a></h1>
 +<p>If you are looking for virtual machine images, check the Software Appliances
 +section.  The Hardware Appliances section is of interest for people seeking to
 +run ownCloud on appliance hardware (i.e. NAS filers, routers, etc.).</p>
 +<div class="section" id="software-appliances">
 +<h2>Software Appliances<a class="headerlink" href="#software-appliances" title="Permalink to this headline">¶</a></h2>
 +<p>There are number of pre-made virtual machine-based appliances:</p>
 +<ul class="simple">
 +<li><a class="reference external" href="http://susestudio.com/a/TadMax/owncloud-in-a-box">SUSE Studio, ownCloud on openSuSE</a>, runnable directly from an USB stick.</li>
- <li><a class="reference external" href="http://jujucharms.com/charms/precise/owncloud">Ubuntu charm, ownCloud 4.5</a></li>
- <li><a class="reference external" href="http://www.pclinuxos.com/forum/index.php/topic,100875.0.html">PCLinuxOS based appliance</a></li>
- <li><a class="reference external" href="http://echorand.me/2012/02/26/owncloud-boxgrinder-pagekite-owncloud-appliance/">Fedora based appliance</a></li>
++<li><a class="reference external" href="http://jujucharms.com/charms/precise/owncloud">Ubuntu charm, ownCloud</a></li>
 +</ul>
 +</div>
 +<div class="section" id="owncloud-on-hardware-appliances">
 +<h2>ownCloud on Hardware Appliances<a class="headerlink" href="#owncloud-on-hardware-appliances" title="Permalink to this headline">¶</a></h2>
 +<p>These are tutorials provided by the user communities of the respective appliances:</p>
 +<ul class="simple">
 +<li><a class="reference external" href="http://wiki.qnap.com/wiki/Category:OwnCloud">QNAP Guide</a> for QNAP NAS appliances</li>
 +<li><a class="reference external" href="http://wiki.openwrt.org/doc/howto/owncloud">OpenWrt Guide</a> for the popular embedded distribution for routers and NAS devices.</li>
++<li><a class="reference external" href="http://www.cphub.net/index.php?id=40&pid=213">Synology Package</a> for Synology NAS products</li>
 +</ul>
 +<div class="admonition-todo admonition" id="index-0">
 +<p class="first admonition-title">Todo</p>
- <p class="last">Tutorials for running owncloud on Synology and Dreamplug.</p>
++<p class="last">Tutorials for running ownCloud on Dreamplug.</p>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_linux.html
index 6796e86,0000000..0c88c56
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_linux.html
+++ b/core/doc/admin/installation/installation_linux.html
@@@ -1,275 -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>Linux Distributions — 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="Mac OS X" href="installation_macos.html" />
 +    <link rel="prev" title="Appliances" href="installation_appliance.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 current"><a class="current reference internal" href="">Linux Distributions</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="#archlinux">Archlinux</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#opensuse">openSUSE</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#fedora">Fedora</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#centos-5-6">CentOS 5 & 6</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#gentoo">Gentoo</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#pclinuxos">PCLinuxOS</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#ubuntu-debian">Ubuntu / Debian</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#supported-distribution-packages">Supported Distribution Packages</a></li>
 +</ul>
 +</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"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html">Other Web Servers</a></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="linux-distributions">
 +<h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <p>This section describes the installation process for different
- distributions. If there are pre-made packages from ownCloud,
- you are encouraged to prefer those over the vendor-provided
- ones, since they usually are more up-to-date.</p>
- <div class="section" id="archlinux">
- <h2>Archlinux<a class="headerlink" href="#archlinux" title="Permalink to this headline">¶</a></h2>
- <p>There are two AUR packages for ownCloud:</p>
- <ul class="simple">
- <li><a class="reference external" href="http://aur.archlinux.org/packages.php?ID=47585">stable version</a></li>
- <li><a class="reference external" href="http://aur.archlinux.org/packages.php?ID=38767">development version</a></li>
- </ul>
- </div>
- <div class="section" id="opensuse">
- <h2>openSUSE<a class="headerlink" href="#opensuse" title="Permalink to this headline">¶</a></h2>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">ready-to-use SLES and openSUSE RPM packages are available in the openSUSE Build Service <a class="reference external" href="http://software.opensuse.org/search?q=owncloud&baseproject=ALL&lang=de">ownCloud repository</a>.</p>
- </div>
- <ol class="arabic simple">
- <li>Copy ownCloud to Apache’s server directory : <strong>/srv/www/htdocs</strong></li>
- <li>Give the web server the necessary permissions:</li>
- </ol>
- <div class="highlight-python"><pre>sudo chown -R wwwrun owncloud</pre>
- </div>
- <ol class="arabic simple" start="3">
- <li>Open the folder in a browser and complete the setup wizard</li>
- </ol>
- <p>If have followed the steps above and want to try it out, run this
- command in a terminal to start Apache if it’s not already running:</p>
- <div class="highlight-python"><pre>sudo /etc/init.d/apache2 start</pre>
- </div>
- <p>Go to <a class="reference external" href="http://servername/owncloud">http://servername/owncloud</a> and walk through the setup.</p>
- </div>
- <div class="section" id="fedora">
- <h2>Fedora<a class="headerlink" href="#fedora" title="Permalink to this headline">¶</a></h2>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">ready-to-use RPM packages are available in the openSUSE Build Service <a class="reference external" href="http://software.opensuse.org/search?q=owncloud&baseproject=ALL&lang=de">ownCloud repository</a>.</p>
- </div>
- <p>Make sure <a class="reference external" href="https://fedoraproject.org/wiki/SELinux_FAQ#How_do_I_enable_or_disable_SELinux_.3F">SELinux is disabled</a> or else the installation process will fail with the following message:</p>
- <div class="highlight-python"><pre>Config file (config/config.php) is not writable for the webserver</pre>
- </div>
- <p>Configure Apache:</p>
- <ol class="arabic simple">
- <li>If you already have a website running from Document Root but would still like to install OwnCloud you can use a Name-based virtual host entry and subdomain.</li>
- <li>Edit your DNS record following this example: <strong>point owncloud.foo.com > ip.ip.ip.ip</strong></li>
- </ol>
- </div>
- <div class="section" id="centos-5-6">
- <h2>CentOS 5 & 6<a class="headerlink" href="#centos-5-6" title="Permalink to this headline">¶</a></h2>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">ready-to-use CentOS RPM packages are available
- in the openSUSE Build Service <a class="reference external" href="http://software.opensuse.org/search?q=owncloud&baseproject=ALL&lang=de">ownCloud repository</a>.</p>
- </div>
- <ol class="arabic simple">
- <li>Create a new file in <strong>/etc/httpd/conf/</strong> and call it <strong>owncloud.conf</strong>.</li>
- <li>You can use the following as an example:</li>
- </ol>
- <div class="highlight-xml"><pre><IfModule mod_alias.c>
- Alias /owncloud /var/www/owncloud/
- </IfModule>
- <Directory /var/www/owncloud/>
-    Options None
-    Order allow,deny
-    allow from all
- </Directory>
- <VirtualHost *:80>
-     ServerAdmin foo at foofarm.com
-     DocumentRoot /var/www/html/owncloud
-     ServerName owncloud.foo.com
-     ErrorLog logs/owncloud.foo.info-error_log
-     CustomLog logs/owncloud.foo.info-access_log common
- 
- </VirtualHost></pre>
- </div>
- <ol class="arabic simple" start="3">
- <li>Now edit your httpd.conf file which is usually located in <tt class="file docutils literal"><span class="pre">/etc/httpd/conf/httpd.conf</span></tt></li>
- <li>Add the following to the bottom</li>
- </ol>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">Include</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">httpd</span><span class="o">/</span><span class="n">conf</span><span class="o">/</span><span class="n">owncloud</span><span class="o">.</span><span class="n">conf</span>
- </pre></div>
- </div>
- <ol class="arabic simple" start="5">
- <li>Restart apache and now when you point your browser to <a class="reference external" href="http://owncloud.foo.com">http://owncloud.foo.com</a> it should properly load without affecting <a class="reference external" href="http://foo.com">http://foo.com</a></li>
- </ol>
- </div>
- <div class="section" id="gentoo">
- <h2>Gentoo<a class="headerlink" href="#gentoo" title="Permalink to this headline">¶</a></h2>
- <p>Set up a standard web server (see instructions above). Then change permissions:</p>
- <div class="highlight-python"><pre>chown -R apache:apache owncloud</pre>
- </div>
- <p>Allow .htaccess, modify <tt class="file docutils literal"><span class="pre">/etc/apache2/vhosts.d/00_default_vhost.conf</span></tt> and
- make sure it contains the following section</p>
- <div class="highlight-xml"><pre><Directory /var/www/localhost/htdocs/owncloud>
-     Options Indexes FollowSymLinks MultiViews
-     AllowOverride All
-     Order allow,deny
-     allow from all
- </Directory></pre>
- </div>
- </div>
- <div class="section" id="pclinuxos">
- <h2>PCLinuxOS<a class="headerlink" href="#pclinuxos" title="Permalink to this headline">¶</a></h2>
- <p>Follow the Tutorial <a class="reference external" href="http://pclinuxoshelp.com/index.php/Owncloud,_installation_and_setup">ownCloud, installation and setup</a> on the PCLinuxOS web site.</p>
++<div class="section" id="supported-distribution-packages">
++<h2>Supported Distribution Packages<a class="headerlink" href="#supported-distribution-packages" title="Permalink to this headline">¶</a></h2>
++<p>Ready-to-use packages are available at <a class="reference external" href="http://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud">openSUSE Build Service</a> for a variety of Linux distributions.</p>
++<p>If your distribution is not listed please follow <a class="reference internal" href="installation_source.html"><em>Manual Installation</em></a>.</p>
++<div class="section" id="additional-installation-guides-and-notes">
++<h3>Additional installation guides and notes<a class="headerlink" href="#additional-installation-guides-and-notes" title="Permalink to this headline">¶</a></h3>
++<p><strong>Fedora:</strong> Make sure <a class="reference external" href="https://fedoraproject.org/wiki/SELinux_FAQ#How_do_I_enable_or_disable_SELinux_.3F">SELinux is disabled</a>
++or else the installation process might fail.</p>
++<p><strong>Archlinux:</strong> There are two AUR packages for ownCloud: <a class="reference external" href="http://aur.archlinux.org/packages.php?ID=47585">stable version</a> and <a class="reference external" href="http://aur.archlinux.org/packages.php?ID=38767">development version</a>.</p>
++<p><strong>PCLinuxOS:</strong> Follow the Tutorial <a class="reference external" href="http://pclinuxoshelp.com/index.php/Owncloud,_installation_and_setup">ownCloud, installation and setup</a> on the PCLinuxOS web site.</p>
 +</div>
- <div class="section" id="ubuntu-debian">
- <h2>Ubuntu / Debian<a class="headerlink" href="#ubuntu-debian" title="Permalink to this headline">¶</a></h2>
- <p>Go to the <a class="reference external" href="http://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud">linux package sources</a> page and execute the steps as described there for your distribution.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_macos.html
index 524a495,0000000..e86ac22
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_macos.html
+++ b/core/doc/admin/installation/installation_macos.html
@@@ -1,161 -1,0 +1,162 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Mac OS X — ownCloud Administrators Manual 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="Windows 7 and Windows Server 2008" href="installation_windows.html" />
 +    <link rel="prev" title="Linux Distributions" href="installation_linux.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 current"><a class="current reference internal" href="">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"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html">Other Web Servers</a></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="mac-os-x">
 +<h1>Mac OS X<a class="headerlink" href="#mac-os-x" title="Permalink to this headline">¶</a></h1>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
- <p class="last">Due to an <a class="reference external" href="https://github.com/owncloud/core/issues/2377">issue</a> with Mac OS Unicode support, installing ownCloud Server 5.0 on
++<p class="last">Due to an <a class="reference external" href="https://github.com/owncloud/core/issues/2377">issue</a> with Mac OS Unicode support, installing ownCloud Server 6.0 on
 +Mac OS is currently not supported.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_others.html
index db22c55,0000000..525faec
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_others.html
+++ b/core/doc/admin/installation/installation_others.html
@@@ -1,328 -1,0 +1,163 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Other Web Servers — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>PageKite 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="Installation" href="index.html" />
 +    <link rel="next" title="Configuration" href="../configuration/index.html" />
 +    <link rel="prev" title="Manual Installation" href="installation_source.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"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l2 current"><a class="current reference internal" href="">Other Web Servers</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="#nginx-configuration">Nginx Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#lighttpd-configuration">Lighttpd Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#yaws-configuration">Yaws Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#hiawatha-configuration">Hiawatha Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#pagekite-configuration">PageKite Configuration</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<li class="toctree-l2 current"><a class="current reference internal" href="">PageKite Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="#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="other-web-servers">
- <h1>Other Web Servers<a class="headerlink" href="#other-web-servers" title="Permalink to this headline">¶</a></h1>
- <p>The most popular server choice for ownCloud is Apache, which is why
- it is also the combinations tested best. However, it is also possible
- to run ownCloud on other web servers. This section does not cover
- Microsoft Internet Information Services (IIS), it is covered
- in the <a class="reference internal" href="installation_windows.html"><em>Windows 7 and Windows Server 2008</em></a> section.</p>
- <div class="section" id="nginx-configuration">
- <h2>Nginx Configuration<a class="headerlink" href="#nginx-configuration" title="Permalink to this headline">¶</a></h2>
- <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 {
-         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;'
-         }
- 
-         # 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">
- <h2>Lighttpd Configuration<a class="headerlink" href="#lighttpd-configuration" title="Permalink to this headline">¶</a></h2>
- <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">
- <h2>Yaws Configuration<a class="headerlink" href="#yaws-configuration" title="Permalink to this headline">¶</a></h2>
- <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">
- <h2>Hiawatha Configuration<a class="headerlink" href="#hiawatha-configuration" title="Permalink to this headline">¶</a></h2>
- <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="pagekite-configuration">
- <h2>PageKite Configuration<a class="headerlink" href="#pagekite-configuration" title="Permalink to this headline">¶</a></h2>
++  <div class="section" id="pagekite-configuration">
++<h1>PageKite Configuration<a class="headerlink" href="#pagekite-configuration" title="Permalink to this headline">¶</a></h1>
 +<p>You can use this <a class="reference external" href="https://pagekite.net/wiki/Howto/GNULinux/OwnCloud/">PageKite how to</a> to make your local ownCloud accessible from the
 +internet using PageKite.</p>
 +</div>
 +<div class="section" id="open-wrt">
- <h2>Open Wrt<a class="headerlink" href="#open-wrt" title="Permalink to this headline">¶</a></h2>
- <p>Here you can find a <a href="#id1"><span class="problematic" id="id2">`tutorial for open Wrt`_</span></a></p>
- </div>
++<h1>Open Wrt<a class="headerlink" href="#open-wrt" title="Permalink to this headline">¶</a></h1>
++<p>Here you can find a <a class="reference external" href="http://wiki.openwrt.org/doc/howto/owncloud">tutorial for open Wrt</a></p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_source.html
index 8bef0bd,0000000..73c36d1
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_source.html
+++ b/core/doc/admin/installation/installation_source.html
@@@ -1,271 -1,0 +1,452 @@@
 +
 +<!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="Other Web Servers" href="installation_others.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-webserver">Extract ownCloud and Copy to Your Webserver</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="#enable-htaccess-and-mod-rewrite-if-running-apache">Enable .htaccess and mod_rewrite if Running Apache</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>
- <li class="toctree-l3"><a class="reference internal" href="#test-your-installation">Test your Installation</a></li>
 +</ul>
 +</li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html">Other Web Servers</a></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 webserver must have the following installed:</p>
++<p>To run ownCloud, your web server must have the following installed:</p>
 +<ul class="simple">
- <li>php5 (>= 5.3)</li>
- <li>php5-gd</li>
- <li>php-xml-parser</li>
++<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 GD</li>
++<li>PHP module zlib</li>
++<li>PHP module iconv</li>
++<li>PHP module SimpleXML</li>
 +</ul>
 +<p>And as <em>optional</em> dependencies:</p>
 +<ul class="simple">
- <li>php5-intl</li>
- <li>php5-sqlite (>= 3)</li>
- <li>php5-mysql</li>
- <li>php5-pgsql (or php-pgsql depending on your distro)</li>
- <li>smbclient</li>
- <li>php5-curl</li>
++<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 exif (for image rotation in pictures app)</li>
++<li>PHP module ldap (for ldap integration)</li>
++<li>PHP module curl</li>
 +<li>curl</li>
 +<li>libcurl3</li>
 +</ul>
- <p>You have to install at least one of php5-sqlite, php5-pgsql or php5-mysql, depending
- on which of the three database systems (SQLite, PostgreSQL or MySQL) you want to use
- and activate its PDO module in the <strong>php.ini</strong>.</p>
- <p>smbclient is only used if you want to mount SMB shares to your ownCloud.
- The curl packages are needed for some apps (e.g. http user authentication)</p>
- <p>Commands for Ubuntu and Debian (run as root):</p>
- <div class="highlight-python"><pre>apt-get install apache2 php5 php5-gd php-xml-parser php5-intl
- apt-get install php5-sqlite php5-mysql php5-pgsql smbclient curl libcurl3 php5-curl</pre>
- </div>
++<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>
- <div class="admonition-todo admonition" id="index-0">
- <p class="first admonition-title">Todo</p>
- <p class="last">Document other distributions.</p>
- </div>
- <p>You don’t need any WebDAV support of your webserver (i.e. apache’s mod_webdav)
++<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 webserver
++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-webserver">
- <h2>Extract ownCloud and Copy to Your Webserver<a class="headerlink" href="#extract-owncloud-and-copy-to-your-webserver" title="Permalink to this headline">¶</a></h2>
++<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 webserver must own the apps/, data/ and config/ directories
++<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 distros like Ubuntu, Debian or Linux Mint and Gentoo use:</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="enable-htaccess-and-mod-rewrite-if-running-apache">
- <h2>Enable .htaccess and mod_rewrite if Running Apache<a class="headerlink" href="#enable-htaccess-and-mod-rewrite-if-running-apache" title="Permalink to this headline">¶</a></h2>
- <p>If you are running the apache webserver, it is recommended that you enable
- <strong>.htaccess</strong> files as ownCloud uses them to enhance security and allows you to
- use webfinger. To enable .htaccess files you need to ensure that
- <strong>AllowOverride</strong> is set to <strong>All</strong> in the <strong>Directory /var/www/</strong> section of
- your virtual host file. This is usually in <tt class="file docutils literal"><span class="pre">/etc/apache2/sites-enabled/000-default</span></tt>.  If your distro supports <strong>a2enmod</strong> run the following commands:</p>
++<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 distros 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 distros using updstart) use:</p>
++<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, Fedora, OpenSuse) use:</p>
++<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 {
++        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;'
++        }
++
++        # 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 webserver, please set the data directory to a location outside of the document root. See the advanced
++<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 class="section" id="test-your-installation">
- <h2>Test your Installation<a class="headerlink" href="#test-your-installation" title="Permalink to this headline">¶</a></h2>
- <p>Login and start using ownCloud. Check your web servers errror log. If it shows
- error, you might have missed a dependency or hit a bug with your particular
- configuration.</p>
- <p>If you plan on using the Webfinger app and
- your ownCloud installation is not in the webroot then you’ll have to manually
- link <tt class="file docutils literal"><span class="pre">/var/www/.well-known</span></tt> to <tt class="file docutils literal"><span class="pre">/path/to/your/owncloud/.well-known</span></tt>.</p>
- </div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_ucs.html
index 0657ac2,0000000..b16672e
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_ucs.html
+++ b/core/doc/admin/installation/installation_ucs.html
@@@ -1,408 -1,0 +1,409 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Univention Corporate Server — ownCloud Administrators Manual 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="Manual Installation" href="installation_source.html" />
 +    <link rel="prev" title="Windows 7 and Windows Server 2008" href="installation_windows.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 current"><a class="current reference internal" href="">Univention Corporate Server</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#pre-configuration">Pre configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#installation">Installation</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#postconfiguration-optional">Postconfiguration (optional)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#using-owncloud">Using ownCloud</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html">Other Web Servers</a></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="univention-corporate-server">
 +<h1>Univention Corporate Server<a class="headerlink" href="#univention-corporate-server" title="Permalink to this headline">¶</a></h1>
 +<p>Subscribers to the ownCloud Enterprise edition can also integrate with
 +<abbr title="Univention Corporate Server">UCS</abbr>.</p>
 +<div class="section" id="pre-configuration">
 +<span id="preconfig"></span><h2>Pre configuration<a class="headerlink" href="#pre-configuration" title="Permalink to this headline">¶</a></h2>
 +<p>ownCloud makes use of the UCR, the Univention Configuration Registry. The values
 +are being read during installation, most of them can be changed later, too.
 +Changes done directly via ownCloud are not taken over to UCR. We think we found
 +sane defaults, nevertheless you might have your own requirements. The
 +installation script will listen to the UCR keys listed below. In case you want
 +to override any default setting, simply add the key in question to the UCR and
 +assign your required value.</p>
 +<table border="1" class="longtable docutils">
 +<colgroup>
 +<col width="20%" />
 +<col width="30%" />
 +<col width="30%" />
 +<col width="20%" />
 +</colgroup>
 +<thead valign="bottom">
 +<tr class="row-odd"><th class="head">Key</th>
 +<th class="head">Default</th>
 +<th class="head">Description</th>
 +<th class="head">Introduced</th>
 +</tr>
 +</thead>
 +<tbody valign="top">
 +<tr class="row-even"><td>owncloud/directory/data</td>
 +<td>/var/lib/owncloud</td>
 +<td>Specifies where the file storage will be placed</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/db/name</td>
 +<td>owncloud</td>
 +<td>Name of the MySQL database. ownCloud will create an own user for it.</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/user/quota</td>
 +<td>(empty)</td>
 +<td>The default quota, when a user is being added. Assign values in human readable strings, e.g. “2 GB”. Unlimited if empty.</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/user/enabled</td>
 +<td>0</td>
 +<td>Wether a new user is allowed to use ownCloud by default.</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/group/enabled</td>
 +<td>0</td>
 +<td>Wether a new group is allowed to be used in ownCloud by default.</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/base/users</td>
 +<td>cn=users,$ldap_base</td>
 +<td>The users-subtree in the LDAP directory. If left blank it will fall back to the LDAP base.</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/base/groups</td>
 +<td>cn=groups,$ldap_base</td>
 +<td>The groups-subtree in the LDAP directory. If left blank it will fall back to the LDAP base.</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/groupMemberAssoc</td>
 +<td>uniqueMember</td>
 +<td>The LDAP attribute showing the group-member relationship. Possible values: uniqueMember, memberUid and member</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/tls</td>
 +<td>1</td>
 +<td>Whether to talk to the LDAP server via TLS.</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/disableMainServer</td>
 +<td>0</td>
 +<td>Deactivates the (first) LDAP Configuration</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/cacheTTL</td>
 +<td>600</td>
 +<td>Lifetime of the ownCloud LDAP Cache in seconds</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/UUIDAttribute</td>
 +<td>(empty)</td>
 +<td>Attribute that provides a unique value for each user and group entry. Empty value for autodetection.</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/loginFilter</td>
 +<td>(&(|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0)) (!(uid=*$)) (&(uid=%uid) (ownCloudEnabled=1)))</td>
 +<td>The LDAP filter that shall be used when a user tries to log in.</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/userlistFilter</td>
 +<td>(&(|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0))(!(uid=*$)) (&(ownCloudEnabled=1)))</td>
 +<td>The LDAP filter that shall be used when the user list is being retrieved (e.g. for sharing)</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/groupFilter</td>
 +<td>(&(objectClass=posixGroup) (ownCloudEnabled=1))</td>
 +<td>The LDAP filter that shall be used when the group list is being retrieved (e.g. for sharing)</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/internalNameAttribute</td>
 +<td>uid</td>
 +<td>Attribute that should be used to create the user’s owncloud internal name</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/displayName</td>
 +<td>uid</td>
 +<td>The LDAP attribute that should be displayed as name in ownCloud</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/user/searchAttributes</td>
 +<td>uid,givenName,sn,description,employeeNumber,mailPrimaryAddress</td>
 +<td>Attributes taken into consideration when searching for users (comma separated)</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/user/quotaAttribute</td>
 +<td>ownCloudQuota</td>
 +<td>Name of the quota attribute. The default attribute is provided by owncloud-schema.</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/user/homeAttribute</td>
 +<td>(empty)</td>
 +<td>Attribute that should be used to create the user’s owncloud internal home folder</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/ldap/group/displayName</td>
 +<td>cn</td>
 +<td>The LDAP attribute that should be used as groupname in ownCloud</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/ldap/group/searchAttributes</td>
 +<td>cn,description, mailPrimaryAddress</td>
 +<td>Attributes taken into consideration when searching for groups (comma separated)</td>
 +<td>5.0.9</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/join/users/update</td>
 +<td>yes</td>
 +<td>Wether ownCloud LDAP schema should be applied to existing users</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/group/enableDomainUsers</td>
 +<td>1</td>
 +<td>Wether the group “Domain Users” shall be enabled for ownCloud on install</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +<tr class="row-even"><td>owncloud/join/users/filter</td>
 +<td>(&(|(&(objectClass=posixAccount) (objectClass=shadowAccount)) (objectClass=univentionMail) (objectClass=sambaSamAccount) (objectClass=simpleSecurityObject) (&(objectClass=person) (objectClass=organizationalPerson) (objectClass=inetOrgPerson))) (!(uidNumber=0)) (!(|(uid=*$) (uid=owncloudsystemuser) (uid=join-backup) (uid=join-slave))) (!(objectClass=ownCloudUser)))</td>
 +<td>Filters, on which LDAP users the ownCloud schema should be applied to. The default excludes system users and already ownCloudUsers.</td>
 +<td>2012.0.1</td>
 +</tr>
 +<tr class="row-odd"><td>owncloud/join/groups/filter</td>
 +<td>(empty)</td>
 +<td>Filters which LDAP groups will be en/disabled for ownCloud when running the script /usr/share/owncloud/update-groups.sh</td>
 +<td>2012.4.0.4</td>
 +</tr>
 +</tbody>
 +</table>
 +<p>If you want to override the default settings, simply create the key in
 +question in the UCR and assign your required value, for example:</p>
 +<div class="highlight-python"><pre>ucr set owncloud/user/enabled=1</pre>
 +</div>
 +<p>or via UMC:</p>
 +<img alt="../_images/ucsint2.png" src="../_images/ucsint2.png" />
 +</div>
 +<div class="section" id="installation">
 +<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
 +<p>Now, we are ready to install ownCloud. This can be either done through the UCS
 +App Center (recommended) or by downloading the packages.</p>
 +<div class="section" id="ucs-app-center">
 +<h3>UCS App Center<a class="headerlink" href="#ucs-app-center" title="Permalink to this headline">¶</a></h3>
 +<p>Open the Univention Management Console and choose the App Center module. You
 +will see a variety of available applications, including ownCloud.</p>
 +<img alt="../_images/ucs-app-center-module.png" src="../_images/ucs-app-center-module.png" />
 +<p>Click on ownCloud 5 and follow the instructions.</p>
 +<img alt="../_images/ucs-app-center-install.png" src="../_images/ucs-app-center-install.png" />
 +<p>In the UCS App Center, you can also upgrade from ownCloud 4.5 by installing
- ownCloud 5.0. They are provided as seperate apps. It is only possible to have
++ownCloud 5.0. They are provided as separate apps. It is only possible to have
 +one version of ownCloud installed.</p>
 +</div>
 +<div class="section" id="manually-by-download">
 +<h3>Manually by download<a class="headerlink" href="#manually-by-download" title="Permalink to this headline">¶</a></h3>
 +<p>Download the integration packages <a class="reference external" href="https://owncloud.com/download">from our website</a> and install them from
 +within your download folder (note: the package owncloud-unsupported is
 +optional) via command line:</p>
 +<div class="highlight-python"><pre>dpkg -i owncloud*.deb</pre>
 +</div>
 +<p>ownCloud will be configured to fully work with LDAP.</p>
 +</div>
 +<div class="section" id="reinstallation">
 +<h3>Reinstallation<a class="headerlink" href="#reinstallation" title="Permalink to this headline">¶</a></h3>
 +<p>When ownCloud was installed before and uninstalled via AppCenter or via command
 +line using apt-get remove, ownCloud can be simply installed again. The old
 +configuration will be used again.</p>
 +<p>When an older ownCloud was installed and has been purged (only possible via
 +command line using apt-get purge) the old configuration is gone, but data is
 +left. This blocks an installation. You can either install the old version and
 +upgrade to ownCloud 5 or (re)move the old data. This is done by removing the
 +MySQL database “ownCloud” using the command line:</p>
 +<div class="highlight-python"><pre>mysql -u root -e "DROP DATABASE owncloud" -p`tail /etc/mysql.secret</pre>
 +</div>
 +<p>In this case you probably also want to remove the data directory
 +<strong>/var/lib/owncloud</strong> although this is not mandatory.</p>
 +</div>
 +</div>
 +<div class="section" id="postconfiguration-optional">
 +<h2>Postconfiguration (optional)<a class="headerlink" href="#postconfiguration-optional" title="Permalink to this headline">¶</a></h2>
 +<p>There is only one local admin user “owncloudadmin”, you can find his password in
- <tt class="file docutils literal"><span class="pre">/etc/owncloudadmin.secret</span></tt>. Use this account, if you want to change basic
++<cite>/etc/owncloudadmin.secret</cite>. Use this account, if you want to change basic
 +ownCloud settings.</p>
 +<p>In the installation process a virtual host is set up (Apache is required
 +therefore). If you want to modify the settings, edit
 +<tt class="file docutils literal"><span class="pre">/etc/apache2/sites-available/owncloud</span></tt> and restart the web server. You
 +might want to do it to enable HTTPS connections. Besides that, you can edit the
 +<strong>.htaccess-File in /var/www/owncloud/</strong>. In the latter file there are also the
 +PHP limits for file transfer specified.</p>
 +</div>
 +<div class="section" id="using-owncloud">
 +<h2>Using ownCloud<a class="headerlink" href="#using-owncloud" title="Permalink to this headline">¶</a></h2>
 +<p>If you decided to enable every user by default to use ownCloud, simply
 +open up <a class="reference external" href="http://myserver.com/owncloud/">http://myserver.com/owncloud/</a> and log in with your LDAP
 +credentials and enjoy.</p>
 +<p>If you did not, go to the UMC and enable the users who shall have access
 +(see picture below). Then, login at <a class="reference external" href="http://myserver.com/owncloud/">http://myserver.com/owncloud/</a> with
 +your LDAP credentials.</p>
 +<img alt="../_images/ucsint1.png" src="../_images/ucsint1.png" />
 +<p>Updating users can also be done by the script
 +<tt class="file docutils literal"><span class="pre">/usr/share/owncloud/update-users.sh</span></tt> . It takes the following UCR
 +variables as parameters: <strong>owncloud/user/enabled</strong> for enabling or disabling,
 +<strong>owncloud/user/quota</strong> as the Quota value and <strong>owncloud/join/users/filter</strong> as
 +LDAP filter to select the users to update.</p>
 +<div class="section" id="groups-2012-4-0-4">
 +<h3>Groups 2012.4.0.4<a class="headerlink" href="#groups-2012-4-0-4" title="Permalink to this headline">¶</a></h3>
 +<p>Since ownCloud Enterprise 2012.4.0.4 group support is enabled. Groups,
 +that are activated for ownCloud usage, can be used to share files to
 +instead of single users, for example. It is also important to note, that
 +users can only share within groups where they belong to. Groups can be
 +enabled and disabled via UCM as shown in the screen shot below.</p>
 +<img alt="../_images/ucsint.png" src="../_images/ucsint.png" />
 +<p>Another way to enable or disable groups is to use the script
 +<tt class="file docutils literal"><span class="pre">/usr/share/owncloud/update-groups.sh</span></tt>. Currently, it takes an argument
 +which can be 1=enable groups or 0=disable groups. The filter applied is being
 +taken from the UCR variable <strong>owncloud/join/groups/filter</strong>. In case it is
 +empty, a message will be displayed.</p>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_windows.html
index a205705,0000000..702d0dc
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_windows.html
+++ b/core/doc/admin/installation/installation_windows.html
@@@ -1,427 -1,0 +1,427 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Windows 7 and Windows Server 2008 — ownCloud Administrators Manual 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="Univention Corporate Server" href="installation_ucs.html" />
 +    <link rel="prev" title="Mac OS X" href="installation_macos.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 current"><a class="current reference internal" href="">Windows 7 and Windows Server 2008</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#activate-iis-with-cgi-support">Activate IIS with CGI Support</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#installing-php">Installing PHP</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#installing-mysql">Installing MySQL</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#installing-owncloud">Installing ownCloud</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#ensure-proper-http-verb-handling">Ensure Proper HTTP-Verb handling</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#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_ucs.html">Univention Corporate Server</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_source.html">Manual Installation</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html">Other Web Servers</a></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="windows-7-and-windows-server-2008">
 +<h1>Windows 7 and Windows Server 2008<a class="headerlink" href="#windows-7-and-windows-server-2008" title="Permalink to this headline">¶</a></h1>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">You must move the data directory outside of your public root (See
 +advanced install settings)</p>
 +</div>
 +<p>This section describes how to install ownCloud on Windows with <abbr title="Internet Information Services">IIS</abbr>.</p>
 +<p>It assumes that you have a vanilla, non-IIS enabled Windows
 +machine – Windows 7 or Server 2008. After enabling IIS, the steps are
 +essentially identical for Windows 7 and Windows Server 2008.</p>
 +<p>For installing ownCloud physical access or a remote desktop connection is
 +required. You should leverage MySQL as the backend database for ownCloud. If you
 +do not want to use MySQL, it is possible to use Postgres or SQLite instead.
 +Microsoft SQL Server is not yet support.</p>
 +<p>Enabling SSL is not yet covered by this section.</p>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
- <p class="last">If you make your desktop machine or server available outside of your</p>
- </div>
- <p>LAN, you must maintain it. Monitor the logs, manage the access, apply patches to
++<p class="last">If you make your desktop machine or server available outside of your
++LAN, you must maintain it. Monitor the logs, manage the access, apply patches to
 +avoid compromising the system at large.</p>
++</div>
 +<p>There are 4 primary steps to the installation, and then a 5th step
 +required for configuring everything to allow files larger than the
 +default 2MB.</p>
 +<ol class="arabic simple">
 +<li>Install IIS with CGI support – enable IIS on your Windows machine.</li>
 +<li>Install PHP – Grab, download and install PHP.</li>
 +<li>Install MySQL – Setup the MySQL server manager and enable ownCloud to create
 +an instance.</li>
 +<li>Install ownCloud – The whole reason we are here!</li>
 +<li>Configure upload sizes and timeouts to enable large file uploads – So that
 +you can upload larger files.</li>
 +</ol>
 +<div class="section" id="activate-iis-with-cgi-support">
 +<h2>Activate IIS with CGI Support<a class="headerlink" href="#activate-iis-with-cgi-support" title="Permalink to this headline">¶</a></h2>
 +<div class="section" id="windows-7">
 +<h3>Windows 7<a class="headerlink" href="#windows-7" title="Permalink to this headline">¶</a></h3>
 +<ol class="arabic simple">
 +<li>Go to <em class="guilabel">Start –> Control Panel –> Programs</em>.</li>
 +<li>Under Programs and Features, there is link titled <em class="guilabel">Turn Windows Features on
 +and Off</em>. Click on it.</li>
 +<li>There is a box labeled Internet Information Services, expand it.</li>
 +<li>Expand World Wide Web Services and all the folders underneath.</li>
 +<li>Select the folders as illustrated in the picture below to get your IIS
 +server up and running.</li>
 +</ol>
 +<div class="align-center figure align-center">
 +<img alt="Windows features required for ownCloud on Windows 7" src="../_images/win7features.jpg" style="width: 250px;" />
 +<p class="caption">Windows Features required for ownCloud on Windows 7</p>
 +</div>
 +<p>You do not need an FTP server running, so you should tune
 +that feature off for your server. You definitely need the IIS Management
 +Console, as that is the easiest way to start, stop, restart you server,
 +as well as where you change certificate options and manage items like
 +file upload size. You must check the CGI box under Application
 +Development Features, because CGI is how you enable PHP on IIS.</p>
 +<p>You have to turn off WebDAV publishing or the Windows WebDAV
 +conflicts with the ownCloud WebDAV interface. This might already be
 +turned off for you, just make sure it stays that way. The common HTTP
 +features are the features you would expect from a web server.
 +With the selections on this page, IIS will now serve up a web page for you.</p>
 +<p>Restart IIS by going to the IIS manager (<em class="guilabel">Start –> IIS Manager</em>).</p>
 +<p>Select your website, and on the far right side is a section titled
 +<em class="guilabel">Manage Server</em>. Make sure that the service is started, or click
 +<em class="guilabel">Start</em> to start the services selected. Once this is complete, you
 +should be able to go to a web browser and navigate to <a class="reference external" href="http://localhost">http://localhost</a>.</p>
 +<p>This should open the standard IIS 7 splash page, which is just a static image
 +that says your web server is running. Assuming you were able to get the
 +splash page, it is safe to say your web server is now up and running.</p>
 +</div>
 +<div class="section" id="windows-server-2008">
 +<h3>Windows Server 2008<a class="headerlink" href="#windows-server-2008" title="Permalink to this headline">¶</a></h3>
 +<ol class="arabic simple">
 +<li>Go to <em class="guilabel">Start –> Control Panel –> Programs</em>.</li>
 +<li>Under Programs and Features, there is link titled
 +<em class="guilabel">Turn Windows Features on and Off</em>. Click on it.</li>
 +<li>This will bring up the Server Manager.</li>
 +<li>In the server manager, Click on Roles, and then click Add Roles.</li>
 +<li>Use the <em class="guilabel">Add Roles Wizard</em> to add the web server role.</li>
 +</ol>
 +<div class="align-center figure align-center">
 +<img alt="server roles required for owncloud" src="../_images/winserverroles.jpg" style="width: 300px;" />
 +<p class="caption">Server roles required for ownCloud</p>
 +</div>
 +<ol class="arabic simple" start="6">
 +<li>Make sure that, at a minimum, the same boxes are checked in this wizard that
 +are checked in the Windows 7 Section. For example, make sure that the CGI box
 +is checked under Application Development Features, and that WebDAV Publishing
 +is turned off. With Remote Desktop Sharing turned on, the detailed role
 +service list looks like the figure “Role Services”.</li>
 +<li>Restart IIS by going to the IIS manager (<em class="guilabel">Start –> IIS Manager</em>).</li>
 +<li>Select your website, and on the far right side is a section titled Manage
 +server. Make sure that the service is started, or click “Start” to start the
 +services selected.</li>
 +<li>Once this is complete, you should be able to go to a web browser and type
 +<cite>localhost</cite>. This should open the standard IIS 7 splash page, which is just a
 +static image that says your web server is running.Assuming you were able to get
 +the splash page, it is safe to say your web server is now up and running. The
 +next part of this “how to” installs PHP on the server.</li>
 +</ol>
 +</div>
 +</div>
 +<div class="section" id="installing-php">
 +<h2>Installing PHP<a class="headerlink" href="#installing-php" title="Permalink to this headline">¶</a></h2>
 +<p>This part is also straightforward, but it is necessary to remind you that this
 +is for IIS only.</p>
 +<ol class="arabic simple">
 +<li>Go to the following link and grab the <a class="reference external" href="http://windows.php.net/download/">PHP installer</a> for version “VC9 Non Thread Safe” 32 or
 +64 bit based on your system.</li>
 +</ol>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">If you are using Apache, make sure you grab VC6 instead, lower on the page.</p>
 +</div>
 +<ol class="arabic simple" start="2">
 +<li>Once through that login, select the location that is closest to you
 +geographically.</li>
 +<li>Run that install wizard once it is downloaded. Read the license agreement,
 +agree, select an install directory.</li>
 +<li>Then select IIS FastCGI as the install server.</li>
 +<li>Take the default selections for the items to install, and click next.
 +Then click <cite>install</cite>.</li>
 +<li>After a few minutes, PHP will be installed. On to MySQL.</li>
 +</ol>
 +</div>
 +<div class="section" id="installing-mysql">
 +<h2>Installing MySQL<a class="headerlink" href="#installing-mysql" title="Permalink to this headline">¶</a></h2>
 +<p>This part installs MySQL on your Windows machine.</p>
 +<ol class="arabic simple">
 +<li>Point your browser to <a class="reference external" href="http://dev.mysql.com/downloads/">http://dev.mysql.com/downloads/</a> and download the latest
 +community edition for your OS – the 32 or 64 bit version. Please download the
 +<strong>MSI Installer</strong> as it will make life easier.</li>
 +<li>Once downloaded, install MySQL (5.5 at the time of writing). Select the
 +Typical installation.</li>
 +<li>When that finishes, check the box to launch the MySQL Instance Configuration
 +Wizard and click Finish.</li>
 +<li>Select a standard configuration, as this will be the only version of MySQL on
 +this machine.</li>
 +<li>Select to install as a windows service, and Check the Launch the MySQL Server
 +Automatically button.</li>
 +<li>Select the modify security settings box on the next page, and enter a
 +password you will remember. You will need this password when you configure
 +ownCloud.</li>
 +<li>Uncheck <strong>enable</strong> root access from remote machines” for security reasons.</li>
 +<li>Click execute, and wait while the instance is created and launched.</li>
 +<li>Click Finish when this is all complete.</li>
 +</ol>
 +<p>Take particular note of your MySQL password, as the user name <strong>root</strong>
 +and the password you select will be necessary later on in the ownCloud
 +installation. As an aside, this link is an excellent resource for questions on
 +how to configure your MySQL instance, and also to configure PHP to work with
 +MySQL. This, however, is not strictly necessary as much of this is handled when
 +you download ownCloud.</p>
 +<p>More information in this topic can be found in a <a class="reference external" href="http://learn.iis.net/page.aspx/353/install-and-configure-mysql-for-php-applications-on-iis-7-and-above/">tutorial on the IIS web site</a>.</p>
 +</div>
 +<div class="section" id="installing-owncloud">
 +<h2>Installing ownCloud<a class="headerlink" href="#installing-owncloud" title="Permalink to this headline">¶</a></h2>
 +<ol class="arabic simple">
 +<li>Download the latest version of ownCloud from <a class="reference external" href="http://owncloud.org/download">http://owncloud.org/download</a>.</li>
 +<li>It will arrive as a tar.bz2 file, and I recommend something like jZip for a
 +free utility to unzip it.</li>
 +<li>Once you have the ownCloud directory unzipped and saved locally, copy it into
 +your wwwroot directory (probably <strong>C:\inetpub\wwwroot</strong>).</li>
 +</ol>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
- <p class="last">You cannot install directly into the directory <strong>wwwroot</strong> from jzip,</p>
- </div>
- <p>as only the administrator can unzip into the <strong>wwwroot</strong> directory. If you save
++<p class="last">You cannot install directly into the directory <strong>wwwroot</strong> from jzip,
++as only the administrator can unzip into the <strong>wwwroot</strong> directory. If you save
 +it in a different folder, and then move the files into <strong>wwwroot</strong> in windows
 +explorer, it works. This will install ownCloud locally in your root web
 +directory. You can use a subdirectory called owncloud, or whatever you want –
 +the www root, or something else.</p>
++</div>
 +<ol class="arabic simple" start="4">
 +<li>It is now time to give write access to the ownCloud directory to the ownCloud
 +server: Navigate your windows explorer over to  <strong>inetpub/wwwroot/owncloud</strong> (or
 +your installation directory if you selected something different).</li>
 +<li>Right click and select properties. Click on the security tab, and click the
 +button “to change permissions, click edit”.</li>
 +<li>Select the “users” user from the list, and check the box “write”.</li>
 +<li>Apply these settings and close out.</li>
 +<li>Now open your browser and go to <a class="reference external" href="http://localhost/owncloud">http://localhost/owncloud</a> (or localhost if it
 +is installed in the root www directory). This should bring up the ownCloud
 +configuration page.</li>
 +<li>At this page, you enter your desired ownCloud user name and password for the
 +administrator, and expand the little arrow.</li>
- <li>Select MySQL as the database, and enter your MySQL database user name,</li>
++<li>Select MySQL as the database, and enter your MySQL database user name,
++password and desired instance name – use the user name and password you setup
++for MySQL earlier in step 3, and pick any name for the database instance.</li>
 +</ol>
- <blockquote>
- <div>password and desired instance name – use the user name and password you setup
- for MySQL earlier in step 3, and pick any name for the database instance.</div></blockquote>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
- <p class="last">The owncloud admin password and the MySQL password CANNOT be the same
++<p class="last">The ownCloud admin password and the MySQL password CANNOT be the same
 +in any way.</p>
 +</div>
 +<ol class="arabic simple" start="11">
 +<li>Click next, and ownCloud should have you logged in as the admin user, and
 +you can get started exploring ownCloud, creating other users and more!</li>
 +</ol>
 +</div>
 +<div class="section" id="ensure-proper-http-verb-handling">
 +<h2>Ensure Proper HTTP-Verb handling<a class="headerlink" href="#ensure-proper-http-verb-handling" title="Permalink to this headline">¶</a></h2>
 +<p>IIS must pass all HTTP and WebDAV verbs to the PHP/CGI handler, and must not try
 +to handle them by itself. If it does, syncing with the Desktop and Mobile
 +Clients will fail. Here is how to ensure your configuration is correct:</p>
 +<ol class="arabic simple">
 +<li>Open IIS Manager7.</li>
 +<li>In the <cite>Connections</cite> bar, pick your site below <cite>Sites</cite>, or choose the top
 +level entry if you want to modify the machine-wide settings.</li>
 +<li>Choose the <cite>Handler Mappings</cite> feature click <cite>PHP_via_fastCGI</cite>.</li>
 +<li>Choose <cite>Request Restrictions</cite> and find the <cite>Verbs</cite> tab.</li>
 +<li>Ensure <cite>All Verbs</cite> is checked.</li>
 +<li>Click <cite>OK</cite>.</li>
 +<li>Next, choose <cite>Request Filtering</cite> feature from IIS Manager.</li>
 +<li>Ensure that all verbs are permitted (or none are forbidden) in the <cite>Verbs</cite>
 +tab.</li>
 +</ol>
 +<p>Also, ensure that you did not enable the WebDAV authoring module, since ownCloud
 +needs to be able to handle WebDAV on the application level.</p>
 +</div>
 +<div class="section" id="configuring-owncloud-php-and-iis-for-large-file-uploads">
 +<h2>Configuring ownCloud, PHP and IIS for Large File Uploads<a class="headerlink" href="#configuring-owncloud-php-and-iis-for-large-file-uploads" title="Permalink to this headline">¶</a></h2>
 +<p>Before going too nuts on ownCloud, it is important to do a couple of
 +configuration changes to make this a useful service for you. You will probably
 +want to increase the <strong>max upload size</strong>, for example. The default upload is
 +set to <strong>2MB</strong>, which is too small for even most MP3 files.</p>
 +<p>To do that, simply go into your <strong>PHP.ini</strong> file, which can be found in your
 +<strong>C:\Program Files (x86)\PHP</strong> folder. In here, you will find a <strong>PHP.ini</strong>
 +file. Open this in a text editor, and look for a few key attributes to
 +change:</p>
 +<ul class="simple">
 +<li><strong>upload_max_filesize</strong> – change this to something good, like 1G, and you
 +will get to upload much larger files.</li>
 +<li><strong>post_max_size</strong> – also change this size, and make it larger than the max
 +upload size you chose, like 1G.</li>
 +</ul>
 +<p>There are other changes you can make, such as the timeout duration for
 +uploads, but for now you should be all set in the <strong>PHP.ini</strong> file.</p>
 +<p>Now you have to go back to IIS manager and make one last change to enable file
 +uploads on the web server larger than 30MB.</p>
 +<ol class="arabic">
 +<li><p class="first">Go to the start menu, and type <strong>iis manager</strong>.</p>
 +</li>
 +<li><p class="first">Open IIS Manager Select the website you want enable to accept large file
 +uploads.</p>
 +</li>
 +<li><p class="first">In the main window in the middle double click on the icon <strong>Request
 +filtering</strong>.</p>
 +</li>
 +<li><p class="first">Once the window is opened you will see a bunch of tabs across the top of the
 +far right,</p>
 +<p>Select <em class="guilabel">Edit Feature Settings</em> and modify the <em class="guilabel">Maximum
 +allowed content length (bytes)</em></p>
 +</li>
 +<li><p class="first">In here, you can change this to up to 4.1 GB.</p>
 +</li>
 +</ol>
 +<div class="admonition note">
 +<p class="first admonition-title">Note</p>
 +<p class="last">This entry is in BYTES, not KB.</p>
 +</div>
 +<p>You should now have ownCloud configured and ready for use.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/maintenance/backup.html
index b0909e1,0000000..115252f
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/backup.html
+++ b/core/doc/admin/maintenance/backup.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>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-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>
 +<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>
++<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/restore.html
index d939c9e,0000000..0ffa3a3
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/restore.html
+++ b/core/doc/admin/maintenance/restore.html
@@@ -1,197 -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="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>
++<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 61c5fc7,0000000..8a63a4f
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/update.html
+++ b/core/doc/admin/maintenance/update.html
@@@ -1,212 -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>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" />
 +<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 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>
++<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>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 lastest point release (see below).</p>
++<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>
 +</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><p>ls | grep -v ‘data\|config’ | xargs rm -r</p>
 +</div></blockquote>
 +</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>
++<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>
 +</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/skeleton/ownCloudUserManual.pdf
index d3bae10,0000000..58ba99f
mode 100644,000000..100644
Binary files differ
diff --cc version.php
index c292355,d48c98f..1a0ad48
--- 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, 14);
 -
 -// The human readable string
 -$OC_VersionString='6.0.0a';
 -
 -// The ownCloud edition
 -$OC_Edition='';
 -
 -// The ownCloud channel
 -$OC_Channel='git';
 -
 -// The build number
 -$OC_Build='';
 -
 +<?php 
- $OC_Version = array(6,0,0,13);
- $OC_VersionString = '6.0';
++$OC_Version = array(6,0,0,14);
++$OC_VersionString = '6.0.0a';
 +$OC_Edition = '';
 +$OC_Channel = 'stable';
- $OC_Build = '2013-12-10T10:56:53+00:00';
++$OC_Build = '2013-12-14T19:49:13+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