[Pkg-owncloud-commits] [owncloud] 138/145: Imported Upstream version 6.0.2~rc1+dfsg

David Prévot taffit at moszumanska.debian.org
Wed Feb 26 16:27:49 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit 52ff8c329e8ea7add569fe35fb523cc8a3cb6f4e
Merge: db5ff38 16e24dc
Author: David Prévot <taffit at debian.org>
Date:   Tue Feb 25 14:49:39 2014 -0400

    Imported Upstream version 6.0.2~rc1+dfsg

 .htaccess                                          |    2 +-
 .../Classes/PHPExcel/Reader/Excel2003XML.php       |    2 +
 .../PHPExcel/Classes/PHPExcel/Reader/Excel2007.php |   26 +-
 .../PHPExcel/Classes/PHPExcel/Reader/Gnumeric.php  |    1 +
 .../PHPExcel/Classes/PHPExcel/Reader/OOCalc.php    |    3 +
 3rdparty/Sabre/DAV/Client.php                      |    6 +-
 3rdparty/Sabre/DAV/Locks/Plugin.php                |    2 +-
 3rdparty/Sabre/DAV/XMLUtil.php                     |    3 +-
 3rdparty/getid3/getid3.lib.php                     |    1 +
 3rdparty/patches.txt                               |    4 +
 3rdparty/phpdocx/classes/AutoLoader.inc            |    2 +-
 3rdparty/phpdocx/classes/CreateDocx.inc            |   11 +
 3rdparty/phpdocx/classes/CreateMath.inc            |    1 +
 3rdparty/phpdocx/classes/Docx2Text.inc             |    5 +
 3rdparty/phpdocx/classes/TransformDoc.inc          |    6 +-
 3rdparty/phpdocx/classes/WordML.inc                |    1 +
 3rdparty/phpdocx/pdf/dompdf.php                    |  328 ---
 3rdparty/phpdocx/pdf/dompdf_config.inc.php         |  497 -----
 3rdparty/phpdocx/pdf/include/_dompdf2phpdocx.php   |  395 ----
 .../pdf/include/_dompdf_treeOut__20120418.php      |  445 ----
 .../pdf/include/absolute_positioner.cls.php        |   85 -
 .../phpdocx/pdf/include/abstract_renderer.cls.php  |  890 --------
 .../pdf/include/attribute_translator.cls.php       |  481 -----
 .../pdf/include/block_frame_decorator.cls.php      |  354 ----
 .../pdf/include/block_frame_reflower.cls.php       |  756 -------
 .../phpdocx/pdf/include/block_positioner.cls.php   |   86 -
 .../phpdocx/pdf/include/block_renderer.cls.php     |  211 --
 .../pdf/include/cached_pdf_decorator.cls.php       |  186 --
 3rdparty/phpdocx/pdf/include/canvas.cls.php        |  328 ---
 .../phpdocx/pdf/include/canvas_factory.cls.php     |   83 -
 3rdparty/phpdocx/pdf/include/cellmap.cls.php       |  730 -------
 3rdparty/phpdocx/pdf/include/cpdf_adapter.cls.php  |  919 --------
 3rdparty/phpdocx/pdf/include/css_color.cls.php     |  287 ---
 3rdparty/phpdocx/pdf/include/dompdf.cls.php        |  792 -------
 .../phpdocx/pdf/include/dompdf_exception.cls.php   |   60 -
 .../pdf/include/dompdf_internal_exception.cls.php  |   59 -
 3rdparty/phpdocx/pdf/include/dompdf_treeOut.php    |  486 -----
 3rdparty/phpdocx/pdf/include/file.skel             |   40 -
 .../phpdocx/pdf/include/fixed_positioner.cls.php   |  117 --
 3rdparty/phpdocx/pdf/include/font_metrics.cls.php  |  299 ---
 3rdparty/phpdocx/pdf/include/frame.cls.php         |  990 ---------
 .../phpdocx/pdf/include/frame_decorator.cls.php    |  483 -----
 3rdparty/phpdocx/pdf/include/frame_factory.cls.php |  207 --
 .../phpdocx/pdf/include/frame_reflower.cls.php     |  414 ----
 3rdparty/phpdocx/pdf/include/frame_tree.cls.php    |  230 --
 3rdparty/phpdocx/pdf/include/functions.inc.php     |  942 ---------
 3rdparty/phpdocx/pdf/include/gd_adapter.cls.php    |  840 --------
 3rdparty/phpdocx/pdf/include/image_cache.cls.php   |  231 --
 .../pdf/include/image_frame_decorator.cls.php      |  116 --
 .../pdf/include/image_frame_reflower.cls.php       |  162 --
 .../phpdocx/pdf/include/image_renderer.cls.php     |   95 -
 .../pdf/include/inline_frame_decorator.cls.php     |  112 -
 .../pdf/include/inline_frame_reflower.cls.php      |   99 -
 .../phpdocx/pdf/include/inline_positioner.cls.php  |  102 -
 .../phpdocx/pdf/include/inline_renderer.cls.php    |  207 --
 .../pdf/include/javascript_embedder.cls.php        |   68 -
 .../include/list_bullet_frame_decorator.cls.php    |   96 -
 .../pdf/include/list_bullet_frame_reflower.cls.php |   66 -
 .../list_bullet_image_frame_decorator.cls.php      |  188 --
 .../pdf/include/list_bullet_positioner.cls.php     |  111 -
 .../pdf/include/list_bullet_renderer.cls.php       |  200 --
 .../pdf/include/null_frame_decorator.cls.php       |   59 -
 .../pdf/include/null_frame_reflower.cls.php        |   54 -
 .../phpdocx/pdf/include/null_positioner.cls.php    |   56 -
 3rdparty/phpdocx/pdf/include/page_cache.cls.php    |  159 --
 .../pdf/include/page_frame_decorator.cls.php       |  583 ------
 .../pdf/include/page_frame_reflower.cls.php        |  245 ---
 .../phpdocx/pdf/include/pdflib_adapter.cls.php     | 1053 ----------
 3rdparty/phpdocx/pdf/include/php_evaluator.cls.php |   76 -
 3rdparty/phpdocx/pdf/include/positioner.cls.php    |   71 -
 3rdparty/phpdocx/pdf/include/renderer.cls.php      |  293 ---
 3rdparty/phpdocx/pdf/include/style.cls.php         | 2165 -------------------
 3rdparty/phpdocx/pdf/include/stylesheet.cls.php    | 1202 -----------
 .../pdf/include/table_cell_frame_decorator.cls.php |  135 --
 .../pdf/include/table_cell_frame_reflower.cls.php  |  147 --
 .../pdf/include/table_cell_positioner.cls.php      |   61 -
 .../pdf/include/table_cell_renderer.cls.php        |  185 --
 .../pdf/include/table_frame_decorator.cls.php      |  342 ---
 .../pdf/include/table_frame_reflower.cls.php       |  574 -----
 .../pdf/include/table_row_frame_decorator.cls.php  |   81 -
 .../pdf/include/table_row_frame_reflower.cls.php   |   94 -
 .../table_row_group_frame_decorator.cls.php        |   96 -
 .../include/table_row_group_frame_reflower.cls.php |   92 -
 .../pdf/include/table_row_positioner.cls.php       |   68 -
 3rdparty/phpdocx/pdf/include/tcpdf_adapter.cls.php |  498 -----
 .../pdf/include/text_frame_decorator.cls.php       |  204 --
 .../pdf/include/text_frame_reflower.cls.php        |  440 ----
 3rdparty/phpdocx/pdf/include/text_renderer.cls.php |  182 --
 3rdparty/phpdocx/pdf/include/ttf_info.cls.php      |  306 ---
 3rdparty/phpdocx/pdf/load_font.php                 |    2 +-
 3rdparty/phpdocx/pdf/www/examples.php              |  108 -
 3rdparty/phpdocx/pdf/www/foot.inc                  |   10 -
 3rdparty/phpdocx/pdf/www/head.inc                  |   39 -
 3rdparty/phpdocx/pdf/www/images/arrow_01.gif       |  Bin 237 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/arrow_02.gif       |  Bin 227 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/arrow_03.gif       |  Bin 232 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/arrow_04.gif       |  Bin 251 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/arrow_05.gif       |  Bin 241 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/arrow_06.gif       |  Bin 268 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/css2.png           |  Bin 392 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/dompdf_simple.png  |  Bin 4861 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/favicon.ico        |  Bin 1406 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/favicon.png        |  Bin 308 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/h_bar.gif          |  Bin 1350 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/left_arrow.gif     |  Bin 276 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/logo.png           |  Bin 2492 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/logo.xcf           |  Bin 8524 -> 0 bytes
 .../phpdocx/pdf/www/images/php5-power-micro.png    |  Bin 268 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/small_logo.png     |  Bin 887 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/star_01.gif        |  Bin 314 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/star_02.gif        |  Bin 324 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/star_03.gif        |  Bin 312 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/star_04.gif        |  Bin 335 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/star_05.gif        |  Bin 380 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/title.gif          |  Bin 2992 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/v_bar.gif          |  Bin 2607 -> 0 bytes
 3rdparty/phpdocx/pdf/www/images/xhtml10.png        |  Bin 481 -> 0 bytes
 3rdparty/phpdocx/pdf/www/index.php                 |   32 -
 3rdparty/phpdocx/pdf/www/style.css                 |  269 ---
 3rdparty/phpdocx/pdf/www/test/anchor_link.html     |  210 --
 .../phpdocx/pdf/www/test/background_image.html     |   68 -
 .../backgroundcolor_fontdecoration_pageborder.html |  138 --
 3rdparty/phpdocx/pdf/www/test/baseline.html        |   16 -
 3rdparty/phpdocx/pdf/www/test/block_height.html    |   14 -
 .../phpdocx/pdf/www/test/border_css_values.html    |   41 -
 3rdparty/phpdocx/pdf/www/test/border_test.html     |  124 --
 3rdparty/phpdocx/pdf/www/test/br.html              |   46 -
 3rdparty/phpdocx/pdf/www/test/center_table.html    |   19 -
 3rdparty/phpdocx/pdf/www/test/css/common.css       |  128 --
 3rdparty/phpdocx/pdf/www/test/css/importabs.css    |    2 -
 3rdparty/phpdocx/pdf/www/test/css/importall.css    |    2 -
 .../phpdocx/pdf/www/test/css/importdisplay.css     |    2 -
 3rdparty/phpdocx/pdf/www/test/css/importprint.css  |    2 -
 3rdparty/phpdocx/pdf/www/test/css/importsub.css    |    2 -
 3rdparty/phpdocx/pdf/www/test/css/linkall.css      |    2 -
 3rdparty/phpdocx/pdf/www/test/css/linkdefault.css  |    2 -
 3rdparty/phpdocx/pdf/www/test/css/linkdisplay.css  |    2 -
 3rdparty/phpdocx/pdf/www/test/css/linkprint.css    |    2 -
 3rdparty/phpdocx/pdf/www/test/css/print_static.css |  701 -------
 3rdparty/phpdocx/pdf/www/test/demo_01.html         |  214 --
 3rdparty/phpdocx/pdf/www/test/entities.html        |   14 -
 3rdparty/phpdocx/pdf/www/test/font_selection.html  |  116 --
 3rdparty/phpdocx/pdf/www/test/gif_test.html        |    9 -
 3rdparty/phpdocx/pdf/www/test/html_attributes.html |   55 -
 3rdparty/phpdocx/pdf/www/test/image.html           |   20 -
 3rdparty/phpdocx/pdf/www/test/image_variants.html  |  149 --
 .../phpdocx/pdf/www/test/images/dokuwiki-128.png   |  Bin 33615 -> 0 bytes
 .../phpdocx/pdf/www/test/images/dompdf_simple.png  |  Bin 4739 -> 0 bytes
 3rdparty/phpdocx/pdf/www/test/images/html.png      |  Bin 748 -> 0 bytes
 3rdparty/phpdocx/pdf/www/test/images/pdf.png       |  Bin 663 -> 0 bytes
 3rdparty/phpdocx/pdf/www/test/images/php.gif       |  Bin 2523 -> 0 bytes
 3rdparty/phpdocx/pdf/www/test/images/png.png       |  Bin 1001 -> 0 bytes
 3rdparty/phpdocx/pdf/www/test/images/smiley.png    |  Bin 730 -> 0 bytes
 3rdparty/phpdocx/pdf/www/test/important_flag.html  |   54 -
 3rdparty/phpdocx/pdf/www/test/javascript.html      |   30 -
 3rdparty/phpdocx/pdf/www/test/large_table.html     | 2197 --------------------
 3rdparty/phpdocx/pdf/www/test/long_table.php       |   43 -
 3rdparty/phpdocx/pdf/www/test/margin.html          |   38 -
 3rdparty/phpdocx/pdf/www/test/media.html           |  150 --
 3rdparty/phpdocx/pdf/www/test/multiple_class.html  |   18 -
 3rdparty/phpdocx/pdf/www/test/nbsp.html            |    6 -
 3rdparty/phpdocx/pdf/www/test/nested_table.html    |   61 -
 3rdparty/phpdocx/pdf/www/test/pages.html           |  201 --
 3rdparty/phpdocx/pdf/www/test/php_test.php         |   28 -
 3rdparty/phpdocx/pdf/www/test/remote.html          |   21 -
 3rdparty/phpdocx/pdf/www/test/simple_ul.html       |   39 -
 3rdparty/phpdocx/pdf/www/test/table.html           |  106 -
 3rdparty/phpdocx/pdf/www/test/table_01.html        |   24 -
 3rdparty/phpdocx/pdf/www/test/table_height.html    |   15 -
 3rdparty/phpdocx/pdf/www/test/table_image.html     |   19 -
 3rdparty/phpdocx/pdf/www/test/ul.html              |  312 ---
 3rdparty/phpdocx/pdf/www/test/unicode.html         |    8 -
 .../phpdocx/pdf/www/test/unicode_wrapping.html     |   13 -
 apps/calendar/appinfo/app.php                      |    4 +
 apps/calendar/js/calendar.js                       |    2 +-
 apps/calendar/lib/object.php                       |   38 +-
 apps/calendar/lib/sabre/backend.php                |   47 +-
 apps/calendar/templates/part.eventform.php         |   12 +-
 apps/calendar/templates/settings.php               |    4 +-
 apps/contacts/Changelog                            |    7 +
 apps/contacts/appinfo/app.php                      |    4 +-
 apps/contacts/js/addressbooks.js                   |    4 +-
 apps/contacts/js/app.js                            |   30 +-
 apps/contacts/js/config.php                        |   13 +-
 apps/contacts/js/contacts.js                       |  100 +-
 apps/contacts/js/groups.js                         |   15 +-
 apps/contacts/lib/backend/database.php             |   23 +-
 apps/contacts/lib/backend/shared.php               |    3 +
 apps/contacts/lib/carddav/backend.php              |   26 +-
 apps/contacts/lib/contact.php                      |    2 +-
 .../lib/controller/addressbookcontroller.php       |    5 +-
 .../lib/controller/contactphotocontroller.php      |    4 +
 apps/contacts/lib/controller/groupcontroller.php   |   17 +-
 apps/contacts/lib/controller/importcontroller.php  |    8 +
 apps/contacts/lib/utils/jsonserializer.php         |   21 +-
 apps/contacts/lib/vobject/groupproperty.php        |    6 +-
 apps/contacts/lib/vobject/vcard.php                |   98 +-
 apps/documents/ajax/documentController.php         |    2 +-
 apps/documents/ajax/download.php                   |    2 +-
 apps/documents/ajax/{download.php => mimes.php}    |    7 +-
 apps/documents/ajax/otpoll.php                     |   10 +-
 apps/documents/ajax/sessionController.php          |   21 -
 apps/documents/ajax/userController.php             |   23 +-
 apps/documents/appinfo/routes.php                  |   14 -
 apps/documents/css/style.css                       |   30 +-
 apps/documents/index.php                           |    1 +
 apps/documents/js/documents.js                     |  114 +-
 apps/documents/js/viewer/viewer.js                 |   17 +-
 apps/documents/lib/db/op.php                       |   29 +-
 apps/documents/lib/db/session.php                  |    3 +-
 apps/documents/lib/helper.php                      |  119 +-
 apps/documents/lib/invite.php                      |   79 -
 apps/documents/public.php                          |    1 -
 apps/documents/templates/documents.php             |    6 +-
 apps/documents/templates/part.sessions.php         |    6 -
 apps/files/ajax/upload.php                         |   18 +-
 apps/files/appinfo/remote.php                      |    1 +
 apps/files/command/scan.php                        |    1 +
 apps/files/css/files.css                           |   15 +-
 apps/files/css/upload.css                          |    8 -
 apps/files/js/fileactions.js                       |    4 +-
 apps/files/js/filelist.js                          |    4 +-
 apps/files/js/files.js                             |    2 +-
 apps/files/templates/index.php                     |   12 +-
 apps/files/templates/part.list.php                 |    2 +-
 apps/files_encryption/ajax/getMigrationStatus.php  |    8 +-
 apps/files_encryption/appinfo/app.php              |    1 +
 apps/files_encryption/appinfo/info.xml             |    4 +
 apps/files_encryption/hooks/hooks.php              |  111 +-
 apps/files_encryption/js/detect-migration.js       |    6 +-
 apps/files_encryption/js/encryption.js             |   12 +
 apps/files_encryption/lib/helper.php               |    2 +
 apps/files_encryption/lib/keymanager.php           |   55 +-
 apps/files_encryption/lib/proxy.php                |   75 +-
 apps/files_encryption/lib/util.php                 |  145 +-
 apps/files_encryption/tests/hooks.php              |  326 +++
 apps/files_encryption/tests/keymanager.php         |   20 +
 apps/files_encryption/tests/proxy.php              |   50 -
 apps/files_encryption/tests/share.php              |  119 +-
 apps/files_encryption/tests/util.php               |   81 +-
 apps/files_external/3rdparty/smb4php/smb.php       |    2 +-
 apps/files_external/lib/config.php                 |   14 +-
 apps/files_external/tests/mountconfig.php          |   25 +
 apps/files_pdfviewer/js/loader.js                  |    2 +-
 apps/files_sharing/css/authenticate.css            |    7 +-
 apps/files_sharing/css/mobile.css                  |   49 +
 apps/files_sharing/css/public.css                  |   86 +-
 apps/files_sharing/js/public.js                    |   24 +-
 apps/files_sharing/lib/api.php                     |   27 +-
 apps/files_sharing/lib/cache.php                   |   75 +-
 apps/files_sharing/lib/permissions.php             |   15 +-
 apps/files_sharing/lib/share/file.php              |    9 +-
 apps/files_sharing/public.php                      |    7 +-
 apps/files_sharing/templates/authenticate.php      |    2 +-
 apps/files_sharing/templates/public.php            |   83 +-
 apps/files_sharing/tests/cache.php                 |  249 +++
 apps/files_sharing/tests/permissions.php           |  110 +
 apps/files_trashbin/ajax/preview.php               |   14 +-
 apps/files_trashbin/appinfo/database.xml           |   16 +-
 apps/files_trashbin/appinfo/version                |    2 +-
 apps/files_videoviewer/appinfo/version             |    2 +-
 .../js/mediaelement-and-player.js                  |  948 +++++----
 .../js/mediaelement-and-player.min.js              |  242 +--
 apps/files_videoviewer/mediaelement/src/Builder.py |  137 --
 .../mediaelement/src/compiler.jar                  |  Bin 3939454 -> 0 bytes
 .../mediaelement/src/css/background.png            |  Bin 135 -> 0 bytes
 .../mediaelement/src/css/bigplay.fw.png            |  Bin 73809 -> 0 bytes
 .../mediaelement/src/css/bigplay.png               |  Bin 2912 -> 0 bytes
 .../mediaelement/src/css/bigplay.svg               |   36 -
 .../mediaelement/src/css/controls-ted.png          |  Bin 1559 -> 0 bytes
 .../mediaelement/src/css/controls-wmp-bg.png       |  Bin 1960 -> 0 bytes
 .../mediaelement/src/css/controls-wmp.png          |  Bin 5511 -> 0 bytes
 .../mediaelement/src/css/controls.fw.png           |  Bin 80382 -> 0 bytes
 .../mediaelement/src/css/controls.png              |  Bin 1873 -> 0 bytes
 .../mediaelement/src/css/controls.svg              |   98 -
 .../mediaelement/src/css/loading.gif               |  Bin 6224 -> 0 bytes
 .../mediaelement/src/css/mediaelementplayer.css    |  850 --------
 .../mediaelement/src/css/mejs-skins.css            |  283 ---
 .../mediaelement/src/flash/FlashMediaElement.as    |    1 -
 .../mediaelement/src/flash/FlashMediaElement.fla   |  Bin 26182 -> 0 bytes
 .../mediaelement/src/flash/HtmlMediaEvent.as       |   29 -
 .../src/flash/htmlelements/AudioElement.as         |  332 ---
 .../src/flash/htmlelements/IMediaElement.as        |   35 -
 .../src/flash/htmlelements/VideoElement.as         |    1 -
 .../src/flash/htmlelements/YouTubeElement.as       |  403 ----
 .../mediaelement/src/js/jeesh-extras.js            |   49 -
 .../files_videoviewer/mediaelement/src/js/jeesh.js | 1578 --------------
 .../mediaelement/src/js/me-featuredetection.js     |   98 -
 .../mediaelement/src/js/me-header.js               |   13 -
 .../mediaelement/src/js/me-i18n-locale-de.js       |   26 -
 .../mediaelement/src/js/me-i18n-locale-zh.js       |   26 -
 .../mediaelement/src/js/me-i18n.js                 |  194 --
 .../mediaelement/src/js/me-mediaelements.js        |  327 ---
 .../mediaelement/src/js/me-namespace.js            |   25 -
 .../mediaelement/src/js/me-plugindetector.js       |  102 -
 .../mediaelement/src/js/me-shim.js                 |  892 --------
 .../mediaelement/src/js/me-utility.js              |  158 --
 .../mediaelement/src/js/mep-feature-ads-vast.js    |  243 ---
 .../mediaelement/src/js/mep-feature-ads.js         |  312 ---
 .../mediaelement/src/js/mep-feature-backlight.js   |  435 ----
 .../mediaelement/src/js/mep-feature-contextmenu.js |  197 --
 .../mediaelement/src/js/mep-feature-endedhtml.js   |   12 -
 .../mediaelement/src/js/mep-feature-fullscreen.js  |  458 ----
 .../src/js/mep-feature-googleanalytics.js          |   68 -
 .../mediaelement/src/js/mep-feature-loop.js        |   26 -
 .../mediaelement/src/js/mep-feature-playlist.js    |   12 -
 .../mediaelement/src/js/mep-feature-playpause.js   |   46 -
 .../mediaelement/src/js/mep-feature-postroll.js    |   35 -
 .../mediaelement/src/js/mep-feature-progress.js    |  173 --
 .../src/js/mep-feature-sourcechooser.js            |   87 -
 .../mediaelement/src/js/mep-feature-speed.js       |   11 -
 .../mediaelement/src/js/mep-feature-stop.js        |   33 -
 .../mediaelement/src/js/mep-feature-time.js        |   84 -
 .../mediaelement/src/js/mep-feature-tracks.js      |  673 ------
 .../src/js/mep-feature-visualcontrols.js           |   10 -
 .../mediaelement/src/js/mep-feature-volume.js      |  225 --
 .../mediaelement/src/js/mep-header.js              |   11 -
 .../mediaelement/src/js/mep-library.js             |    5 -
 .../mediaelement/src/js/mep-player.js              | 1165 -----------
 .../mediaelement/src/silverlight/App.xaml          |    8 -
 .../mediaelement/src/silverlight/App.xaml.cs       |   68 -
 .../mediaelement/src/silverlight/MainPage.xaml     |  276 ---
 .../mediaelement/src/silverlight/MainPage.xaml.cs  |  636 ------
 .../src/silverlight/Properties/AppManifest.xml     |    6 -
 .../src/silverlight/Properties/AssemblyInfo.cs     |   35 -
 .../src/silverlight/SilverlightMediaElement.csproj |  112 -
 .../SilverlightMediaElement.csproj.user            |   32 -
 .../src/silverlight/SilverlightMediaElement.sln    |   20 -
 .../mediaelement/src/yuicompressor-2.4.2.jar       |  Bin 851219 -> 0 bytes
 apps/gallery/ajax/image.php                        |   16 +-
 apps/gallery/ajax/thumbnail.php                    |   19 +-
 apps/gallery/css/mobile.css                        |   19 +
 apps/gallery/css/public.css                        |   31 +-
 apps/gallery/js/public.js                          |   12 +-
 apps/gallery/lib/thumbnail.php                     |    8 +-
 apps/gallery/public.php                            |    1 +
 apps/gallery/templates/public.php                  |   11 +-
 apps/updater/lib/downloader.php                    |   20 +-
 apps/updater/lib/helper.php                        |    8 +-
 apps/updater/templates/admin.php                   |    2 +-
 apps/user_ldap/appinfo/info.xml                    |    3 +
 apps/user_ldap/js/settings.js                      |    1 +
 apps/user_ldap/lib/access.php                      |   13 +-
 apps/user_ldap/lib/helper.php                      |    6 +
 apps/user_ldap/lib/ildapwrapper.php                |    4 +-
 apps/user_ldap/lib/ldap.php                        |    6 +-
 apps/user_ldap/lib/wizard.php                      |    5 +
 apps/user_ldap/tests/access.php                    |   71 +
 apps/user_ldap/tests/user_ldap.php                 |  101 +-
 apps/user_ldap/user_ldap.php                       |   36 +-
 config/config.sample.php                           |   10 +
 core/ajax/appconfig.php                            |   27 +-
 core/ajax/share.php                                |   28 +-
 core/css/icons.css                                 |  240 +++
 core/doc/admin/LDAP/CONFIGURATION.html             |  484 +++++
 .../Introduction.html}                             |   45 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../installation_linux.html => LDAP/index.html}    |   48 +-
 .../_images/100000000000001D0000001E5C455170.png   |  Bin 0 -> 1301 bytes
 .../_images/100000000000003800000018D49F1CE7.png   |  Bin 0 -> 873 bytes
 .../_images/1000000000000050000000DB83B8FA5B.png   |  Bin 0 -> 17868 bytes
 .../_images/10000000000000950000004412998BE7.png   |  Bin 0 -> 2083 bytes
 .../_images/10000000000000A800000073F49785A6.png   |  Bin 0 -> 5450 bytes
 .../_images/10000000000000B600000120706C3C75.png   |  Bin 0 -> 6579 bytes
 .../_images/10000000000000CD000000ECA8DE7780.png   |  Bin 0 -> 7028 bytes
 .../_images/10000000000000D2000000F553818155.png   |  Bin 0 -> 40563 bytes
 .../_images/10000000000000F1000000F56125BDBA.png   |  Bin 0 -> 5002 bytes
 .../_images/10000000000000F1000000F6704F46D3.png   |  Bin 0 -> 4269 bytes
 .../_images/10000000000000F20000003BAA849B42.png   |  Bin 0 -> 12296 bytes
 .../_images/10000000000000F300000068AF0ECD53.png   |  Bin 0 -> 2795 bytes
 .../_images/10000000000000F40000019A110DD159.png   |  Bin 0 -> 9945 bytes
 .../_images/10000000000000F5000000675DC5F68C.png   |  Bin 0 -> 2645 bytes
 .../_images/10000000000000F500000067A8845EF8.png   |  Bin 0 -> 3191 bytes
 .../_images/10000000000000F60000006754ED2A1E.png   |  Bin 0 -> 3302 bytes
 .../_images/10000000000000F6000000685DFB3767.png   |  Bin 0 -> 3288 bytes
 .../_images/100000000000012C0000009C444B4720.png   |  Bin 0 -> 5703 bytes
 .../_images/100000000000013C0000017D4FC6CEF5.png   |  Bin 0 -> 15943 bytes
 .../_images/10000000000001400000008A557EF7E3.png   |  Bin 0 -> 5796 bytes
 .../_images/10000000000001440000005A2989832F.png   |  Bin 0 -> 14546 bytes
 .../_images/1000000000000160000000DBB2FB0223.png   |  Bin 0 -> 9238 bytes
 .../_images/1000000000000163000000E9CDA84C92.png   |  Bin 0 -> 28427 bytes
 .../_images/1000000000000165000000D3FF2168AB.png   |  Bin 0 -> 8964 bytes
 .../_images/1000000000000167000000B43E4BF478.png   |  Bin 0 -> 6216 bytes
 .../_images/1000000000000175000000FAB2A2B294.png   |  Bin 0 -> 30207 bytes
 .../_images/10000000000001800000009A9494E037.png   |  Bin 0 -> 6695 bytes
 .../_images/10000000000001880000007EA4444400.png   |  Bin 0 -> 4446 bytes
 .../_images/100000000000018B000000A090F31164.png   |  Bin 0 -> 5189 bytes
 .../_images/100000000000018E000000C4BA62B2A3.png   |  Bin 0 -> 7559 bytes
 .../_images/1000000000000193000001AE9AB8B0A2.png   |  Bin 0 -> 15022 bytes
 .../_images/1000000000000194000000498325A766.png   |  Bin 0 -> 3850 bytes
 .../_images/1000000000000194000000FAD39BC0D8.png   |  Bin 0 -> 9793 bytes
 .../_images/1000000000000195000000EF7E44082C.png   |  Bin 0 -> 32515 bytes
 .../_images/10000000000001980000009271BE0D26.png   |  Bin 0 -> 6348 bytes
 .../_images/100000000000019E0000004CD2A0F407.png   |  Bin 0 -> 4562 bytes
 .../_images/10000000000001A3000000AAFE82893A.png   |  Bin 0 -> 7417 bytes
 .../_images/10000000000001A40000006C954442CE.png   |  Bin 0 -> 4317 bytes
 .../_images/10000000000001AC000000477C76808F.png   |  Bin 0 -> 3251 bytes
 .../_images/10000000000001BF00000012349EAE2F.png   |  Bin 0 -> 2672 bytes
 .../_images/10000000000001C1000000FE663748B2.png   |  Bin 0 -> 13463 bytes
 .../_images/10000000000001C9000000AF9C1CE57F.png   |  Bin 0 -> 7443 bytes
 .../_images/10000000000001CE000000F2E2084BA1.png   |  Bin 0 -> 32918 bytes
 .../_images/10000000000001CF00000176B0BE1EBC.png   |  Bin 0 -> 19593 bytes
 .../_images/10000000000001D30000014DC251C948.png   |  Bin 0 -> 13282 bytes
 .../_images/10000000000001E50000006E3ECDC427.png   |  Bin 0 -> 4218 bytes
 .../_images/10000000000001E50000018C3AD09A21.png   |  Bin 0 -> 107117 bytes
 .../_images/10000000000001EE00000164642CCA08.png   |  Bin 0 -> 73614 bytes
 .../_images/10000000000001F40000016609A0CFCC.png   |  Bin 0 -> 55791 bytes
 .../_images/10000000000001FD000000DF8D2D7546.png   |  Bin 0 -> 10154 bytes
 .../_images/1000000000000200000000BCCCC35DEB.png   |  Bin 0 -> 8340 bytes
 .../_images/10000000000002170000004A27056037.png   |  Bin 0 -> 3446 bytes
 .../_images/100000000000021C0000004CACBF786C.png   |  Bin 0 -> 60017 bytes
 .../_images/10000000000002210000002DE3BE7515.png   |  Bin 0 -> 43976 bytes
 .../_images/1000000000000227000000935D9B1EF6.png   |  Bin 0 -> 7153 bytes
 .../_images/100000000000023B000000125381F51B.png   |  Bin 0 -> 2174 bytes
 .../_images/100000000000024400000027BEE1E4A9.png   |  Bin 0 -> 37305 bytes
 .../_images/1000000000000247000000A77440E4D3.png   |  Bin 0 -> 13432 bytes
 .../_images/10000000000002650000018CA6A1BE66.png   |  Bin 0 -> 74341 bytes
 .../_images/10000000000002650000018E4285E964.png   |  Bin 0 -> 92661 bytes
 .../_images/10000000000002690000018D3A8C9F17.png   |  Bin 0 -> 75305 bytes
 .../_images/100000000000026A000001DCAF8778F2.png   |  Bin 0 -> 126167 bytes
 .../_images/100000000000026E0000003672ADCB6E.png   |  Bin 0 -> 59136 bytes
 .../_images/10000000000002720000013FB6EDA793.png   |  Bin 0 -> 71618 bytes
 .../_images/100000000000027B0000011D10F70F88.png   |  Bin 0 -> 10759 bytes
 .../_images/10000000000002840000016729388B7F.png   |  Bin 0 -> 17014 bytes
 .../_images/1000000000000288000001A1D5BE4881.png   |  Bin 0 -> 43888 bytes
 .../_images/1000000000000289000001A9D7F3941F.png   |  Bin 0 -> 45688 bytes
 .../_images/10000000000002910000018B31D51F03.png   |  Bin 0 -> 48251 bytes
 .../_images/1000000000000291000001951B69B9A6.png   |  Bin 0 -> 48707 bytes
 .../_images/10000000000002950000019EF5732E36.png   |  Bin 0 -> 45789 bytes
 .../_images/10000000000002950000021E245F6883.png   |  Bin 0 -> 37232 bytes
 .../_images/1000000000000298000001870B0581FA.png   |  Bin 0 -> 48992 bytes
 .../_images/1000000000000298000001874D3CA506.png   |  Bin 0 -> 47645 bytes
 .../_images/100000000000029B0000018885B5282E.png   |  Bin 0 -> 47473 bytes
 .../_images/100000000000029F000000B8A83D0275.png   |  Bin 0 -> 131939 bytes
 .../_images/10000000000002A6000000BFBE298238.png   |  Bin 0 -> 22524 bytes
 .../_images/10000000000002B1000002258C08D304.png   |  Bin 0 -> 32791 bytes
 .../_images/10000000000002B3000000365E1CD00D.png   |  Bin 0 -> 55217 bytes
 .../_images/10000000000002B30000003A5B960711.png   |  Bin 0 -> 76501 bytes
 .../_images/10000000000002BB000000266DB6AD1A.png   |  Bin 0 -> 2419 bytes
 .../_images/10000000000002BB000001EABD7E6DF0.png   |  Bin 0 -> 336801 bytes
 .../_images/10000000000002BF000001E5B544E7E7.png   |  Bin 0 -> 97877 bytes
 .../_images/10000000000002C1000001ED5CECCC6D.png   |  Bin 0 -> 134744 bytes
 .../_images/10000000000002C3000001EBBD39E47A.png   |  Bin 0 -> 113591 bytes
 .../_images/10000000000002C700000048F3729BAA.png   |  Bin 0 -> 67393 bytes
 .../_images/10000000000002F3000000926CA65D02.png   |  Bin 0 -> 7435 bytes
 .../_images/1000000000000304000001B964698779.png   |  Bin 0 -> 46567 bytes
 .../_images/1000000000000336000000F38C3FAF84.png   |  Bin 0 -> 19215 bytes
 .../_images/1000000000000372000002AF943ADDA0.png   |  Bin 0 -> 77271 bytes
 .../_images/10000000000003730000002B6865E951.png   |  Bin 0 -> 6012 bytes
 .../_images/10000000000003A60000011E274A1A28.png   |  Bin 0 -> 27778 bytes
 .../_images/10000000000003A6000002A9C7A660BE.png   |  Bin 0 -> 48549 bytes
 .../_images/10000000000003A800000039364066E4.png   |  Bin 0 -> 2473 bytes
 .../_images/10000000000003B30000021B5EE5D338.png   |  Bin 0 -> 26142 bytes
 .../_images/10000000000003DF00000071A41D8A1F.png   |  Bin 0 -> 7998 bytes
 .../_images/10000000000003DF000000D953A456B6.png   |  Bin 0 -> 20531 bytes
 .../_images/10000000000003E8000001524A147A04.png   |  Bin 0 -> 20730 bytes
 .../_images/10000000000003EC000000AB60616FA7.png   |  Bin 0 -> 11252 bytes
 .../_images/10000000000003FB000002359BAFB40E.png   |  Bin 0 -> 52998 bytes
 .../_images/10000000000004010000017E4A6552BC.png   |  Bin 0 -> 23425 bytes
 .../_images/1000000000000403000001632F0B76F6.png   |  Bin 0 -> 22013 bytes
 .../_images/1000000000000404000000FCFC13E732.png   |  Bin 0 -> 15600 bytes
 .../_images/10000000000004100000005657010336.png   |  Bin 0 -> 5834 bytes
 .../_images/10000000000004170000016ACB5E15AE.png   |  Bin 0 -> 17777 bytes
 .../_images/100000000000041D0000003D52225C0D.png   |  Bin 0 -> 2619 bytes
 .../_images/100000000000041D0000017D8D1BC4D9.png   |  Bin 0 -> 19279 bytes
 .../_images/100000000000042500000163D2B339D5.png   |  Bin 0 -> 18284 bytes
 .../_images/1000000000000427000000324F58266D.png   |  Bin 0 -> 3549 bytes
 .../_images/100000000000042E000001D3EEB9978B.png   |  Bin 0 -> 26544 bytes
 .../_images/100000000000042F000000CC3EDDE79E.png   |  Bin 0 -> 17217 bytes
 .../_images/1000000000000430000000AF9D6E724E.png   |  Bin 0 -> 15565 bytes
 .../_images/100000000000043000000164DA0CE8C9.png   |  Bin 0 -> 17870 bytes
 .../_images/100000000000043200000169BCD20493.png   |  Bin 0 -> 17111 bytes
 .../_images/1000000000000453000001BFFCF48776.png   |  Bin 0 -> 90848 bytes
 .../_images/100000000000045800000197FE462F2B.png   |  Bin 0 -> 87827 bytes
 .../_images/1000000000000462000000D44541CF9A.png   |  Bin 0 -> 26360 bytes
 .../_images/1000000000000467000002B63162E59B.png   |  Bin 0 -> 98937 bytes
 .../_images/10000000000004690000026615360BEB.png   |  Bin 0 -> 79621 bytes
 .../_images/100000000000046C000000C2D3E5CF30.png   |  Bin 0 -> 24263 bytes
 .../_images/100000000000046D0000015F4B5494A9.png   |  Bin 0 -> 54254 bytes
 .../_images/100000000000046F000000DEA2BFCD9B.png   |  Bin 0 -> 33578 bytes
 .../_images/1000000000000470000001B68AE60DD3.png   |  Bin 0 -> 53051 bytes
 .../_images/10000000000004710000014BBC34499D.png   |  Bin 0 -> 42673 bytes
 .../_images/100000000000047200000129CB014025.png   |  Bin 0 -> 49688 bytes
 .../_images/10000000000004770000008AAF3CFFDB.png   |  Bin 0 -> 20774 bytes
 .../_images/100000000000047700000219A3013A92.png   |  Bin 0 -> 64044 bytes
 .../_images/1000000000000479000002887E7F48EA.png   |  Bin 0 -> 103484 bytes
 .../_images/100000000000047A000000B727198874.png   |  Bin 0 -> 39182 bytes
 .../_images/100000000000047A000000FB86FF2A9A.png   |  Bin 0 -> 39293 bytes
 .../_images/100000000000047A0000011C6682A254.png   |  Bin 0 -> 45027 bytes
 .../_images/100000000000048100000245268CDB7A.png   |  Bin 0 -> 170000 bytes
 .../_images/10000000000004920000028D9C8DC2CB.png   |  Bin 0 -> 42580 bytes
 .../_images/10000000000004C0000000795BB2C146.png   |  Bin 0 -> 11658 bytes
 .../_images/10000000000004ED000000BE3B9E25D5.png   |  Bin 0 -> 17947 bytes
 .../_images/1000000000000523000000C6F786381C.png   |  Bin 0 -> 11774 bytes
 .../_images/100000000000052500000088DBB95005.png   |  Bin 0 -> 9110 bytes
 .../_images/1000000000000525000000BE30CF0423.png   |  Bin 0 -> 22144 bytes
 .../_images/1000000000000527000000A7AB409FE0.png   |  Bin 0 -> 8145 bytes
 .../_images/100000000000052F000000C2867B7294.png   |  Bin 0 -> 19378 bytes
 .../_images/1000000000000530000001410CF0028A.png   |  Bin 0 -> 28881 bytes
 .../_images/100000000000053100000142D9A4C916.png   |  Bin 0 -> 21903 bytes
 .../_images/1000000000000532000000285DDBBF37.png   |  Bin 0 -> 3643 bytes
 .../_images/100000000000053A00000067708C8F53.png   |  Bin 0 -> 10039 bytes
 .../_images/1000000000000552000000BF22E90239.png   |  Bin 0 -> 28686 bytes
 .../_images/1000000000000557000002E148BAB6D4.png   |  Bin 0 -> 274289 bytes
 .../_images/10000000000005970000006AE23997C9.png   |  Bin 0 -> 9708 bytes
 .../_images/10000000000005AF00000074604B1A67.png   |  Bin 0 -> 10960 bytes
 .../_images/10000000000005B90000007866D92D14.png   |  Bin 0 -> 12227 bytes
 .../_images/10000000000005BB0000007C1DF71FA7.png   |  Bin 0 -> 12121 bytes
 .../_images/10000000000005C30000006CAFFAAD61.png   |  Bin 0 -> 10451 bytes
 .../_images/10000000000005D00000003B29340A7A.png   |  Bin 0 -> 3663 bytes
 .../_images/10000000000005D50000009458C5EE48.png   |  Bin 0 -> 9396 bytes
 .../_images/10000000000005E20000009B1BA5A8CF.png   |  Bin 0 -> 10494 bytes
 .../_images/10000000000005E6000000676902E040.png   |  Bin 0 -> 11118 bytes
 .../_images/10000000000005EB000000A68BA73E2D.png   |  Bin 0 -> 9895 bytes
 .../_images/10000000000005EC00000073E678DFEC.png   |  Bin 0 -> 11066 bytes
 .../_images/10000000000005F30000030F1372448D.png   |  Bin 0 -> 209174 bytes
 .../_images/10000000000005F70000005F0912E904.png   |  Bin 0 -> 9691 bytes
 .../_images/10000000000005F70000007E43DB8026.png   |  Bin 0 -> 11835 bytes
 .../_images/10000000000005FA0000005CE8491B77.png   |  Bin 0 -> 8013 bytes
 .../_images/10000000000005FF0000005F35710398.png   |  Bin 0 -> 7709 bytes
 .../_images/10000000000006000000005EDA7B96BE.png   |  Bin 0 -> 7862 bytes
 .../_images/100000000000060300000065DF96536B.png   |  Bin 0 -> 7799 bytes
 .../_images/10000000000006060000006A0106CA0C.png   |  Bin 0 -> 7281 bytes
 .../_images/100000000000061A0000006FC014C3A4.png   |  Bin 0 -> 6997 bytes
 .../_images/100000000000061D0000007047877972.png   |  Bin 0 -> 10952 bytes
 .../_images/100000000000061E0000006BCF9ECC0B.png   |  Bin 0 -> 8768 bytes
 .../_images/100000000000062A0000005F61A18950.png   |  Bin 0 -> 9781 bytes
 .../_images/1000000000000631000000E19D116AA0.png   |  Bin 0 -> 12942 bytes
 .../_images/100000000000063F00000090AAE1FA4A.png   |  Bin 0 -> 36870 bytes
 .../_images/1000000000000668000002D29EAD9899.png   |  Bin 0 -> 215204 bytes
 .../_images/100000000000066D000001AAD8CE8256.png   |  Bin 0 -> 136897 bytes
 .../_images/10000201000002FC000001DC2DDAD2F1.png   |  Bin 0 -> 47621 bytes
 .../_images/1000020100000359000000A8B848DE68.png   |  Bin 0 -> 8426 bytes
 .../_images/10000201000005F90000029D8BA200FB.png   |  Bin 0 -> 28486 bytes
 core/doc/admin/_sources/LDAP/CONFIGURATION.txt     |  485 +++++
 core/doc/admin/_sources/LDAP/Introduction.txt      |   21 +
 core/doc/admin/_sources/LDAP/Table_of_Contents.txt |    4 +
 core/doc/admin/_sources/LDAP/index.txt             |    8 +
 core/doc/admin/_sources/activity/Configuration.txt |   15 +
 core/doc/admin/_sources/activity/Introduction.txt  |   22 +
 core/doc/admin/_sources/activity/RSS_Feed.txt      |   33 +
 .../admin/_sources/activity/Table_of_Contents.txt  |    4 +
 core/doc/admin/_sources/activity/Utilization.txt   |  136 ++
 core/doc/admin/_sources/activity/index.txt         |   10 +
 .../doc/admin/_sources/antivirus/Configuration.txt |  127 ++
 core/doc/admin/_sources/antivirus/Introduction.txt |   34 +
 .../admin/_sources/antivirus/Table_of_Contents.txt |    4 +
 core/doc/admin/_sources/antivirus/index.txt        |    8 +
 core/doc/admin/_sources/config/APPS.txt            |   50 +
 core/doc/admin/_sources/config/Code_Locations.txt  |   38 +
 .../admin/_sources/config/Default_Parameters.txt   |   63 +
 core/doc/admin/_sources/config/Deleted_Items.txt   |   18 +
 core/doc/admin/_sources/config/Introduction.txt    |   10 +
 core/doc/admin/_sources/config/Logging.txt         |   52 +
 core/doc/admin/_sources/config/Mail_Parameters.txt |   63 +
 core/doc/admin/_sources/config/Maintenance.txt     |   19 +
 core/doc/admin/_sources/config/Miscellaneous.txt   |   56 +
 core/doc/admin/_sources/config/Previews.txt        |   35 +
 .../config/Reverse_Proxy_Configurations.txt        |   51 +
 core/doc/admin/_sources/config/Session_Info.txt    |   24 +
 .../admin/_sources/config/Table_of_Contents.txt    |    5 +
 core/doc/admin/_sources/config/User_Experience.txt |   35 +
 core/doc/admin/_sources/config/Verification.txt    |   29 +
 core/doc/admin/_sources/config/index.txt           |   20 +
 .../doc/admin/_sources/configuration/auth_ldap.txt |    8 +
 .../_sources/configuration/background_jobs.txt     |    2 +-
 core/doc/admin/_sources/cron/Introduction.txt      |    5 +
 core/doc/admin/_sources/cron/Usage.txt             |   24 +
 core/doc/admin/_sources/cron/index.txt             |    7 +
 .../admin/_sources/dependencies/Configuration.txt  |   12 +
 .../admin/_sources/dependencies/Introduction.txt   |    6 +
 .../_sources/dependencies/Table_of_Contents.txt    |    4 +
 .../admin/_sources/dependencies/Utilization.txt    |   17 +
 core/doc/admin/_sources/dependencies/index.txt     |    9 +
 .../admin/_sources/encryption/Configuration.txt    |   88 +
 .../doc/admin/_sources/encryption/File_Systems.txt |   65 +
 .../doc/admin/_sources/encryption/Introduction.txt |   57 +
 .../_sources/encryption/Table_of_Contents.txt      |    4 +
 core/doc/admin/_sources/encryption/index.txt       |    9 +
 core/doc/admin/_sources/external/Configuration.txt |  875 ++++++++
 core/doc/admin/_sources/external/Introduction.txt  |   54 +
 .../admin/_sources/external/Table_of_Contents.txt  |    4 +
 core/doc/admin/_sources/external/index.txt         |    8 +
 .../doc/admin/_sources/first_run/Configuration.txt |   12 +
 core/doc/admin/_sources/first_run/Introduction.txt |    4 +
 core/doc/admin/_sources/first_run/Links.txt        |   54 +
 .../admin/_sources/first_run/Table_of_Contents.txt |    4 +
 core/doc/admin/_sources/first_run/Usage.txt        |   21 +
 core/doc/admin/_sources/first_run/index.txt        |   10 +
 .../_sources/installation/installation_linux.txt   |    2 +-
 .../_sources/installation/installation_source.txt  |  346 ++-
 .../_sources/installation/installation_windows.txt |    2 +-
 core/doc/admin/_sources/maintenance/update.txt     |    9 +-
 .../_sources/quota/Checking_available_space.txt    |   22 +
 .../admin/_sources/quota/Excluded_from_quota.txt   |   40 +
 core/doc/admin/_sources/quota/Introduction.txt     |   21 +
 core/doc/admin/_sources/quota/Sharing.txt          |   26 +
 .../doc/admin/_sources/quota/Table_of_Contents.txt |    4 +
 core/doc/admin/_sources/quota/index.txt            |   10 +
 .../doc/admin/_sources/share_app/Configuration.txt |   32 +
 core/doc/admin/_sources/share_app/Introduction.txt |    7 +
 .../_sources/share_app/Retrieving_shared_data.txt  |   46 +
 .../admin/_sources/share_app/Table_of_Contents.txt |    4 +
 core/doc/admin/_sources/share_app/Utilization.txt  |   96 +
 core/doc/admin/_sources/share_app/index.txt        |   11 +
 core/doc/admin/_sources/sharing_api/Contents.txt   |    4 +
 .../_sources/sharing_api/Create_a_new_Share.txt    |  261 +++
 .../admin/_sources/sharing_api/Delete_Share.txt    |   89 +
 .../admin/_sources/sharing_api/Get_All_Shares.txt  |  155 ++
 .../Get_Information_about_a_known_share.txt        |  160 ++
 .../Get_Shares_from_a_Specific_File_or_Folder.txt  |  364 ++++
 .../admin/_sources/sharing_api/Introduction.txt    |   48 +
 core/doc/admin/_sources/sharing_api/index.txt      |   13 +
 .../admin/_sources/sync_client/Advanced_Usage.txt  |  114 +
 .../admin/_sources/sync_client/Introduction.txt    |    9 +
 .../_sources/sync_client/Obtaining_the_Client.txt  |   29 +
 .../_sources/sync_client/Setting_up_an_Account.txt |   54 +
 .../_sources/sync_client/Table_of_Contents.txt     |    7 +
 .../doc/admin/_sources/sync_client/Visual_Tour.txt |  257 +++
 core/doc/admin/_sources/sync_client/index.txt      |   11 +
 .../undelete/Configuration_and_storage_.txt        |   33 +
 core/doc/admin/_sources/undelete/Introduction.txt  |   25 +
 .../admin/_sources/undelete/Table_of_Contents.txt  |    8 +
 core/doc/admin/_sources/undelete/Utilization.txt   |  146 ++
 core/doc/admin/_sources/undelete/index.txt         |    9 +
 .../versions/Configuration_and_storage.txt         |   52 +
 core/doc/admin/_sources/versions/Introduction.txt  |   39 +
 core/doc/admin/_sources/versions/Utilization.txt   |  114 +
 core/doc/admin/_sources/versions/index.txt         |   16 +
 core/doc/admin/_sources/viewers/Configuration.txt  |   28 +
 core/doc/admin/_sources/viewers/Introduction.txt   |    5 +
 core/doc/admin/_sources/viewers/Utilization.txt    |   23 +
 core/doc/admin/_sources/viewers/index.txt          |   12 +
 core/doc/admin/_sources/web_guide/Adding_Data.txt  |  117 ++
 .../admin/_sources/web_guide/Initial_Log_In.txt    |   29 +
 core/doc/admin/_sources/web_guide/Introduction.txt |    6 +
 .../_sources/web_guide/Main_ownCloud_screen.txt    |   32 +
 core/doc/admin/_sources/web_guide/Navigation.txt   |   75 +
 .../_sources/web_guide/Personal_Configurations.txt |   84 +
 .../admin/_sources/web_guide/Table_of_Contents.txt |    5 +
 core/doc/admin/_sources/web_guide/index.txt        |   12 +
 .../Configuration.html}                            |   44 +-
 .../Introduction.html}                             |   47 +-
 .../RSS_Feed.html}                                 |   50 +-
 .../Table_of_Contents.html}                        |   39 +-
 core/doc/admin/activity/Utilization.html           |  205 ++
 .../index.html}                                    |   48 +-
 core/doc/admin/antivirus/Configuration.html        |  202 ++
 .../Introduction.html}                             |   55 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../index.html}                                    |   51 +-
 .../installation_linux.html => config/APPS.html}   |   86 +-
 .../Code_Locations.html}                           |   85 +-
 core/doc/admin/config/Default_Parameters.html      |  219 ++
 .../Deleted_Items.html}                            |   61 +-
 .../Introduction.html}                             |   43 +-
 .../Logging.html}                                  |  101 +-
 .../Mail_Parameters.html}                          |   39 +-
 .../Maintenance.html}                              |   63 +-
 .../Miscellaneous.html}                            |   39 +-
 .../Previews.html}                                 |   82 +-
 .../Reverse_Proxy_Configurations.html}             |   93 +-
 .../Session_Info.html}                             |   66 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../User_Experience.html}                          |   79 +-
 .../Verification.html}                             |   74 +-
 .../installation_linux.html => config/index.html}  |   55 +-
 core/doc/admin/configuration/auth_ldap.html        |    8 +
 core/doc/admin/configuration/background_jobs.html  |    4 +-
 core/doc/admin/contents.html                       |    3 +-
 .../Introduction.html}                             |   40 +-
 .../installation_linux.html => cron/Usage.html}    |   48 +-
 .../installation_linux.html => cron/index.html}    |   42 +-
 .../Configuration.html}                            |   41 +-
 .../Introduction.html}                             |   40 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../Utilization.html}                              |   44 +-
 .../index.html}                                    |   44 +-
 .../Configuration.html}                            |   70 +-
 .../File_Systems.html}                             |   54 +-
 .../Introduction.html}                             |   59 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../index.html}                                    |   51 +-
 core/doc/admin/external/Configuration.html         |  494 +++++
 .../Introduction.html}                             |   57 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../index.html}                                    |   51 +-
 .../Configuration.html}                            |   41 +-
 .../Introduction.html}                             |   39 +-
 .../Links.html}                                    |   55 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../Usage.html}                                    |   43 +-
 .../index.html}                                    |   51 +-
 .../doc/admin/installation/installation_linux.html |    2 +-
 .../admin/installation/installation_source.html    |  326 ++-
 .../admin/installation/installation_windows.html   |    2 +-
 core/doc/admin/maintenance/update.html             |    8 +-
 .../Checking_available_space.html}                 |   43 +-
 .../Excluded_from_quota.html}                      |   63 +-
 .../Introduction.html}                             |   46 +-
 .../installation_linux.html => quota/Sharing.html} |   53 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../installation_linux.html => quota/index.html}   |   58 +-
 .../Configuration.html}                            |   47 +-
 .../Introduction.html}                             |   42 +-
 .../Retrieving_shared_data.html}                   |   49 +-
 .../Table_of_Contents.html}                        |   39 +-
 core/doc/admin/share_app/Utilization.html          |  194 ++
 .../index.html}                                    |   59 +-
 .../Contents.html}                                 |   39 +-
 core/doc/admin/sharing_api/Create_a_new_Share.html |  408 ++++
 .../Delete_Share.html}                             |  121 +-
 core/doc/admin/sharing_api/Get_All_Shares.html     |  305 +++
 .../Get_Information_about_a_known_share.html       |  309 +++
 .../Get_Shares_from_a_Specific_File_or_Folder.html |  500 +++++
 .../Introduction.html}                             |   80 +-
 core/doc/admin/sharing_api/index.html              |  187 ++
 core/doc/admin/sync_client/Advanced_Usage.html     |  205 ++
 .../Introduction.html}                             |   43 +-
 .../Obtaining_the_Client.html}                     |   54 +-
 .../Setting_up_an_Account.html}                    |   55 +-
 .../Table_of_Contents.html}                        |   40 +-
 core/doc/admin/sync_client/Visual_Tour.html        |  261 +++
 .../index.html}                                    |   57 +-
 .../Configuration_and_storage_.html}               |   49 +-
 .../Introduction.html}                             |   53 +-
 .../Table_of_Contents.html}                        |   41 +-
 core/doc/admin/undelete/Utilization.html           |  221 ++
 .../index.html}                                    |   60 +-
 .../Configuration_and_storage.html}                |   56 +-
 .../Introduction.html}                             |   53 +-
 core/doc/admin/versions/Utilization.html           |  201 ++
 .../index.html}                                    |   63 +-
 .../Configuration.html}                            |   46 +-
 .../Introduction.html}                             |   40 +-
 .../Utilization.html}                              |   42 +-
 .../installation_linux.html => viewers/index.html} |   49 +-
 core/doc/admin/web_guide/Adding_Data.html          |  195 ++
 .../Initial_Log_In.html}                           |   48 +-
 .../Introduction.html}                             |   41 +-
 .../Main_ownCloud_screen.html}                     |   50 +-
 .../Navigation.html}                               |   68 +-
 .../Personal_Configurations.html}                  |   83 +-
 .../Table_of_Contents.html}                        |   39 +-
 .../index.html}                                    |   68 +-
 core/doc/user/_sources/pim/contacts.txt            |    6 +
 core/doc/user/_sources/pim/troubleshooting.txt     |   50 +
 core/doc/user/contents.html                        |    3 +
 core/doc/user/pim/contacts.html                    |    5 +
 core/doc/user/pim/troubleshooting.html             |   45 +
 core/img/actions/toggle-filelist.png               |  Bin 0 -> 195 bytes
 core/img/actions/toggle-filelist.svg               |   11 +
 core/img/actions/toggle-pictures.png               |  Bin 0 -> 193 bytes
 core/img/actions/toggle-pictures.svg               |    9 +
 core/js/config.php                                 |    6 +
 core/js/js.js                                      |   53 +-
 core/js/share.js                                   |    6 +-
 core/skeleton/ownCloudUserManual.pdf               |  Bin 1558473 -> 1571890 bytes
 core/templates/layout.base.php                     |    2 +-
 core/templates/layout.guest.php                    |    2 +-
 lib/base.php                                       |    4 +-
 lib/private/app.php                                |    4 +
 .../connector/sabre/exceptionloggerplugin.php      |   50 +
 lib/private/connector/sabre/file.php               |    6 +-
 lib/private/connector/sabre/objecttree.php         |   15 +-
 lib/private/files.php                              |    3 +
 lib/private/files/cache/storage.php                |   19 +
 lib/private/files/view.php                         |    4 +-
 lib/private/l10n.php                               |    4 +-
 lib/private/log/errorhandler.php                   |   31 +-
 lib/private/log/owncloud.php                       |    1 -
 lib/private/memcache/apc.php                       |    2 +
 lib/private/ocs/result.php                         |   18 +-
 lib/private/request.php                            |   48 +-
 lib/private/setup.php                              |    1 +
 lib/private/share/searchresultsorter.php           |   59 +
 lib/private/updater.php                            |   15 +
 lib/private/urlgenerator.php                       |    3 +-
 lib/private/user.php                               |    5 +-
 lib/public/share.php                               |    2 +-
 lib/public/util.php                                |    8 +-
 ocs/providers.php                                  |    2 +
 settings/ajax/decryptall.php                       |    9 +-
 settings/css/settings.css                          |    6 +
 settings/js/apps.js                                |   30 +-
 settings/js/personal.js                            |   10 +-
 settings/templates/apps.php                        |   13 +-
 settings/templates/personal.php                    |   48 +-
 version.php                                        |    8 +-
 789 files changed, 16437 insertions(+), 45996 deletions(-)

diff --cc .htaccess
index fa6263c,4ba5095..4ba5095
mode 100644,100755..100644
--- a/.htaccess
+++ b/.htaccess
diff --cc 3rdparty/PHPExcel/Classes/PHPExcel/Reader/Excel2003XML.php
index acde1cc,0000000..fef9837
mode 100644,000000..100644
--- a/3rdparty/PHPExcel/Classes/PHPExcel/Reader/Excel2003XML.php
+++ b/3rdparty/PHPExcel/Classes/PHPExcel/Reader/Excel2003XML.php
@@@ -1,802 -1,0 +1,804 @@@
 +<?php
 +/**
 + * PHPExcel
 + *
 + * Copyright (c) 2006 - 2013 PHPExcel
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU Lesser General Public
 + * License as published by the Free Software Foundation; either
 + * version 2.1 of the License, or (at your option) 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
 + * Lesser General Public License for more details.
 + *
 + * You should have received a copy of the GNU Lesser General Public
 + * License along with this library; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 + *
 + * @category   PHPExcel
 + * @package    PHPExcel_Reader
 + * @copyright  Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
 + * @version    1.7.9, 2013-06-02
 + */
 +
 +
 +/** PHPExcel root directory */
 +if (!defined('PHPEXCEL_ROOT')) {
 +	/**
 +	 * @ignore
 +	 */
 +	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
 +	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
 +}
 +
 +/**
 + * PHPExcel_Reader_Excel2003XML
 + *
 + * @category   PHPExcel
 + * @package    PHPExcel_Reader
 + * @copyright  Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + */
 +class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
 +{
 +	/**
 +	 * Formats
 +	 *
 +	 * @var array
 +	 */
 +	private $_styles = array();
 +
 +	/**
 +	 * Character set used in the file
 +	 *
 +	 * @var string
 +	 */
 +	private $_charSet = 'UTF-8';
 +
 +
 +	/**
 +	 * Create a new PHPExcel_Reader_Excel2003XML
 +	 */
 +	public function __construct() {
 +		$this->_readFilter 	= new PHPExcel_Reader_DefaultReadFilter();
 +	}
 +
 +
 +	/**
 +	 * Can the current PHPExcel_Reader_IReader read the file?
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @return 	boolean
 +	 * @throws PHPExcel_Reader_Exception
 +	 */
 +	public function canRead($pFilename)
 +	{
 +
 +		//	Office					xmlns:o="urn:schemas-microsoft-com:office:office"
 +		//	Excel					xmlns:x="urn:schemas-microsoft-com:office:excel"
 +		//	XML Spreadsheet			xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
 +		//	Spreadsheet component	xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet"
 +		//	XML schema 				xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
 +		//	XML data type			xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
 +		//	MS-persist recordset	xmlns:rs="urn:schemas-microsoft-com:rowset"
 +		//	Rowset					xmlns:z="#RowsetSchema"
 +		//
 +
 +		$signature = array(
 +				'<?xml version="1.0"',
 +				'<?mso-application progid="Excel.Sheet"?>'
 +			);
 +
 +		// Open file
 +		$this->_openFile($pFilename);
 +		$fileHandle = $this->_fileHandle;
 +		
 +		// Read sample data (first 2 KB will do)
 +		$data = fread($fileHandle, 2048);
 +		fclose($fileHandle);
 +
 +		$valid = true;
 +		foreach($signature as $match) {
 +			// every part of the signature must be present
 +			if (strpos($data, $match) === false) {
 +				$valid = false;
 +				break;
 +			}
 +		}
 +
 +		//	Retrieve charset encoding
 +		if(preg_match('/<?xml.*encoding=[\'"](.*?)[\'"].*?>/um',$data,$matches)) {
 +			$this->_charSet = strtoupper($matches[1]);
 +		}
 +//		echo 'Character Set is ',$this->_charSet,'<br />';
 +
 +		return $valid;
 +	}
 +
 +
 +	/**
 +	 * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetNames($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +		if (!$this->canRead($pFilename)) {
 +			throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
 +		}
 +
 +		$worksheetNames = array();
 +
++		libxml_disable_entity_loader(true);
 +		$xml = simplexml_load_file($pFilename);
 +		$namespaces = $xml->getNamespaces(true);
 +
 +		$xml_ss = $xml->children($namespaces['ss']);
 +		foreach($xml_ss->Worksheet as $worksheet) {
 +			$worksheet_ss = $worksheet->attributes($namespaces['ss']);
 +			$worksheetNames[] = self::_convertStringEncoding((string) $worksheet_ss['Name'],$this->_charSet);
 +		}
 +
 +		return $worksheetNames;
 +	}
 +
 +
 +	/**
 +	 * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns)
 +	 *
 +	 * @param   string     $pFilename
 +	 * @throws   PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetInfo($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$worksheetInfo = array();
 +
++		libxml_disable_entity_loader(true);
 +		$xml = simplexml_load_file($pFilename);
 +		$namespaces = $xml->getNamespaces(true);
 +
 +		$worksheetID = 1;
 +		$xml_ss = $xml->children($namespaces['ss']);
 +		foreach($xml_ss->Worksheet as $worksheet) {
 +			$worksheet_ss = $worksheet->attributes($namespaces['ss']);
 +
 +			$tmpInfo = array();
 +			$tmpInfo['worksheetName'] = '';
 +			$tmpInfo['lastColumnLetter'] = 'A';
 +			$tmpInfo['lastColumnIndex'] = 0;
 +			$tmpInfo['totalRows'] = 0;
 +			$tmpInfo['totalColumns'] = 0;
 +
 +			if (isset($worksheet_ss['Name'])) {
 +				$tmpInfo['worksheetName'] = (string) $worksheet_ss['Name'];
 +			} else {
 +				$tmpInfo['worksheetName'] = "Worksheet_{$worksheetID}";
 +			}
 +
 +			if (isset($worksheet->Table->Row)) {
 +				$rowIndex = 0;
 +
 +				foreach($worksheet->Table->Row as $rowData) {
 +					$columnIndex = 0;
 +					$rowHasData = false;
 +
 +					foreach($rowData->Cell as $cell) {
 +						if (isset($cell->Data)) {
 +							$tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex);
 +							$rowHasData = true;
 +						}
 +
 +						++$columnIndex;
 +					}
 +
 +					++$rowIndex;
 +
 +					if ($rowHasData) {
 +						$tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex);
 +					}
 +				}
 +			}
 +
 +			$tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']);
 +			$tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1;
 +
 +			$worksheetInfo[] = $tmpInfo;
 +			++$worksheetID;
 +		}
 +
 +		return $worksheetInfo;
 +	}
 +
 +
 +    /**
 +	 * Loads PHPExcel from file
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @return 	PHPExcel
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function load($pFilename)
 +	{
 +		// Create new PHPExcel
 +		$objPHPExcel = new PHPExcel();
 +
 +		// Load into this instance
 +		return $this->loadIntoExisting($pFilename, $objPHPExcel);
 +	}
 +
 +
 +	private static function identifyFixedStyleValue($styleList,&$styleAttributeValue) {
 +		$styleAttributeValue = strtolower($styleAttributeValue);
 +		foreach($styleList as $style) {
 +			if ($styleAttributeValue == strtolower($style)) {
 +				$styleAttributeValue = $style;
 +				return true;
 +			}
 +		}
 +		return false;
 +	}
 +
 +
 + 	/**
 + 	 * pixel units to excel width units(units of 1/256th of a character width)
 + 	 * @param pxs
 + 	 * @return
 + 	 */
 + 	private static function _pixel2WidthUnits($pxs) {
 +		$UNIT_OFFSET_MAP = array(0, 36, 73, 109, 146, 182, 219);
 +
 +		$widthUnits = 256 * ($pxs / 7);
 +		$widthUnits += $UNIT_OFFSET_MAP[($pxs % 7)];
 +		return $widthUnits;
 +	}
 +
 +
 +	/**
 +	 * excel width units(units of 1/256th of a character width) to pixel units
 +	 * @param widthUnits
 +	 * @return
 +	 */
 +	private static function _widthUnits2Pixel($widthUnits) {
 +		$pixels = ($widthUnits / 256) * 7;
 +		$offsetWidthUnits = $widthUnits % 256;
 +		$pixels += round($offsetWidthUnits / (256 / 7));
 +		return $pixels;
 +	}
 +
 +
 +	private static function _hex2str($hex) {
 +		return chr(hexdec($hex[1]));
 +	}
 +
 +
 +	/**
 +	 * Loads PHPExcel from file into PHPExcel instance
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @param	PHPExcel	$objPHPExcel
 +	 * @return 	PHPExcel
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
 +	{
 +		$fromFormats	= array('\-',	'\ ');
 +		$toFormats		= array('-',	' ');
 +
 +		$underlineStyles = array (
 +				PHPExcel_Style_Font::UNDERLINE_NONE,
 +				PHPExcel_Style_Font::UNDERLINE_DOUBLE,
 +				PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING,
 +				PHPExcel_Style_Font::UNDERLINE_SINGLE,
 +				PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING
 +			);
 +		$verticalAlignmentStyles = array (
 +				PHPExcel_Style_Alignment::VERTICAL_BOTTOM,
 +				PHPExcel_Style_Alignment::VERTICAL_TOP,
 +				PHPExcel_Style_Alignment::VERTICAL_CENTER,
 +				PHPExcel_Style_Alignment::VERTICAL_JUSTIFY
 +			);
 +		$horizontalAlignmentStyles = array (
 +				PHPExcel_Style_Alignment::HORIZONTAL_GENERAL,
 +				PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
 +				PHPExcel_Style_Alignment::HORIZONTAL_RIGHT,
 +				PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
 +				PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS,
 +				PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY
 +			);
 +
 +		$timezoneObj = new DateTimeZone('Europe/London');
 +		$GMT = new DateTimeZone('UTC');
 +
 +
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		if (!$this->canRead($pFilename)) {
 +			throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
 +		}
 +
 +		$xml = simplexml_load_file($pFilename);
 +		$namespaces = $xml->getNamespaces(true);
 +
 +		$docProps = $objPHPExcel->getProperties();
 +		if (isset($xml->DocumentProperties[0])) {
 +			foreach($xml->DocumentProperties[0] as $propertyName => $propertyValue) {
 +				switch ($propertyName) {
 +					case 'Title' :
 +							$docProps->setTitle(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'Subject' :
 +							$docProps->setSubject(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'Author' :
 +							$docProps->setCreator(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'Created' :
 +							$creationDate = strtotime($propertyValue);
 +							$docProps->setCreated($creationDate);
 +							break;
 +					case 'LastAuthor' :
 +							$docProps->setLastModifiedBy(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'LastSaved' :
 +							$lastSaveDate = strtotime($propertyValue);
 +							$docProps->setModified($lastSaveDate);
 +							break;
 +					case 'Company' :
 +							$docProps->setCompany(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'Category' :
 +							$docProps->setCategory(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'Manager' :
 +							$docProps->setManager(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'Keywords' :
 +							$docProps->setKeywords(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +					case 'Description' :
 +							$docProps->setDescription(self::_convertStringEncoding($propertyValue,$this->_charSet));
 +							break;
 +				}
 +			}
 +		}
 +		if (isset($xml->CustomDocumentProperties)) {
 +			foreach($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) {
 +				$propertyAttributes = $propertyValue->attributes($namespaces['dt']);
 +				$propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/','PHPExcel_Reader_Excel2003XML::_hex2str',$propertyName);
 +				$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_UNKNOWN;
 +				switch((string) $propertyAttributes) {
 +					case 'string' :
 +						$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
 +						$propertyValue = trim($propertyValue);
 +						break;
 +					case 'boolean' :
 +						$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN;
 +						$propertyValue = (bool) $propertyValue;
 +						break;
 +					case 'integer' :
 +						$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_INTEGER;
 +						$propertyValue = intval($propertyValue);
 +						break;
 +					case 'float' :
 +						$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT;
 +						$propertyValue = floatval($propertyValue);
 +						break;
 +					case 'dateTime.tz' :
 +						$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE;
 +						$propertyValue = strtotime(trim($propertyValue));
 +						break;
 +				}
 +				$docProps->setCustomProperty($propertyName,$propertyValue,$propertyType);
 +			}
 +		}
 +
 +		foreach($xml->Styles[0] as $style) {
 +			$style_ss = $style->attributes($namespaces['ss']);
 +			$styleID = (string) $style_ss['ID'];
 +//			echo 'Style ID = '.$styleID.'<br />';
 +			if ($styleID == 'Default') {
 +				$this->_styles['Default'] = array();
 +			} else {
 +				$this->_styles[$styleID] = $this->_styles['Default'];
 +			}
 +			foreach ($style as $styleType => $styleData) {
 +				$styleAttributes = $styleData->attributes($namespaces['ss']);
 +//				echo $styleType.'<br />';
 +				switch ($styleType) {
 +					case 'Alignment' :
 +							foreach($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
 +//								echo $styleAttributeKey.' = '.$styleAttributeValue.'<br />';
 +								$styleAttributeValue = (string) $styleAttributeValue;
 +								switch ($styleAttributeKey) {
 +									case 'Vertical' :
 +											if (self::identifyFixedStyleValue($verticalAlignmentStyles,$styleAttributeValue)) {
 +												$this->_styles[$styleID]['alignment']['vertical'] = $styleAttributeValue;
 +											}
 +											break;
 +									case 'Horizontal' :
 +											if (self::identifyFixedStyleValue($horizontalAlignmentStyles,$styleAttributeValue)) {
 +												$this->_styles[$styleID]['alignment']['horizontal'] = $styleAttributeValue;
 +											}
 +											break;
 +									case 'WrapText' :
 +											$this->_styles[$styleID]['alignment']['wrap'] = true;
 +											break;
 +								}
 +							}
 +							break;
 +					case 'Borders' :
 +							foreach($styleData->Border as $borderStyle) {
 +								$borderAttributes = $borderStyle->attributes($namespaces['ss']);
 +								$thisBorder = array();
 +								foreach($borderAttributes as $borderStyleKey => $borderStyleValue) {
 +//									echo $borderStyleKey.' = '.$borderStyleValue.'<br />';
 +									switch ($borderStyleKey) {
 +										case 'LineStyle' :
 +												$thisBorder['style'] = PHPExcel_Style_Border::BORDER_MEDIUM;
 +//												$thisBorder['style'] = $borderStyleValue;
 +												break;
 +										case 'Weight' :
 +//												$thisBorder['style'] = $borderStyleValue;
 +												break;
 +										case 'Position' :
 +												$borderPosition = strtolower($borderStyleValue);
 +												break;
 +										case 'Color' :
 +												$borderColour = substr($borderStyleValue,1);
 +												$thisBorder['color']['rgb'] = $borderColour;
 +												break;
 +									}
 +								}
 +								if (!empty($thisBorder)) {
 +									if (($borderPosition == 'left') || ($borderPosition == 'right') || ($borderPosition == 'top') || ($borderPosition == 'bottom')) {
 +										$this->_styles[$styleID]['borders'][$borderPosition] = $thisBorder;
 +									}
 +								}
 +							}
 +							break;
 +					case 'Font' :
 +							foreach($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
 +//								echo $styleAttributeKey.' = '.$styleAttributeValue.'<br />';
 +								$styleAttributeValue = (string) $styleAttributeValue;
 +								switch ($styleAttributeKey) {
 +									case 'FontName' :
 +											$this->_styles[$styleID]['font']['name'] = $styleAttributeValue;
 +											break;
 +									case 'Size' :
 +											$this->_styles[$styleID]['font']['size'] = $styleAttributeValue;
 +											break;
 +									case 'Color' :
 +											$this->_styles[$styleID]['font']['color']['rgb'] = substr($styleAttributeValue,1);
 +											break;
 +									case 'Bold' :
 +											$this->_styles[$styleID]['font']['bold'] = true;
 +											break;
 +									case 'Italic' :
 +											$this->_styles[$styleID]['font']['italic'] = true;
 +											break;
 +									case 'Underline' :
 +											if (self::identifyFixedStyleValue($underlineStyles,$styleAttributeValue)) {
 +												$this->_styles[$styleID]['font']['underline'] = $styleAttributeValue;
 +											}
 +											break;
 +								}
 +							}
 +							break;
 +					case 'Interior' :
 +							foreach($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
 +//								echo $styleAttributeKey.' = '.$styleAttributeValue.'<br />';
 +								switch ($styleAttributeKey) {
 +									case 'Color' :
 +											$this->_styles[$styleID]['fill']['color']['rgb'] = substr($styleAttributeValue,1);
 +											break;
 +								}
 +							}
 +							break;
 +					case 'NumberFormat' :
 +							foreach($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
 +//								echo $styleAttributeKey.' = '.$styleAttributeValue.'<br />';
 +								$styleAttributeValue = str_replace($fromFormats,$toFormats,$styleAttributeValue);
 +								switch ($styleAttributeValue) {
 +									case 'Short Date' :
 +											$styleAttributeValue = 'dd/mm/yyyy';
 +											break;
 +								}
 +								if ($styleAttributeValue > '') {
 +									$this->_styles[$styleID]['numberformat']['code'] = $styleAttributeValue;
 +								}
 +							}
 +							break;
 +					case 'Protection' :
 +							foreach($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
 +//								echo $styleAttributeKey.' = '.$styleAttributeValue.'<br />';
 +							}
 +							break;
 +				}
 +			}
 +//			print_r($this->_styles[$styleID]);
 +//			echo '<hr />';
 +		}
 +//		echo '<hr />';
 +
 +		$worksheetID = 0;
 +		$xml_ss = $xml->children($namespaces['ss']);
 +
 +		foreach($xml_ss->Worksheet as $worksheet) {
 +			$worksheet_ss = $worksheet->attributes($namespaces['ss']);
 +
 +			if ((isset($this->_loadSheetsOnly)) && (isset($worksheet_ss['Name'])) &&
 +				(!in_array($worksheet_ss['Name'], $this->_loadSheetsOnly))) {
 +				continue;
 +			}
 +
 +//			echo '<h3>Worksheet: ',$worksheet_ss['Name'],'<h3>';
 +//
 +			// Create new Worksheet
 +			$objPHPExcel->createSheet();
 +			$objPHPExcel->setActiveSheetIndex($worksheetID);
 +			if (isset($worksheet_ss['Name'])) {
 +				$worksheetName = self::_convertStringEncoding((string) $worksheet_ss['Name'],$this->_charSet);
 +				//	Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in
 +				//		formula cells... during the load, all formulae should be correct, and we're simply bringing
 +				//		the worksheet name in line with the formula, not the reverse
 +				$objPHPExcel->getActiveSheet()->setTitle($worksheetName,false);
 +			}
 +
 +			$columnID = 'A';
 +			if (isset($worksheet->Table->Column)) {
 +				foreach($worksheet->Table->Column as $columnData) {
 +					$columnData_ss = $columnData->attributes($namespaces['ss']);
 +					if (isset($columnData_ss['Index'])) {
 +						$columnID = PHPExcel_Cell::stringFromColumnIndex($columnData_ss['Index']-1);
 +					}
 +					if (isset($columnData_ss['Width'])) {
 +						$columnWidth = $columnData_ss['Width'];
 +//						echo '<b>Setting column width for '.$columnID.' to '.$columnWidth.'</b><br />';
 +						$objPHPExcel->getActiveSheet()->getColumnDimension($columnID)->setWidth($columnWidth / 5.4);
 +					}
 +					++$columnID;
 +				}
 +			}
 +
 +			$rowID = 1;
 +			if (isset($worksheet->Table->Row)) {
 +				foreach($worksheet->Table->Row as $rowData) {
 +					$rowHasData = false;
 +					$row_ss = $rowData->attributes($namespaces['ss']);
 +					if (isset($row_ss['Index'])) {
 +						$rowID = (integer) $row_ss['Index'];
 +					}
 +//					echo '<b>Row '.$rowID.'</b><br />';
 +
 +					$columnID = 'A';
 +					foreach($rowData->Cell as $cell) {
 +
 +						$cell_ss = $cell->attributes($namespaces['ss']);
 +						if (isset($cell_ss['Index'])) {
 +							$columnID = PHPExcel_Cell::stringFromColumnIndex($cell_ss['Index']-1);
 +						}
 +						$cellRange = $columnID.$rowID;
 +
 +						if ($this->getReadFilter() !== NULL) {
 +							if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {
 +								continue;
 +							}
 +						}
 +
 +						if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) {
 +							$columnTo = $columnID;
 +							if (isset($cell_ss['MergeAcross'])) {
 +								$columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1);
 +							}
 +							$rowTo = $rowID;
 +							if (isset($cell_ss['MergeDown'])) {
 +								$rowTo = $rowTo + $cell_ss['MergeDown'];
 +							}
 +							$cellRange .= ':'.$columnTo.$rowTo;
 +							$objPHPExcel->getActiveSheet()->mergeCells($cellRange);
 +						}
 +
 +						$cellIsSet = $hasCalculatedValue = false;
 +						$cellDataFormula = '';
 +						if (isset($cell_ss['Formula'])) {
 +							$cellDataFormula = $cell_ss['Formula'];
 +							// added this as a check for array formulas
 +							if (isset($cell_ss['ArrayRange'])) {
 +								$cellDataCSEFormula = $cell_ss['ArrayRange'];
 +//								echo "found an array formula at ".$columnID.$rowID."<br />";
 +							}
 +							$hasCalculatedValue = true;
 +						}
 +						if (isset($cell->Data)) {
 +							$cellValue = $cellData = $cell->Data;
 +							$type = PHPExcel_Cell_DataType::TYPE_NULL;
 +							$cellData_ss = $cellData->attributes($namespaces['ss']);
 +							if (isset($cellData_ss['Type'])) {
 +								$cellDataType = $cellData_ss['Type'];
 +								switch ($cellDataType) {
 +									/*
 +									const TYPE_STRING		= 's';
 +									const TYPE_FORMULA		= 'f';
 +									const TYPE_NUMERIC		= 'n';
 +									const TYPE_BOOL			= 'b';
 +								    const TYPE_NULL			= 'null';
 +								    const TYPE_INLINE		= 'inlineStr';
 +									const TYPE_ERROR		= 'e';
 +									*/
 +									case 'String' :
 +											$cellValue = self::_convertStringEncoding($cellValue,$this->_charSet);
 +											$type = PHPExcel_Cell_DataType::TYPE_STRING;
 +											break;
 +									case 'Number' :
 +											$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +											$cellValue = (float) $cellValue;
 +											if (floor($cellValue) == $cellValue) {
 +												$cellValue = (integer) $cellValue;
 +											}
 +											break;
 +									case 'Boolean' :
 +											$type = PHPExcel_Cell_DataType::TYPE_BOOL;
 +											$cellValue = ($cellValue != 0);
 +											break;
 +									case 'DateTime' :
 +											$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +											$cellValue = PHPExcel_Shared_Date::PHPToExcel(strtotime($cellValue));
 +											break;
 +									case 'Error' :
 +											$type = PHPExcel_Cell_DataType::TYPE_ERROR;
 +											break;
 +								}
 +							}
 +
 +							if ($hasCalculatedValue) {
 +//								echo 'FORMULA<br />';
 +								$type = PHPExcel_Cell_DataType::TYPE_FORMULA;
 +								$columnNumber = PHPExcel_Cell::columnIndexFromString($columnID);
 +								if (substr($cellDataFormula,0,3) == 'of:') {
 +									$cellDataFormula = substr($cellDataFormula,3);
 +//									echo 'Before: ',$cellDataFormula,'<br />';
 +									$temp = explode('"',$cellDataFormula);
 +									$key = false;
 +									foreach($temp as &$value) {
 +										//	Only replace in alternate array entries (i.e. non-quoted blocks)
 +										if ($key = !$key) {
 +											$value = str_replace(array('[.','.',']'),'',$value);
 +										}
 +									}
 +								} else {
 +									//	Convert R1C1 style references to A1 style references (but only when not quoted)
 +//									echo 'Before: ',$cellDataFormula,'<br />';
 +									$temp = explode('"',$cellDataFormula);
 +									$key = false;
 +									foreach($temp as &$value) {
 +										//	Only replace in alternate array entries (i.e. non-quoted blocks)
 +										if ($key = !$key) {
 +											preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/',$value, $cellReferences,PREG_SET_ORDER+PREG_OFFSET_CAPTURE);
 +											//	Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way
 +											//		through the formula from left to right. Reversing means that we work right to left.through
 +											//		the formula
 +											$cellReferences = array_reverse($cellReferences);
 +											//	Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent,
 +											//		then modify the formula to use that new reference
 +											foreach($cellReferences as $cellReference) {
 +												$rowReference = $cellReference[2][0];
 +												//	Empty R reference is the current row
 +												if ($rowReference == '') $rowReference = $rowID;
 +												//	Bracketed R references are relative to the current row
 +												if ($rowReference{0} == '[') $rowReference = $rowID + trim($rowReference,'[]');
 +												$columnReference = $cellReference[4][0];
 +												//	Empty C reference is the current column
 +												if ($columnReference == '') $columnReference = $columnNumber;
 +												//	Bracketed C references are relative to the current column
 +												if ($columnReference{0} == '[') $columnReference = $columnNumber + trim($columnReference,'[]');
 +												$A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference;
 +													$value = substr_replace($value,$A1CellReference,$cellReference[0][1],strlen($cellReference[0][0]));
 +											}
 +										}
 +									}
 +								}
 +								unset($value);
 +								//	Then rebuild the formula string
 +								$cellDataFormula = implode('"',$temp);
 +//								echo 'After: ',$cellDataFormula,'<br />';
 +							}
 +
 +//							echo 'Cell '.$columnID.$rowID.' is a '.$type.' with a value of '.(($hasCalculatedValue) ? $cellDataFormula : $cellValue).'<br />';
 +//
 +							$objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue),$type);
 +							if ($hasCalculatedValue) {
 +//								echo 'Formula result is '.$cellValue.'<br />';
 +								$objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setCalculatedValue($cellValue);
 +							}
 +							$cellIsSet = $rowHasData = true;
 +						}
 +
 +						if (isset($cell->Comment)) {
 +//							echo '<b>comment found</b><br />';
 +							$commentAttributes = $cell->Comment->attributes($namespaces['ss']);
 +							$author = 'unknown';
 +							if (isset($commentAttributes->Author)) {
 +								$author = (string)$commentAttributes->Author;
 +//								echo 'Author: ',$author,'<br />';
 +							}
 +							$node = $cell->Comment->Data->asXML();
 +//							$annotation = str_replace('html:','',substr($node,49,-10));
 +//							echo $annotation,'<br />';
 +							$annotation = strip_tags($node);
 +//							echo 'Annotation: ',$annotation,'<br />';
 +							$objPHPExcel->getActiveSheet()->getComment( $columnID.$rowID )
 +															->setAuthor(self::_convertStringEncoding($author ,$this->_charSet))
 +															->setText($this->_parseRichText($annotation) );
 +						}
 +
 +						if (($cellIsSet) && (isset($cell_ss['StyleID']))) {
 +							$style = (string) $cell_ss['StyleID'];
 +//							echo 'Cell style for '.$columnID.$rowID.' is '.$style.'<br />';
 +							if ((isset($this->_styles[$style])) && (!empty($this->_styles[$style]))) {
 +//								echo 'Cell '.$columnID.$rowID.'<br />';
 +//								print_r($this->_styles[$style]);
 +//								echo '<br />';
 +								if (!$objPHPExcel->getActiveSheet()->cellExists($columnID.$rowID)) {
 +									$objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setValue(NULL);
 +								}
 +								$objPHPExcel->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->_styles[$style]);
 +							}
 +						}
 +						++$columnID;
 +					}
 +
 +					if ($rowHasData) {
 +						if (isset($row_ss['StyleID'])) {
 +							$rowStyle = $row_ss['StyleID'];
 +						}
 +						if (isset($row_ss['Height'])) {
 +							$rowHeight = $row_ss['Height'];
 +//							echo '<b>Setting row height to '.$rowHeight.'</b><br />';
 +							$objPHPExcel->getActiveSheet()->getRowDimension($rowID)->setRowHeight($rowHeight);
 +						}
 +					}
 +
 +					++$rowID;
 +				}
 +			}
 +			++$worksheetID;
 +		}
 +
 +		// Return
 +		return $objPHPExcel;
 +	}
 +
 +
 +	private static function _convertStringEncoding($string,$charset) {
 +		if ($charset != 'UTF-8') {
 +			return PHPExcel_Shared_String::ConvertEncoding($string,'UTF-8',$charset);
 +		}
 +		return $string;
 +	}
 +
 +
 +	private function _parseRichText($is = '') {
 +		$value = new PHPExcel_RichText();
 +
 +		$value->createText(self::_convertStringEncoding($is,$this->_charSet));
 +
 +		return $value;
 +	}
 +
 +}
diff --cc 3rdparty/PHPExcel/Classes/PHPExcel/Reader/Excel2007.php
index 6e9a420,0000000..932fb1e
mode 100644,000000..100644
--- a/3rdparty/PHPExcel/Classes/PHPExcel/Reader/Excel2007.php
+++ b/3rdparty/PHPExcel/Classes/PHPExcel/Reader/Excel2007.php
@@@ -1,1982 -1,0 +1,1996 @@@
 +<?php
 +/**
 + * PHPExcel
 + *
 + * Copyright (c) 2006 - 2013 PHPExcel
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU Lesser General Public
 + * License as published by the Free Software Foundation; either
 + * version 2.1 of the License, or (at your option) 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
 + * Lesser General Public License for more details.
 + *
 + * You should have received a copy of the GNU Lesser General Public
 + * License along with this library; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 + *
 + * @category   PHPExcel
 + * @package    PHPExcel_Reader
 + * @copyright  Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
 + * @version    1.7.9, 2013-06-02
 + */
 +
 +
 +/** PHPExcel root directory */
 +if (!defined('PHPEXCEL_ROOT')) {
 +	/**
 +	 * @ignore
 +	 */
 +	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
 +	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
 +}
 +
 +/**
 + * PHPExcel_Reader_Excel2007
 + *
 + * @category	PHPExcel
 + * @package	PHPExcel_Reader
 + * @copyright	Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + */
 +class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
 +{
 +	/**
 +	 * PHPExcel_ReferenceHelper instance
 +	 *
 +	 * @var PHPExcel_ReferenceHelper
 +	 */
 +	private $_referenceHelper = NULL;
 +
 +	/**
 +	 * PHPExcel_Reader_Excel2007_Theme instance
 +	 *
 +	 * @var PHPExcel_Reader_Excel2007_Theme
 +	 */
 +	private static $_theme = NULL;
 +
 +
 +	/**
 +	 * Create a new PHPExcel_Reader_Excel2007 instance
 +	 */
 +	public function __construct() {
 +		$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
 +		$this->_referenceHelper = PHPExcel_ReferenceHelper::getInstance();
 +	}
 +
 +
 +	/**
 +	 * Can the current PHPExcel_Reader_IReader read the file?
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @return 	boolean
 +	 * @throws PHPExcel_Reader_Exception
 +	 */
 +	public function canRead($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		// Check if zip class exists
 +		if (!class_exists('ZipArchive',FALSE)) {
 +			throw new PHPExcel_Reader_Exception("ZipArchive library is not enabled");
 +		}
 +
 +		$xl = false;
 +		// Load file
 +		$zip = new ZipArchive;
 +		if ($zip->open($pFilename) === true) {
 +			// check if it is an OOXML archive
++			libxml_disable_entity_loader(true);
 +			$rels = simplexml_load_string($this->_getFromZipArchive($zip, "_rels/.rels"));
 +			if ($rels !== false) {
 +				foreach ($rels->Relationship as $rel) {
 +					switch ($rel["Type"]) {
 +						case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument":
 +							if (basename($rel["Target"]) == 'workbook.xml') {
 +								$xl = true;
 +							}
 +							break;
 +
 +					}
 +				}
 +			}
 +			$zip->close();
 +		}
 +
 +		return $xl;
 +	}
 +
 +
 +	/**
 +	 * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetNames($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$worksheetNames = array();
 +
 +		$zip = new ZipArchive;
 +		$zip->open($pFilename);
 +
 +		//	The files we're looking at here are small enough that simpleXML is more efficient than XMLReader
++		libxml_disable_entity_loader(true);
 +		$rels = simplexml_load_string(
 +		    $this->_getFromZipArchive($zip, "_rels/.rels")
 +		); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +		foreach ($rels->Relationship as $rel) {
 +			switch ($rel["Type"]) {
 +				case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument":
++				 	libxml_disable_entity_loader(true);
 +					$xmlWorkbook = simplexml_load_string(
 +					    $this->_getFromZipArchive($zip, "{$rel['Target']}")
 +					);  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +
 +					if ($xmlWorkbook->sheets) {
 +						foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
 +							// Check if sheet should be skipped
 +							$worksheetNames[] = (string) $eleSheet["name"];
 +						}
 +					}
 +			}
 +		}
 +
 +		$zip->close();
 +
 +		return $worksheetNames;
 +	}
 +
 +
 +	/**
 +	 * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns)
 +	 *
 +	 * @param   string     $pFilename
 +	 * @throws   PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetInfo($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$worksheetInfo = array();
 +
 +		$zip = new ZipArchive;
 +		$zip->open($pFilename);
- 
++		libxml_disable_entity_loader(true);
 +		$rels = simplexml_load_string($this->_getFromZipArchive($zip, "_rels/.rels")); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +		foreach ($rels->Relationship as $rel) {
 +			if ($rel["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument") {
 +				$dir = dirname($rel["Target"]);
++				libxml_disable_entity_loader(true);
 +				$relsWorkbook = simplexml_load_string($this->_getFromZipArchive($zip, "$dir/_rels/" . basename($rel["Target"]) . ".rels"));  //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +				$relsWorkbook->registerXPathNamespace("rel", "http://schemas.openxmlformats.org/package/2006/relationships");
 +
 +				$worksheets = array();
 +				foreach ($relsWorkbook->Relationship as $ele) {
 +					if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
 +						$worksheets[(string) $ele["Id"]] = $ele["Target"];
 +					}
- 				}
- 
++				}
++				libxml_disable_entity_loader(true);
 +				$xmlWorkbook = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +				if ($xmlWorkbook->sheets) {
 +					$dir = dirname($rel["Target"]);
 +					foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
 +						$tmpInfo = array(
 +							'worksheetName' => (string) $eleSheet["name"],
 +							'lastColumnLetter' => 'A',
 +							'lastColumnIndex' => 0,
 +							'totalRows' => 0,
 +							'totalColumns' => 0,
 +						);
 +
 +						$fileWorksheet = $worksheets[(string) self::array_item($eleSheet->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "id")];
 +
 +						$xml = new XMLReader();
 +						$res = $xml->open('zip://'.PHPExcel_Shared_File::realpath($pFilename).'#'."$dir/$fileWorksheet");
 +						$xml->setParserProperty(2,true);
 +
 +						$currCells = 0;
 +						while ($xml->read()) {
 +							if ($xml->name == 'row' && $xml->nodeType == XMLReader::ELEMENT) {
 +								$row = $xml->getAttribute('r');
 +								$tmpInfo['totalRows'] = $row;
 +								$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
 +								$currCells = 0;
 +							} elseif ($xml->name == 'c' && $xml->nodeType == XMLReader::ELEMENT) {
 +								$currCells++;
 +							}
 +						}
 +						$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
 +						$xml->close();
 +
 +						$tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1;
 +						$tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']);
 +
 +						$worksheetInfo[] = $tmpInfo;
 +					}
 +				}
 +			}
 +		}
 +
 +		$zip->close();
 +
 +		return $worksheetInfo;
 +	}
 +
 +
 +	private static function _castToBool($c) {
 +//		echo 'Initial Cast to Boolean<br />';
 +		$value = isset($c->v) ? (string) $c->v : NULL;
 +		if ($value == '0') {
 +			return FALSE;
 +		} elseif ($value == '1') {
 +			return TRUE;
 +		} else {
 +			return (bool)$c->v;
 +		}
 +		return $value;
 +	}	//	function _castToBool()
 +
 +
 +	private static function _castToError($c) {
 +//		echo 'Initial Cast to Error<br />';
 +		return isset($c->v) ? (string) $c->v : NULL;
 +	}	//	function _castToError()
 +
 +
 +	private static function _castToString($c) {
 +//		echo 'Initial Cast to String<br />';
 +		return isset($c->v) ? (string) $c->v : NULL;
 +	}	//	function _castToString()
 +
 +
 +	private function _castToFormula($c,$r,&$cellDataType,&$value,&$calculatedValue,&$sharedFormulas,$castBaseType) {
 +//		echo 'Formula<br />';
 +//		echo '$c->f is '.$c->f.'<br />';
 +		$cellDataType 		= 'f';
 +		$value 				= "={$c->f}";
 +		$calculatedValue 	= self::$castBaseType($c);
 +
 +		// Shared formula?
 +		if (isset($c->f['t']) && strtolower((string)$c->f['t']) == 'shared') {
 +//			echo 'SHARED FORMULA<br />';
 +			$instance = (string)$c->f['si'];
 +
 +//			echo 'Instance ID = '.$instance.'<br />';
 +//
 +//			echo 'Shared Formula Array:<pre>';
 +//			print_r($sharedFormulas);
 +//			echo '</pre>';
 +			if (!isset($sharedFormulas[(string)$c->f['si']])) {
 +//				echo 'SETTING NEW SHARED FORMULA<br />';
 +//				echo 'Master is '.$r.'<br />';
 +//				echo 'Formula is '.$value.'<br />';
 +				$sharedFormulas[$instance] = array(	'master' => $r,
 +													'formula' => $value
 +												  );
 +//				echo 'New Shared Formula Array:<pre>';
 +//				print_r($sharedFormulas);
 +//				echo '</pre>';
 +			} else {
 +//				echo 'GETTING SHARED FORMULA<br />';
 +//				echo 'Master is '.$sharedFormulas[$instance]['master'].'<br />';
 +//				echo 'Formula is '.$sharedFormulas[$instance]['formula'].'<br />';
 +				$master = PHPExcel_Cell::coordinateFromString($sharedFormulas[$instance]['master']);
 +				$current = PHPExcel_Cell::coordinateFromString($r);
 +
 +				$difference = array(0, 0);
 +				$difference[0] = PHPExcel_Cell::columnIndexFromString($current[0]) - PHPExcel_Cell::columnIndexFromString($master[0]);
 +				$difference[1] = $current[1] - $master[1];
 +
 +				$value = $this->_referenceHelper->updateFormulaReferences(	$sharedFormulas[$instance]['formula'],
 +																			'A1',
 +																			$difference[0],
 +																			$difference[1]
 +																		 );
 +//				echo 'Adjusted Formula is '.$value.'<br />';
 +			}
 +		}
 +	}
 +
 +
 +	public function _getFromZipArchive(ZipArchive $archive, $fileName = '')
 +	{
 +		// Root-relative paths
 +		if (strpos($fileName, '//') !== false)
 +		{
 +			$fileName = substr($fileName, strpos($fileName, '//') + 1);
 +		}
 +		$fileName = PHPExcel_Shared_File::realpath($fileName);
 +
 +		// Apache POI fixes
 +		$contents = $archive->getFromName($fileName);
 +		if ($contents === false)
 +		{
 +			$contents = $archive->getFromName(substr($fileName, 1));
 +		}
 +
 +		return $contents;
 +	}
 +
 +
 +	/**
 +	 * Loads PHPExcel from file
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function load($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		// Initialisations
 +		$excel = new PHPExcel;
 +		$excel->removeSheetByIndex(0);
 +		if (!$this->_readDataOnly) {
 +			$excel->removeCellStyleXfByIndex(0); // remove the default style
 +			$excel->removeCellXfByIndex(0); // remove the default style
 +		}
 +		$zip = new ZipArchive;
 +		$zip->open($pFilename);
 +
 +		//	Read the theme first, because we need the colour scheme when reading the styles
++		libxml_disable_entity_loader(true);
 +		$wbRels = simplexml_load_string($this->_getFromZipArchive($zip, "xl/_rels/workbook.xml.rels")); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +		foreach ($wbRels->Relationship as $rel) {
 +			switch ($rel["Type"]) {
 +				case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme":
 +					$themeOrderArray = array('lt1','dk1','lt2','dk2');
 +					$themeOrderAdditional = count($themeOrderArray);
- 
++					libxml_disable_entity_loader(true);
 +					$xmlTheme = simplexml_load_string($this->_getFromZipArchive($zip, "xl/{$rel['Target']}"));
 +					if (is_object($xmlTheme)) {
 +						$xmlThemeName = $xmlTheme->attributes();
 +						$xmlTheme = $xmlTheme->children("http://schemas.openxmlformats.org/drawingml/2006/main");
 +						$themeName = (string)$xmlThemeName['name'];
 +
 +						$colourScheme = $xmlTheme->themeElements->clrScheme->attributes();
 +						$colourSchemeName = (string)$colourScheme['name'];
 +						$colourScheme = $xmlTheme->themeElements->clrScheme->children("http://schemas.openxmlformats.org/drawingml/2006/main");
 +
 +						$themeColours = array();
 +						foreach ($colourScheme as $k => $xmlColour) {
 +							$themePos = array_search($k,$themeOrderArray);
 +							if ($themePos === false) {
 +								$themePos = $themeOrderAdditional++;
 +							}
 +							if (isset($xmlColour->sysClr)) {
 +								$xmlColourData = $xmlColour->sysClr->attributes();
 +								$themeColours[$themePos] = $xmlColourData['lastClr'];
 +							} elseif (isset($xmlColour->srgbClr)) {
 +								$xmlColourData = $xmlColour->srgbClr->attributes();
 +								$themeColours[$themePos] = $xmlColourData['val'];
 +							}
 +						}
 +						self::$_theme = new PHPExcel_Reader_Excel2007_Theme($themeName,$colourSchemeName,$themeColours);
 +					}
 +					break;
 +			}
 +		}
- 
++		libxml_disable_entity_loader(true);
 +		$rels = simplexml_load_string($this->_getFromZipArchive($zip, "_rels/.rels")); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +		foreach ($rels->Relationship as $rel) {
 +			switch ($rel["Type"]) {
 +				case "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties":
++					libxml_disable_entity_loader(true);
 +					$xmlCore = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));
 +					if (is_object($xmlCore)) {
 +						$xmlCore->registerXPathNamespace("dc", "http://purl.org/dc/elements/1.1/");
 +						$xmlCore->registerXPathNamespace("dcterms", "http://purl.org/dc/terms/");
 +						$xmlCore->registerXPathNamespace("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
 +						$docProps = $excel->getProperties();
 +						$docProps->setCreator((string) self::array_item($xmlCore->xpath("dc:creator")));
 +						$docProps->setLastModifiedBy((string) self::array_item($xmlCore->xpath("cp:lastModifiedBy")));
 +						$docProps->setCreated(strtotime(self::array_item($xmlCore->xpath("dcterms:created")))); //! respect xsi:type
 +						$docProps->setModified(strtotime(self::array_item($xmlCore->xpath("dcterms:modified")))); //! respect xsi:type
 +						$docProps->setTitle((string) self::array_item($xmlCore->xpath("dc:title")));
 +						$docProps->setDescription((string) self::array_item($xmlCore->xpath("dc:description")));
 +						$docProps->setSubject((string) self::array_item($xmlCore->xpath("dc:subject")));
 +						$docProps->setKeywords((string) self::array_item($xmlCore->xpath("cp:keywords")));
 +						$docProps->setCategory((string) self::array_item($xmlCore->xpath("cp:category")));
 +					}
 +				break;
 +
 +				case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties":
++					libxml_disable_entity_loader(true);
 +					$xmlCore = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));
 +					if (is_object($xmlCore)) {
 +						$docProps = $excel->getProperties();
 +						if (isset($xmlCore->Company))
 +							$docProps->setCompany((string) $xmlCore->Company);
 +						if (isset($xmlCore->Manager))
 +							$docProps->setManager((string) $xmlCore->Manager);
 +					}
 +				break;
 +
 +				case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties":
++					libxml_disable_entity_loader(true);
 +					$xmlCore = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));
 +					if (is_object($xmlCore)) {
 +						$docProps = $excel->getProperties();
 +						foreach ($xmlCore as $xmlProperty) {
 +							$cellDataOfficeAttributes = $xmlProperty->attributes();
 +							if (isset($cellDataOfficeAttributes['name'])) {
 +								$propertyName = (string) $cellDataOfficeAttributes['name'];
 +								$cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');
 +								$attributeType = $cellDataOfficeChildren->getName();
 +								$attributeValue = (string) $cellDataOfficeChildren->{$attributeType};
 +								$attributeValue = PHPExcel_DocumentProperties::convertProperty($attributeValue,$attributeType);
 +								$attributeType = PHPExcel_DocumentProperties::convertPropertyType($attributeType);
 +								$docProps->setCustomProperty($propertyName,$attributeValue,$attributeType);
 +							}
 +						}
 +					}
 +				break;
 +
 +				case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument":
 +					$dir = dirname($rel["Target"]);
++					libxml_disable_entity_loader(true);
 +					$relsWorkbook = simplexml_load_string($this->_getFromZipArchive($zip, "$dir/_rels/" . basename($rel["Target"]) . ".rels"));  //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +					$relsWorkbook->registerXPathNamespace("rel", "http://schemas.openxmlformats.org/package/2006/relationships");
 +
 +					$sharedStrings = array();
 +					$xpath = self::array_item($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings']"));
++					libxml_disable_entity_loader(true);
 +					$xmlStrings = simplexml_load_string($this->_getFromZipArchive($zip, "$dir/$xpath[Target]"));  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +					if (isset($xmlStrings) && isset($xmlStrings->si)) {
 +						foreach ($xmlStrings->si as $val) {
 +							if (isset($val->t)) {
 +								$sharedStrings[] = PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $val->t );
 +							} elseif (isset($val->r)) {
 +								$sharedStrings[] = $this->_parseRichText($val);
 +							}
 +						}
 +					}
 +
 +					$worksheets = array();
 +					foreach ($relsWorkbook->Relationship as $ele) {
 +						if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
 +							$worksheets[(string) $ele["Id"]] = $ele["Target"];
 +						}
 +					}
 +
 +					$styles 	= array();
 +					$cellStyles = array();
 +					$xpath = self::array_item($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles']"));
++					libxml_disable_entity_loader(true);
 +					$xmlStyles = simplexml_load_string($this->_getFromZipArchive($zip, "$dir/$xpath[Target]")); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +					$numFmts = null;
 +					if ($xmlStyles && $xmlStyles->numFmts[0]) {
 +						$numFmts = $xmlStyles->numFmts[0];
 +					}
 +					if (isset($numFmts) && ($numFmts !== NULL)) {
 +						$numFmts->registerXPathNamespace("sml", "http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +					}
 +					if (!$this->_readDataOnly && $xmlStyles) {
 +						foreach ($xmlStyles->cellXfs->xf as $xf) {
 +							$numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
 +
 +							if ($xf["numFmtId"]) {
 +								if (isset($numFmts)) {
 +									$tmpNumFmt = self::array_item($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
 +
 +									if (isset($tmpNumFmt["formatCode"])) {
 +										$numFmt = (string) $tmpNumFmt["formatCode"];
 +									}
 +								}
 +
 +								if ((int)$xf["numFmtId"] < 164) {
 +									$numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
 +								}
 +							}
 +							//$numFmt = str_replace('mm', 'i', $numFmt);
 +							//$numFmt = str_replace('h', 'H', $numFmt);
 +
 +							$style = (object) array(
 +								"numFmt" => $numFmt,
 +								"font" => $xmlStyles->fonts->font[intval($xf["fontId"])],
 +								"fill" => $xmlStyles->fills->fill[intval($xf["fillId"])],
 +								"border" => $xmlStyles->borders->border[intval($xf["borderId"])],
 +								"alignment" => $xf->alignment,
 +								"protection" => $xf->protection,
 +							);
 +							$styles[] = $style;
 +
 +							// add style to cellXf collection
 +							$objStyle = new PHPExcel_Style;
 +							self::_readStyle($objStyle, $style);
 +							$excel->addCellXf($objStyle);
 +						}
 +
 +						foreach ($xmlStyles->cellStyleXfs->xf as $xf) {
 +							$numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
 +							if ($numFmts && $xf["numFmtId"]) {
 +								$tmpNumFmt = self::array_item($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
 +								if (isset($tmpNumFmt["formatCode"])) {
 +									$numFmt = (string) $tmpNumFmt["formatCode"];
 +								} else if ((int)$xf["numFmtId"] < 165) {
 +									$numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
 +								}
 +							}
 +
 +							$cellStyle = (object) array(
 +								"numFmt" => $numFmt,
 +								"font" => $xmlStyles->fonts->font[intval($xf["fontId"])],
 +								"fill" => $xmlStyles->fills->fill[intval($xf["fillId"])],
 +								"border" => $xmlStyles->borders->border[intval($xf["borderId"])],
 +								"alignment" => $xf->alignment,
 +								"protection" => $xf->protection,
 +							);
 +							$cellStyles[] = $cellStyle;
 +
 +							// add style to cellStyleXf collection
 +							$objStyle = new PHPExcel_Style;
 +							self::_readStyle($objStyle, $cellStyle);
 +							$excel->addCellStyleXf($objStyle);
 +						}
 +					}
 +
 +					$dxfs = array();
 +					if (!$this->_readDataOnly && $xmlStyles) {
 +						//	Conditional Styles
 +						if ($xmlStyles->dxfs) {
 +							foreach ($xmlStyles->dxfs->dxf as $dxf) {
 +								$style = new PHPExcel_Style(FALSE, TRUE);
 +								self::_readStyle($style, $dxf);
 +								$dxfs[] = $style;
 +							}
 +						}
 +						//	Cell Styles
 +						if ($xmlStyles->cellStyles) {
 +							foreach ($xmlStyles->cellStyles->cellStyle as $cellStyle) {
 +								if (intval($cellStyle['builtinId']) == 0) {
 +									if (isset($cellStyles[intval($cellStyle['xfId'])])) {
 +										// Set default style
 +										$style = new PHPExcel_Style;
 +										self::_readStyle($style, $cellStyles[intval($cellStyle['xfId'])]);
 +
 +										// normal style, currently not using it for anything
 +									}
 +								}
 +							}
 +						}
 +					}
- 
++					libxml_disable_entity_loader(true);
 +					$xmlWorkbook = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +
 +					// Set base date
 +					if ($xmlWorkbook->workbookPr) {
 +						PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900);
 +						if (isset($xmlWorkbook->workbookPr['date1904'])) {
 +							if (self::boolean((string) $xmlWorkbook->workbookPr['date1904'])) {
 +								PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904);
 +							}
 +						}
 +					}
 +
 +					$sheetId = 0; // keep track of new sheet id in final workbook
 +					$oldSheetId = -1; // keep track of old sheet id in final workbook
 +					$countSkippedSheets = 0; // keep track of number of skipped sheets
 +					$mapSheetId = array(); // mapping of sheet ids from old to new
 +
 +
 +					$charts = $chartDetails = array();
 +
 +					if ($xmlWorkbook->sheets) {
 +						foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
 +							++$oldSheetId;
 +
 +							// Check if sheet should be skipped
 +							if (isset($this->_loadSheetsOnly) && !in_array((string) $eleSheet["name"], $this->_loadSheetsOnly)) {
 +								++$countSkippedSheets;
 +								$mapSheetId[$oldSheetId] = null;
 +								continue;
 +							}
 +
 +							// Map old sheet id in original workbook to new sheet id.
 +							// They will differ if loadSheetsOnly() is being used
 +							$mapSheetId[$oldSheetId] = $oldSheetId - $countSkippedSheets;
 +
 +							// Load sheet
 +							$docSheet = $excel->createSheet();
 +							//	Use false for $updateFormulaCellReferences to prevent adjustment of worksheet
 +							//		references in formula cells... during the load, all formulae should be correct,
 +							//		and we're simply bringing the worksheet name in line with the formula, not the
 +							//		reverse
 +							$docSheet->setTitle((string) $eleSheet["name"],false);
 +							$fileWorksheet = $worksheets[(string) self::array_item($eleSheet->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "id")];
++							libxml_disable_entity_loader(true);
 +							$xmlSheet = simplexml_load_string($this->_getFromZipArchive($zip, "$dir/$fileWorksheet"));  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +
 +							$sharedFormulas = array();
 +
 +							if (isset($eleSheet["state"]) && (string) $eleSheet["state"] != '') {
 +								$docSheet->setSheetState( (string) $eleSheet["state"] );
 +							}
 +
 +							if (isset($xmlSheet->sheetViews) && isset($xmlSheet->sheetViews->sheetView)) {
 +							    if (isset($xmlSheet->sheetViews->sheetView['zoomScale'])) {
 +								    $docSheet->getSheetView()->setZoomScale( intval($xmlSheet->sheetViews->sheetView['zoomScale']) );
 +								}
 +
 +							    if (isset($xmlSheet->sheetViews->sheetView['zoomScaleNormal'])) {
 +								    $docSheet->getSheetView()->setZoomScaleNormal( intval($xmlSheet->sheetViews->sheetView['zoomScaleNormal']) );
 +								}
 +
 +							    if (isset($xmlSheet->sheetViews->sheetView['view'])) {
 +								    $docSheet->getSheetView()->setView((string) $xmlSheet->sheetViews->sheetView['view']);
 +								}
 +
 +								if (isset($xmlSheet->sheetViews->sheetView['showGridLines'])) {
 +									$docSheet->setShowGridLines(self::boolean((string)$xmlSheet->sheetViews->sheetView['showGridLines']));
 +								}
 +
 +								if (isset($xmlSheet->sheetViews->sheetView['showRowColHeaders'])) {
 +									$docSheet->setShowRowColHeaders(self::boolean((string)$xmlSheet->sheetViews->sheetView['showRowColHeaders']));
 +								}
 +
 +								if (isset($xmlSheet->sheetViews->sheetView['rightToLeft'])) {
 +									$docSheet->setRightToLeft(self::boolean((string)$xmlSheet->sheetViews->sheetView['rightToLeft']));
 +								}
 +
 +								if (isset($xmlSheet->sheetViews->sheetView->pane)) {
 +								    if (isset($xmlSheet->sheetViews->sheetView->pane['topLeftCell'])) {
 +								        $docSheet->freezePane( (string)$xmlSheet->sheetViews->sheetView->pane['topLeftCell'] );
 +								    } else {
 +								        $xSplit = 0;
 +								        $ySplit = 0;
 +
 +								        if (isset($xmlSheet->sheetViews->sheetView->pane['xSplit'])) {
 +								            $xSplit = 1 + intval($xmlSheet->sheetViews->sheetView->pane['xSplit']);
 +								        }
 +
 +								    	if (isset($xmlSheet->sheetViews->sheetView->pane['ySplit'])) {
 +								            $ySplit = 1 + intval($xmlSheet->sheetViews->sheetView->pane['ySplit']);
 +								        }
 +
 +								        $docSheet->freezePaneByColumnAndRow($xSplit, $ySplit);
 +								    }
 +								}
 +
 +								if (isset($xmlSheet->sheetViews->sheetView->selection)) {
 +									if (isset($xmlSheet->sheetViews->sheetView->selection['sqref'])) {
 +										$sqref = (string)$xmlSheet->sheetViews->sheetView->selection['sqref'];
 +										$sqref = explode(' ', $sqref);
 +										$sqref = $sqref[0];
 +										$docSheet->setSelectedCells($sqref);
 +									}
 +								}
 +
 +							}
 +
 +							if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->tabColor)) {
 +								if (isset($xmlSheet->sheetPr->tabColor['rgb'])) {
 +									$docSheet->getTabColor()->setARGB( (string)$xmlSheet->sheetPr->tabColor['rgb'] );
 +								}
 +							}
 +
 +							if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->outlinePr)) {
 +								if (isset($xmlSheet->sheetPr->outlinePr['summaryRight']) &&
 +									!self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryRight'])) {
 +									$docSheet->setShowSummaryRight(FALSE);
 +								} else {
 +									$docSheet->setShowSummaryRight(TRUE);
 +								}
 +
 +								if (isset($xmlSheet->sheetPr->outlinePr['summaryBelow']) &&
 +									!self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryBelow'])) {
 +									$docSheet->setShowSummaryBelow(FALSE);
 +								} else {
 +									$docSheet->setShowSummaryBelow(TRUE);
 +								}
 +							}
 +
 +							if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->pageSetUpPr)) {
 +								if (isset($xmlSheet->sheetPr->pageSetUpPr['fitToPage']) &&
 +									!self::boolean((string) $xmlSheet->sheetPr->pageSetUpPr['fitToPage'])) {
 +									$docSheet->getPageSetup()->setFitToPage(FALSE);
 +								} else {
 +									$docSheet->getPageSetup()->setFitToPage(TRUE);
 +								}
 +							}
 +
 +							if (isset($xmlSheet->sheetFormatPr)) {
 +								if (isset($xmlSheet->sheetFormatPr['customHeight']) &&
 +									self::boolean((string) $xmlSheet->sheetFormatPr['customHeight']) &&
 +									isset($xmlSheet->sheetFormatPr['defaultRowHeight'])) {
 +									$docSheet->getDefaultRowDimension()->setRowHeight( (float)$xmlSheet->sheetFormatPr['defaultRowHeight'] );
 +								}
 +								if (isset($xmlSheet->sheetFormatPr['defaultColWidth'])) {
 +									$docSheet->getDefaultColumnDimension()->setWidth( (float)$xmlSheet->sheetFormatPr['defaultColWidth'] );
 +								}
 +								if (isset($xmlSheet->sheetFormatPr['zeroHeight']) &&
 +									((string)$xmlSheet->sheetFormatPr['zeroHeight'] == '1')) {
 +									$docSheet->getDefaultRowDimension()->setzeroHeight(true);
 +								}
 +							}
 +
 +							if (isset($xmlSheet->cols) && !$this->_readDataOnly) {
 +								foreach ($xmlSheet->cols->col as $col) {
 +									for ($i = intval($col["min"]) - 1; $i < intval($col["max"]); ++$i) {
 +										if ($col["style"] && !$this->_readDataOnly) {
 +											$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setXfIndex(intval($col["style"]));
 +										}
 +										if (self::boolean($col["bestFit"])) {
 +											//$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setAutoSize(TRUE);
 +										}
 +										if (self::boolean($col["hidden"])) {
 +											$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setVisible(FALSE);
 +										}
 +										if (self::boolean($col["collapsed"])) {
 +											$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setCollapsed(TRUE);
 +										}
 +										if ($col["outlineLevel"] > 0) {
 +											$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setOutlineLevel(intval($col["outlineLevel"]));
 +										}
 +										$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setWidth(floatval($col["width"]));
 +
 +										if (intval($col["max"]) == 16384) {
 +											break;
 +										}
 +									}
 +								}
 +							}
 +
 +							if (isset($xmlSheet->printOptions) && !$this->_readDataOnly) {
 +								if (self::boolean((string) $xmlSheet->printOptions['gridLinesSet'])) {
 +									$docSheet->setShowGridlines(TRUE);
 +								}
 +
 +								if (self::boolean((string) $xmlSheet->printOptions['gridLines'])) {
 +									$docSheet->setPrintGridlines(TRUE);
 +								}
 +
 +								if (self::boolean((string) $xmlSheet->printOptions['horizontalCentered'])) {
 +									$docSheet->getPageSetup()->setHorizontalCentered(TRUE);
 +								}
 +								if (self::boolean((string) $xmlSheet->printOptions['verticalCentered'])) {
 +									$docSheet->getPageSetup()->setVerticalCentered(TRUE);
 +								}
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->sheetData && $xmlSheet->sheetData->row) {
 +								foreach ($xmlSheet->sheetData->row as $row) {
 +									if ($row["ht"] && !$this->_readDataOnly) {
 +										$docSheet->getRowDimension(intval($row["r"]))->setRowHeight(floatval($row["ht"]));
 +									}
 +									if (self::boolean($row["hidden"]) && !$this->_readDataOnly) {
 +										$docSheet->getRowDimension(intval($row["r"]))->setVisible(FALSE);
 +									}
 +									if (self::boolean($row["collapsed"])) {
 +										$docSheet->getRowDimension(intval($row["r"]))->setCollapsed(TRUE);
 +									}
 +									if ($row["outlineLevel"] > 0) {
 +										$docSheet->getRowDimension(intval($row["r"]))->setOutlineLevel(intval($row["outlineLevel"]));
 +									}
 +									if ($row["s"] && !$this->_readDataOnly) {
 +										$docSheet->getRowDimension(intval($row["r"]))->setXfIndex(intval($row["s"]));
 +									}
 +
 +									foreach ($row->c as $c) {
 +										$r 					= (string) $c["r"];
 +										$cellDataType 		= (string) $c["t"];
 +										$value				= null;
 +										$calculatedValue 	= null;
 +
 +										// Read cell?
 +										if ($this->getReadFilter() !== NULL) {
 +											$coordinates = PHPExcel_Cell::coordinateFromString($r);
 +
 +											if (!$this->getReadFilter()->readCell($coordinates[0], $coordinates[1], $docSheet->getTitle())) {
 +												continue;
 +											}
 +										}
 +
 +	//									echo '<b>Reading cell '.$coordinates[0].$coordinates[1].'</b><br />';
 +	//									print_r($c);
 +	//									echo '<br />';
 +	//									echo 'Cell Data Type is '.$cellDataType.': ';
 +	//
 +										// Read cell!
 +										switch ($cellDataType) {
 +											case "s":
 +	//											echo 'String<br />';
 +												if ((string)$c->v != '') {
 +													$value = $sharedStrings[intval($c->v)];
 +
 +													if ($value instanceof PHPExcel_RichText) {
 +														$value = clone $value;
 +													}
 +												} else {
 +													$value = '';
 +												}
 +
 +												break;
 +											case "b":
 +	//											echo 'Boolean<br />';
 +												if (!isset($c->f)) {
 +													$value = self::_castToBool($c);
 +												} else {
 +													// Formula
 +													$this->_castToFormula($c,$r,$cellDataType,$value,$calculatedValue,$sharedFormulas,'_castToBool');
 +													if (isset($c->f['t'])) {
 +														$att = array();
 +														$att = $c->f;
 +														$docSheet->getCell($r)->setFormulaAttributes($att);
 +													}
 +	//												echo '$calculatedValue = '.$calculatedValue.'<br />';
 +												}
 +												break;
 +											case "inlineStr":
 +	//											echo 'Inline String<br />';
 +												$value = $this->_parseRichText($c->is);
 +
 +												break;
 +											case "e":
 +	//											echo 'Error<br />';
 +												if (!isset($c->f)) {
 +													$value = self::_castToError($c);
 +												} else {
 +													// Formula
 +													$this->_castToFormula($c,$r,$cellDataType,$value,$calculatedValue,$sharedFormulas,'_castToError');
 +	//												echo '$calculatedValue = '.$calculatedValue.'<br />';
 +												}
 +
 +												break;
 +
 +											default:
 +	//											echo 'Default<br />';
 +												if (!isset($c->f)) {
 +	//												echo 'Not a Formula<br />';
 +													$value = self::_castToString($c);
 +												} else {
 +	//												echo 'Treat as Formula<br />';
 +													// Formula
 +													$this->_castToFormula($c,$r,$cellDataType,$value,$calculatedValue,$sharedFormulas,'_castToString');
 +	//												echo '$calculatedValue = '.$calculatedValue.'<br />';
 +												}
 +
 +												break;
 +										}
 +	//									echo 'Value is '.$value.'<br />';
 +
 +										// Check for numeric values
 +										if (is_numeric($value) && $cellDataType != 's') {
 +											if ($value == (int)$value) $value = (int)$value;
 +											elseif ($value == (float)$value) $value = (float)$value;
 +											elseif ($value == (double)$value) $value = (double)$value;
 +										}
 +
 +										// Rich text?
 +										if ($value instanceof PHPExcel_RichText && $this->_readDataOnly) {
 +											$value = $value->getPlainText();
 +										}
 +
 +										$cell = $docSheet->getCell($r);
 +										// Assign value
 +										if ($cellDataType != '') {
 +											$cell->setValueExplicit($value, $cellDataType);
 +										} else {
 +											$cell->setValue($value);
 +										}
 +										if ($calculatedValue !== NULL) {
 +											$cell->setCalculatedValue($calculatedValue);
 +										}
 +
 +										// Style information?
 +										if ($c["s"] && !$this->_readDataOnly) {
 +											// no style index means 0, it seems
 +											$cell->setXfIndex(isset($styles[intval($c["s"])]) ?
 +												intval($c["s"]) : 0);
 +										}
 +									}
 +								}
 +							}
 +
 +							$conditionals = array();
 +							if (!$this->_readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) {
 +								foreach ($xmlSheet->conditionalFormatting as $conditional) {
 +									foreach ($conditional->cfRule as $cfRule) {
 +										if (
 +											(
 +												(string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_NONE ||
 +												(string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CELLIS ||
 +												(string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT ||
 +												(string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_EXPRESSION
 +											) && isset($dxfs[intval($cfRule["dxfId"])])
 +										) {
 +											$conditionals[(string) $conditional["sqref"]][intval($cfRule["priority"])] = $cfRule;
 +										}
 +									}
 +								}
 +
 +								foreach ($conditionals as $ref => $cfRules) {
 +									ksort($cfRules);
 +									$conditionalStyles = array();
 +									foreach ($cfRules as $cfRule) {
 +										$objConditional = new PHPExcel_Style_Conditional();
 +										$objConditional->setConditionType((string)$cfRule["type"]);
 +										$objConditional->setOperatorType((string)$cfRule["operator"]);
 +
 +										if ((string)$cfRule["text"] != '') {
 +											$objConditional->setText((string)$cfRule["text"]);
 +										}
 +
 +										if (count($cfRule->formula) > 1) {
 +											foreach ($cfRule->formula as $formula) {
 +												$objConditional->addCondition((string)$formula);
 +											}
 +										} else {
 +											$objConditional->addCondition((string)$cfRule->formula);
 +										}
 +										$objConditional->setStyle(clone $dxfs[intval($cfRule["dxfId"])]);
 +										$conditionalStyles[] = $objConditional;
 +									}
 +
 +									// Extract all cell references in $ref
 +									$aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($ref);
 +									foreach ($aReferences as $reference) {
 +										$docSheet->getStyle($reference)->setConditionalStyles($conditionalStyles);
 +									}
 +								}
 +							}
 +
 +							$aKeys = array("sheet", "objects", "scenarios", "formatCells", "formatColumns", "formatRows", "insertColumns", "insertRows", "insertHyperlinks", "deleteColumns", "deleteRows", "selectLockedCells", "sort", "autoFilter", "pivotTables", "selectUnlockedCells");
 +							if (!$this->_readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) {
 +								foreach ($aKeys as $key) {
 +									$method = "set" . ucfirst($key);
 +									$docSheet->getProtection()->$method(self::boolean((string) $xmlSheet->sheetProtection[$key]));
 +								}
 +							}
 +
 +							if (!$this->_readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) {
 +								$docSheet->getProtection()->setPassword((string) $xmlSheet->sheetProtection["password"], TRUE);
 +								if ($xmlSheet->protectedRanges->protectedRange) {
 +									foreach ($xmlSheet->protectedRanges->protectedRange as $protectedRange) {
 +										$docSheet->protectCells((string) $protectedRange["sqref"], (string) $protectedRange["password"], true);
 +									}
 +								}
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->autoFilter && !$this->_readDataOnly) {
 +								$autoFilter = $docSheet->getAutoFilter();
 +								$autoFilter->setRange((string) $xmlSheet->autoFilter["ref"]);
 +								foreach ($xmlSheet->autoFilter->filterColumn as $filterColumn) {
 +									$column = $autoFilter->getColumnByOffset((integer) $filterColumn["colId"]);
 +									//	Check for standard filters
 +									if ($filterColumn->filters) {
 +										$column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER);
 +										$filters = $filterColumn->filters;
 +										if ((isset($filters["blank"])) && ($filters["blank"] == 1)) {
 +											$column->createRule()->setRule(
 +												NULL,	//	Operator is undefined, but always treated as EQUAL
 +												''
 +											)
 +											->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
 +										}
 +										//	Standard filters are always an OR join, so no join rule needs to be set
 +										//	Entries can be either filter elements
 +										foreach ($filters->filter as $filterRule) {
 +											$column->createRule()->setRule(
 +												NULL,	//	Operator is undefined, but always treated as EQUAL
 +												(string) $filterRule["val"]
 +											)
 +											->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
 +										}
 +										//	Or Date Group elements
 +										foreach ($filters->dateGroupItem as $dateGroupItem) {
 +											$column->createRule()->setRule(
 +												NULL,	//	Operator is undefined, but always treated as EQUAL
 +												array(
 +													'year' => (string) $dateGroupItem["year"],
 +													'month' => (string) $dateGroupItem["month"],
 +													'day' => (string) $dateGroupItem["day"],
 +													'hour' => (string) $dateGroupItem["hour"],
 +													'minute' => (string) $dateGroupItem["minute"],
 +													'second' => (string) $dateGroupItem["second"],
 +												),
 +												(string) $dateGroupItem["dateTimeGrouping"]
 +											)
 +											->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP);
 +										}
 +									}
 +									//	Check for custom filters
 +									if ($filterColumn->customFilters) {
 +										$column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);
 +										$customFilters = $filterColumn->customFilters;
 +										//	Custom filters can an AND or an OR join;
 +										//		and there should only ever be one or two entries
 +										if ((isset($customFilters["and"])) && ($customFilters["and"] == 1)) {
 +											$column->setJoin(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND);
 +										}
 +										foreach ($customFilters->customFilter as $filterRule) {
 +											$column->createRule()->setRule(
 +												(string) $filterRule["operator"],
 +												(string) $filterRule["val"]
 +											)
 +											->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
 +										}
 +									}
 +									//	Check for dynamic filters
 +									if ($filterColumn->dynamicFilter) {
 +										$column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);
 +										//	We should only ever have one dynamic filter
 +										foreach ($filterColumn->dynamicFilter as $filterRule) {
 +											$column->createRule()->setRule(
 +												NULL,	//	Operator is undefined, but always treated as EQUAL
 +												(string) $filterRule["val"],
 +												(string) $filterRule["type"]
 +											)
 +											->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);
 +											if (isset($filterRule["val"])) {
 +												$column->setAttribute('val',(string) $filterRule["val"]);
 +											}
 +											if (isset($filterRule["maxVal"])) {
 +												$column->setAttribute('maxVal',(string) $filterRule["maxVal"]);
 +											}
 +										}
 +									}
 +									//	Check for dynamic filters
 +									if ($filterColumn->top10) {
 +										$column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER);
 +										//	We should only ever have one top10 filter
 +										foreach ($filterColumn->top10 as $filterRule) {
 +											$column->createRule()->setRule(
 +												(((isset($filterRule["percent"])) && ($filterRule["percent"] == 1))
 +													? PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT
 +													: PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE
 +												),
 +												(string) $filterRule["val"],
 +												(((isset($filterRule["top"])) && ($filterRule["top"] == 1))
 +													? PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP
 +													: PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM
 +												)
 +											)
 +											->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_TOPTENFILTER);
 +										}
 +									}
 +								}
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->mergeCells && $xmlSheet->mergeCells->mergeCell && !$this->_readDataOnly) {
 +								foreach ($xmlSheet->mergeCells->mergeCell as $mergeCell) {
 +									$mergeRef = (string) $mergeCell["ref"];
 +									if (strpos($mergeRef,':') !== FALSE) {
 +										$docSheet->mergeCells((string) $mergeCell["ref"]);
 +									}
 +								}
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->pageMargins && !$this->_readDataOnly) {
 +								$docPageMargins = $docSheet->getPageMargins();
 +								$docPageMargins->setLeft(floatval($xmlSheet->pageMargins["left"]));
 +								$docPageMargins->setRight(floatval($xmlSheet->pageMargins["right"]));
 +								$docPageMargins->setTop(floatval($xmlSheet->pageMargins["top"]));
 +								$docPageMargins->setBottom(floatval($xmlSheet->pageMargins["bottom"]));
 +								$docPageMargins->setHeader(floatval($xmlSheet->pageMargins["header"]));
 +								$docPageMargins->setFooter(floatval($xmlSheet->pageMargins["footer"]));
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->pageSetup && !$this->_readDataOnly) {
 +								$docPageSetup = $docSheet->getPageSetup();
 +
 +								if (isset($xmlSheet->pageSetup["orientation"])) {
 +									$docPageSetup->setOrientation((string) $xmlSheet->pageSetup["orientation"]);
 +								}
 +								if (isset($xmlSheet->pageSetup["paperSize"])) {
 +									$docPageSetup->setPaperSize(intval($xmlSheet->pageSetup["paperSize"]));
 +								}
 +								if (isset($xmlSheet->pageSetup["scale"])) {
 +									$docPageSetup->setScale(intval($xmlSheet->pageSetup["scale"]), FALSE);
 +								}
 +								if (isset($xmlSheet->pageSetup["fitToHeight"]) && intval($xmlSheet->pageSetup["fitToHeight"]) >= 0) {
 +									$docPageSetup->setFitToHeight(intval($xmlSheet->pageSetup["fitToHeight"]), FALSE);
 +								}
 +								if (isset($xmlSheet->pageSetup["fitToWidth"]) && intval($xmlSheet->pageSetup["fitToWidth"]) >= 0) {
 +									$docPageSetup->setFitToWidth(intval($xmlSheet->pageSetup["fitToWidth"]), FALSE);
 +								}
 +								if (isset($xmlSheet->pageSetup["firstPageNumber"]) && isset($xmlSheet->pageSetup["useFirstPageNumber"]) &&
 +									self::boolean((string) $xmlSheet->pageSetup["useFirstPageNumber"])) {
 +									$docPageSetup->setFirstPageNumber(intval($xmlSheet->pageSetup["firstPageNumber"]));
 +								}
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->headerFooter && !$this->_readDataOnly) {
 +								$docHeaderFooter = $docSheet->getHeaderFooter();
 +
 +								if (isset($xmlSheet->headerFooter["differentOddEven"]) &&
 +									self::boolean((string)$xmlSheet->headerFooter["differentOddEven"])) {
 +									$docHeaderFooter->setDifferentOddEven(TRUE);
 +								} else {
 +									$docHeaderFooter->setDifferentOddEven(FALSE);
 +								}
 +								if (isset($xmlSheet->headerFooter["differentFirst"]) &&
 +									self::boolean((string)$xmlSheet->headerFooter["differentFirst"])) {
 +									$docHeaderFooter->setDifferentFirst(TRUE);
 +								} else {
 +									$docHeaderFooter->setDifferentFirst(FALSE);
 +								}
 +								if (isset($xmlSheet->headerFooter["scaleWithDoc"]) &&
 +									!self::boolean((string)$xmlSheet->headerFooter["scaleWithDoc"])) {
 +									$docHeaderFooter->setScaleWithDocument(FALSE);
 +								} else {
 +									$docHeaderFooter->setScaleWithDocument(TRUE);
 +								}
 +								if (isset($xmlSheet->headerFooter["alignWithMargins"]) &&
 +									!self::boolean((string)$xmlSheet->headerFooter["alignWithMargins"])) {
 +									$docHeaderFooter->setAlignWithMargins(FALSE);
 +								} else {
 +									$docHeaderFooter->setAlignWithMargins(TRUE);
 +								}
 +
 +								$docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader);
 +								$docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter);
 +								$docHeaderFooter->setEvenHeader((string) $xmlSheet->headerFooter->evenHeader);
 +								$docHeaderFooter->setEvenFooter((string) $xmlSheet->headerFooter->evenFooter);
 +								$docHeaderFooter->setFirstHeader((string) $xmlSheet->headerFooter->firstHeader);
 +								$docHeaderFooter->setFirstFooter((string) $xmlSheet->headerFooter->firstFooter);
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->rowBreaks && $xmlSheet->rowBreaks->brk && !$this->_readDataOnly) {
 +								foreach ($xmlSheet->rowBreaks->brk as $brk) {
 +									if ($brk["man"]) {
 +										$docSheet->setBreak("A$brk[id]", PHPExcel_Worksheet::BREAK_ROW);
 +									}
 +								}
 +							}
 +							if ($xmlSheet && $xmlSheet->colBreaks && $xmlSheet->colBreaks->brk && !$this->_readDataOnly) {
 +								foreach ($xmlSheet->colBreaks->brk as $brk) {
 +									if ($brk["man"]) {
 +										$docSheet->setBreak(PHPExcel_Cell::stringFromColumnIndex((string) $brk["id"]) . "1", PHPExcel_Worksheet::BREAK_COLUMN);
 +									}
 +								}
 +							}
 +
 +							if ($xmlSheet && $xmlSheet->dataValidations && !$this->_readDataOnly) {
 +								foreach ($xmlSheet->dataValidations->dataValidation as $dataValidation) {
 +								    // Uppercase coordinate
 +							    	$range = strtoupper($dataValidation["sqref"]);
 +									$rangeSet = explode(' ',$range);
 +									foreach($rangeSet as $range) {
 +										$stRange = $docSheet->shrinkRangeToFit($range);
 +
 +										// Extract all cell references in $range
 +										$aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($stRange);
 +										foreach ($aReferences as $reference) {
 +											// Create validation
 +											$docValidation = $docSheet->getCell($reference)->getDataValidation();
 +											$docValidation->setType((string) $dataValidation["type"]);
 +											$docValidation->setErrorStyle((string) $dataValidation["errorStyle"]);
 +											$docValidation->setOperator((string) $dataValidation["operator"]);
 +											$docValidation->setAllowBlank($dataValidation["allowBlank"] != 0);
 +											$docValidation->setShowDropDown($dataValidation["showDropDown"] == 0);
 +											$docValidation->setShowInputMessage($dataValidation["showInputMessage"] != 0);
 +											$docValidation->setShowErrorMessage($dataValidation["showErrorMessage"] != 0);
 +											$docValidation->setErrorTitle((string) $dataValidation["errorTitle"]);
 +											$docValidation->setError((string) $dataValidation["error"]);
 +											$docValidation->setPromptTitle((string) $dataValidation["promptTitle"]);
 +											$docValidation->setPrompt((string) $dataValidation["prompt"]);
 +											$docValidation->setFormula1((string) $dataValidation->formula1);
 +											$docValidation->setFormula2((string) $dataValidation->formula2);
 +										}
 +									}
 +								}
 +							}
 +
 +							// Add hyperlinks
 +							$hyperlinks = array();
 +							if (!$this->_readDataOnly) {
 +								// Locate hyperlink relations
 +								if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) {
++									libxml_disable_entity_loader(true);
 +									$relsWorksheet = simplexml_load_string($this->_getFromZipArchive($zip,  dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels") ); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +									foreach ($relsWorksheet->Relationship as $ele) {
 +										if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink") {
 +											$hyperlinks[(string)$ele["Id"]] = (string)$ele["Target"];
 +										}
 +									}
 +								}
 +
 +								// Loop through hyperlinks
 +								if ($xmlSheet && $xmlSheet->hyperlinks) {
 +									foreach ($xmlSheet->hyperlinks->hyperlink as $hyperlink) {
 +										// Link url
 +										$linkRel = $hyperlink->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships');
 +
 +										foreach (PHPExcel_Cell::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) {
 +											$cell = $docSheet->getCell( $cellReference );
 +											if (isset($linkRel['id'])) {
 +												$hyperlinkUrl = $hyperlinks[ (string)$linkRel['id'] ];
 +												if (isset($hyperlink['location'])) {
 +													$hyperlinkUrl .= '#' . (string) $hyperlink['location'];
 +												}
 +												$cell->getHyperlink()->setUrl($hyperlinkUrl);
 +											} elseif (isset($hyperlink['location'])) {
 +												$cell->getHyperlink()->setUrl( 'sheet://' . (string)$hyperlink['location'] );
 +											}
 +
 +											// Tooltip
 +											if (isset($hyperlink['tooltip'])) {
 +												$cell->getHyperlink()->setTooltip( (string)$hyperlink['tooltip'] );
 +											}
 +										}
 +									}
 +								}
 +							}
 +
 +							// Add comments
 +							$comments = array();
 +							$vmlComments = array();
 +							if (!$this->_readDataOnly) {
 +								// Locate comment relations
 +								if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) {
++									libxml_disable_entity_loader(true);									
 +									$relsWorksheet = simplexml_load_string($this->_getFromZipArchive($zip,  dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels") ); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +									foreach ($relsWorksheet->Relationship as $ele) {
 +									    if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") {
 +											$comments[(string)$ele["Id"]] = (string)$ele["Target"];
 +										}
 +									    if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing") {
 +											$vmlComments[(string)$ele["Id"]] = (string)$ele["Target"];
 +										}
 +									}
 +								}
 +
 +								// Loop through comments
 +								foreach ($comments as $relName => $relPath) {
 +									// Load comments file
 +									$relPath = PHPExcel_Shared_File::realpath(dirname("$dir/$fileWorksheet") . "/" . $relPath);
 +									$commentsFile = simplexml_load_string($this->_getFromZipArchive($zip, $relPath) );
 +
 +									// Utility variables
 +									$authors = array();
 +
 +									// Loop through authors
 +									foreach ($commentsFile->authors->author as $author) {
 +										$authors[] = (string)$author;
 +									}
 +
 +									// Loop through contents
 +									foreach ($commentsFile->commentList->comment as $comment) {
 +										$docSheet->getComment( (string)$comment['ref'] )->setAuthor( $authors[(string)$comment['authorId']] );
 +										$docSheet->getComment( (string)$comment['ref'] )->setText( $this->_parseRichText($comment->text) );
 +									}
 +								}
 +
 +								// Loop through VML comments
 +							    foreach ($vmlComments as $relName => $relPath) {
 +									// Load VML comments file
 +									$relPath = PHPExcel_Shared_File::realpath(dirname("$dir/$fileWorksheet") . "/" . $relPath);
 +									$vmlCommentsFile = simplexml_load_string( $this->_getFromZipArchive($zip, $relPath) );
 +									$vmlCommentsFile->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml');
 +
 +									$shapes = $vmlCommentsFile->xpath('//v:shape');
 +									foreach ($shapes as $shape) {
 +										$shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml');
 +
 +										if (isset($shape['style'])) {
 +	    									$style        = (string)$shape['style'];
 +	    									$fillColor    = strtoupper( substr( (string)$shape['fillcolor'], 1 ) );
 +	    									$column       = null;
 +	    									$row          = null;
 +
 +	    									$clientData   = $shape->xpath('.//x:ClientData');
 +	    									if (is_array($clientData) && !empty($clientData)) {
 +	        									$clientData   = $clientData[0];
 +
 +	        									if ( isset($clientData['ObjectType']) && (string)$clientData['ObjectType'] == 'Note' ) {
 +	        									    $temp = $clientData->xpath('.//x:Row');
 +	        									    if (is_array($temp)) $row = $temp[0];
 +
 +	        									    $temp = $clientData->xpath('.//x:Column');
 +	        									    if (is_array($temp)) $column = $temp[0];
 +	        									}
 +	    									}
 +
 +	    									if (($column !== NULL) && ($row !== NULL)) {
 +	    									    // Set comment properties
 +	    									    $comment = $docSheet->getCommentByColumnAndRow((string) $column, $row + 1);
 +	    									    $comment->getFillColor()->setRGB( $fillColor );
 +
 +	    									    // Parse style
 +	    									    $styleArray = explode(';', str_replace(' ', '', $style));
 +	    									    foreach ($styleArray as $stylePair) {
 +	    									        $stylePair = explode(':', $stylePair);
 +
 +	    									        if ($stylePair[0] == 'margin-left')     $comment->setMarginLeft($stylePair[1]);
 +	    									        if ($stylePair[0] == 'margin-top')      $comment->setMarginTop($stylePair[1]);
 +	    									        if ($stylePair[0] == 'width')           $comment->setWidth($stylePair[1]);
 +	    									        if ($stylePair[0] == 'height')          $comment->setHeight($stylePair[1]);
 +	    									        if ($stylePair[0] == 'visibility')      $comment->setVisible( $stylePair[1] == 'visible' );
 +
 +	    									    }
 +	    									}
 +										}
 +									}
 +								}
 +
 +								// Header/footer images
 +								if ($xmlSheet && $xmlSheet->legacyDrawingHF && !$this->_readDataOnly) {
 +									if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) {
 +										$relsWorksheet = simplexml_load_string($this->_getFromZipArchive($zip,  dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels") ); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +										$vmlRelationship = '';
 +
 +										foreach ($relsWorksheet->Relationship as $ele) {
 +											if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing") {
 +												$vmlRelationship = self::dir_add("$dir/$fileWorksheet", $ele["Target"]);
 +											}
 +										}
 +
 +										if ($vmlRelationship != '') {
 +											// Fetch linked images
 +											$relsVML = simplexml_load_string($this->_getFromZipArchive($zip,  dirname($vmlRelationship) . '/_rels/' . basename($vmlRelationship) . '.rels' )); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +											$drawings = array();
 +											foreach ($relsVML->Relationship as $ele) {
 +												if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") {
 +													$drawings[(string) $ele["Id"]] = self::dir_add($vmlRelationship, $ele["Target"]);
 +												}
 +											}
 +
 +											// Fetch VML document
 +											$vmlDrawing = simplexml_load_string($this->_getFromZipArchive($zip, $vmlRelationship));
 +											$vmlDrawing->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml');
 +
 +											$hfImages = array();
 +
 +											$shapes = $vmlDrawing->xpath('//v:shape');
 +											foreach ($shapes as $shape) {
 +												$shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml');
 +												$imageData = $shape->xpath('//v:imagedata');
 +												$imageData = $imageData[0];
 +
 +												$imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office');
 +												$style = self::toCSSArray( (string)$shape['style'] );
 +
 +												$hfImages[ (string)$shape['id'] ] = new PHPExcel_Worksheet_HeaderFooterDrawing();
 +												if (isset($imageData['title'])) {
 +													$hfImages[ (string)$shape['id'] ]->setName( (string)$imageData['title'] );
 +												}
 +
 +												$hfImages[ (string)$shape['id'] ]->setPath("zip://".PHPExcel_Shared_File::realpath($pFilename)."#" . $drawings[(string)$imageData['relid']], false);
 +												$hfImages[ (string)$shape['id'] ]->setResizeProportional(false);
 +												$hfImages[ (string)$shape['id'] ]->setWidth($style['width']);
 +												$hfImages[ (string)$shape['id'] ]->setHeight($style['height']);
 +												$hfImages[ (string)$shape['id'] ]->setOffsetX($style['margin-left']);
 +												$hfImages[ (string)$shape['id'] ]->setOffsetY($style['margin-top']);
 +												$hfImages[ (string)$shape['id'] ]->setResizeProportional(true);
 +											}
 +
 +											$docSheet->getHeaderFooter()->setImages($hfImages);
 +										}
 +									}
 +								}
 +
 +							}
 +
 +// TODO: Autoshapes from twoCellAnchors!
 +							if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) {
 +								$relsWorksheet = simplexml_load_string($this->_getFromZipArchive($zip,  dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels") ); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +								$drawings = array();
 +								foreach ($relsWorksheet->Relationship as $ele) {
 +									if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing") {
 +										$drawings[(string) $ele["Id"]] = self::dir_add("$dir/$fileWorksheet", $ele["Target"]);
 +									}
 +								}
 +								if ($xmlSheet->drawing && !$this->_readDataOnly) {
 +									foreach ($xmlSheet->drawing as $drawing) {
 +										$fileDrawing = $drawings[(string) self::array_item($drawing->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "id")];
 +										$relsDrawing = simplexml_load_string($this->_getFromZipArchive($zip,  dirname($fileDrawing) . "/_rels/" . basename($fileDrawing) . ".rels") ); //~ http://schemas.openxmlformats.org/package/2006/relationships");
 +										$images = array();
 +
 +										if ($relsDrawing && $relsDrawing->Relationship) {
 +											foreach ($relsDrawing->Relationship as $ele) {
 +												if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") {
 +													$images[(string) $ele["Id"]] = self::dir_add($fileDrawing, $ele["Target"]);
 +												} elseif ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart") {
 +													if ($this->_includeCharts) {
 +														$charts[self::dir_add($fileDrawing, $ele["Target"])] = array('id'		=> (string) $ele["Id"],
 +																													 'sheet'	=> $docSheet->getTitle()
 +																													);
 +													}
 +												}
 +											}
 +										}
 +										$xmlDrawing = simplexml_load_string($this->_getFromZipArchive($zip, $fileDrawing))->children("http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing");
 +
 +										if ($xmlDrawing->oneCellAnchor) {
 +											foreach ($xmlDrawing->oneCellAnchor as $oneCellAnchor) {
 +												if ($oneCellAnchor->pic->blipFill) {
 +													$blip = $oneCellAnchor->pic->blipFill->children("http://schemas.openxmlformats.org/drawingml/2006/main")->blip;
 +													$xfrm = $oneCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->xfrm;
 +													$outerShdw = $oneCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->effectLst->outerShdw;
 +													$objDrawing = new PHPExcel_Worksheet_Drawing;
 +													$objDrawing->setName((string) self::array_item($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name"));
 +													$objDrawing->setDescription((string) self::array_item($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr"));
 +													$objDrawing->setPath("zip://".PHPExcel_Shared_File::realpath($pFilename)."#" . $images[(string) self::array_item($blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "embed")], false);
 +													$objDrawing->setCoordinates(PHPExcel_Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col) . ($oneCellAnchor->from->row + 1));
 +													$objDrawing->setOffsetX(PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->colOff));
 +													$objDrawing->setOffsetY(PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->rowOff));
 +													$objDrawing->setResizeProportional(false);
 +													$objDrawing->setWidth(PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($oneCellAnchor->ext->attributes(), "cx")));
 +													$objDrawing->setHeight(PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($oneCellAnchor->ext->attributes(), "cy")));
 +													if ($xfrm) {
 +														$objDrawing->setRotation(PHPExcel_Shared_Drawing::angleToDegrees(self::array_item($xfrm->attributes(), "rot")));
 +													}
 +													if ($outerShdw) {
 +														$shadow = $objDrawing->getShadow();
 +														$shadow->setVisible(true);
 +														$shadow->setBlurRadius(PHPExcel_Shared_Drawing::EMUTopixels(self::array_item($outerShdw->attributes(), "blurRad")));
 +														$shadow->setDistance(PHPExcel_Shared_Drawing::EMUTopixels(self::array_item($outerShdw->attributes(), "dist")));
 +														$shadow->setDirection(PHPExcel_Shared_Drawing::angleToDegrees(self::array_item($outerShdw->attributes(), "dir")));
 +														$shadow->setAlignment((string) self::array_item($outerShdw->attributes(), "algn"));
 +														$shadow->getColor()->setRGB(self::array_item($outerShdw->srgbClr->attributes(), "val"));
 +														$shadow->setAlpha(self::array_item($outerShdw->srgbClr->alpha->attributes(), "val") / 1000);
 +													}
 +													$objDrawing->setWorksheet($docSheet);
 +												} else {
 +													//	? Can charts be positioned with a oneCellAnchor ?
 +													$coordinates	= PHPExcel_Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col) . ($oneCellAnchor->from->row + 1);
 +													$offsetX		= PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->colOff);
 +													$offsetY		= PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->rowOff);
 +													$width			= PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($oneCellAnchor->ext->attributes(), "cx"));
 +													$height			= PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($oneCellAnchor->ext->attributes(), "cy"));
 +												}
 +											}
 +										}
 +										if ($xmlDrawing->twoCellAnchor) {
 +											foreach ($xmlDrawing->twoCellAnchor as $twoCellAnchor) {
 +												if ($twoCellAnchor->pic->blipFill) {
 +													$blip = $twoCellAnchor->pic->blipFill->children("http://schemas.openxmlformats.org/drawingml/2006/main")->blip;
 +													$xfrm = $twoCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->xfrm;
 +													$outerShdw = $twoCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->effectLst->outerShdw;
 +													$objDrawing = new PHPExcel_Worksheet_Drawing;
 +													$objDrawing->setName((string) self::array_item($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name"));
 +													$objDrawing->setDescription((string) self::array_item($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr"));
 +													$objDrawing->setPath("zip://".PHPExcel_Shared_File::realpath($pFilename)."#" . $images[(string) self::array_item($blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "embed")], false);
 +													$objDrawing->setCoordinates(PHPExcel_Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1));
 +													$objDrawing->setOffsetX(PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->colOff));
 +													$objDrawing->setOffsetY(PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->rowOff));
 +													$objDrawing->setResizeProportional(false);
 +
 +													$objDrawing->setWidth(PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($xfrm->ext->attributes(), "cx")));
 +													$objDrawing->setHeight(PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($xfrm->ext->attributes(), "cy")));
 +
 +													if ($xfrm) {
 +														$objDrawing->setRotation(PHPExcel_Shared_Drawing::angleToDegrees(self::array_item($xfrm->attributes(), "rot")));
 +													}
 +													if ($outerShdw) {
 +														$shadow = $objDrawing->getShadow();
 +														$shadow->setVisible(true);
 +														$shadow->setBlurRadius(PHPExcel_Shared_Drawing::EMUTopixels(self::array_item($outerShdw->attributes(), "blurRad")));
 +														$shadow->setDistance(PHPExcel_Shared_Drawing::EMUTopixels(self::array_item($outerShdw->attributes(), "dist")));
 +														$shadow->setDirection(PHPExcel_Shared_Drawing::angleToDegrees(self::array_item($outerShdw->attributes(), "dir")));
 +														$shadow->setAlignment((string) self::array_item($outerShdw->attributes(), "algn"));
 +														$shadow->getColor()->setRGB(self::array_item($outerShdw->srgbClr->attributes(), "val"));
 +														$shadow->setAlpha(self::array_item($outerShdw->srgbClr->alpha->attributes(), "val") / 1000);
 +													}
 +													$objDrawing->setWorksheet($docSheet);
 +												} elseif(($this->_includeCharts) && ($twoCellAnchor->graphicFrame)) {
 +													$fromCoordinate	= PHPExcel_Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1);
 +													$fromOffsetX	= PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->colOff);
 +													$fromOffsetY	= PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->rowOff);
 +													$toCoordinate	= PHPExcel_Cell::stringFromColumnIndex((string) $twoCellAnchor->to->col) . ($twoCellAnchor->to->row + 1);
 +													$toOffsetX		= PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->to->colOff);
 +													$toOffsetY		= PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->to->rowOff);
 +													$graphic		= $twoCellAnchor->graphicFrame->children("http://schemas.openxmlformats.org/drawingml/2006/main")->graphic;
 +													$chartRef		= $graphic->graphicData->children("http://schemas.openxmlformats.org/drawingml/2006/chart")->chart;
 +													$thisChart		= (string) $chartRef->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships");
 +
 +													$chartDetails[$docSheet->getTitle().'!'.$thisChart] =
 +															array(	'fromCoordinate'	=> $fromCoordinate,
 +																	'fromOffsetX'		=> $fromOffsetX,
 +																	'fromOffsetY'		=> $fromOffsetY,
 +																	'toCoordinate'		=> $toCoordinate,
 +																	'toOffsetX'			=> $toOffsetX,
 +																	'toOffsetY'			=> $toOffsetY,
 +																	'worksheetTitle'	=> $docSheet->getTitle()
 +																 );
 +												}
 +											}
 +										}
 +
 +									}
 +								}
 +							}
 +
 +							// Loop through definedNames
 +							if ($xmlWorkbook->definedNames) {
 +								foreach ($xmlWorkbook->definedNames->definedName as $definedName) {
 +									// Extract range
 +									$extractedRange = (string)$definedName;
 +									$extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
 +									if (($spos = strpos($extractedRange,'!')) !== false) {
 +										$extractedRange = substr($extractedRange,0,$spos).str_replace('$', '', substr($extractedRange,$spos));
 +									} else {
 +										$extractedRange = str_replace('$', '', $extractedRange);
 +									}
 +
 +									// Valid range?
 +									if (stripos((string)$definedName, '#REF!') !== FALSE || $extractedRange == '') {
 +										continue;
 +									}
 +
 +									// Some definedNames are only applicable if we are on the same sheet...
 +									if ((string)$definedName['localSheetId'] != '' && (string)$definedName['localSheetId'] == $sheetId) {
 +										// Switch on type
 +										switch ((string)$definedName['name']) {
 +
 +											case '_xlnm._FilterDatabase':
 +												if ((string)$definedName['hidden'] !== '1') {
 +													$docSheet->getAutoFilter()->setRange($extractedRange);
 +												}
 +												break;
 +
 +											case '_xlnm.Print_Titles':
 +												// Split $extractedRange
 +												$extractedRange = explode(',', $extractedRange);
 +
 +												// Set print titles
 +												foreach ($extractedRange as $range) {
 +													$matches = array();
 +													$range = str_replace('$', '', $range);
 +
 +													// check for repeating columns, e g. 'A:A' or 'A:D'
 +													if (preg_match('/!?([A-Z]+)\:([A-Z]+)$/', $range, $matches)) {
 +														$docSheet->getPageSetup()->setColumnsToRepeatAtLeft(array($matches[1], $matches[2]));
 +													}
 +													// check for repeating rows, e.g. '1:1' or '1:5'
 +													elseif (preg_match('/!?(\d+)\:(\d+)$/', $range, $matches)) {
 +														$docSheet->getPageSetup()->setRowsToRepeatAtTop(array($matches[1], $matches[2]));
 +													}
 +												}
 +												break;
 +
 +											case '_xlnm.Print_Area':
 +												$rangeSets = explode(',', $extractedRange);		// FIXME: what if sheetname contains comma?
 +												$newRangeSets = array();
 +												foreach($rangeSets as $rangeSet) {
 +													$range = explode('!', $rangeSet);	// FIXME: what if sheetname contains exclamation mark?
 +													$rangeSet = isset($range[1]) ? $range[1] : $range[0];
 +													if (strpos($rangeSet, ':') === FALSE) {
 +														$rangeSet = $rangeSet . ':' . $rangeSet;
 +													}
 +													$newRangeSets[] = str_replace('$', '', $rangeSet);
 +												}
 +												$docSheet->getPageSetup()->setPrintArea(implode(',',$newRangeSets));
 +												break;
 +
 +											default:
 +												break;
 +										}
 +									}
 +								}
 +							}
 +
 +							// Next sheet id
 +							++$sheetId;
 +						}
 +
 +						// Loop through definedNames
 +						if ($xmlWorkbook->definedNames) {
 +							foreach ($xmlWorkbook->definedNames->definedName as $definedName) {
 +								// Extract range
 +								$extractedRange = (string)$definedName;
 +								$extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
 +								if (($spos = strpos($extractedRange,'!')) !== false) {
 +									$extractedRange = substr($extractedRange,0,$spos).str_replace('$', '', substr($extractedRange,$spos));
 +								} else {
 +									$extractedRange = str_replace('$', '', $extractedRange);
 +								}
 +
 +								// Valid range?
 +								if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') {
 +									continue;
 +								}
 +
 +								// Some definedNames are only applicable if we are on the same sheet...
 +								if ((string)$definedName['localSheetId'] != '') {
 +									// Local defined name
 +									// Switch on type
 +									switch ((string)$definedName['name']) {
 +
 +										case '_xlnm._FilterDatabase':
 +										case '_xlnm.Print_Titles':
 +										case '_xlnm.Print_Area':
 +											break;
 +
 +										default:
 +											if ($mapSheetId[(integer) $definedName['localSheetId']] !== null) {
 +												$range = explode('!', (string)$definedName);
 +												if (count($range) == 2) {
 +													$range[0] = str_replace("''", "'", $range[0]);
 +													$range[0] = str_replace("'", "", $range[0]);
 +													if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) {
 +														$extractedRange = str_replace('$', '', $range[1]);
 +														$scope = $docSheet->getParent()->getSheet($mapSheetId[(integer) $definedName['localSheetId']]);
 +														$excel->addNamedRange( new PHPExcel_NamedRange((string)$definedName['name'], $worksheet, $extractedRange, true, $scope) );
 +													}
 +												}
 +											}
 +											break;
 +									}
 +								} else if (!isset($definedName['localSheetId'])) {
 +									// "Global" definedNames
 +									$locatedSheet = null;
 +									$extractedSheetName = '';
 +									if (strpos( (string)$definedName, '!' ) !== false) {
 +										// Extract sheet name
 +										$extractedSheetName = PHPExcel_Worksheet::extractSheetTitle( (string)$definedName, true );
 +										$extractedSheetName = $extractedSheetName[0];
 +
 +										// Locate sheet
 +										$locatedSheet = $excel->getSheetByName($extractedSheetName);
 +
 +										// Modify range
 +										$range = explode('!', $extractedRange);
 +										$extractedRange = isset($range[1]) ? $range[1] : $range[0];
 +									}
 +
 +									if ($locatedSheet !== NULL) {
 +										$excel->addNamedRange( new PHPExcel_NamedRange((string)$definedName['name'], $locatedSheet, $extractedRange, false) );
 +									}
 +								}
 +							}
 +						}
 +					}
 +
 +					if ((!$this->_readDataOnly) || (!empty($this->_loadSheetsOnly))) {
 +						// active sheet index
 +						$activeTab = intval($xmlWorkbook->bookViews->workbookView["activeTab"]); // refers to old sheet index
 +
 +						// keep active sheet index if sheet is still loaded, else first sheet is set as the active
 +						if (isset($mapSheetId[$activeTab]) && $mapSheetId[$activeTab] !== null) {
 +							$excel->setActiveSheetIndex($mapSheetId[$activeTab]);
 +						} else {
 +							if ($excel->getSheetCount() == 0) {
 +								$excel->createSheet();
 +							}
 +							$excel->setActiveSheetIndex(0);
 +						}
 +					}
 +				break;
 +			}
 +
 +		}
 +
 +
 +		if (!$this->_readDataOnly) {
 +			$contentTypes = simplexml_load_string($this->_getFromZipArchive($zip, "[Content_Types].xml"));
 +			foreach ($contentTypes->Override as $contentType) {
 +				switch ($contentType["ContentType"]) {
 +					case "application/vnd.openxmlformats-officedocument.drawingml.chart+xml":
 +						if ($this->_includeCharts) {
 +							$chartEntryRef = ltrim($contentType['PartName'],'/');
 +							$chartElements = simplexml_load_string($this->_getFromZipArchive($zip, $chartEntryRef));
 +							$objChart = PHPExcel_Reader_Excel2007_Chart::readChart($chartElements,basename($chartEntryRef,'.xml'));
 +
 +//							echo 'Chart ',$chartEntryRef,'<br />';
 +//							var_dump($charts[$chartEntryRef]);
 +//
 +							if (isset($charts[$chartEntryRef])) {
 +								$chartPositionRef = $charts[$chartEntryRef]['sheet'].'!'.$charts[$chartEntryRef]['id'];
 +//								echo 'Position Ref ',$chartPositionRef,'<br />';
 +								if (isset($chartDetails[$chartPositionRef])) {
 +//									var_dump($chartDetails[$chartPositionRef]);
 +
 +									$excel->getSheetByName($charts[$chartEntryRef]['sheet'])->addChart($objChart);
 +									$objChart->setWorksheet($excel->getSheetByName($charts[$chartEntryRef]['sheet']));
 +									$objChart->setTopLeftPosition( $chartDetails[$chartPositionRef]['fromCoordinate'],
 +																   $chartDetails[$chartPositionRef]['fromOffsetX'],
 +																   $chartDetails[$chartPositionRef]['fromOffsetY']
 +																 );
 +									$objChart->setBottomRightPosition( $chartDetails[$chartPositionRef]['toCoordinate'],
 +																	   $chartDetails[$chartPositionRef]['toOffsetX'],
 +																	   $chartDetails[$chartPositionRef]['toOffsetY']
 +																	 );
 +								}
 +							}
 +						}
 +				}
 +			}
 +		}
 +
 +		$zip->close();
 +
 +		return $excel;
 +	}
 +
 +
 +	private static function _readColor($color, $background=FALSE) {
 +		if (isset($color["rgb"])) {
 +			return (string)$color["rgb"];
 +		} else if (isset($color["indexed"])) {
 +			return PHPExcel_Style_Color::indexedColor($color["indexed"]-7,$background)->getARGB();
 +		} else if (isset($color["theme"])) {
 +			if (self::$_theme !== NULL) {
 +				$returnColour = self::$_theme->getColourByIndex((int)$color["theme"]);
 +				if (isset($color["tint"])) {
 +					$tintAdjust = (float) $color["tint"];
 +					$returnColour = PHPExcel_Style_Color::changeBrightness($returnColour, $tintAdjust);
 +				}
 +				return 'FF'.$returnColour;
 +			}
 +		}
 +
 +		if ($background) {
 +			return 'FFFFFFFF';
 +		}
 +		return 'FF000000';
 +	}
 +
 +
 +	private static function _readStyle($docStyle, $style) {
 +		// format code
 +//		if (isset($style->numFmt)) {
 +//			if (isset($style->numFmt['formatCode'])) {
 +//				$docStyle->getNumberFormat()->setFormatCode((string) $style->numFmt['formatCode']);
 +//			} else {
 +				$docStyle->getNumberFormat()->setFormatCode($style->numFmt);
 +//			}
 +//		}
 +
 +		// font
 +		if (isset($style->font)) {
 +			$docStyle->getFont()->setName((string) $style->font->name["val"]);
 +			$docStyle->getFont()->setSize((string) $style->font->sz["val"]);
 +			if (isset($style->font->b)) {
 +				$docStyle->getFont()->setBold(!isset($style->font->b["val"]) || self::boolean((string) $style->font->b["val"]));
 +			}
 +			if (isset($style->font->i)) {
 +				$docStyle->getFont()->setItalic(!isset($style->font->i["val"]) || self::boolean((string) $style->font->i["val"]));
 +			}
 +			if (isset($style->font->strike)) {
 +				$docStyle->getFont()->setStrikethrough(!isset($style->font->strike["val"]) || self::boolean((string) $style->font->strike["val"]));
 +			}
 +			$docStyle->getFont()->getColor()->setARGB(self::_readColor($style->font->color));
 +
 +			if (isset($style->font->u) && !isset($style->font->u["val"])) {
 +				$docStyle->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
 +			} else if (isset($style->font->u) && isset($style->font->u["val"])) {
 +				$docStyle->getFont()->setUnderline((string)$style->font->u["val"]);
 +			}
 +
 +			if (isset($style->font->vertAlign) && isset($style->font->vertAlign["val"])) {
 +				$vertAlign = strtolower((string)$style->font->vertAlign["val"]);
 +				if ($vertAlign == 'superscript') {
 +					$docStyle->getFont()->setSuperScript(true);
 +				}
 +				if ($vertAlign == 'subscript') {
 +					$docStyle->getFont()->setSubScript(true);
 +				}
 +			}
 +		}
 +
 +		// fill
 +		if (isset($style->fill)) {
 +			if ($style->fill->gradientFill) {
 +				$gradientFill = $style->fill->gradientFill[0];
 +				if(!empty($gradientFill["type"])) {
 +					$docStyle->getFill()->setFillType((string) $gradientFill["type"]);
 +				}
 +				$docStyle->getFill()->setRotation(floatval($gradientFill["degree"]));
 +				$gradientFill->registerXPathNamespace("sml", "http://schemas.openxmlformats.org/spreadsheetml/2006/main");
 +				$docStyle->getFill()->getStartColor()->setARGB(self::_readColor( self::array_item($gradientFill->xpath("sml:stop[@position=0]"))->color) );
 +				$docStyle->getFill()->getEndColor()->setARGB(self::_readColor( self::array_item($gradientFill->xpath("sml:stop[@position=1]"))->color) );
 +			} elseif ($style->fill->patternFill) {
 +				$patternType = (string)$style->fill->patternFill["patternType"] != '' ? (string)$style->fill->patternFill["patternType"] : 'solid';
 +				$docStyle->getFill()->setFillType($patternType);
 +				if ($style->fill->patternFill->fgColor) {
 +					$docStyle->getFill()->getStartColor()->setARGB(self::_readColor($style->fill->patternFill->fgColor,true));
 +				} else {
 +					$docStyle->getFill()->getStartColor()->setARGB('FF000000');
 +				}
 +				if ($style->fill->patternFill->bgColor) {
 +					$docStyle->getFill()->getEndColor()->setARGB(self::_readColor($style->fill->patternFill->bgColor,true));
 +				}
 +			}
 +		}
 +
 +		// border
 +		if (isset($style->border)) {
 +			$diagonalUp = self::boolean((string) $style->border["diagonalUp"]);
 +			$diagonalDown = self::boolean((string) $style->border["diagonalDown"]);
 +			if (!$diagonalUp && !$diagonalDown) {
 +				$docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_NONE);
 +			} elseif ($diagonalUp && !$diagonalDown) {
 +				$docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_UP);
 +			} elseif (!$diagonalUp && $diagonalDown) {
 +				$docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_DOWN);
 +			} else {
 +				$docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_BOTH);
 +			}
 +			self::_readBorder($docStyle->getBorders()->getLeft(), $style->border->left);
 +			self::_readBorder($docStyle->getBorders()->getRight(), $style->border->right);
 +			self::_readBorder($docStyle->getBorders()->getTop(), $style->border->top);
 +			self::_readBorder($docStyle->getBorders()->getBottom(), $style->border->bottom);
 +			self::_readBorder($docStyle->getBorders()->getDiagonal(), $style->border->diagonal);
 +		}
 +
 +		// alignment
 +		if (isset($style->alignment)) {
 +			$docStyle->getAlignment()->setHorizontal((string) $style->alignment["horizontal"]);
 +			$docStyle->getAlignment()->setVertical((string) $style->alignment["vertical"]);
 +
 +			$textRotation = 0;
 +			if ((int)$style->alignment["textRotation"] <= 90) {
 +				$textRotation = (int)$style->alignment["textRotation"];
 +			} else if ((int)$style->alignment["textRotation"] > 90) {
 +				$textRotation = 90 - (int)$style->alignment["textRotation"];
 +			}
 +
 +			$docStyle->getAlignment()->setTextRotation(intval($textRotation));
 +			$docStyle->getAlignment()->setWrapText(self::boolean((string) $style->alignment["wrapText"]));
 +			$docStyle->getAlignment()->setShrinkToFit(self::boolean((string) $style->alignment["shrinkToFit"]));
 +			$docStyle->getAlignment()->setIndent( intval((string)$style->alignment["indent"]) > 0 ? intval((string)$style->alignment["indent"]) : 0 );
 +		}
 +
 +		// protection
 +		if (isset($style->protection)) {
 +			if (isset($style->protection['locked'])) {
 +				if (self::boolean((string) $style->protection['locked'])) {
 +					$docStyle->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_PROTECTED);
 +				} else {
 +					$docStyle->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED);
 +				}
 +			}
 +
 +			if (isset($style->protection['hidden'])) {
 +				if (self::boolean((string) $style->protection['hidden'])) {
 +					$docStyle->getProtection()->setHidden(PHPExcel_Style_Protection::PROTECTION_PROTECTED);
 +				} else {
 +					$docStyle->getProtection()->setHidden(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED);
 +				}
 +			}
 +		}
 +	}
 +
 +
 +	private static function _readBorder($docBorder, $eleBorder) {
 +		if (isset($eleBorder["style"])) {
 +			$docBorder->setBorderStyle((string) $eleBorder["style"]);
 +		}
 +		if (isset($eleBorder->color)) {
 +			$docBorder->getColor()->setARGB(self::_readColor($eleBorder->color));
 +		}
 +	}
 +
 +
 +	private function _parseRichText($is = null) {
 +		$value = new PHPExcel_RichText();
 +
 +		if (isset($is->t)) {
 +			$value->createText( PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $is->t ) );
 +		} else {
 +			foreach ($is->r as $run) {
 +				if (!isset($run->rPr)) {
 +					$objText = $value->createText( PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $run->t ) );
 +
 +				} else {
 +					$objText = $value->createTextRun( PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $run->t ) );
 +
 +					if (isset($run->rPr->rFont["val"])) {
 +						$objText->getFont()->setName((string) $run->rPr->rFont["val"]);
 +					}
 +
 +					if (isset($run->rPr->sz["val"])) {
 +						$objText->getFont()->setSize((string) $run->rPr->sz["val"]);
 +					}
 +
 +					if (isset($run->rPr->color)) {
 +						$objText->getFont()->setColor( new PHPExcel_Style_Color( self::_readColor($run->rPr->color) ) );
 +					}
 +
 +					if ((isset($run->rPr->b["val"]) && self::boolean((string) $run->rPr->b["val"])) ||
 +						(isset($run->rPr->b) && !isset($run->rPr->b["val"]))) {
 +						$objText->getFont()->setBold(TRUE);
 +					}
 +
 +					if ((isset($run->rPr->i["val"]) && self::boolean((string) $run->rPr->i["val"])) ||
 +						(isset($run->rPr->i) && !isset($run->rPr->i["val"]))) {
 +						$objText->getFont()->setItalic(TRUE);
 +					}
 +
 +					if (isset($run->rPr->vertAlign) && isset($run->rPr->vertAlign["val"])) {
 +						$vertAlign = strtolower((string)$run->rPr->vertAlign["val"]);
 +						if ($vertAlign == 'superscript') {
 +							$objText->getFont()->setSuperScript(TRUE);
 +						}
 +						if ($vertAlign == 'subscript') {
 +							$objText->getFont()->setSubScript(TRUE);
 +						}
 +					}
 +
 +					if (isset($run->rPr->u) && !isset($run->rPr->u["val"])) {
 +						$objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
 +					} else if (isset($run->rPr->u) && isset($run->rPr->u["val"])) {
 +						$objText->getFont()->setUnderline((string)$run->rPr->u["val"]);
 +					}
 +
 +					if ((isset($run->rPr->strike["val"]) && self::boolean((string) $run->rPr->strike["val"])) ||
 +						(isset($run->rPr->strike) && !isset($run->rPr->strike["val"]))) {
 +						$objText->getFont()->setStrikethrough(TRUE);
 +					}
 +				}
 +			}
 +		}
 +
 +		return $value;
 +	}
 +
 +
 +	private static function array_item($array, $key = 0) {
 +		return (isset($array[$key]) ? $array[$key] : null);
 +	}
 +
 +
 +	private static function dir_add($base, $add) {
 +		return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add");
 +	}
 +
 +
 +	private static function toCSSArray($style) {
 +		$style = str_replace(array("\r","\n"), "", $style);
 +
 +		$temp = explode(';', $style);
 +		$style = array();
 +		foreach ($temp as $item) {
 +			$item = explode(':', $item);
 +
 +			if (strpos($item[1], 'px') !== false) {
 +				$item[1] = str_replace('px', '', $item[1]);
 +			}
 +			if (strpos($item[1], 'pt') !== false) {
 +				$item[1] = str_replace('pt', '', $item[1]);
 +				$item[1] = PHPExcel_Shared_Font::fontSizeToPixels($item[1]);
 +			}
 +			if (strpos($item[1], 'in') !== false) {
 +				$item[1] = str_replace('in', '', $item[1]);
 +				$item[1] = PHPExcel_Shared_Font::inchSizeToPixels($item[1]);
 +			}
 +			if (strpos($item[1], 'cm') !== false) {
 +				$item[1] = str_replace('cm', '', $item[1]);
 +				$item[1] = PHPExcel_Shared_Font::centimeterSizeToPixels($item[1]);
 +			}
 +
 +			$style[$item[0]] = $item[1];
 +		}
 +
 +		return $style;
 +	}
 +
 +	private static function boolean($value = NULL)
 +	{
 +		if (is_numeric($value)) {
 +			return (bool) $value;
 +		}
 +		return ($value === 'true' || $value === 'TRUE') ? TRUE : FALSE;
 +	}
 +}
diff --cc 3rdparty/PHPExcel/Classes/PHPExcel/Reader/Gnumeric.php
index 902c5a5,0000000..dff4768
mode 100644,000000..100644
--- a/3rdparty/PHPExcel/Classes/PHPExcel/Reader/Gnumeric.php
+++ b/3rdparty/PHPExcel/Classes/PHPExcel/Reader/Gnumeric.php
@@@ -1,873 -1,0 +1,874 @@@
 +<?php
 +/**
 + * PHPExcel
 + *
 + * Copyright (c) 2006 - 2013 PHPExcel
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU Lesser General Public
 + * License as published by the Free Software Foundation; either
 + * version 2.1 of the License, or (at your option) 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
 + * Lesser General Public License for more details.
 + *
 + * You should have received a copy of the GNU Lesser General Public
 + * License along with this library; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 + *
 + * @category   PHPExcel
 + * @package    PHPExcel_Reader
 + * @copyright  Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
 + * @version    1.7.9, 2013-06-02
 + */
 +
 +
 +/** PHPExcel root directory */
 +if (!defined('PHPEXCEL_ROOT')) {
 +	/**
 +	 * @ignore
 +	 */
 +	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
 +	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
 +}
 +
 +/**
 + * PHPExcel_Reader_Gnumeric
 + *
 + * @category	PHPExcel
 + * @package		PHPExcel_Reader
 + * @copyright	Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + */
 +class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
 +{
 +	/**
 +	 * Formats
 +	 *
 +	 * @var array
 +	 */
 +	private $_styles = array();
 +
 +	/**
 +	 * Shared Expressions
 +	 *
 +	 * @var array
 +	 */
 +	private $_expressions = array();
 +
 +	private $_referenceHelper = null;
 +
 +
 +	/**
 +	 * Create a new PHPExcel_Reader_Gnumeric
 +	 */
 +	public function __construct() {
 +		$this->_readFilter 	= new PHPExcel_Reader_DefaultReadFilter();
 +		$this->_referenceHelper = PHPExcel_ReferenceHelper::getInstance();
 +	}
 +
 +
 +	/**
 +	 * Can the current PHPExcel_Reader_IReader read the file?
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @return 	boolean
 +	 * @throws PHPExcel_Reader_Exception
 +	 */
 +	public function canRead($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		// Check if gzlib functions are available
 +		if (!function_exists('gzread')) {
 +			throw new PHPExcel_Reader_Exception("gzlib library is not enabled");
 +		}
 +
 +		// Read signature data (first 3 bytes)
 +		$fh = fopen($pFilename, 'r');
 +		$data = fread($fh, 2);
 +		fclose($fh);
 +
 +		if ($data != chr(0x1F).chr(0x8B)) {
 +			return false;
 +		}
 +
 +		return true;
 +	}
 +
 +
 +	/**
 +	 * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetNames($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$xml = new XMLReader();
 +		$xml->open(
 +			'compress.zlib://'.realpath($pFilename)
 +		);
 +		$xml->setParserProperty(2,true);
 +
 +		$worksheetNames = array();
 +		while ($xml->read()) {
 +			if ($xml->name == 'gnm:SheetName' && $xml->nodeType == XMLReader::ELEMENT) {
 +			    $xml->read();	//	Move onto the value node
 +				$worksheetNames[] = (string) $xml->value;
 +			} elseif ($xml->name == 'gnm:Sheets') {
 +				//	break out of the loop once we've got our sheet names rather than parse the entire file
 +				break;
 +			}
 +		}
 +
 +		return $worksheetNames;
 +	}
 +
 +
 +	/**
 +	 * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns)
 +	 *
 +	 * @param   string     $pFilename
 +	 * @throws   PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetInfo($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$xml = new XMLReader();
 +		$xml->open(
 +			'compress.zlib://'.realpath($pFilename)
 +		);
 +		$xml->setParserProperty(2,true);
 +
 +		$worksheetInfo = array();
 +		while ($xml->read()) {
 +			if ($xml->name == 'gnm:Sheet' && $xml->nodeType == XMLReader::ELEMENT) {
 +				$tmpInfo = array(
 +					'worksheetName' => '',
 +					'lastColumnLetter' => 'A',
 +					'lastColumnIndex' => 0,
 +					'totalRows' => 0,
 +					'totalColumns' => 0,
 +				);
 +
 +				while ($xml->read()) {
 +					if ($xml->name == 'gnm:Name' && $xml->nodeType == XMLReader::ELEMENT) {
 +					    $xml->read();	//	Move onto the value node
 +						$tmpInfo['worksheetName'] = (string) $xml->value;
 +					} elseif ($xml->name == 'gnm:MaxCol' && $xml->nodeType == XMLReader::ELEMENT) {
 +					    $xml->read();	//	Move onto the value node
 +						$tmpInfo['lastColumnIndex'] = (int) $xml->value;
 +						$tmpInfo['totalColumns'] = (int) $xml->value + 1;
 +					} elseif ($xml->name == 'gnm:MaxRow' && $xml->nodeType == XMLReader::ELEMENT) {
 +					    $xml->read();	//	Move onto the value node
 +						$tmpInfo['totalRows'] = (int) $xml->value + 1;
 +						break;
 +					}
 +				}
 +				$tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']);
 +				$worksheetInfo[] = $tmpInfo;
 +			}
 +		}
 +
 +		return $worksheetInfo;
 +	}
 +
 +
 +	private function _gzfileGetContents($filename) {
 +		$file = @gzopen($filename, 'rb');
 +		if ($file !== false) {
 +			$data = '';
 +			while (!gzeof($file)) {
 +				$data .= gzread($file, 1024);
 +			}
 +			gzclose($file);
 +		}
 +		return $data;
 +	}
 +
 +
 +	/**
 +	 * Loads PHPExcel from file
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @return 	PHPExcel
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function load($pFilename)
 +	{
 +		// Create new PHPExcel
 +		$objPHPExcel = new PHPExcel();
 +
 +		// Load into this instance
 +		return $this->loadIntoExisting($pFilename, $objPHPExcel);
 +	}
 +
 +
 +	/**
 +	 * Loads PHPExcel from file into PHPExcel instance
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @param	PHPExcel	$objPHPExcel
 +	 * @return 	PHPExcel
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$timezoneObj = new DateTimeZone('Europe/London');
 +		$GMT = new DateTimeZone('UTC');
 +
 +		$gFileData = $this->_gzfileGetContents($pFilename);
 +
 +//		echo '<pre>';
 +//		echo htmlentities($gFileData,ENT_QUOTES,'UTF-8');
 +//		echo '</pre><hr />';
 +//
++		libxml_disable_entity_loader(true);
 +		$xml = simplexml_load_string($gFileData);
 +		$namespacesMeta = $xml->getNamespaces(true);
 +
 +//		var_dump($namespacesMeta);
 +//
 +		$gnmXML = $xml->children($namespacesMeta['gnm']);
 +
 +		$docProps = $objPHPExcel->getProperties();
 +		//	Document Properties are held differently, depending on the version of Gnumeric
 +		if (isset($namespacesMeta['office'])) {
 +			$officeXML = $xml->children($namespacesMeta['office']);
 +		    $officeDocXML = $officeXML->{'document-meta'};
 +			$officeDocMetaXML = $officeDocXML->meta;
 +
 +			foreach($officeDocMetaXML as $officePropertyData) {
 +
 +				$officePropertyDC = array();
 +				if (isset($namespacesMeta['dc'])) {
 +					$officePropertyDC = $officePropertyData->children($namespacesMeta['dc']);
 +				}
 +				foreach($officePropertyDC as $propertyName => $propertyValue) {
 +					$propertyValue = (string) $propertyValue;
 +					switch ($propertyName) {
 +						case 'title' :
 +								$docProps->setTitle(trim($propertyValue));
 +								break;
 +						case 'subject' :
 +								$docProps->setSubject(trim($propertyValue));
 +								break;
 +						case 'creator' :
 +								$docProps->setCreator(trim($propertyValue));
 +								$docProps->setLastModifiedBy(trim($propertyValue));
 +								break;
 +						case 'date' :
 +								$creationDate = strtotime(trim($propertyValue));
 +								$docProps->setCreated($creationDate);
 +								$docProps->setModified($creationDate);
 +								break;
 +						case 'description' :
 +								$docProps->setDescription(trim($propertyValue));
 +								break;
 +					}
 +				}
 +				$officePropertyMeta = array();
 +				if (isset($namespacesMeta['meta'])) {
 +					$officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']);
 +				}
 +				foreach($officePropertyMeta as $propertyName => $propertyValue) {
 +					$attributes = $propertyValue->attributes($namespacesMeta['meta']);
 +					$propertyValue = (string) $propertyValue;
 +					switch ($propertyName) {
 +						case 'keyword' :
 +								$docProps->setKeywords(trim($propertyValue));
 +								break;
 +						case 'initial-creator' :
 +								$docProps->setCreator(trim($propertyValue));
 +								$docProps->setLastModifiedBy(trim($propertyValue));
 +								break;
 +						case 'creation-date' :
 +								$creationDate = strtotime(trim($propertyValue));
 +								$docProps->setCreated($creationDate);
 +								$docProps->setModified($creationDate);
 +								break;
 +						case 'user-defined' :
 +								list(,$attrName) = explode(':',$attributes['name']);
 +								switch ($attrName) {
 +									case 'publisher' :
 +											$docProps->setCompany(trim($propertyValue));
 +											break;
 +									case 'category' :
 +											$docProps->setCategory(trim($propertyValue));
 +											break;
 +									case 'manager' :
 +											$docProps->setManager(trim($propertyValue));
 +											break;
 +								}
 +								break;
 +					}
 +				}
 +			}
 +		} elseif (isset($gnmXML->Summary)) {
 +			foreach($gnmXML->Summary->Item as $summaryItem) {
 +				$propertyName = $summaryItem->name;
 +				$propertyValue = $summaryItem->{'val-string'};
 +				switch ($propertyName) {
 +					case 'title' :
 +						$docProps->setTitle(trim($propertyValue));
 +						break;
 +					case 'comments' :
 +						$docProps->setDescription(trim($propertyValue));
 +						break;
 +					case 'keywords' :
 +						$docProps->setKeywords(trim($propertyValue));
 +						break;
 +					case 'category' :
 +						$docProps->setCategory(trim($propertyValue));
 +						break;
 +					case 'manager' :
 +						$docProps->setManager(trim($propertyValue));
 +						break;
 +					case 'author' :
 +						$docProps->setCreator(trim($propertyValue));
 +						$docProps->setLastModifiedBy(trim($propertyValue));
 +						break;
 +					case 'company' :
 +						$docProps->setCompany(trim($propertyValue));
 +						break;
 +				}
 +			}
 +		}
 +
 +		$worksheetID = 0;
 +		foreach($gnmXML->Sheets->Sheet as $sheet) {
 +			$worksheetName = (string) $sheet->Name;
 +//			echo '<b>Worksheet: ',$worksheetName,'</b><br />';
 +			if ((isset($this->_loadSheetsOnly)) && (!in_array($worksheetName, $this->_loadSheetsOnly))) {
 +				continue;
 +			}
 +
 +			$maxRow = $maxCol = 0;
 +
 +			// Create new Worksheet
 +			$objPHPExcel->createSheet();
 +			$objPHPExcel->setActiveSheetIndex($worksheetID);
 +			//	Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula
 +			//		cells... during the load, all formulae should be correct, and we're simply bringing the worksheet
 +			//		name in line with the formula, not the reverse
 +			$objPHPExcel->getActiveSheet()->setTitle($worksheetName,false);
 +
 +			if ((!$this->_readDataOnly) && (isset($sheet->PrintInformation))) {
 +				if (isset($sheet->PrintInformation->Margins)) {
 +					foreach($sheet->PrintInformation->Margins->children('gnm',TRUE) as $key => $margin) {
 +						$marginAttributes = $margin->attributes();
 +						$marginSize = 72 / 100;	//	Default
 +						switch($marginAttributes['PrefUnit']) {
 +							case 'mm' :
 +								$marginSize = intval($marginAttributes['Points']) / 100;
 +								break;
 +						}
 +						switch($key) {
 +							case 'top' :
 +								$objPHPExcel->getActiveSheet()->getPageMargins()->setTop($marginSize);
 +								break;
 +							case 'bottom' :
 +								$objPHPExcel->getActiveSheet()->getPageMargins()->setBottom($marginSize);
 +								break;
 +							case 'left' :
 +								$objPHPExcel->getActiveSheet()->getPageMargins()->setLeft($marginSize);
 +								break;
 +							case 'right' :
 +								$objPHPExcel->getActiveSheet()->getPageMargins()->setRight($marginSize);
 +								break;
 +							case 'header' :
 +								$objPHPExcel->getActiveSheet()->getPageMargins()->setHeader($marginSize);
 +								break;
 +							case 'footer' :
 +								$objPHPExcel->getActiveSheet()->getPageMargins()->setFooter($marginSize);
 +								break;
 +						}
 +					}
 +				}
 +			}
 +
 +			foreach($sheet->Cells->Cell as $cell) {
 +				$cellAttributes = $cell->attributes();
 +				$row = (int) $cellAttributes->Row + 1;
 +				$column = (int) $cellAttributes->Col;
 +
 +				if ($row > $maxRow) $maxRow = $row;
 +				if ($column > $maxCol) $maxCol = $column;
 +
 +				$column = PHPExcel_Cell::stringFromColumnIndex($column);
 +
 +				// Read cell?
 +				if ($this->getReadFilter() !== NULL) {
 +					if (!$this->getReadFilter()->readCell($column, $row, $worksheetName)) {
 +						continue;
 +					}
 +				}
 +
 +				$ValueType = $cellAttributes->ValueType;
 +				$ExprID = (string) $cellAttributes->ExprID;
 +//				echo 'Cell ',$column,$row,'<br />';
 +//				echo 'Type is ',$ValueType,'<br />';
 +//				echo 'Value is ',$cell,'<br />';
 +				$type = PHPExcel_Cell_DataType::TYPE_FORMULA;
 +				if ($ExprID > '') {
 +					if (((string) $cell) > '') {
 +
 +						$this->_expressions[$ExprID] = array( 'column'	=> $cellAttributes->Col,
 +															  'row'		=> $cellAttributes->Row,
 +															  'formula'	=> (string) $cell
 +															);
 +//						echo 'NEW EXPRESSION ',$ExprID,'<br />';
 +					} else {
 +						$expression = $this->_expressions[$ExprID];
 +
 +						$cell = $this->_referenceHelper->updateFormulaReferences( $expression['formula'],
 +																				  'A1',
 +																				  $cellAttributes->Col - $expression['column'],
 +																				  $cellAttributes->Row - $expression['row'],
 +																				  $worksheetName
 +																				);
 +//						echo 'SHARED EXPRESSION ',$ExprID,'<br />';
 +//						echo 'New Value is ',$cell,'<br />';
 +					}
 +					$type = PHPExcel_Cell_DataType::TYPE_FORMULA;
 +				} else {
 +					switch($ValueType) {
 +						case '10' :		//	NULL
 +							$type = PHPExcel_Cell_DataType::TYPE_NULL;
 +							break;
 +						case '20' :		//	Boolean
 +							$type = PHPExcel_Cell_DataType::TYPE_BOOL;
 +							$cell = ($cell == 'TRUE') ? True : False;
 +							break;
 +						case '30' :		//	Integer
 +							$cell = intval($cell);
 +						case '40' :		//	Float
 +							$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +							break;
 +						case '50' :		//	Error
 +							$type = PHPExcel_Cell_DataType::TYPE_ERROR;
 +							break;
 +						case '60' :		//	String
 +							$type = PHPExcel_Cell_DataType::TYPE_STRING;
 +							break;
 +						case '70' :		//	Cell Range
 +						case '80' :		//	Array
 +					}
 +				}
 +				$objPHPExcel->getActiveSheet()->getCell($column.$row)->setValueExplicit($cell,$type);
 +			}
 +
 +			if ((!$this->_readDataOnly) && (isset($sheet->Objects))) {
 +				foreach($sheet->Objects->children('gnm',TRUE) as $key => $comment) {
 +					$commentAttributes = $comment->attributes();
 +					//	Only comment objects are handled at the moment
 +					if ($commentAttributes->Text) {
 +						$objPHPExcel->getActiveSheet()->getComment( (string)$commentAttributes->ObjectBound )
 +															->setAuthor( (string)$commentAttributes->Author )
 +															->setText($this->_parseRichText((string)$commentAttributes->Text) );
 +					}
 +				}
 +			}
 +//			echo '$maxCol=',$maxCol,'; $maxRow=',$maxRow,'<br />';
 +//
 +			foreach($sheet->Styles->StyleRegion as $styleRegion) {
 +				$styleAttributes = $styleRegion->attributes();
 +				if (($styleAttributes['startRow'] <= $maxRow) &&
 +					($styleAttributes['startCol'] <= $maxCol)) {
 +
 +					$startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']);
 +					$startRow = $styleAttributes['startRow'] + 1;
 +
 +					$endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol'];
 +					$endColumn = PHPExcel_Cell::stringFromColumnIndex($endColumn);
 +					$endRow = ($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow'];
 +					$endRow += 1;
 +					$cellRange = $startColumn.$startRow.':'.$endColumn.$endRow;
 +//					echo $cellRange,'<br />';
 +
 +					$styleAttributes = $styleRegion->Style->attributes();
 +//					var_dump($styleAttributes);
 +//					echo '<br />';
 +
 +					//	We still set the number format mask for date/time values, even if _readDataOnly is true
 +					if ((!$this->_readDataOnly) ||
 +						(PHPExcel_Shared_Date::isDateTimeFormatCode($styleArray['numberformat']['code']))) {
 +						$styleArray = array();
 +						$styleArray['numberformat']['code'] = (string) $styleAttributes['Format'];
 +						//	If _readDataOnly is false, we set all formatting information
 +						if (!$this->_readDataOnly) {
 +							switch($styleAttributes['HAlign']) {
 +								case '1' :
 +									$styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
 +									break;
 +								case '2' :
 +									$styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_LEFT;
 +									break;
 +								case '4' :
 +									$styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;
 +									break;
 +								case '8' :
 +									$styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;
 +									break;
 +								case '16' :
 +								case '64' :
 +									$styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS;
 +									break;
 +								case '32' :
 +									$styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY;
 +									break;
 +							}
 +
 +							switch($styleAttributes['VAlign']) {
 +								case '1' :
 +									$styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_TOP;
 +									break;
 +								case '2' :
 +									$styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_BOTTOM;
 +									break;
 +								case '4' :
 +									$styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_CENTER;
 +									break;
 +								case '8' :
 +									$styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_JUSTIFY;
 +									break;
 +							}
 +
 +							$styleArray['alignment']['wrap'] = ($styleAttributes['WrapText'] == '1') ? True : False;
 +							$styleArray['alignment']['shrinkToFit'] = ($styleAttributes['ShrinkToFit'] == '1') ? True : False;
 +							$styleArray['alignment']['indent'] = (intval($styleAttributes["Indent"]) > 0) ? $styleAttributes["indent"] : 0;
 +
 +							$RGB = self::_parseGnumericColour($styleAttributes["Fore"]);
 +							$styleArray['font']['color']['rgb'] = $RGB;
 +							$RGB = self::_parseGnumericColour($styleAttributes["Back"]);
 +							$shade = $styleAttributes["Shade"];
 +							if (($RGB != '000000') || ($shade != '0')) {
 +								$styleArray['fill']['color']['rgb'] = $styleArray['fill']['startcolor']['rgb'] = $RGB;
 +								$RGB2 = self::_parseGnumericColour($styleAttributes["PatternColor"]);
 +								$styleArray['fill']['endcolor']['rgb'] = $RGB2;
 +								switch($shade) {
 +									case '1' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_SOLID;
 +										break;
 +									case '2' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR;
 +										break;
 +									case '3' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_GRADIENT_PATH;
 +										break;
 +									case '4' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN;
 +										break;
 +									case '5' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY;
 +										break;
 +									case '6' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID;
 +										break;
 +									case '7' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL;
 +										break;
 +									case '8' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS;
 +										break;
 +									case '9' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKUP;
 +										break;
 +									case '10' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL;
 +										break;
 +									case '11' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625;
 +										break;
 +									case '12' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_GRAY125;
 +										break;
 +									case '13' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN;
 +										break;
 +									case '14' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY;
 +										break;
 +									case '15' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID;
 +										break;
 +									case '16' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL;
 +										break;
 +									case '17' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS;
 +										break;
 +									case '18' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP;
 +										break;
 +									case '19' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL;
 +										break;
 +									case '20' :
 +										$styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY;
 +										break;
 +								}
 +							}
 +
 +							$fontAttributes = $styleRegion->Style->Font->attributes();
 +//							var_dump($fontAttributes);
 +//							echo '<br />';
 +							$styleArray['font']['name'] = (string) $styleRegion->Style->Font;
 +							$styleArray['font']['size'] = intval($fontAttributes['Unit']);
 +							$styleArray['font']['bold'] = ($fontAttributes['Bold'] == '1') ? True : False;
 +							$styleArray['font']['italic'] = ($fontAttributes['Italic'] == '1') ? True : False;
 +							$styleArray['font']['strike'] = ($fontAttributes['StrikeThrough'] == '1') ? True : False;
 +							switch($fontAttributes['Underline']) {
 +								case '1' :
 +									$styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_SINGLE;
 +									break;
 +								case '2' :
 +									$styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_DOUBLE;
 +									break;
 +								case '3' :
 +									$styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING;
 +									break;
 +								case '4' :
 +									$styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING;
 +									break;
 +								default :
 +									$styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_NONE;
 +									break;
 +							}
 +							switch($fontAttributes['Script']) {
 +								case '1' :
 +									$styleArray['font']['superScript'] = True;
 +									break;
 +								case '-1' :
 +									$styleArray['font']['subScript'] = True;
 +									break;
 +							}
 +
 +							if (isset($styleRegion->Style->StyleBorder)) {
 +								if (isset($styleRegion->Style->StyleBorder->Top)) {
 +									$styleArray['borders']['top'] = self::_parseBorderAttributes($styleRegion->Style->StyleBorder->Top->attributes());
 +								}
 +								if (isset($styleRegion->Style->StyleBorder->Bottom)) {
 +									$styleArray['borders']['bottom'] = self::_parseBorderAttributes($styleRegion->Style->StyleBorder->Bottom->attributes());
 +								}
 +								if (isset($styleRegion->Style->StyleBorder->Left)) {
 +									$styleArray['borders']['left'] = self::_parseBorderAttributes($styleRegion->Style->StyleBorder->Left->attributes());
 +								}
 +								if (isset($styleRegion->Style->StyleBorder->Right)) {
 +									$styleArray['borders']['right'] = self::_parseBorderAttributes($styleRegion->Style->StyleBorder->Right->attributes());
 +								}
 +								if ((isset($styleRegion->Style->StyleBorder->Diagonal)) && (isset($styleRegion->Style->StyleBorder->{'Rev-Diagonal'}))) {
 +									$styleArray['borders']['diagonal'] = self::_parseBorderAttributes($styleRegion->Style->StyleBorder->Diagonal->attributes());
 +									$styleArray['borders']['diagonaldirection'] = PHPExcel_Style_Borders::DIAGONAL_BOTH;
 +								} elseif (isset($styleRegion->Style->StyleBorder->Diagonal)) {
 +									$styleArray['borders']['diagonal'] = self::_parseBorderAttributes($styleRegion->Style->StyleBorder->Diagonal->attributes());
 +									$styleArray['borders']['diagonaldirection'] = PHPExcel_Style_Borders::DIAGONAL_UP;
 +								} elseif (isset($styleRegion->Style->StyleBorder->{'Rev-Diagonal'})) {
 +									$styleArray['borders']['diagonal'] = self::_parseBorderAttributes($styleRegion->Style->StyleBorder->{'Rev-Diagonal'}->attributes());
 +									$styleArray['borders']['diagonaldirection'] = PHPExcel_Style_Borders::DIAGONAL_DOWN;
 +								}
 +							}
 +							if (isset($styleRegion->Style->HyperLink)) {
 +								//	TO DO
 +								$hyperlink = $styleRegion->Style->HyperLink->attributes();
 +							}
 +						}
 +//						var_dump($styleArray);
 +//						echo '<br />';
 +						$objPHPExcel->getActiveSheet()->getStyle($cellRange)->applyFromArray($styleArray);
 +					}
 +				}
 +			}
 +
 +			if ((!$this->_readDataOnly) && (isset($sheet->Cols))) {
 +				//	Column Widths
 +				$columnAttributes = $sheet->Cols->attributes();
 +				$defaultWidth = $columnAttributes['DefaultSizePts']  / 5.4;
 +				$c = 0;
 +				foreach($sheet->Cols->ColInfo as $columnOverride) {
 +					$columnAttributes = $columnOverride->attributes();
 +					$column = $columnAttributes['No'];
 +					$columnWidth = $columnAttributes['Unit']  / 5.4;
 +					$hidden = ((isset($columnAttributes['Hidden'])) && ($columnAttributes['Hidden'] == '1')) ? true : false;
 +					$columnCount = (isset($columnAttributes['Count'])) ? $columnAttributes['Count'] : 1;
 +					while ($c < $column) {
 +						$objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setWidth($defaultWidth);
 +						++$c;
 +					}
 +					while (($c < ($column+$columnCount)) && ($c <= $maxCol)) {
 +						$objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setWidth($columnWidth);
 +						if ($hidden) {
 +							$objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setVisible(false);
 +						}
 +						++$c;
 +					}
 +				}
 +				while ($c <= $maxCol) {
 +					$objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setWidth($defaultWidth);
 +					++$c;
 +				}
 +			}
 +
 +			if ((!$this->_readDataOnly) && (isset($sheet->Rows))) {
 +				//	Row Heights
 +				$rowAttributes = $sheet->Rows->attributes();
 +				$defaultHeight = $rowAttributes['DefaultSizePts'];
 +				$r = 0;
 +
 +				foreach($sheet->Rows->RowInfo as $rowOverride) {
 +					$rowAttributes = $rowOverride->attributes();
 +					$row = $rowAttributes['No'];
 +					$rowHeight = $rowAttributes['Unit'];
 +					$hidden = ((isset($rowAttributes['Hidden'])) && ($rowAttributes['Hidden'] == '1')) ? true : false;
 +					$rowCount = (isset($rowAttributes['Count'])) ? $rowAttributes['Count'] : 1;
 +					while ($r < $row) {
 +						++$r;
 +						$objPHPExcel->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight);
 +					}
 +					while (($r < ($row+$rowCount)) && ($r < $maxRow)) {
 +						++$r;
 +						$objPHPExcel->getActiveSheet()->getRowDimension($r)->setRowHeight($rowHeight);
 +						if ($hidden) {
 +							$objPHPExcel->getActiveSheet()->getRowDimension($r)->setVisible(false);
 +						}
 +					}
 +				}
 +				while ($r < $maxRow) {
 +					++$r;
 +					$objPHPExcel->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight);
 +				}
 +			}
 +
 +			//	Handle Merged Cells in this worksheet
 +			if (isset($sheet->MergedRegions)) {
 +				foreach($sheet->MergedRegions->Merge as $mergeCells) {
 +					if (strpos($mergeCells,':') !== FALSE) {
 +						$objPHPExcel->getActiveSheet()->mergeCells($mergeCells);
 +					}
 +				}
 +			}
 +
 +			$worksheetID++;
 +		}
 +
 +		//	Loop through definedNames (global named ranges)
 +		if (isset($gnmXML->Names)) {
 +			foreach($gnmXML->Names->Name as $namedRange) {
 +				$name = (string) $namedRange->name;
 +				$range = (string) $namedRange->value;
 +				if (stripos($range, '#REF!') !== false) {
 +					continue;
 +				}
 +
 +				$range = explode('!',$range);
 +				$range[0] = trim($range[0],"'");;
 +				if ($worksheet = $objPHPExcel->getSheetByName($range[0])) {
 +					$extractedRange = str_replace('$', '', $range[1]);
 +					$objPHPExcel->addNamedRange( new PHPExcel_NamedRange($name, $worksheet, $extractedRange) );
 +				}
 +			}
 +		}
 +
 +
 +		// Return
 +		return $objPHPExcel;
 +	}
 +
 +
 +	private static function _parseBorderAttributes($borderAttributes)
 +	{
 +		$styleArray = array();
 +
 +		if (isset($borderAttributes["Color"])) {
 +			$RGB = self::_parseGnumericColour($borderAttributes["Color"]);
 +			$styleArray['color']['rgb'] = $RGB;
 +		}
 +
 +		switch ($borderAttributes["Style"]) {
 +			case '0' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_NONE;
 +				break;
 +			case '1' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_THIN;
 +				break;
 +			case '2' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUM;
 +				break;
 +			case '4' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_DASHED;
 +				break;
 +			case '5' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_THICK;
 +				break;
 +			case '6' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_DOUBLE;
 +				break;
 +			case '7' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_DOTTED;
 +				break;
 +			case '9' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_DASHDOT;
 +				break;
 +			case '10' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT;
 +				break;
 +			case '11' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_DASHDOTDOT;
 +				break;
 +			case '12' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT;
 +				break;
 +			case '13' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT;
 +				break;
 +			case '3' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_SLANTDASHDOT;
 +				break;
 +			case '8' :
 +				$styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHED;
 +				break;
 +		}
 +		return $styleArray;
 +	}
 +
 +
 +	private function _parseRichText($is = '') {
 +		$value = new PHPExcel_RichText();
 +
 +		$value->createText($is);
 +
 +		return $value;
 +	}
 +
 +
 +	private static function _parseGnumericColour($gnmColour) {
 +		list($gnmR,$gnmG,$gnmB) = explode(':',$gnmColour);
 +		$gnmR = substr(str_pad($gnmR,4,'0',STR_PAD_RIGHT),0,2);
 +		$gnmG = substr(str_pad($gnmG,4,'0',STR_PAD_RIGHT),0,2);
 +		$gnmB = substr(str_pad($gnmB,4,'0',STR_PAD_RIGHT),0,2);
 +		$RGB = $gnmR.$gnmG.$gnmB;
 +//		echo 'Excel Colour: ',$RGB,'<br />';
 +		return $RGB;
 +	}
 +
 +}
diff --cc 3rdparty/PHPExcel/Classes/PHPExcel/Reader/OOCalc.php
index 4bd4933,0000000..63b0a78
mode 100644,000000..100644
--- a/3rdparty/PHPExcel/Classes/PHPExcel/Reader/OOCalc.php
+++ b/3rdparty/PHPExcel/Classes/PHPExcel/Reader/OOCalc.php
@@@ -1,695 -1,0 +1,698 @@@
 +<?php
 +/**
 + * PHPExcel
 + *
 + * Copyright (c) 2006 - 2013 PHPExcel
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU Lesser General Public
 + * License as published by the Free Software Foundation; either
 + * version 2.1 of the License, or (at your option) 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
 + * Lesser General Public License for more details.
 + *
 + * You should have received a copy of the GNU Lesser General Public
 + * License along with this library; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 + *
 + * @category   PHPExcel
 + * @package    PHPExcel_Reader
 + * @copyright  Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
 + * @version    1.7.9, 2013-06-02
 + */
 +
 +
 +/** PHPExcel root directory */
 +if (!defined('PHPEXCEL_ROOT')) {
 +	/**
 +	 * @ignore
 +	 */
 +	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
 +	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
 +}
 +
 +/**
 + * PHPExcel_Reader_OOCalc
 + *
 + * @category	PHPExcel
 + * @package		PHPExcel_Reader
 + * @copyright	Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
 + */
 +class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
 +{
 +	/**
 +	 * Formats
 +	 *
 +	 * @var array
 +	 */
 +	private $_styles = array();
 +
 +
 +	/**
 +	 * Create a new PHPExcel_Reader_OOCalc
 +	 */
 +	public function __construct() {
 +		$this->_readFilter 	= new PHPExcel_Reader_DefaultReadFilter();
 +	}
 +
 +
 +	/**
 +	 * Can the current PHPExcel_Reader_IReader read the file?
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @return 	boolean
 +	 * @throws PHPExcel_Reader_Exception
 +	 */
 +	public function canRead($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		// Check if zip class exists
 +		if (!class_exists('ZipArchive',FALSE)) {
 +			throw new PHPExcel_Reader_Exception("ZipArchive library is not enabled");
 +		}
 +
 +        $mimeType = 'UNKNOWN';
 +		// Load file
 +		$zip = new ZipArchive;
 +		if ($zip->open($pFilename) === true) {
 +			// check if it is an OOXML archive
 +			$stat = $zip->statName('mimetype');
 +			if ($stat && ($stat['size'] <= 255)) {
 +				$mimeType = $zip->getFromName($stat['name']);
 +			} elseif($stat = $zip->statName('META-INF/manifest.xml')) {
++			libxml_disable_entity_loader(true);
 +		        $xml = simplexml_load_string($zip->getFromName('META-INF/manifest.xml'));
 +		        $namespacesContent = $xml->getNamespaces(true);
 +				if (isset($namespacesContent['manifest'])) {
 +			        $manifest = $xml->children($namespacesContent['manifest']);
 +				    foreach($manifest as $manifestDataSet) {
 +					    $manifestAttributes = $manifestDataSet->attributes($namespacesContent['manifest']);
 +				        if ($manifestAttributes->{'full-path'} == '/') {
 +				            $mimeType = (string) $manifestAttributes->{'media-type'};
 +				            break;
 +				    	}
 +				    }
 +				}
 +			}
 +
 +			$zip->close();
 +
 +			return ($mimeType === 'application/vnd.oasis.opendocument.spreadsheet');
 +		}
 +
 +		return FALSE;
 +	}
 +
 +
 +	/**
 +	 * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetNames($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$zip = new ZipArchive;
 +		if (!$zip->open($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! Error opening file.");
 +		}
 +
 +		$worksheetNames = array();
 +
 +		$xml = new XMLReader();
 +		$res = $xml->open('zip://'.realpath($pFilename).'#content.xml');
 +		$xml->setParserProperty(2,true);
 +
 +		//	Step into the first level of content of the XML
 +		$xml->read();
 +		while ($xml->read()) {
 +			//	Quickly jump through to the office:body node
 +			while ($xml->name !== 'office:body') {
 +				if ($xml->isEmptyElement)
 +					$xml->read();
 +				else
 +					$xml->next();
 +			}
 +			//	Now read each node until we find our first table:table node
 +			while ($xml->read()) {
 +				if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) {
 +					//	Loop through each table:table node reading the table:name attribute for each worksheet name
 +					do {
 +						$worksheetNames[] = $xml->getAttribute('table:name');
 +						$xml->next();
 +					} while ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT);
 +				}
 +			}
 +		}
 +
 +		return $worksheetNames;
 +	}
 +
 +
 +	/**
 +	 * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns)
 +	 *
 +	 * @param   string     $pFilename
 +	 * @throws   PHPExcel_Reader_Exception
 +	 */
 +	public function listWorksheetInfo($pFilename)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$worksheetInfo = array();
 +
 +		$zip = new ZipArchive;
 +		if (!$zip->open($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! Error opening file.");
 +		}
 +
 +		$xml = new XMLReader();
 +		$res = $xml->open('zip://'.realpath($pFilename).'#content.xml');
 +		$xml->setParserProperty(2,true);
 +
 +		//	Step into the first level of content of the XML
 +		$xml->read();
 +		while ($xml->read()) {
 +			//	Quickly jump through to the office:body node
 +			while ($xml->name !== 'office:body') {
 +				if ($xml->isEmptyElement)
 +					$xml->read();
 +				else
 +					$xml->next();
 +			}
 +				//	Now read each node until we find our first table:table node
 +			while ($xml->read()) {
 +				if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) {
 +					$worksheetNames[] = $xml->getAttribute('table:name');
 +
 +					$tmpInfo = array(
 +						'worksheetName' => $xml->getAttribute('table:name'),
 +						'lastColumnLetter' => 'A',
 +						'lastColumnIndex' => 0,
 +						'totalRows' => 0,
 +						'totalColumns' => 0,
 +					);
 +
 +					//	Loop through each child node of the table:table element reading
 +					$currCells = 0;
 +					do {
 +						$xml->read();
 +						if ($xml->name == 'table:table-row' && $xml->nodeType == XMLReader::ELEMENT) {
 +							$rowspan = $xml->getAttribute('table:number-rows-repeated');
 +							$rowspan = empty($rowspan) ? 1 : $rowspan;
 +							$tmpInfo['totalRows'] += $rowspan;
 +							$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
 +							$currCells = 0;
 +							//	Step into the row
 +							$xml->read();
 +							do {
 +								if ($xml->name == 'table:table-cell' && $xml->nodeType == XMLReader::ELEMENT) {
 +									if (!$xml->isEmptyElement) {
 +										$currCells++;
 +										$xml->next();
 +									} else {
 +										$xml->read();
 +									}
 +								} elseif ($xml->name == 'table:covered-table-cell' && $xml->nodeType == XMLReader::ELEMENT) {
 +									$mergeSize = $xml->getAttribute('table:number-columns-repeated');
 +									$currCells += $mergeSize;
 +									$xml->read();
 +								}
 +							} while ($xml->name != 'table:table-row');
 +						}
 +					} while ($xml->name != 'table:table');
 +
 +					$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
 +					$tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1;
 +					$tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']);
 +					$worksheetInfo[] = $tmpInfo;
 +				}
 +			}
 +
 +//				foreach($workbookData->table as $worksheetDataSet) {
 +//					$worksheetData = $worksheetDataSet->children($namespacesContent['table']);
 +//					$worksheetDataAttributes = $worksheetDataSet->attributes($namespacesContent['table']);
 +//
 +//					$rowIndex = 0;
 +//					foreach ($worksheetData as $key => $rowData) {
 +//						switch ($key) {
 +//							case 'table-row' :
 +//								$rowDataTableAttributes = $rowData->attributes($namespacesContent['table']);
 +//								$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ?
 +//										$rowDataTableAttributes['number-rows-repeated'] : 1;
 +//								$columnIndex = 0;
 +//
 +//								foreach ($rowData as $key => $cellData) {
 +//									$cellDataTableAttributes = $cellData->attributes($namespacesContent['table']);
 +//									$colRepeats = (isset($cellDataTableAttributes['number-columns-repeated'])) ?
 +//										$cellDataTableAttributes['number-columns-repeated'] : 1;
 +//									$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
 +//									if (isset($cellDataOfficeAttributes['value-type'])) {
 +//										$tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex + $colRepeats - 1);
 +//										$tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex + $rowRepeats);
 +//									}
 +//									$columnIndex += $colRepeats;
 +//								}
 +//								$rowIndex += $rowRepeats;
 +//								break;
 +//						}
 +//					}
 +//
 +//					$tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']);
 +//					$tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1;
 +//
 +//				}
 +//			}
 +		}
 +
 +		return $worksheetInfo;
 +	}
 +
 +
 +	/**
 +	 * Loads PHPExcel from file
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @return 	PHPExcel
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function load($pFilename)
 +	{
 +		// Create new PHPExcel
 +		$objPHPExcel = new PHPExcel();
 +
 +		// Load into this instance
 +		return $this->loadIntoExisting($pFilename, $objPHPExcel);
 +	}
 +
 +
 +	private static function identifyFixedStyleValue($styleList,&$styleAttributeValue) {
 +		$styleAttributeValue = strtolower($styleAttributeValue);
 +		foreach($styleList as $style) {
 +			if ($styleAttributeValue == strtolower($style)) {
 +				$styleAttributeValue = $style;
 +				return true;
 +			}
 +		}
 +		return false;
 +	}
 +
 +
 +	/**
 +	 * Loads PHPExcel from file into PHPExcel instance
 +	 *
 +	 * @param 	string 		$pFilename
 +	 * @param	PHPExcel	$objPHPExcel
 +	 * @return 	PHPExcel
 +	 * @throws 	PHPExcel_Reader_Exception
 +	 */
 +	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
 +	{
 +		// Check if file exists
 +		if (!file_exists($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
 +		}
 +
 +		$timezoneObj = new DateTimeZone('Europe/London');
 +		$GMT = new DateTimeZone('UTC');
 +
 +		$zip = new ZipArchive;
 +		if (!$zip->open($pFilename)) {
 +			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! Error opening file.");
 +		}
 +
 +//		echo '<h1>Meta Information</h1>';
++		libxml_disable_entity_loader(true);
 +		$xml = simplexml_load_string($zip->getFromName("meta.xml"));
 +		$namespacesMeta = $xml->getNamespaces(true);
 +//		echo '<pre>';
 +//		print_r($namespacesMeta);
 +//		echo '</pre><hr />';
 +
 +		$docProps = $objPHPExcel->getProperties();
 +		$officeProperty = $xml->children($namespacesMeta['office']);
 +		foreach($officeProperty as $officePropertyData) {
 +			$officePropertyDC = array();
 +			if (isset($namespacesMeta['dc'])) {
 +				$officePropertyDC = $officePropertyData->children($namespacesMeta['dc']);
 +			}
 +			foreach($officePropertyDC as $propertyName => $propertyValue) {
 +				switch ($propertyName) {
 +					case 'title' :
 +							$docProps->setTitle($propertyValue);
 +							break;
 +					case 'subject' :
 +							$docProps->setSubject($propertyValue);
 +							break;
 +					case 'creator' :
 +							$docProps->setCreator($propertyValue);
 +							$docProps->setLastModifiedBy($propertyValue);
 +							break;
 +					case 'date' :
 +							$creationDate = strtotime($propertyValue);
 +							$docProps->setCreated($creationDate);
 +							$docProps->setModified($creationDate);
 +							break;
 +					case 'description' :
 +							$docProps->setDescription($propertyValue);
 +							break;
 +				}
 +			}
 +			$officePropertyMeta = array();
 +			if (isset($namespacesMeta['dc'])) {
 +				$officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']);
 +			}
 +			foreach($officePropertyMeta as $propertyName => $propertyValue) {
 +				$propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']);
 +				switch ($propertyName) {
 +					case 'initial-creator' :
 +							$docProps->setCreator($propertyValue);
 +							break;
 +					case 'keyword' :
 +							$docProps->setKeywords($propertyValue);
 +							break;
 +					case 'creation-date' :
 +							$creationDate = strtotime($propertyValue);
 +							$docProps->setCreated($creationDate);
 +							break;
 +					case 'user-defined' :
 +							$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
 +							foreach ($propertyValueAttributes as $key => $value) {
 +								if ($key == 'name') {
 +									$propertyValueName = (string) $value;
 +								} elseif($key == 'value-type') {
 +									switch ($value) {
 +										case 'date'	:
 +											$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue,'date');
 +											$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE;
 +											break;
 +										case 'boolean'	:
 +											$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue,'bool');
 +											$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN;
 +											break;
 +										case 'float'	:
 +											$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue,'r4');
 +											$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT;
 +											break;
 +										default :
 +											$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
 +									}
 +								}
 +							}
 +							$docProps->setCustomProperty($propertyValueName,$propertyValue,$propertyValueType);
 +							break;
 +				}
 +			}
 +		}
 +
 +
 +//		echo '<h1>Workbook Content</h1>';
++		libxml_disable_entity_loader(true);
 +		$xml = simplexml_load_string($zip->getFromName("content.xml"));
 +		$namespacesContent = $xml->getNamespaces(true);
 +//		echo '<pre>';
 +//		print_r($namespacesContent);
 +//		echo '</pre><hr />';
 +
 +		$workbook = $xml->children($namespacesContent['office']);
 +		foreach($workbook->body->spreadsheet as $workbookData) {
 +			$workbookData = $workbookData->children($namespacesContent['table']);
 +			$worksheetID = 0;
 +			foreach($workbookData->table as $worksheetDataSet) {
 +				$worksheetData = $worksheetDataSet->children($namespacesContent['table']);
 +//				print_r($worksheetData);
 +//				echo '<br />';
 +				$worksheetDataAttributes = $worksheetDataSet->attributes($namespacesContent['table']);
 +//				print_r($worksheetDataAttributes);
 +//				echo '<br />';
 +				if ((isset($this->_loadSheetsOnly)) && (isset($worksheetDataAttributes['name'])) &&
 +					(!in_array($worksheetDataAttributes['name'], $this->_loadSheetsOnly))) {
 +					continue;
 +				}
 +
 +//				echo '<h2>Worksheet '.$worksheetDataAttributes['name'].'</h2>';
 +				// Create new Worksheet
 +				$objPHPExcel->createSheet();
 +				$objPHPExcel->setActiveSheetIndex($worksheetID);
 +				if (isset($worksheetDataAttributes['name'])) {
 +					$worksheetName = (string) $worksheetDataAttributes['name'];
 +					//	Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in
 +					//		formula cells... during the load, all formulae should be correct, and we're simply
 +					//		bringing the worksheet name in line with the formula, not the reverse
 +					$objPHPExcel->getActiveSheet()->setTitle($worksheetName,false);
 +				}
 +
 +				$rowID = 1;
 +				foreach($worksheetData as $key => $rowData) {
 +//					echo '<b>'.$key.'</b><br />';
 +					switch ($key) {
 +						case 'table-header-rows':
 +							foreach ($rowData as $key=>$cellData) {
 +								$rowData = $cellData;
 +								break;
 +							}
 +						case 'table-row' :
 +							$rowDataTableAttributes = $rowData->attributes($namespacesContent['table']);
 +							$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ?
 +									$rowDataTableAttributes['number-rows-repeated'] : 1;
 +							$columnID = 'A';
 +							foreach($rowData as $key => $cellData) {
 +								if ($this->getReadFilter() !== NULL) {
 +									if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {
 +										continue;
 +									}
 +								}
 +
 +//								echo '<b>'.$columnID.$rowID.'</b><br />';
 +								$cellDataText = (isset($namespacesContent['text'])) ?
 +									$cellData->children($namespacesContent['text']) :
 +									'';
 +								$cellDataOffice = $cellData->children($namespacesContent['office']);
 +								$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
 +								$cellDataTableAttributes = $cellData->attributes($namespacesContent['table']);
 +
 +//								echo 'Office Attributes: ';
 +//								print_r($cellDataOfficeAttributes);
 +//								echo '<br />Table Attributes: ';
 +//								print_r($cellDataTableAttributes);
 +//								echo '<br />Cell Data Text';
 +//								print_r($cellDataText);
 +//								echo '<br />';
 +//
 +								$type = $formatting = $hyperlink = null;
 +								$hasCalculatedValue = false;
 +								$cellDataFormula = '';
 +								if (isset($cellDataTableAttributes['formula'])) {
 +									$cellDataFormula = $cellDataTableAttributes['formula'];
 +									$hasCalculatedValue = true;
 +								}
 +
 +								if (isset($cellDataOffice->annotation)) {
 +//									echo 'Cell has comment<br />';
 +									$annotationText = $cellDataOffice->annotation->children($namespacesContent['text']);
 +									$textArray = array();
 +									foreach($annotationText as $t) {
 +										foreach($t->span as $text) {
 +											$textArray[] = (string)$text;
 +										}
 +									}
 +									$text = implode("\n",$textArray);
 +//									echo $text,'<br />';
 +									$objPHPExcel->getActiveSheet()->getComment( $columnID.$rowID )
 +//																	->setAuthor( $author )
 +																	->setText($this->_parseRichText($text) );
 +								}
 +
 +									if (isset($cellDataText->p)) {
 +									// Consolidate if there are multiple p records (maybe with spans as well)
 +									$dataArray = array();
 +									// Text can have multiple text:p and within those, multiple text:span.
 +									// text:p newlines, but text:span does not.
 +									// Also, here we assume there is no text data is span fields are specified, since
 +									// we have no way of knowing proper positioning anyway.
 +									foreach ($cellDataText->p as $pData) {
 +										if (isset($pData->span)) {
 +											// span sections do not newline, so we just create one large string here
 +											$spanSection = "";
 +											foreach ($pData->span as $spanData) {
 +												$spanSection .= $spanData;
 +											}
 +											array_push($dataArray, $spanSection);
 +										} else {
 +											array_push($dataArray, $pData);
 +										}
 +									}
 +									$allCellDataText = implode($dataArray, "\n");
 +
 +//									echo 'Value Type is '.$cellDataOfficeAttributes['value-type'].'<br />';
 +									switch ($cellDataOfficeAttributes['value-type']) {
 + 										case 'string' :
 +												$type = PHPExcel_Cell_DataType::TYPE_STRING;
 +												$dataValue = $allCellDataText;
 +												if (isset($dataValue->a)) {
 +													$dataValue = $dataValue->a;
 +													$cellXLinkAttributes = $dataValue->attributes($namespacesContent['xlink']);
 +													$hyperlink = $cellXLinkAttributes['href'];
 +												}
 +												break;
 +										case 'boolean' :
 +												$type = PHPExcel_Cell_DataType::TYPE_BOOL;
 +												$dataValue = ($allCellDataText == 'TRUE') ? True : False;
 +												break;
 +										case 'percentage' :
 +												$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +												$dataValue = (float) $cellDataOfficeAttributes['value'];
 +												if (floor($dataValue) == $dataValue) {
 +													$dataValue = (integer) $dataValue;
 +												}
 +												$formatting = PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00;
 +												break;
 +										case 'currency' :
 +												$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +												$dataValue = (float) $cellDataOfficeAttributes['value'];
 +												if (floor($dataValue) == $dataValue) {
 +													$dataValue = (integer) $dataValue;
 +												}
 +												$formatting = PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE;
 +												break;
 +										case 'float' :
 +												$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +												$dataValue = (float) $cellDataOfficeAttributes['value'];
 +												if (floor($dataValue) == $dataValue) {
 +													if ($dataValue = (integer) $dataValue)
 +														$dataValue = (integer) $dataValue;
 +													else
 +														$dataValue = (float) $dataValue;
 +												}
 +												break;
 +										case 'date' :
 +												$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +											    $dateObj = new DateTime($cellDataOfficeAttributes['date-value'], $GMT);
 +												$dateObj->setTimeZone($timezoneObj);
 +												list($year,$month,$day,$hour,$minute,$second) = explode(' ',$dateObj->format('Y m d H i s'));
 +												$dataValue = PHPExcel_Shared_Date::FormattedPHPToExcel($year,$month,$day,$hour,$minute,$second);
 +												if ($dataValue != floor($dataValue)) {
 +													$formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15.' '.PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4;
 +												} else {
 +													$formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15;
 +												}
 +												break;
 +										case 'time' :
 +												$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
 +												$dataValue = PHPExcel_Shared_Date::PHPToExcel(strtotime('01-01-1970 '.implode(':',sscanf($cellDataOfficeAttributes['time-value'],'PT%dH%dM%dS'))));
 +												$formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4;
 +												break;
 +									}
 +//									echo 'Data value is '.$dataValue.'<br />';
 +//									if ($hyperlink !== NULL) {
 +//										echo 'Hyperlink is '.$hyperlink.'<br />';
 +//									}
 +								} else {
 +									$type = PHPExcel_Cell_DataType::TYPE_NULL;
 +									$dataValue = NULL;
 +								}
 +
 +								if ($hasCalculatedValue) {
 +									$type = PHPExcel_Cell_DataType::TYPE_FORMULA;
 +//									echo 'Formula: '.$cellDataFormula.'<br />';
 +									$cellDataFormula = substr($cellDataFormula,strpos($cellDataFormula,':=')+1);
 +									$temp = explode('"',$cellDataFormula);
 +									$tKey = false;
 +									foreach($temp as &$value) {
 +										//	Only replace in alternate array entries (i.e. non-quoted blocks)
 +										if ($tKey = !$tKey) {
 +											$value = preg_replace('/\[\.(.*):\.(.*)\]/Ui','$1:$2',$value);
 +											$value = preg_replace('/\[\.(.*)\]/Ui','$1',$value);
 +											$value = PHPExcel_Calculation::_translateSeparator(';',',',$value,$inBraces);
 +										}
 +									}
 +									unset($value);
 +									//	Then rebuild the formula string
 +									$cellDataFormula = implode('"',$temp);
 +//									echo 'Adjusted Formula: '.$cellDataFormula.'<br />';
 +								}
 +
 +								$colRepeats = (isset($cellDataTableAttributes['number-columns-repeated'])) ?
 +									$cellDataTableAttributes['number-columns-repeated'] : 1;
 +								if ($type !== NULL) {
 +									for ($i = 0; $i < $colRepeats; ++$i) {
 +										if ($i > 0) {
 +											++$columnID;
 +										}
 +										if ($type !== PHPExcel_Cell_DataType::TYPE_NULL) {
 +											for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) {
 +												$rID = $rowID + $rowAdjust;
 +												$objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $dataValue),$type);
 +												if ($hasCalculatedValue) {
 +//													echo 'Forumla result is '.$dataValue.'<br />';
 +													$objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->setCalculatedValue($dataValue);
 +												}
 +												if ($formatting !== NULL) {
 +													$objPHPExcel->getActiveSheet()->getStyle($columnID.$rID)->getNumberFormat()->setFormatCode($formatting);
 +												} else {
 +													$objPHPExcel->getActiveSheet()->getStyle($columnID.$rID)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_GENERAL);
 +												}
 +												if ($hyperlink !== NULL) {
 +													$objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->getHyperlink()->setUrl($hyperlink);
 +												}
 +											}
 +										}
 +									}
 +								}
 +
 +								//	Merged cells
 +								if ((isset($cellDataTableAttributes['number-columns-spanned'])) || (isset($cellDataTableAttributes['number-rows-spanned']))) {
 +									if (($type !== PHPExcel_Cell_DataType::TYPE_NULL) || (!$this->_readDataOnly)) {
 +										$columnTo = $columnID;
 +										if (isset($cellDataTableAttributes['number-columns-spanned'])) {
 +											$columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cellDataTableAttributes['number-columns-spanned'] -2);
 +										}
 +										$rowTo = $rowID;
 +										if (isset($cellDataTableAttributes['number-rows-spanned'])) {
 +											$rowTo = $rowTo + $cellDataTableAttributes['number-rows-spanned'] - 1;
 +										}
 +										$cellRange = $columnID.$rowID.':'.$columnTo.$rowTo;
 +										$objPHPExcel->getActiveSheet()->mergeCells($cellRange);
 +									}
 +								}
 +
 +								++$columnID;
 +							}
 +							$rowID += $rowRepeats;
 +							break;
 +					}
 +				}
 +				++$worksheetID;
 +			}
 +		}
 +
 +		// Return
 +		return $objPHPExcel;
 +	}
 +
 +
 +	private function _parseRichText($is = '') {
 +		$value = new PHPExcel_RichText();
 +
 +		$value->createText($is);
 +
 +		return $value;
 +	}
 +
 +}
diff --cc 3rdparty/Sabre/DAV/Client.php
index 07c2895,0000000..9850bfe
mode 100644,000000..100644
--- a/3rdparty/Sabre/DAV/Client.php
+++ b/3rdparty/Sabre/DAV/Client.php
@@@ -1,563 -1,0 +1,567 @@@
 +<?php
 +
 +/**
 + * SabreDAV DAV client
 + *
 + * This client wraps around Curl to provide a convenient API to a WebDAV
 + * server.
 + *
 + * NOTE: This class is experimental, it's api will likely change in the future.
 + *
 + * @package Sabre
 + * @subpackage DAVClient
 + * @copyright Copyright (C) 2007-2013 Rooftop Solutions. All rights reserved.
 + * @author Evert Pot (http://www.rooftopsolutions.nl/)
 + * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
 + */
 +class Sabre_DAV_Client {
 +
 +    /**
 +     * The propertyMap is a key-value array.
 +     *
 +     * If you use the propertyMap, any {DAV:}multistatus responses with the
 +     * proeprties listed in this array, will automatically be mapped to a
 +     * respective class.
 +     *
 +     * The {DAV:}resourcetype property is automatically added. This maps to
 +     * Sabre_DAV_Property_ResourceType
 +     *
 +     * @var array
 +     */
 +    public $propertyMap = array();
 +
 +    protected $baseUri;
 +    protected $userName;
 +    protected $password;
 +    protected $proxy;
 +    protected $trustedCertificates;
 +
 +    /**
 +     * Basic authentication
 +     */
 +    const AUTH_BASIC = 1;
 +
 +    /**
 +     * Digest authentication
 +     */
 +    const AUTH_DIGEST = 2;
 +
 +    /**
 +     * The authentication type we're using.
 +     *
 +     * This is a bitmask of AUTH_BASIC and AUTH_DIGEST.
 +     *
 +     * If DIGEST is used, the client makes 1 extra request per request, to get
 +     * the authentication tokens.
 +     *
 +     * @var int
 +     */
 +    protected $authType;
 +
 +    /**
 +     * Indicates if SSL verification is enabled or not.
 +     *
 +     * @var boolean
 +     */
 +    private $verifyPeer;
 +
 +    /**
 +     * Constructor
 +     *
 +     * Settings are provided through the 'settings' argument. The following
 +     * settings are supported:
 +     *
 +     *   * baseUri
 +     *   * userName (optional)
 +     *   * password (optional)
 +     *   * proxy (optional)
 +     *
 +     * @param array $settings
 +     */
 +    public function __construct(array $settings) {
 +
 +        if (!isset($settings['baseUri'])) {
 +            throw new InvalidArgumentException('A baseUri must be provided');
 +        }
 +
 +        $validSettings = array(
 +            'baseUri',
 +            'userName',
 +            'password',
 +            'proxy',
 +        );
 +
 +        foreach($validSettings as $validSetting) {
 +            if (isset($settings[$validSetting])) {
 +                $this->$validSetting = $settings[$validSetting];
 +            }
 +        }
 +
 +        if (isset($settings['authType'])) {
 +            $this->authType = $settings['authType'];
 +        } else {
 +            $this->authType = self::AUTH_BASIC | self::AUTH_DIGEST;
 +        }
 +
 +        $this->propertyMap['{DAV:}resourcetype'] = 'Sabre_DAV_Property_ResourceType';
 +
 +    }
 +
 +    /**
 +     * Add trusted root certificates to the webdav client.
 +     *
 +     * The parameter certificates should be a absolute path to a file
 +     * which contains all trusted certificates
 +     *
 +     * @param string $certificates
 +     */
 +    public function addTrustedCertificates($certificates) {
 +        $this->trustedCertificates = $certificates;
 +    }
 +
 +    /**
 +     * Enables/disables SSL peer verification
 +     *
 +     * @param boolean $value
 +     */
 +    public function setVerifyPeer($value) {
 +        $this->verifyPeer = $value;
 +    }
 +
 +    /**
 +     * Does a PROPFIND request
 +     *
 +     * The list of requested properties must be specified as an array, in clark
 +     * notation.
 +     *
 +     * The returned array will contain a list of filenames as keys, and
 +     * properties as values.
 +     *
 +     * The properties array will contain the list of properties. Only properties
 +     * that are actually returned from the server (without error) will be
 +     * returned, anything else is discarded.
 +     *
 +     * Depth should be either 0 or 1. A depth of 1 will cause a request to be
 +     * made to the server to also return all child resources.
 +     *
 +     * @param string $url
 +     * @param array $properties
 +     * @param int $depth
 +     * @return array
 +     */
 +    public function propFind($url, array $properties, $depth = 0) {
 +
 +        $body = '<?xml version="1.0"?>' . "\n";
 +        $body.= '<d:propfind xmlns:d="DAV:">' . "\n";
 +        $body.= '  <d:prop>' . "\n";
 +
 +        foreach($properties as $property) {
 +
 +            list(
 +                $namespace,
 +                $elementName
 +            ) = Sabre_DAV_XMLUtil::parseClarkNotation($property);
 +
 +            if ($namespace === 'DAV:') {
 +                $body.='    <d:' . $elementName . ' />' . "\n";
 +            } else {
 +                $body.="    <x:" . $elementName . " xmlns:x=\"" . $namespace . "\"/>\n";
 +            }
 +
 +        }
 +
 +        $body.= '  </d:prop>' . "\n";
 +        $body.= '</d:propfind>';
 +
 +        $response = $this->request('PROPFIND', $url, $body, array(
 +            'Depth' => $depth,
 +            'Content-Type' => 'application/xml'
 +        ));
 +
 +        $result = $this->parseMultiStatus($response['body']);
 +
 +        // If depth was 0, we only return the top item
 +        if ($depth===0) {
 +            reset($result);
 +            $result = current($result);
 +            return isset($result[200])?$result[200]:array();
 +        }
 +
 +        $newResult = array();
 +        foreach($result as $href => $statusList) {
 +
 +            $newResult[$href] = isset($statusList[200])?$statusList[200]:array();
 +
 +        }
 +
 +        return $newResult;
 +
 +    }
 +
 +    /**
 +     * Updates a list of properties on the server
 +     *
 +     * The list of properties must have clark-notation properties for the keys,
 +     * and the actual (string) value for the value. If the value is null, an
 +     * attempt is made to delete the property.
 +     *
 +     * @todo Must be building the request using the DOM, and does not yet
 +     *       support complex properties.
 +     * @param string $url
 +     * @param array $properties
 +     * @return void
 +     */
 +    public function propPatch($url, array $properties) {
 +
 +        $body = '<?xml version="1.0"?>' . "\n";
 +        $body.= '<d:propertyupdate xmlns:d="DAV:">' . "\n";
 +
 +        foreach($properties as $propName => $propValue) {
 +
 +            list(
 +                $namespace,
 +                $elementName
 +            ) = Sabre_DAV_XMLUtil::parseClarkNotation($propName);
 +
 +            if ($propValue === null) {
 +
 +                $body.="<d:remove><d:prop>\n";
 +
 +                if ($namespace === 'DAV:') {
 +                    $body.='    <d:' . $elementName . ' />' . "\n";
 +                } else {
 +                    $body.="    <x:" . $elementName . " xmlns:x=\"" . $namespace . "\"/>\n";
 +                }
 +
 +                $body.="</d:prop></d:remove>\n";
 +
 +            } else {
 +
 +                $body.="<d:set><d:prop>\n";
 +                if ($namespace === 'DAV:') {
 +                    $body.='    <d:' . $elementName . '>';
 +                } else {
 +                    $body.="    <x:" . $elementName . " xmlns:x=\"" . $namespace . "\">";
 +                }
 +                // Shitty.. i know
 +                $body.=htmlspecialchars($propValue, ENT_NOQUOTES, 'UTF-8');
 +                if ($namespace === 'DAV:') {
 +                    $body.='</d:' . $elementName . '>' . "\n";
 +                } else {
 +                    $body.="</x:" . $elementName . ">\n";
 +                }
 +                $body.="</d:prop></d:set>\n";
 +
 +            }
 +
 +        }
 +
 +        $body.= '</d:propertyupdate>';
 +
 +        $this->request('PROPPATCH', $url, $body, array(
 +            'Content-Type' => 'application/xml'
 +        ));
 +
 +    }
 +
 +    /**
 +     * Performs an HTTP options request
 +     *
 +     * This method returns all the features from the 'DAV:' header as an array.
 +     * If there was no DAV header, or no contents this method will return an
 +     * empty array.
 +     *
 +     * @return array
 +     */
 +    public function options() {
 +
 +        $result = $this->request('OPTIONS');
 +        if (!isset($result['headers']['dav'])) {
 +            return array();
 +        }
 +
 +        $features = explode(',', $result['headers']['dav']);
 +        foreach($features as &$v) {
 +            $v = trim($v);
 +        }
 +        return $features;
 +
 +    }
 +
 +    /**
 +     * Performs an actual HTTP request, and returns the result.
 +     *
 +     * If the specified url is relative, it will be expanded based on the base
 +     * url.
 +     *
 +     * The returned array contains 3 keys:
 +     *   * body - the response body
 +     *   * httpCode - a HTTP code (200, 404, etc)
 +     *   * headers - a list of response http headers. The header names have
 +     *     been lowercased.
 +     *
 +     * @param string $method
 +     * @param string $url
 +     * @param string $body
 +     * @param array $headers
 +     * @return array
 +     */
 +    public function request($method, $url = '', $body = null, $headers = array()) {
 +
 +        $url = $this->getAbsoluteUrl($url);
 +
 +        $curlSettings = array(
 +            CURLOPT_RETURNTRANSFER => true,
 +            // Return headers as part of the response
 +            CURLOPT_HEADER => true,
-             CURLOPT_POSTFIELDS => $body,
++            // For security we cast this to a string. If somehow an array could
++            // be passed here, it would be possible for an attacker to use @ to
++            // post local files.
++            CURLOPT_POSTFIELDS => (string)$body,
 +            // Automatically follow redirects
 +            CURLOPT_FOLLOWLOCATION => true,
 +            CURLOPT_MAXREDIRS => 5,
 +        );
 +
 +        if($this->verifyPeer !== null) {
 +            $curlSettings[CURLOPT_SSL_VERIFYPEER] = $this->verifyPeer;
 +        }
 +
 +        if($this->trustedCertificates) {
 +            $curlSettings[CURLOPT_CAINFO] = $this->trustedCertificates;
 +        }
 +
 +        switch ($method) {
 +            case 'HEAD' :
 +
 +                // do not read body with HEAD requests (this is necessary because cURL does not ignore the body with HEAD
 +                // requests when the Content-Length header is given - which in turn is perfectly valid according to HTTP
 +                // specs...) cURL does unfortunately return an error in this case ("transfer closed transfer closed with
 +                // ... bytes remaining to read") this can be circumvented by explicitly telling cURL to ignore the
 +                // response body
 +                $curlSettings[CURLOPT_NOBODY] = true;
 +                $curlSettings[CURLOPT_CUSTOMREQUEST] = 'HEAD';
 +                break;
 +
 +            default:
 +                $curlSettings[CURLOPT_CUSTOMREQUEST] = $method;
 +                break;
 +
 +        }
 +
 +        // Adding HTTP headers
 +        $nHeaders = array();
 +        foreach($headers as $key=>$value) {
 +
 +            $nHeaders[] = $key . ': ' . $value;
 +
 +        }
 +        $curlSettings[CURLOPT_HTTPHEADER] = $nHeaders;
 +
 +        if ($this->proxy) {
 +            $curlSettings[CURLOPT_PROXY] = $this->proxy;
 +        }
 +
 +        if ($this->userName && $this->authType) {
 +            $curlType = 0;
 +            if ($this->authType & self::AUTH_BASIC) {
 +                $curlType |= CURLAUTH_BASIC;
 +            }
 +            if ($this->authType & self::AUTH_DIGEST) {
 +                $curlType |= CURLAUTH_DIGEST;
 +            }
 +            $curlSettings[CURLOPT_HTTPAUTH] = $curlType;
 +            $curlSettings[CURLOPT_USERPWD] = $this->userName . ':' . $this->password;
 +        }
 +
 +        list(
 +            $response,
 +            $curlInfo,
 +            $curlErrNo,
 +            $curlError
 +        ) = $this->curlRequest($url, $curlSettings);
 +
 +        $headerBlob = substr($response, 0, $curlInfo['header_size']);
 +        $response = substr($response, $curlInfo['header_size']);
 +
 +        // In the case of 100 Continue, or redirects we'll have multiple lists
 +        // of headers for each separate HTTP response. We can easily split this
 +        // because they are separated by \r\n\r\n
 +        $headerBlob = explode("\r\n\r\n", trim($headerBlob, "\r\n"));
 +
 +        // We only care about the last set of headers
 +        $headerBlob = $headerBlob[count($headerBlob)-1];
 +
 +        // Splitting headers
 +        $headerBlob = explode("\r\n", $headerBlob);
 +
 +        $headers = array();
 +        foreach($headerBlob as $header) {
 +            $parts = explode(':', $header, 2);
 +            if (count($parts)==2) {
 +                $headers[strtolower(trim($parts[0]))] = trim($parts[1]);
 +            }
 +        }
 +
 +        $response = array(
 +            'body' => $response,
 +            'statusCode' => $curlInfo['http_code'],
 +            'headers' => $headers
 +        );
 +
 +        if ($curlErrNo) {
 +            throw new Sabre_DAV_Exception('[CURL] Error while making request: ' . $curlError . ' (error code: ' . $curlErrNo . ')');
 +        }
 +
 +        if ($response['statusCode']>=400) {
 +            switch ($response['statusCode']) {
 +                case 400 :
 +                    throw new Sabre_DAV_Exception_BadRequest('Bad request');
 +                case 401 :
 +                    throw new Sabre_DAV_Exception_NotAuthenticated('Not authenticated');
 +                case 402 :
 +                    throw new Sabre_DAV_Exception_PaymentRequired('Payment required');
 +                case 403 :
 +                    throw new Sabre_DAV_Exception_Forbidden('Forbidden');
 +                case 404:
 +                    throw new Sabre_DAV_Exception_NotFound('Resource not found.');
 +                case 405 :
 +                    throw new Sabre_DAV_Exception_MethodNotAllowed('Method not allowed');
 +                case 409 :
 +                    throw new Sabre_DAV_Exception_Conflict('Conflict');
 +                case 412 :
 +                    throw new Sabre_DAV_Exception_PreconditionFailed('Precondition failed');
 +                case 416 :
 +                    throw new Sabre_DAV_Exception_RequestedRangeNotSatisfiable('Requested Range Not Satisfiable');
 +                case 500 :
 +                    throw new Sabre_DAV_Exception('Internal server error');
 +                case 501 :
 +                    throw new Sabre_DAV_Exception_NotImplemented('Not Implemented');
 +                case 507 :
 +                    throw new Sabre_DAV_Exception_InsufficientStorage('Insufficient storage');
 +                default:
 +                    throw new Sabre_DAV_Exception('HTTP error response. (errorcode ' . $response['statusCode'] . ')');
 +            }
 +        }
 +
 +        return $response;
 +
 +    }
 +
 +    /**
 +     * Wrapper for all curl functions.
 +     *
 +     * The only reason this was split out in a separate method, is so it
 +     * becomes easier to unittest.
 +     *
 +     * @param string $url
 +     * @param array $settings
 +     * @return array
 +     */
 +    // @codeCoverageIgnoreStart
 +    protected function curlRequest($url, $settings) {
 +
 +        $curl = curl_init($url);
 +        curl_setopt_array($curl, $settings);
 +
 +        return array(
 +            curl_exec($curl),
 +            curl_getinfo($curl),
 +            curl_errno($curl),
 +            curl_error($curl)
 +        );
 +
 +    }
 +    // @codeCoverageIgnoreEnd
 +
 +    /**
 +     * Returns the full url based on the given url (which may be relative). All
 +     * urls are expanded based on the base url as given by the server.
 +     *
 +     * @param string $url
 +     * @return string
 +     */
 +    protected function getAbsoluteUrl($url) {
 +
 +        // If the url starts with http:// or https://, the url is already absolute.
 +        if (preg_match('/^http(s?):\/\//', $url)) {
 +            return $url;
 +        }
 +
 +        // If the url starts with a slash, we must calculate the url based off
 +        // the root of the base url.
 +        if (strpos($url,'/') === 0) {
 +            $parts = parse_url($this->baseUri);
 +            return $parts['scheme'] . '://' . $parts['host'] . (isset($parts['port'])?':' . $parts['port']:'') . $url;
 +        }
 +
 +        // Otherwise...
 +        return $this->baseUri . $url;
 +
 +    }
 +
 +    /**
 +     * Parses a WebDAV multistatus response body
 +     *
 +     * This method returns an array with the following structure
 +     *
 +     * array(
 +     *   'url/to/resource' => array(
 +     *     '200' => array(
 +     *        '{DAV:}property1' => 'value1',
 +     *        '{DAV:}property2' => 'value2',
 +     *     ),
 +     *     '404' => array(
 +     *        '{DAV:}property1' => null,
 +     *        '{DAV:}property2' => null,
 +     *     ),
 +     *   )
 +     *   'url/to/resource2' => array(
 +     *      .. etc ..
 +     *   )
 +     * )
 +     *
 +     *
 +     * @param string $body xml body
 +     * @return array
 +     */
 +    public function parseMultiStatus($body) {
 +
 +        $body = Sabre_DAV_XMLUtil::convertDAVNamespace($body);
 +
++	libxml_disable_entity_loader(true);
 +        $responseXML = simplexml_load_string($body, null, LIBXML_NOBLANKS | LIBXML_NOCDATA);
 +        if ($responseXML===false) {
 +            throw new InvalidArgumentException('The passed data is not valid XML');
 +        }
 +
 +        $responseXML->registerXPathNamespace('d', 'urn:DAV');
 +
 +        $propResult = array();
 +
 +        foreach($responseXML->xpath('d:response') as $response) {
 +            $response->registerXPathNamespace('d', 'urn:DAV');
 +            $href = $response->xpath('d:href');
 +            $href = (string)$href[0];
 +
 +            $properties = array();
 +
 +            foreach($response->xpath('d:propstat') as $propStat) {
 +
 +                $propStat->registerXPathNamespace('d', 'urn:DAV');
 +                $status = $propStat->xpath('d:status');
 +                list($httpVersion, $statusCode, $message) = explode(' ', (string)$status[0],3);
 +
 +                $properties[$statusCode] = Sabre_DAV_XMLUtil::parseProperties(dom_import_simplexml($propStat), $this->propertyMap);
 +
 +            }
 +
 +            $propResult[$href] = $properties;
 +
 +        }
 +
 +        return $propResult;
 +
 +    }
 +
 +}
diff --cc 3rdparty/Sabre/DAV/Locks/Plugin.php
index 5c37a71,0000000..e7fab2b
mode 100644,000000..100644
--- a/3rdparty/Sabre/DAV/Locks/Plugin.php
+++ b/3rdparty/Sabre/DAV/Locks/Plugin.php
@@@ -1,640 -1,0 +1,640 @@@
 +<?php
 +
 +/**
 + * Locking plugin
 + *
 + * This plugin provides locking support to a WebDAV server.
 + * The easiest way to get started, is by hooking it up as such:
 + *
 + * $lockBackend = new Sabre_DAV_Locks_Backend_File('./mylockdb');
 + * $lockPlugin = new Sabre_DAV_Locks_Plugin($lockBackend);
 + * $server->addPlugin($lockPlugin);
 + *
 + * @package Sabre
 + * @subpackage DAV
 + * @copyright Copyright (C) 2007-2013 Rooftop Solutions. All rights reserved.
 + * @author Evert Pot (http://www.rooftopsolutions.nl/)
 + * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
 + */
 +class Sabre_DAV_Locks_Plugin extends Sabre_DAV_ServerPlugin {
 +
 +    /**
 +     * locksBackend
 +     *
 +     * @var Sabre_DAV_Locks_Backend_Abstract
 +     */
 +    protected $locksBackend;
 +
 +    /**
 +     * server
 +     *
 +     * @var Sabre_DAV_Server
 +     */
 +    protected $server;
 +
 +    /**
 +     * __construct
 +     *
 +     * @param Sabre_DAV_Locks_Backend_Abstract $locksBackend
 +     */
 +    public function __construct(Sabre_DAV_Locks_Backend_Abstract $locksBackend = null) {
 +
 +        $this->locksBackend = $locksBackend;
 +
 +    }
 +
 +    /**
 +     * Initializes the plugin
 +     *
 +     * This method is automatically called by the Server class after addPlugin.
 +     *
 +     * @param Sabre_DAV_Server $server
 +     * @return void
 +     */
 +    public function initialize(Sabre_DAV_Server $server) {
 +
 +        $this->server = $server;
 +        $server->subscribeEvent('unknownMethod',array($this,'unknownMethod'));
 +        $server->subscribeEvent('beforeMethod',array($this,'beforeMethod'),50);
 +        $server->subscribeEvent('afterGetProperties',array($this,'afterGetProperties'));
 +
 +    }
 +
 +    /**
 +     * Returns a plugin name.
 +     *
 +     * Using this name other plugins will be able to access other plugins
 +     * using Sabre_DAV_Server::getPlugin
 +     *
 +     * @return string
 +     */
 +    public function getPluginName() {
 +
 +        return 'locks';
 +
 +    }
 +
 +    /**
 +     * This method is called by the Server if the user used an HTTP method
 +     * the server didn't recognize.
 +     *
 +     * This plugin intercepts the LOCK and UNLOCK methods.
 +     *
 +     * @param string $method
 +     * @param string $uri
 +     * @return bool
 +     */
 +    public function unknownMethod($method, $uri) {
 +
 +        switch($method) {
 +
 +            case 'LOCK'   : $this->httpLock($uri); return false;
 +            case 'UNLOCK' : $this->httpUnlock($uri); return false;
 +
 +        }
 +
 +    }
 +
 +    /**
 +     * This method is called after most properties have been found
 +     * it allows us to add in any Lock-related properties
 +     *
 +     * @param string $path
 +     * @param array $newProperties
 +     * @return bool
 +     */
 +    public function afterGetProperties($path, &$newProperties) {
 +
 +        foreach($newProperties[404] as $propName=>$discard) {
 +
 +            switch($propName) {
 +
 +                case '{DAV:}supportedlock' :
 +                    $val = false;
 +                    if ($this->locksBackend) $val = true;
 +                    $newProperties[200][$propName] = new Sabre_DAV_Property_SupportedLock($val);
 +                    unset($newProperties[404][$propName]);
 +                    break;
 +
 +                case '{DAV:}lockdiscovery' :
 +                    $newProperties[200][$propName] = new Sabre_DAV_Property_LockDiscovery($this->getLocks($path));
 +                    unset($newProperties[404][$propName]);
 +                    break;
 +
 +            }
 +
 +
 +        }
 +        return true;
 +
 +    }
 +
 +
 +    /**
 +     * This method is called before the logic for any HTTP method is
 +     * handled.
 +     *
 +     * This plugin uses that feature to intercept access to locked resources.
 +     *
 +     * @param string $method
 +     * @param string $uri
 +     * @return bool
 +     */
 +    public function beforeMethod($method, $uri) {
 +
 +        switch($method) {
 +
 +            case 'DELETE' :
 +                $lastLock = null;
 +                if (!$this->validateLock($uri,$lastLock, true))
 +                    throw new Sabre_DAV_Exception_Locked($lastLock);
 +                break;
 +            case 'MKCOL' :
 +            case 'PROPPATCH' :
 +            case 'PUT' :
 +            case 'PATCH' :
 +                $lastLock = null;
 +                if (!$this->validateLock($uri,$lastLock))
 +                    throw new Sabre_DAV_Exception_Locked($lastLock);
 +                break;
 +            case 'MOVE' :
 +                $lastLock = null;
 +                if (!$this->validateLock(array(
 +                      $uri,
 +                      $this->server->calculateUri($this->server->httpRequest->getHeader('Destination')),
 +                    ),$lastLock, true))
 +                        throw new Sabre_DAV_Exception_Locked($lastLock);
 +                break;
 +            case 'COPY' :
 +                $lastLock = null;
 +                if (!$this->validateLock(
 +                      $this->server->calculateUri($this->server->httpRequest->getHeader('Destination')),
 +                      $lastLock, true))
 +                        throw new Sabre_DAV_Exception_Locked($lastLock);
 +                break;
 +        }
 +
 +        return true;
 +
 +    }
 +
 +    /**
 +     * Use this method to tell the server this plugin defines additional
 +     * HTTP methods.
 +     *
 +     * This method is passed a uri. It should only return HTTP methods that are
 +     * available for the specified uri.
 +     *
 +     * @param string $uri
 +     * @return array
 +     */
 +    public function getHTTPMethods($uri) {
 +
 +        if ($this->locksBackend)
 +            return array('LOCK','UNLOCK');
 +
 +        return array();
 +
 +    }
 +
 +    /**
 +     * Returns a list of features for the HTTP OPTIONS Dav: header.
 +     *
 +     * In this case this is only the number 2. The 2 in the Dav: header
 +     * indicates the server supports locks.
 +     *
 +     * @return array
 +     */
 +    public function getFeatures() {
 +
 +        return array(2);
 +
 +    }
 +
 +    /**
 +     * Returns all lock information on a particular uri
 +     *
 +     * This function should return an array with Sabre_DAV_Locks_LockInfo objects. If there are no locks on a file, return an empty array.
 +     *
 +     * Additionally there is also the possibility of locks on parent nodes, so we'll need to traverse every part of the tree
 +     * If the $returnChildLocks argument is set to true, we'll also traverse all the children of the object
 +     * for any possible locks and return those as well.
 +     *
 +     * @param string $uri
 +     * @param bool $returnChildLocks
 +     * @return array
 +     */
 +    public function getLocks($uri, $returnChildLocks = false) {
 +
 +        $lockList = array();
 +
 +        if ($this->locksBackend)
 +            $lockList = array_merge($lockList,$this->locksBackend->getLocks($uri, $returnChildLocks));
 +
 +        return $lockList;
 +
 +    }
 +
 +    /**
 +     * Locks an uri
 +     *
 +     * The WebDAV lock request can be operated to either create a new lock on a file, or to refresh an existing lock
 +     * If a new lock is created, a full XML body should be supplied, containing information about the lock such as the type
 +     * of lock (shared or exclusive) and the owner of the lock
 +     *
 +     * If a lock is to be refreshed, no body should be supplied and there should be a valid If header containing the lock
 +     *
 +     * Additionally, a lock can be requested for a non-existent file. In these case we're obligated to create an empty file as per RFC4918:S7.3
 +     *
 +     * @param string $uri
 +     * @return void
 +     */
 +    protected function httpLock($uri) {
 +
 +        $lastLock = null;
 +        if (!$this->validateLock($uri,$lastLock)) {
 +
 +            // If the existing lock was an exclusive lock, we need to fail
 +            if (!$lastLock || $lastLock->scope == Sabre_DAV_Locks_LockInfo::EXCLUSIVE) {
 +                //var_dump($lastLock);
 +                throw new Sabre_DAV_Exception_ConflictingLock($lastLock);
 +            }
 +
 +        }
 +
 +        if ($body = $this->server->httpRequest->getBody(true)) {
 +            // This is a new lock request
 +            $lockInfo = $this->parseLockRequest($body);
 +            $lockInfo->depth = $this->server->getHTTPDepth();
 +            $lockInfo->uri = $uri;
 +            if($lastLock && $lockInfo->scope != Sabre_DAV_Locks_LockInfo::SHARED) throw new Sabre_DAV_Exception_ConflictingLock($lastLock);
 +
 +        } elseif ($lastLock) {
 +
 +            // This must have been a lock refresh
 +            $lockInfo = $lastLock;
 +
 +            // The resource could have been locked through another uri.
 +            if ($uri!=$lockInfo->uri) $uri = $lockInfo->uri;
 +
 +        } else {
 +
 +            // There was neither a lock refresh nor a new lock request
 +            throw new Sabre_DAV_Exception_BadRequest('An xml body is required for lock requests');
 +
 +        }
 +
 +        if ($timeout = $this->getTimeoutHeader()) $lockInfo->timeout = $timeout;
 +
 +        $newFile = false;
 +
 +        // If we got this far.. we should go check if this node actually exists. If this is not the case, we need to create it first
 +        try {
 +            $this->server->tree->getNodeForPath($uri);
 +
 +            // We need to call the beforeWriteContent event for RFC3744
 +            // Edit: looks like this is not used, and causing problems now.
 +            //
 +            // See Issue 222
 +            // $this->server->broadcastEvent('beforeWriteContent',array($uri));
 +
 +        } catch (Sabre_DAV_Exception_NotFound $e) {
 +
 +            // It didn't, lets create it
 +            $this->server->createFile($uri,fopen('php://memory','r'));
 +            $newFile = true;
 +
 +        }
 +
 +        $this->lockNode($uri,$lockInfo);
 +
 +        $this->server->httpResponse->setHeader('Content-Type','application/xml; charset=utf-8');
 +        $this->server->httpResponse->setHeader('Lock-Token','<opaquelocktoken:' . $lockInfo->token . '>');
 +        $this->server->httpResponse->sendStatus($newFile?201:200);
 +        $this->server->httpResponse->sendBody($this->generateLockResponse($lockInfo));
 +
 +    }
 +
 +    /**
 +     * Unlocks a uri
 +     *
 +     * This WebDAV method allows you to remove a lock from a node. The client should provide a valid locktoken through the Lock-token http header
 +     * The server should return 204 (No content) on success
 +     *
 +     * @param string $uri
 +     * @return void
 +     */
 +    protected function httpUnlock($uri) {
 +
 +        $lockToken = $this->server->httpRequest->getHeader('Lock-Token');
 +
 +        // If the locktoken header is not supplied, we need to throw a bad request exception
 +        if (!$lockToken) throw new Sabre_DAV_Exception_BadRequest('No lock token was supplied');
 +
 +        $locks = $this->getLocks($uri);
 +
 +        // Windows sometimes forgets to include < and > in the Lock-Token
 +        // header
 +        if ($lockToken[0]!=='<') $lockToken = '<' . $lockToken . '>';
 +
 +        foreach($locks as $lock) {
 +
 +            if ('<opaquelocktoken:' . $lock->token . '>' == $lockToken) {
 +
 +                $this->unlockNode($uri,$lock);
 +                $this->server->httpResponse->setHeader('Content-Length','0');
 +                $this->server->httpResponse->sendStatus(204);
 +                return;
 +
 +            }
 +
 +        }
 +
 +        // If we got here, it means the locktoken was invalid
 +        throw new Sabre_DAV_Exception_LockTokenMatchesRequestUri();
 +
 +    }
 +
 +    /**
 +     * Locks a uri
 +     *
 +     * All the locking information is supplied in the lockInfo object. The object has a suggested timeout, but this can be safely ignored
 +     * It is important that if the existing timeout is ignored, the property is overwritten, as this needs to be sent back to the client
 +     *
 +     * @param string $uri
 +     * @param Sabre_DAV_Locks_LockInfo $lockInfo
 +     * @return bool
 +     */
 +    public function lockNode($uri,Sabre_DAV_Locks_LockInfo $lockInfo) {
 +
 +        if (!$this->server->broadcastEvent('beforeLock',array($uri,$lockInfo))) return;
 +
 +        if ($this->locksBackend) return $this->locksBackend->lock($uri,$lockInfo);
 +        throw new Sabre_DAV_Exception_MethodNotAllowed('Locking support is not enabled for this resource. No Locking backend was found so if you didn\'t expect this error, please check your configuration.');
 +
 +    }
 +
 +    /**
 +     * Unlocks a uri
 +     *
 +     * This method removes a lock from a uri. It is assumed all the supplied information is correct and verified
 +     *
 +     * @param string $uri
 +     * @param Sabre_DAV_Locks_LockInfo $lockInfo
 +     * @return bool
 +     */
 +    public function unlockNode($uri,Sabre_DAV_Locks_LockInfo $lockInfo) {
 +
 +        if (!$this->server->broadcastEvent('beforeUnlock',array($uri,$lockInfo))) return;
 +        if ($this->locksBackend) return $this->locksBackend->unlock($uri,$lockInfo);
 +
 +    }
 +
 +
 +    /**
 +     * Returns the contents of the HTTP Timeout header.
 +     *
 +     * The method formats the header into an integer.
 +     *
 +     * @return int
 +     */
 +    public function getTimeoutHeader() {
 +
 +        $header = $this->server->httpRequest->getHeader('Timeout');
 +
 +        if ($header) {
 +
 +            if (stripos($header,'second-')===0) $header = (int)(substr($header,7));
 +            else if (strtolower($header)=='infinite') $header=Sabre_DAV_Locks_LockInfo::TIMEOUT_INFINITE;
 +            else throw new Sabre_DAV_Exception_BadRequest('Invalid HTTP timeout header');
 +
 +        } else {
 +
 +            $header = 0;
 +
 +        }
 +
 +        return $header;
 +
 +    }
 +
 +    /**
 +     * Generates the response for successful LOCK requests
 +     *
 +     * @param Sabre_DAV_Locks_LockInfo $lockInfo
 +     * @return string
 +     */
 +    protected function generateLockResponse(Sabre_DAV_Locks_LockInfo $lockInfo) {
 +
 +        $dom = new DOMDocument('1.0','utf-8');
 +        $dom->formatOutput = true;
 +
 +        $prop = $dom->createElementNS('DAV:','d:prop');
 +        $dom->appendChild($prop);
 +
 +        $lockDiscovery = $dom->createElementNS('DAV:','d:lockdiscovery');
 +        $prop->appendChild($lockDiscovery);
 +
 +        $lockObj = new Sabre_DAV_Property_LockDiscovery(array($lockInfo),true);
 +        $lockObj->serialize($this->server,$lockDiscovery);
 +
 +        return $dom->saveXML();
 +
 +    }
 +
 +    /**
 +     * validateLock should be called when a write operation is about to happen
 +     * It will check if the requested url is locked, and see if the correct lock tokens are passed
 +     *
 +     * @param mixed $urls List of relevant urls. Can be an array, a string or nothing at all for the current request uri
 +     * @param mixed $lastLock This variable will be populated with the last checked lock object (Sabre_DAV_Locks_LockInfo)
 +     * @param bool $checkChildLocks If set to true, this function will also look for any locks set on child resources of the supplied urls. This is needed for for example deletion of entire trees.
 +     * @return bool
 +     */
 +    protected function validateLock($urls = null,&$lastLock = null, $checkChildLocks = false) {
 +
 +        if (is_null($urls)) {
 +            $urls = array($this->server->getRequestUri());
 +        } elseif (is_string($urls)) {
 +            $urls = array($urls);
 +        } elseif (!is_array($urls)) {
 +            throw new Sabre_DAV_Exception('The urls parameter should either be null, a string or an array');
 +        }
 +
 +        $conditions = $this->getIfConditions();
 +
 +        // We're going to loop through the urls and make sure all lock conditions are satisfied
 +        foreach($urls as $url) {
 +
 +            $locks = $this->getLocks($url, $checkChildLocks);
 +
 +            // If there were no conditions, but there were locks, we fail
 +            if (!$conditions && $locks) {
 +                reset($locks);
 +                $lastLock = current($locks);
 +                return false;
 +            }
 +
 +            // If there were no locks or conditions, we go to the next url
 +            if (!$locks && !$conditions) continue;
 +
 +            foreach($conditions as $condition) {
 +
 +                if (!$condition['uri']) {
 +                    $conditionUri = $this->server->getRequestUri();
 +                } else {
 +                    $conditionUri = $this->server->calculateUri($condition['uri']);
 +                }
 +
 +                // If the condition has a url, and it isn't part of the affected url at all, check the next condition
 +                if ($conditionUri && strpos($url,$conditionUri)!==0) continue;
 +
 +                // The tokens array contians arrays with 2 elements. 0=true/false for normal/not condition, 1=locktoken
 +                // At least 1 condition has to be satisfied
 +                foreach($condition['tokens'] as $conditionToken) {
 +
 +                    $etagValid = true;
 +                    $lockValid  = true;
 +
 +                    // key 2 can contain an etag
 +                    if ($conditionToken[2]) {
 +
 +                        $uri = $conditionUri?$conditionUri:$this->server->getRequestUri();
 +                        $node = $this->server->tree->getNodeForPath($uri);
 +                        $etagValid = $node->getETag()==$conditionToken[2];
 +
 +                    }
 +
 +                    // key 1 can contain a lock token
 +                    if ($conditionToken[1]) {
 +
 +                        $lockValid = false;
 +                        // Match all the locks
 +                        foreach($locks as $lockIndex=>$lock) {
 +
 +                            $lockToken = 'opaquelocktoken:' . $lock->token;
 +
 +                            // Checking NOT
 +                            if (!$conditionToken[0] && $lockToken != $conditionToken[1]) {
 +
 +                                // Condition valid, onto the next
 +                                $lockValid = true;
 +                                break;
 +                            }
 +                            if ($conditionToken[0] && $lockToken == $conditionToken[1]) {
 +
 +                                $lastLock = $lock;
 +                                // Condition valid and lock matched
 +                                unset($locks[$lockIndex]);
 +                                $lockValid = true;
 +                                break;
 +
 +                            }
 +
 +                        }
 +
 +                    }
 +
 +                    // If, after checking both etags and locks they are stil valid,
 +                    // we can continue with the next condition.
 +                    if ($etagValid && $lockValid) continue 2;
 +               }
 +               // No conditions matched, so we fail
 +               throw new Sabre_DAV_Exception_PreconditionFailed('The tokens provided in the if header did not match','If');
 +            }
 +
 +            // Conditions were met, we'll also need to check if all the locks are gone
 +            if (count($locks)) {
 +
 +                reset($locks);
 +
 +                // There's still locks, we fail
 +                $lastLock = current($locks);
 +                return false;
 +
 +            }
 +
 +
 +        }
 +
 +        // We got here, this means every condition was satisfied
 +        return true;
 +
 +    }
 +
 +    /**
 +     * This method is created to extract information from the WebDAV HTTP 'If:' header
 +     *
 +     * The If header can be quite complex, and has a bunch of features. We're using a regex to extract all relevant information
 +     * The function will return an array, containing structs with the following keys
 +     *
 +     *   * uri   - the uri the condition applies to. If this is returned as an
 +     *     empty string, this implies it's referring to the request url.
 +     *   * tokens - The lock token. another 2 dimensional array containing 2 elements (0 = true/false.. If this is a negative condition its set to false, 1 = the actual token)
 +     *   * etag - an etag, if supplied
 +     *
 +     * @return array
 +     */
 +    public function getIfConditions() {
 +
 +        $header = $this->server->httpRequest->getHeader('If');
 +        if (!$header) return array();
 +
 +        $matches = array();
 +
 +        $regex = '/(?:\<(?P<uri>.*?)\>\s)?\((?P<not>Not\s)?(?:\<(?P<token>[^\>]*)\>)?(?:\s?)(?:\[(?P<etag>[^\]]*)\])?\)/im';
 +        preg_match_all($regex,$header,$matches,PREG_SET_ORDER);
 +
 +        $conditions = array();
 +
 +        foreach($matches as $match) {
 +
 +            $condition = array(
 +                'uri'   => $match['uri'],
 +                'tokens' => array(
 +                    array($match['not']?0:1,$match['token'],isset($match['etag'])?$match['etag']:'')
 +                ),
 +            );
 +
 +            if (!$condition['uri'] && count($conditions)) $conditions[count($conditions)-1]['tokens'][] = array(
 +                $match['not']?0:1,
 +                $match['token'],
 +                isset($match['etag'])?$match['etag']:''
 +            );
 +            else {
 +                $conditions[] = $condition;
 +            }
 +
 +        }
 +
 +        return $conditions;
 +
 +    }
 +
 +    /**
 +     * Parses a webdav lock xml body, and returns a new Sabre_DAV_Locks_LockInfo object
 +     *
 +     * @param string $body
 +     * @return Sabre_DAV_Locks_LockInfo
 +     */
 +    protected function parseLockRequest($body) {
- 
++	libxml_disable_entity_loader(true);
 +        $xml = simplexml_load_string(
 +            Sabre_DAV_XMLUtil::convertDAVNamespace($body),
 +            null,
 +            LIBXML_NOWARNING);
 +        $xml->registerXPathNamespace('d','urn:DAV');
 +        $lockInfo = new Sabre_DAV_Locks_LockInfo();
 +
 +        $children = $xml->children("urn:DAV");
 +        $lockInfo->owner = (string)$children->owner;
 +
 +        $lockInfo->token = Sabre_DAV_UUIDUtil::getUUID();
 +        $lockInfo->scope = count($xml->xpath('d:lockscope/d:exclusive'))>0?Sabre_DAV_Locks_LockInfo::EXCLUSIVE:Sabre_DAV_Locks_LockInfo::SHARED;
 +
 +        return $lockInfo;
 +
 +    }
 +
 +
 +}
diff --cc 3rdparty/Sabre/DAV/XMLUtil.php
index 8153382,0000000..faa3f3a
mode 100644,000000..100644
--- a/3rdparty/Sabre/DAV/XMLUtil.php
+++ b/3rdparty/Sabre/DAV/XMLUtil.php
@@@ -1,187 -1,0 +1,188 @@@
 +<?php
 +
 +/**
 + * XML utilities for WebDAV
 + *
 + * @package Sabre
 + * @subpackage DAV
 + * @copyright Copyright (C) 2007-2013 Rooftop Solutions. All rights reserved.
 + * @author Evert Pot (http://www.rooftopsolutions.nl/)
 + * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
 + */
 +class Sabre_DAV_XMLUtil {
 +
 +    /**
 +     * Returns the 'clark notation' for an element.
 +     *
 +     * For example, and element encoded as:
 +     * <b:myelem xmlns:b="http://www.example.org/" />
 +     * will be returned as:
 +     * {http://www.example.org}myelem
 +     *
 +     * This format is used throughout the SabreDAV sourcecode.
 +     * Elements encoded with the urn:DAV namespace will
 +     * be returned as if they were in the DAV: namespace. This is to avoid
 +     * compatibility problems.
 +     *
 +     * This function will return null if a nodetype other than an Element is passed.
 +     *
 +     * @param DOMNode $dom
 +     * @return string
 +     */
 +    static function toClarkNotation(DOMNode $dom) {
 +
 +        if ($dom->nodeType !== XML_ELEMENT_NODE) return null;
 +
 +        // Mapping back to the real namespace, in case it was dav
 +        if ($dom->namespaceURI=='urn:DAV') $ns = 'DAV:'; else $ns = $dom->namespaceURI;
 +
 +        // Mapping to clark notation
 +        return '{' . $ns . '}' . $dom->localName;
 +
 +    }
 +
 +    /**
 +     * Parses a clark-notation string, and returns the namespace and element
 +     * name components.
 +     *
 +     * If the string was invalid, it will throw an InvalidArgumentException.
 +     *
 +     * @param string $str
 +     * @throws InvalidArgumentException
 +     * @return array
 +     */
 +    static function parseClarkNotation($str) {
 +
 +        if (!preg_match('/^{([^}]*)}(.*)$/',$str,$matches)) {
 +            throw new InvalidArgumentException('\'' . $str . '\' is not a valid clark-notation formatted string');
 +        }
 +
 +        return array(
 +            $matches[1],
 +            $matches[2]
 +        );
 +
 +    }
 +
 +    /**
 +     * This method takes an XML document (as string) and converts all instances of the
 +     * DAV: namespace to urn:DAV
 +     *
 +     * This is unfortunately needed, because the DAV: namespace violates the xml namespaces
 +     * spec, and causes the DOM to throw errors
 +     *
 +     * @param string $xmlDocument
 +     * @return array|string|null
 +     */
 +    static function convertDAVNamespace($xmlDocument) {
 +
 +        // This is used to map the DAV: namespace to urn:DAV. This is needed, because the DAV:
 +        // namespace is actually a violation of the XML namespaces specification, and will cause errors
 +        return preg_replace("/xmlns(:[A-Za-z0-9_]*)?=(\"|\')DAV:(\\2)/","xmlns\\1=\\2urn:DAV\\2",$xmlDocument);
 +
 +    }
 +
 +    /**
 +     * This method provides a generic way to load a DOMDocument for WebDAV use.
 +     *
 +     * This method throws a Sabre_DAV_Exception_BadRequest exception for any xml errors.
 +     * It does not preserve whitespace, and it converts the DAV: namespace to urn:DAV.
 +     *
 +     * @param string $xml
 +     * @throws Sabre_DAV_Exception_BadRequest
 +     * @return DOMDocument
 +     */
 +    static function loadDOMDocument($xml) {
 +
 +        if (empty($xml))
 +            throw new Sabre_DAV_Exception_BadRequest('Empty XML document sent');
 +
 +        // The BitKinex client sends xml documents as UTF-16. PHP 5.3.1 (and presumably lower)
 +        // does not support this, so we must intercept this and convert to UTF-8.
 +        if (substr($xml,0,12) === "\x3c\x00\x3f\x00\x78\x00\x6d\x00\x6c\x00\x20\x00") {
 +
 +            // Note: the preceeding byte sequence is "<?xml" encoded as UTF_16, without the BOM.
 +            $xml = iconv('UTF-16LE','UTF-8',$xml);
 +
 +            // Because the xml header might specify the encoding, we must also change this.
 +            // This regex looks for the string encoding="UTF-16" and replaces it with
 +            // encoding="UTF-8".
 +            $xml = preg_replace('|<\?xml([^>]*)encoding="UTF-16"([^>]*)>|u','<?xml\1encoding="UTF-8"\2>',$xml);
 +
 +        }
 +
 +        // Retaining old error setting
 +        $oldErrorSetting =  libxml_use_internal_errors(true);
++	libxml_disable_entity_loader(true);
 +
 +        // Clearing any previous errors
 +        libxml_clear_errors();
 +
 +        $dom = new DOMDocument();
 +
 +        // We don't generally care about any whitespace
 +        $dom->preserveWhiteSpace = false;
 +        
-         $dom->loadXML(self::convertDAVNamespace($xml),LIBXML_NOWARNING | LIBXML_NOERROR);
++        $dom->loadXML(self::convertDAVNamespace($xml),LIBXML_NOWARNING | LIBXML_NOERROR | LIBXML_DTDLOAD | LIBXML_DTDATTR);
 +
 +        if ($error = libxml_get_last_error()) {
 +            libxml_clear_errors();
 +            throw new Sabre_DAV_Exception_BadRequest('The request body had an invalid XML body. (message: ' . $error->message . ', errorcode: ' . $error->code . ', line: ' . $error->line . ')');
 +        }
 +
 +        // Restoring old mechanism for error handling
 +        if ($oldErrorSetting===false) libxml_use_internal_errors(false);
 +
 +        return $dom;
 +
 +    }
 +
 +    /**
 +     * Parses all WebDAV properties out of a DOM Element
 +     *
 +     * Generally WebDAV properties are enclosed in {DAV:}prop elements. This
 +     * method helps by going through all these and pulling out the actual
 +     * propertynames, making them array keys and making the property values,
 +     * well.. the array values.
 +     *
 +     * If no value was given (self-closing element) null will be used as the
 +     * value. This is used in for example PROPFIND requests.
 +     *
 +     * Complex values are supported through the propertyMap argument. The
 +     * propertyMap should have the clark-notation properties as it's keys, and
 +     * classnames as values.
 +     *
 +     * When any of these properties are found, the unserialize() method will be
 +     * (statically) called. The result of this method is used as the value.
 +     *
 +     * @param DOMElement $parentNode
 +     * @param array $propertyMap
 +     * @return array
 +     */
 +    static function parseProperties(DOMElement $parentNode, array $propertyMap = array()) {
 +
 +        $propList = array();
 +        foreach($parentNode->childNodes as $propNode) {
 +
 +            if (Sabre_DAV_XMLUtil::toClarkNotation($propNode)!=='{DAV:}prop') continue;
 +
 +            foreach($propNode->childNodes as $propNodeData) {
 +
 +                /* If there are no elements in here, we actually get 1 text node, this special case is dedicated to netdrive */
 +                if ($propNodeData->nodeType != XML_ELEMENT_NODE) continue;
 +
 +                $propertyName = Sabre_DAV_XMLUtil::toClarkNotation($propNodeData);
 +                if (isset($propertyMap[$propertyName])) {
 +                    $propList[$propertyName] = call_user_func(array($propertyMap[$propertyName],'unserialize'),$propNodeData);
 +                } else {
 +                    $propList[$propertyName] = $propNodeData->textContent;
 +                }
 +            }
 +
 +
 +        }
 +        return $propList;
 +
 +    }
 +
 +}
diff --cc 3rdparty/getid3/getid3.lib.php
index 08c3067,0000000..b7d05b3
mode 100644,000000..100644
--- a/3rdparty/getid3/getid3.lib.php
+++ b/3rdparty/getid3/getid3.lib.php
@@@ -1,1342 -1,0 +1,1343 @@@
 +<?php
 +/////////////////////////////////////////////////////////////////
 +/// getID3() by James Heinrich <info at getid3.org>               //
 +//  available at http://getid3.sourceforge.net                 //
 +//            or http://www.getid3.org                         //
 +/////////////////////////////////////////////////////////////////
 +//                                                             //
 +// getid3.lib.php - part of getID3()                           //
 +// See readme.txt for more details                             //
 +//                                                            ///
 +/////////////////////////////////////////////////////////////////
 +
 +
 +class getid3_lib
 +{
 +
 +	public static function PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8') {
 +		$returnstring = '';
 +		for ($i = 0; $i < strlen($string); $i++) {
 +			if ($hex) {
 +				$returnstring .= str_pad(dechex(ord($string{$i})), 2, '0', STR_PAD_LEFT);
 +			} else {
 +				$returnstring .= ' '.(preg_match("#[\x20-\x7E]#", $string{$i}) ? $string{$i} : '�');
 +			}
 +			if ($spaces) {
 +				$returnstring .= ' ';
 +			}
 +		}
 +		if (!empty($htmlencoding)) {
 +			if ($htmlencoding === true) {
 +				$htmlencoding = 'UTF-8'; // prior to getID3 v1.9.0 the function's 4th parameter was boolean
 +			}
 +			$returnstring = htmlentities($returnstring, ENT_QUOTES, $htmlencoding);
 +		}
 +		return $returnstring;
 +	}
 +
 +	public static function trunc($floatnumber) {
 +		// truncates a floating-point number at the decimal point
 +		// returns int (if possible, otherwise float)
 +		if ($floatnumber >= 1) {
 +			$truncatednumber = floor($floatnumber);
 +		} elseif ($floatnumber <= -1) {
 +			$truncatednumber = ceil($floatnumber);
 +		} else {
 +			$truncatednumber = 0;
 +		}
 +		if (self::intValueSupported($truncatednumber)) {
 +			$truncatednumber = (int) $truncatednumber;
 +		}
 +		return $truncatednumber;
 +	}
 +
 +
 +	public static function safe_inc(&$variable, $increment=1) {
 +		if (isset($variable)) {
 +			$variable += $increment;
 +		} else {
 +			$variable = $increment;
 +		}
 +		return true;
 +	}
 +
 +	public static function CastAsInt($floatnum) {
 +		// convert to float if not already
 +		$floatnum = (float) $floatnum;
 +
 +		// convert a float to type int, only if possible
 +		if (self::trunc($floatnum) == $floatnum) {
 +			// it's not floating point
 +			if (self::intValueSupported($floatnum)) {
 +				// it's within int range
 +				$floatnum = (int) $floatnum;
 +			}
 +		}
 +		return $floatnum;
 +	}
 +
 +	public static function intValueSupported($num) {
 +		// check if integers are 64-bit
 +		static $hasINT64 = null;
 +		if ($hasINT64 === null) { // 10x faster than is_null()
 +			$hasINT64 = is_int(pow(2, 31)); // 32-bit int are limited to (2^31)-1
 +			if (!$hasINT64 && !defined('PHP_INT_MIN')) {
 +				define('PHP_INT_MIN', ~PHP_INT_MAX);
 +			}
 +		}
 +		// if integers are 64-bit - no other check required
 +		if ($hasINT64 || (($num <= PHP_INT_MAX) && ($num >= PHP_INT_MIN))) {
 +			return true;
 +		}
 +		return false;
 +	}
 +
 +	public static function DecimalizeFraction($fraction) {
 +		list($numerator, $denominator) = explode('/', $fraction);
 +		return $numerator / ($denominator ? $denominator : 1);
 +	}
 +
 +
 +	public static function DecimalBinary2Float($binarynumerator) {
 +		$numerator   = self::Bin2Dec($binarynumerator);
 +		$denominator = self::Bin2Dec('1'.str_repeat('0', strlen($binarynumerator)));
 +		return ($numerator / $denominator);
 +	}
 +
 +
 +	public static function NormalizeBinaryPoint($binarypointnumber, $maxbits=52) {
 +		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
 +		if (strpos($binarypointnumber, '.') === false) {
 +			$binarypointnumber = '0.'.$binarypointnumber;
 +		} elseif ($binarypointnumber{0} == '.') {
 +			$binarypointnumber = '0'.$binarypointnumber;
 +		}
 +		$exponent = 0;
 +		while (($binarypointnumber{0} != '1') || (substr($binarypointnumber, 1, 1) != '.')) {
 +			if (substr($binarypointnumber, 1, 1) == '.') {
 +				$exponent--;
 +				$binarypointnumber = substr($binarypointnumber, 2, 1).'.'.substr($binarypointnumber, 3);
 +			} else {
 +				$pointpos = strpos($binarypointnumber, '.');
 +				$exponent += ($pointpos - 1);
 +				$binarypointnumber = str_replace('.', '', $binarypointnumber);
 +				$binarypointnumber = $binarypointnumber{0}.'.'.substr($binarypointnumber, 1);
 +			}
 +		}
 +		$binarypointnumber = str_pad(substr($binarypointnumber, 0, $maxbits + 2), $maxbits + 2, '0', STR_PAD_RIGHT);
 +		return array('normalized'=>$binarypointnumber, 'exponent'=>(int) $exponent);
 +	}
 +
 +
 +	public static function Float2BinaryDecimal($floatvalue) {
 +		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
 +		$maxbits = 128; // to how many bits of precision should the calculations be taken?
 +		$intpart   = self::trunc($floatvalue);
 +		$floatpart = abs($floatvalue - $intpart);
 +		$pointbitstring = '';
 +		while (($floatpart != 0) && (strlen($pointbitstring) < $maxbits)) {
 +			$floatpart *= 2;
 +			$pointbitstring .= (string) self::trunc($floatpart);
 +			$floatpart -= self::trunc($floatpart);
 +		}
 +		$binarypointnumber = decbin($intpart).'.'.$pointbitstring;
 +		return $binarypointnumber;
 +	}
 +
 +
 +	public static function Float2String($floatvalue, $bits) {
 +		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-expl.html
 +		switch ($bits) {
 +			case 32:
 +				$exponentbits = 8;
 +				$fractionbits = 23;
 +				break;
 +
 +			case 64:
 +				$exponentbits = 11;
 +				$fractionbits = 52;
 +				break;
 +
 +			default:
 +				return false;
 +				break;
 +		}
 +		if ($floatvalue >= 0) {
 +			$signbit = '0';
 +		} else {
 +			$signbit = '1';
 +		}
 +		$normalizedbinary  = self::NormalizeBinaryPoint(self::Float2BinaryDecimal($floatvalue), $fractionbits);
 +		$biasedexponent    = pow(2, $exponentbits - 1) - 1 + $normalizedbinary['exponent']; // (127 or 1023) +/- exponent
 +		$exponentbitstring = str_pad(decbin($biasedexponent), $exponentbits, '0', STR_PAD_LEFT);
 +		$fractionbitstring = str_pad(substr($normalizedbinary['normalized'], 2), $fractionbits, '0', STR_PAD_RIGHT);
 +
 +		return self::BigEndian2String(self::Bin2Dec($signbit.$exponentbitstring.$fractionbitstring), $bits % 8, false);
 +	}
 +
 +
 +	public static function LittleEndian2Float($byteword) {
 +		return self::BigEndian2Float(strrev($byteword));
 +	}
 +
 +
 +	public static function BigEndian2Float($byteword) {
 +		// ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic
 +		// http://www.psc.edu/general/software/packages/ieee/ieee.html
 +		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html
 +
 +		$bitword = self::BigEndian2Bin($byteword);
 +		if (!$bitword) {
 +			return 0;
 +		}
 +		$signbit = $bitword{0};
 +
 +		switch (strlen($byteword) * 8) {
 +			case 32:
 +				$exponentbits = 8;
 +				$fractionbits = 23;
 +				break;
 +
 +			case 64:
 +				$exponentbits = 11;
 +				$fractionbits = 52;
 +				break;
 +
 +			case 80:
 +				// 80-bit Apple SANE format
 +				// http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/
 +				$exponentstring = substr($bitword, 1, 15);
 +				$isnormalized = intval($bitword{16});
 +				$fractionstring = substr($bitword, 17, 63);
 +				$exponent = pow(2, self::Bin2Dec($exponentstring) - 16383);
 +				$fraction = $isnormalized + self::DecimalBinary2Float($fractionstring);
 +				$floatvalue = $exponent * $fraction;
 +				if ($signbit == '1') {
 +					$floatvalue *= -1;
 +				}
 +				return $floatvalue;
 +				break;
 +
 +			default:
 +				return false;
 +				break;
 +		}
 +		$exponentstring = substr($bitword, 1, $exponentbits);
 +		$fractionstring = substr($bitword, $exponentbits + 1, $fractionbits);
 +		$exponent = self::Bin2Dec($exponentstring);
 +		$fraction = self::Bin2Dec($fractionstring);
 +
 +		if (($exponent == (pow(2, $exponentbits) - 1)) && ($fraction != 0)) {
 +			// Not a Number
 +			$floatvalue = false;
 +		} elseif (($exponent == (pow(2, $exponentbits) - 1)) && ($fraction == 0)) {
 +			if ($signbit == '1') {
 +				$floatvalue = '-infinity';
 +			} else {
 +				$floatvalue = '+infinity';
 +			}
 +		} elseif (($exponent == 0) && ($fraction == 0)) {
 +			if ($signbit == '1') {
 +				$floatvalue = -0;
 +			} else {
 +				$floatvalue = 0;
 +			}
 +			$floatvalue = ($signbit ? 0 : -0);
 +		} elseif (($exponent == 0) && ($fraction != 0)) {
 +			// These are 'unnormalized' values
 +			$floatvalue = pow(2, (-1 * (pow(2, $exponentbits - 1) - 2))) * self::DecimalBinary2Float($fractionstring);
 +			if ($signbit == '1') {
 +				$floatvalue *= -1;
 +			}
 +		} elseif ($exponent != 0) {
 +			$floatvalue = pow(2, ($exponent - (pow(2, $exponentbits - 1) - 1))) * (1 + self::DecimalBinary2Float($fractionstring));
 +			if ($signbit == '1') {
 +				$floatvalue *= -1;
 +			}
 +		}
 +		return (float) $floatvalue;
 +	}
 +
 +
 +	public static function BigEndian2Int($byteword, $synchsafe=false, $signed=false) {
 +		$intvalue = 0;
 +		$bytewordlen = strlen($byteword);
 +		if ($bytewordlen == 0) {
 +			return false;
 +		}
 +		for ($i = 0; $i < $bytewordlen; $i++) {
 +			if ($synchsafe) { // disregard MSB, effectively 7-bit bytes
 +				//$intvalue = $intvalue | (ord($byteword{$i}) & 0x7F) << (($bytewordlen - 1 - $i) * 7); // faster, but runs into problems past 2^31 on 32-bit systems
 +				$intvalue += (ord($byteword{$i}) & 0x7F) * pow(2, ($bytewordlen - 1 - $i) * 7);
 +			} else {
 +				$intvalue += ord($byteword{$i}) * pow(256, ($bytewordlen - 1 - $i));
 +			}
 +		}
 +		if ($signed && !$synchsafe) {
 +			// synchsafe ints are not allowed to be signed
 +			if ($bytewordlen <= PHP_INT_SIZE) {
 +				$signMaskBit = 0x80 << (8 * ($bytewordlen - 1));
 +				if ($intvalue & $signMaskBit) {
 +					$intvalue = 0 - ($intvalue & ($signMaskBit - 1));
 +				}
 +			} else {
 +				throw new Exception('ERROR: Cannot have signed integers larger than '.(8 * PHP_INT_SIZE).'-bits ('.strlen($byteword).') in self::BigEndian2Int()');
 +				break;
 +			}
 +		}
 +		return self::CastAsInt($intvalue);
 +	}
 +
 +
 +	public static function LittleEndian2Int($byteword, $signed=false) {
 +		return self::BigEndian2Int(strrev($byteword), false, $signed);
 +	}
 +
 +
 +	public static function BigEndian2Bin($byteword) {
 +		$binvalue = '';
 +		$bytewordlen = strlen($byteword);
 +		for ($i = 0; $i < $bytewordlen; $i++) {
 +			$binvalue .= str_pad(decbin(ord($byteword{$i})), 8, '0', STR_PAD_LEFT);
 +		}
 +		return $binvalue;
 +	}
 +
 +
 +	public static function BigEndian2String($number, $minbytes=1, $synchsafe=false, $signed=false) {
 +		if ($number < 0) {
 +			throw new Exception('ERROR: self::BigEndian2String() does not support negative numbers');
 +		}
 +		$maskbyte = (($synchsafe || $signed) ? 0x7F : 0xFF);
 +		$intstring = '';
 +		if ($signed) {
 +			if ($minbytes > PHP_INT_SIZE) {
 +				throw new Exception('ERROR: Cannot have signed integers larger than '.(8 * PHP_INT_SIZE).'-bits in self::BigEndian2String()');
 +			}
 +			$number = $number & (0x80 << (8 * ($minbytes - 1)));
 +		}
 +		while ($number != 0) {
 +			$quotient = ($number / ($maskbyte + 1));
 +			$intstring = chr(ceil(($quotient - floor($quotient)) * $maskbyte)).$intstring;
 +			$number = floor($quotient);
 +		}
 +		return str_pad($intstring, $minbytes, "\x00", STR_PAD_LEFT);
 +	}
 +
 +
 +	public static function Dec2Bin($number) {
 +		while ($number >= 256) {
 +			$bytes[] = (($number / 256) - (floor($number / 256))) * 256;
 +			$number = floor($number / 256);
 +		}
 +		$bytes[] = $number;
 +		$binstring = '';
 +		for ($i = 0; $i < count($bytes); $i++) {
 +			$binstring = (($i == count($bytes) - 1) ? decbin($bytes[$i]) : str_pad(decbin($bytes[$i]), 8, '0', STR_PAD_LEFT)).$binstring;
 +		}
 +		return $binstring;
 +	}
 +
 +
 +	public static function Bin2Dec($binstring, $signed=false) {
 +		$signmult = 1;
 +		if ($signed) {
 +			if ($binstring{0} == '1') {
 +				$signmult = -1;
 +			}
 +			$binstring = substr($binstring, 1);
 +		}
 +		$decvalue = 0;
 +		for ($i = 0; $i < strlen($binstring); $i++) {
 +			$decvalue += ((int) substr($binstring, strlen($binstring) - $i - 1, 1)) * pow(2, $i);
 +		}
 +		return self::CastAsInt($decvalue * $signmult);
 +	}
 +
 +
 +	public static function Bin2String($binstring) {
 +		// return 'hi' for input of '0110100001101001'
 +		$string = '';
 +		$binstringreversed = strrev($binstring);
 +		for ($i = 0; $i < strlen($binstringreversed); $i += 8) {
 +			$string = chr(self::Bin2Dec(strrev(substr($binstringreversed, $i, 8)))).$string;
 +		}
 +		return $string;
 +	}
 +
 +
 +	public static function LittleEndian2String($number, $minbytes=1, $synchsafe=false) {
 +		$intstring = '';
 +		while ($number > 0) {
 +			if ($synchsafe) {
 +				$intstring = $intstring.chr($number & 127);
 +				$number >>= 7;
 +			} else {
 +				$intstring = $intstring.chr($number & 255);
 +				$number >>= 8;
 +			}
 +		}
 +		return str_pad($intstring, $minbytes, "\x00", STR_PAD_RIGHT);
 +	}
 +
 +
 +	public static function array_merge_clobber($array1, $array2) {
 +		// written by kc�hireability*com
 +		// taken from http://www.php.net/manual/en/function.array-merge-recursive.php
 +		if (!is_array($array1) || !is_array($array2)) {
 +			return false;
 +		}
 +		$newarray = $array1;
 +		foreach ($array2 as $key => $val) {
 +			if (is_array($val) && isset($newarray[$key]) && is_array($newarray[$key])) {
 +				$newarray[$key] = self::array_merge_clobber($newarray[$key], $val);
 +			} else {
 +				$newarray[$key] = $val;
 +			}
 +		}
 +		return $newarray;
 +	}
 +
 +
 +	public static function array_merge_noclobber($array1, $array2) {
 +		if (!is_array($array1) || !is_array($array2)) {
 +			return false;
 +		}
 +		$newarray = $array1;
 +		foreach ($array2 as $key => $val) {
 +			if (is_array($val) && isset($newarray[$key]) && is_array($newarray[$key])) {
 +				$newarray[$key] = self::array_merge_noclobber($newarray[$key], $val);
 +			} elseif (!isset($newarray[$key])) {
 +				$newarray[$key] = $val;
 +			}
 +		}
 +		return $newarray;
 +	}
 +
 +
 +	public static function ksort_recursive(&$theArray) {
 +		ksort($theArray);
 +		foreach ($theArray as $key => $value) {
 +			if (is_array($value)) {
 +				self::ksort_recursive($theArray[$key]);
 +			}
 +		}
 +		return true;
 +	}
 +
 +	public static function fileextension($filename, $numextensions=1) {
 +		if (strstr($filename, '.')) {
 +			$reversedfilename = strrev($filename);
 +			$offset = 0;
 +			for ($i = 0; $i < $numextensions; $i++) {
 +				$offset = strpos($reversedfilename, '.', $offset + 1);
 +				if ($offset === false) {
 +					return '';
 +				}
 +			}
 +			return strrev(substr($reversedfilename, 0, $offset));
 +		}
 +		return '';
 +	}
 +
 +
 +	public static function PlaytimeString($seconds) {
 +		$sign = (($seconds < 0) ? '-' : '');
 +		$seconds = round(abs($seconds));
 +		$H = (int) floor( $seconds                            / 3600);
 +		$M = (int) floor(($seconds - (3600 * $H)            ) /   60);
 +		$S = (int) round( $seconds - (3600 * $H) - (60 * $M)        );
 +		return $sign.($H ? $H.':' : '').($H ? str_pad($M, 2, '0', STR_PAD_LEFT) : intval($M)).':'.str_pad($S, 2, 0, STR_PAD_LEFT);
 +	}
 +
 +
 +	public static function DateMac2Unix($macdate) {
 +		// Macintosh timestamp: seconds since 00:00h January 1, 1904
 +		// UNIX timestamp:      seconds since 00:00h January 1, 1970
 +		return self::CastAsInt($macdate - 2082844800);
 +	}
 +
 +
 +	public static function FixedPoint8_8($rawdata) {
 +		return self::BigEndian2Int(substr($rawdata, 0, 1)) + (float) (self::BigEndian2Int(substr($rawdata, 1, 1)) / pow(2, 8));
 +	}
 +
 +
 +	public static function FixedPoint16_16($rawdata) {
 +		return self::BigEndian2Int(substr($rawdata, 0, 2)) + (float) (self::BigEndian2Int(substr($rawdata, 2, 2)) / pow(2, 16));
 +	}
 +
 +
 +	public static function FixedPoint2_30($rawdata) {
 +		$binarystring = self::BigEndian2Bin($rawdata);
 +		return self::Bin2Dec(substr($binarystring, 0, 2)) + (float) (self::Bin2Dec(substr($binarystring, 2, 30)) / pow(2, 30));
 +	}
 +
 +
 +	public static function CreateDeepArray($ArrayPath, $Separator, $Value) {
 +		// assigns $Value to a nested array path:
 +		//   $foo = self::CreateDeepArray('/path/to/my', '/', 'file.txt')
 +		// is the same as:
 +		//   $foo = array('path'=>array('to'=>'array('my'=>array('file.txt'))));
 +		// or
 +		//   $foo['path']['to']['my'] = 'file.txt';
 +		$ArrayPath = ltrim($ArrayPath, $Separator);
 +		if (($pos = strpos($ArrayPath, $Separator)) !== false) {
 +			$ReturnedArray[substr($ArrayPath, 0, $pos)] = self::CreateDeepArray(substr($ArrayPath, $pos + 1), $Separator, $Value);
 +		} else {
 +			$ReturnedArray[$ArrayPath] = $Value;
 +		}
 +		return $ReturnedArray;
 +	}
 +
 +	public static function array_max($arraydata, $returnkey=false) {
 +		$maxvalue = false;
 +		$maxkey = false;
 +		foreach ($arraydata as $key => $value) {
 +			if (!is_array($value)) {
 +				if ($value > $maxvalue) {
 +					$maxvalue = $value;
 +					$maxkey = $key;
 +				}
 +			}
 +		}
 +		return ($returnkey ? $maxkey : $maxvalue);
 +	}
 +
 +	public static function array_min($arraydata, $returnkey=false) {
 +		$minvalue = false;
 +		$minkey = false;
 +		foreach ($arraydata as $key => $value) {
 +			if (!is_array($value)) {
 +				if ($value > $minvalue) {
 +					$minvalue = $value;
 +					$minkey = $key;
 +				}
 +			}
 +		}
 +		return ($returnkey ? $minkey : $minvalue);
 +	}
 +
 +	public static function XML2array($XMLstring) {
 +		if (function_exists('simplexml_load_string')) {
 +			if (function_exists('get_object_vars')) {
++				libxml_disable_entity_loader(true);
 +				$XMLobject = simplexml_load_string($XMLstring);
 +				return self::SimpleXMLelement2array($XMLobject);
 +			}
 +		}
 +		return false;
 +	}
 +
 +	public static function SimpleXMLelement2array($XMLobject) {
 +		if (!is_object($XMLobject) && !is_array($XMLobject)) {
 +			return $XMLobject;
 +		}
 +		$XMLarray = (is_object($XMLobject) ? get_object_vars($XMLobject) : $XMLobject);
 +		foreach ($XMLarray as $key => $value) {
 +			$XMLarray[$key] = self::SimpleXMLelement2array($value);
 +		}
 +		return $XMLarray;
 +	}
 +
 +
 +	// Allan Hansen <ah�artemis*dk>
 +	// self::md5_data() - returns md5sum for a file from startuing position to absolute end position
 +	public static function hash_data($file, $offset, $end, $algorithm) {
 +		static $tempdir = '';
 +		if (!self::intValueSupported($end)) {
 +			return false;
 +		}
 +		switch ($algorithm) {
 +			case 'md5':
 +				$hash_function = 'md5_file';
 +				$unix_call     = 'md5sum';
 +				$windows_call  = 'md5sum.exe';
 +				$hash_length   = 32;
 +				break;
 +
 +			case 'sha1':
 +				$hash_function = 'sha1_file';
 +				$unix_call     = 'sha1sum';
 +				$windows_call  = 'sha1sum.exe';
 +				$hash_length   = 40;
 +				break;
 +
 +			default:
 +				throw new Exception('Invalid algorithm ('.$algorithm.') in self::hash_data()');
 +				break;
 +		}
 +		$size = $end - $offset;
 +		while (true) {
 +			if (GETID3_OS_ISWINDOWS) {
 +
 +				// It seems that sha1sum.exe for Windows only works on physical files, does not accept piped data
 +				// Fall back to create-temp-file method:
 +				if ($algorithm == 'sha1') {
 +					break;
 +				}
 +
 +				$RequiredFiles = array('cygwin1.dll', 'head.exe', 'tail.exe', $windows_call);
 +				foreach ($RequiredFiles as $required_file) {
 +					if (!is_readable(GETID3_HELPERAPPSDIR.$required_file)) {
 +						// helper apps not available - fall back to old method
 +						break 2;
 +					}
 +				}
 +				$commandline  = GETID3_HELPERAPPSDIR.'head.exe -c '.$end.' '.escapeshellarg(str_replace('/', DIRECTORY_SEPARATOR, $file)).' | ';
 +				$commandline .= GETID3_HELPERAPPSDIR.'tail.exe -c '.$size.' | ';
 +				$commandline .= GETID3_HELPERAPPSDIR.$windows_call;
 +
 +			} else {
 +
 +				$commandline  = 'head -c'.$end.' '.escapeshellarg($file).' | ';
 +				$commandline .= 'tail -c'.$size.' | ';
 +				$commandline .= $unix_call;
 +
 +			}
 +			if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
 +				//throw new Exception('PHP running in Safe Mode - backtick operator not available, using slower non-system-call '.$algorithm.' algorithm');
 +				break;
 +			}
 +			return substr(`$commandline`, 0, $hash_length);
 +		}
 +
 +		if (empty($tempdir)) {
 +			// yes this is ugly, feel free to suggest a better way
 +			require_once(dirname(__FILE__).'/getid3.php');
 +			$getid3_temp = new getID3();
 +			$tempdir = $getid3_temp->tempdir;
 +			unset($getid3_temp);
 +		}
 +		// try to create a temporary file in the system temp directory - invalid dirname should force to system temp dir
 +		if (($data_filename = tempnam($tempdir, 'gI3')) === false) {
 +			// can't find anywhere to create a temp file, just fail
 +			return false;
 +		}
 +
 +		// Init
 +		$result = false;
 +
 +		// copy parts of file
 +		try {
 +			self::CopyFileParts($file, $data_filename, $offset, $end - $offset);
 +			$result = $hash_function($data_filename);
 +		} catch (Exception $e) {
 +			throw new Exception('self::CopyFileParts() failed in getid_lib::hash_data(): '.$e->getMessage());
 +		}
 +		unlink($data_filename);
 +		return $result;
 +	}
 +
 +	public static function CopyFileParts($filename_source, $filename_dest, $offset, $length) {
 +		if (!self::intValueSupported($offset + $length)) {
 +			throw new Exception('cannot copy file portion, it extends beyond the '.round(PHP_INT_MAX / 1073741824).'GB limit');
 +		}
 +		if (is_readable($filename_source) && is_file($filename_source) && ($fp_src = fopen($filename_source, 'rb'))) {
 +			if (($fp_dest = fopen($filename_dest, 'wb'))) {
 +				if (fseek($fp_src, $offset, SEEK_SET) == 0) {
 +					$byteslefttowrite = $length;
 +					while (($byteslefttowrite > 0) && ($buffer = fread($fp_src, min($byteslefttowrite, getID3::FREAD_BUFFER_SIZE)))) {
 +						$byteswritten = fwrite($fp_dest, $buffer, $byteslefttowrite);
 +						$byteslefttowrite -= $byteswritten;
 +					}
 +					return true;
 +				} else {
 +					throw new Exception('failed to seek to offset '.$offset.' in '.$filename_source);
 +				}
 +				fclose($fp_dest);
 +			} else {
 +				throw new Exception('failed to create file for writing '.$filename_dest);
 +			}
 +			fclose($fp_src);
 +		} else {
 +			throw new Exception('failed to open file for reading '.$filename_source);
 +		}
 +		return false;
 +	}
 +
 +	public static function iconv_fallback_int_utf8($charval) {
 +		if ($charval < 128) {
 +			// 0bbbbbbb
 +			$newcharstring = chr($charval);
 +		} elseif ($charval < 2048) {
 +			// 110bbbbb 10bbbbbb
 +			$newcharstring  = chr(($charval >>   6) | 0xC0);
 +			$newcharstring .= chr(($charval & 0x3F) | 0x80);
 +		} elseif ($charval < 65536) {
 +			// 1110bbbb 10bbbbbb 10bbbbbb
 +			$newcharstring  = chr(($charval >>  12) | 0xE0);
 +			$newcharstring .= chr(($charval >>   6) | 0xC0);
 +			$newcharstring .= chr(($charval & 0x3F) | 0x80);
 +		} else {
 +			// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
 +			$newcharstring  = chr(($charval >>  18) | 0xF0);
 +			$newcharstring .= chr(($charval >>  12) | 0xC0);
 +			$newcharstring .= chr(($charval >>   6) | 0xC0);
 +			$newcharstring .= chr(($charval & 0x3F) | 0x80);
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// ISO-8859-1 => UTF-8
 +	public static function iconv_fallback_iso88591_utf8($string, $bom=false) {
 +		if (function_exists('utf8_encode')) {
 +			return utf8_encode($string);
 +		}
 +		// utf8_encode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support)
 +		$newcharstring = '';
 +		if ($bom) {
 +			$newcharstring .= "\xEF\xBB\xBF";
 +		}
 +		for ($i = 0; $i < strlen($string); $i++) {
 +			$charval = ord($string{$i});
 +			$newcharstring .= self::iconv_fallback_int_utf8($charval);
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// ISO-8859-1 => UTF-16BE
 +	public static function iconv_fallback_iso88591_utf16be($string, $bom=false) {
 +		$newcharstring = '';
 +		if ($bom) {
 +			$newcharstring .= "\xFE\xFF";
 +		}
 +		for ($i = 0; $i < strlen($string); $i++) {
 +			$newcharstring .= "\x00".$string{$i};
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// ISO-8859-1 => UTF-16LE
 +	public static function iconv_fallback_iso88591_utf16le($string, $bom=false) {
 +		$newcharstring = '';
 +		if ($bom) {
 +			$newcharstring .= "\xFF\xFE";
 +		}
 +		for ($i = 0; $i < strlen($string); $i++) {
 +			$newcharstring .= $string{$i}."\x00";
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// ISO-8859-1 => UTF-16LE (BOM)
 +	public static function iconv_fallback_iso88591_utf16($string) {
 +		return self::iconv_fallback_iso88591_utf16le($string, true);
 +	}
 +
 +	// UTF-8 => ISO-8859-1
 +	public static function iconv_fallback_utf8_iso88591($string) {
 +		if (function_exists('utf8_decode')) {
 +			return utf8_decode($string);
 +		}
 +		// utf8_decode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support)
 +		$newcharstring = '';
 +		$offset = 0;
 +		$stringlength = strlen($string);
 +		while ($offset < $stringlength) {
 +			if ((ord($string{$offset}) | 0x07) == 0xF7) {
 +				// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
 +						   ((ord($string{($offset + 1)}) & 0x3F) << 12) &
 +						   ((ord($string{($offset + 2)}) & 0x3F) <<  6) &
 +							(ord($string{($offset + 3)}) & 0x3F);
 +				$offset += 4;
 +			} elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
 +				// 1110bbbb 10bbbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
 +						   ((ord($string{($offset + 1)}) & 0x3F) <<  6) &
 +							(ord($string{($offset + 2)}) & 0x3F);
 +				$offset += 3;
 +			} elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
 +				// 110bbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x1F) <<  6) &
 +							(ord($string{($offset + 1)}) & 0x3F);
 +				$offset += 2;
 +			} elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
 +				// 0bbbbbbb
 +				$charval = ord($string{$offset});
 +				$offset += 1;
 +			} else {
 +				// error? throw some kind of warning here?
 +				$charval = false;
 +				$offset += 1;
 +			}
 +			if ($charval !== false) {
 +				$newcharstring .= (($charval < 256) ? chr($charval) : '?');
 +			}
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// UTF-8 => UTF-16BE
 +	public static function iconv_fallback_utf8_utf16be($string, $bom=false) {
 +		$newcharstring = '';
 +		if ($bom) {
 +			$newcharstring .= "\xFE\xFF";
 +		}
 +		$offset = 0;
 +		$stringlength = strlen($string);
 +		while ($offset < $stringlength) {
 +			if ((ord($string{$offset}) | 0x07) == 0xF7) {
 +				// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
 +						   ((ord($string{($offset + 1)}) & 0x3F) << 12) &
 +						   ((ord($string{($offset + 2)}) & 0x3F) <<  6) &
 +							(ord($string{($offset + 3)}) & 0x3F);
 +				$offset += 4;
 +			} elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
 +				// 1110bbbb 10bbbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
 +						   ((ord($string{($offset + 1)}) & 0x3F) <<  6) &
 +							(ord($string{($offset + 2)}) & 0x3F);
 +				$offset += 3;
 +			} elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
 +				// 110bbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x1F) <<  6) &
 +							(ord($string{($offset + 1)}) & 0x3F);
 +				$offset += 2;
 +			} elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
 +				// 0bbbbbbb
 +				$charval = ord($string{$offset});
 +				$offset += 1;
 +			} else {
 +				// error? throw some kind of warning here?
 +				$charval = false;
 +				$offset += 1;
 +			}
 +			if ($charval !== false) {
 +				$newcharstring .= (($charval < 65536) ? self::BigEndian2String($charval, 2) : "\x00".'?');
 +			}
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// UTF-8 => UTF-16LE
 +	public static function iconv_fallback_utf8_utf16le($string, $bom=false) {
 +		$newcharstring = '';
 +		if ($bom) {
 +			$newcharstring .= "\xFF\xFE";
 +		}
 +		$offset = 0;
 +		$stringlength = strlen($string);
 +		while ($offset < $stringlength) {
 +			if ((ord($string{$offset}) | 0x07) == 0xF7) {
 +				// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
 +						   ((ord($string{($offset + 1)}) & 0x3F) << 12) &
 +						   ((ord($string{($offset + 2)}) & 0x3F) <<  6) &
 +							(ord($string{($offset + 3)}) & 0x3F);
 +				$offset += 4;
 +			} elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
 +				// 1110bbbb 10bbbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
 +						   ((ord($string{($offset + 1)}) & 0x3F) <<  6) &
 +							(ord($string{($offset + 2)}) & 0x3F);
 +				$offset += 3;
 +			} elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
 +				// 110bbbbb 10bbbbbb
 +				$charval = ((ord($string{($offset + 0)}) & 0x1F) <<  6) &
 +							(ord($string{($offset + 1)}) & 0x3F);
 +				$offset += 2;
 +			} elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
 +				// 0bbbbbbb
 +				$charval = ord($string{$offset});
 +				$offset += 1;
 +			} else {
 +				// error? maybe throw some warning here?
 +				$charval = false;
 +				$offset += 1;
 +			}
 +			if ($charval !== false) {
 +				$newcharstring .= (($charval < 65536) ? self::LittleEndian2String($charval, 2) : '?'."\x00");
 +			}
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// UTF-8 => UTF-16LE (BOM)
 +	public static function iconv_fallback_utf8_utf16($string) {
 +		return self::iconv_fallback_utf8_utf16le($string, true);
 +	}
 +
 +	// UTF-16BE => UTF-8
 +	public static function iconv_fallback_utf16be_utf8($string) {
 +		if (substr($string, 0, 2) == "\xFE\xFF") {
 +			// strip BOM
 +			$string = substr($string, 2);
 +		}
 +		$newcharstring = '';
 +		for ($i = 0; $i < strlen($string); $i += 2) {
 +			$charval = self::BigEndian2Int(substr($string, $i, 2));
 +			$newcharstring .= self::iconv_fallback_int_utf8($charval);
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// UTF-16LE => UTF-8
 +	public static function iconv_fallback_utf16le_utf8($string) {
 +		if (substr($string, 0, 2) == "\xFF\xFE") {
 +			// strip BOM
 +			$string = substr($string, 2);
 +		}
 +		$newcharstring = '';
 +		for ($i = 0; $i < strlen($string); $i += 2) {
 +			$charval = self::LittleEndian2Int(substr($string, $i, 2));
 +			$newcharstring .= self::iconv_fallback_int_utf8($charval);
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// UTF-16BE => ISO-8859-1
 +	public static function iconv_fallback_utf16be_iso88591($string) {
 +		if (substr($string, 0, 2) == "\xFE\xFF") {
 +			// strip BOM
 +			$string = substr($string, 2);
 +		}
 +		$newcharstring = '';
 +		for ($i = 0; $i < strlen($string); $i += 2) {
 +			$charval = self::BigEndian2Int(substr($string, $i, 2));
 +			$newcharstring .= (($charval < 256) ? chr($charval) : '?');
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// UTF-16LE => ISO-8859-1
 +	public static function iconv_fallback_utf16le_iso88591($string) {
 +		if (substr($string, 0, 2) == "\xFF\xFE") {
 +			// strip BOM
 +			$string = substr($string, 2);
 +		}
 +		$newcharstring = '';
 +		for ($i = 0; $i < strlen($string); $i += 2) {
 +			$charval = self::LittleEndian2Int(substr($string, $i, 2));
 +			$newcharstring .= (($charval < 256) ? chr($charval) : '?');
 +		}
 +		return $newcharstring;
 +	}
 +
 +	// UTF-16 (BOM) => ISO-8859-1
 +	public static function iconv_fallback_utf16_iso88591($string) {
 +		$bom = substr($string, 0, 2);
 +		if ($bom == "\xFE\xFF") {
 +			return self::iconv_fallback_utf16be_iso88591(substr($string, 2));
 +		} elseif ($bom == "\xFF\xFE") {
 +			return self::iconv_fallback_utf16le_iso88591(substr($string, 2));
 +		}
 +		return $string;
 +	}
 +
 +	// UTF-16 (BOM) => UTF-8
 +	public static function iconv_fallback_utf16_utf8($string) {
 +		$bom = substr($string, 0, 2);
 +		if ($bom == "\xFE\xFF") {
 +			return self::iconv_fallback_utf16be_utf8(substr($string, 2));
 +		} elseif ($bom == "\xFF\xFE") {
 +			return self::iconv_fallback_utf16le_utf8(substr($string, 2));
 +		}
 +		return $string;
 +	}
 +
 +	public static function iconv_fallback($in_charset, $out_charset, $string) {
 +
 +		if ($in_charset == $out_charset) {
 +			return $string;
 +		}
 +
 +		// iconv() availble
 +		if (function_exists('iconv')) {
 +			if ($converted_string = @iconv($in_charset, $out_charset.'//TRANSLIT', $string)) {
 +				switch ($out_charset) {
 +					case 'ISO-8859-1':
 +						$converted_string = rtrim($converted_string, "\x00");
 +						break;
 +				}
 +				return $converted_string;
 +			}
 +
 +			// iconv() may sometimes fail with "illegal character in input string" error message
 +			// and return an empty string, but returning the unconverted string is more useful
 +			return $string;
 +		}
 +
 +
 +		// iconv() not available
 +		static $ConversionFunctionList = array();
 +		if (empty($ConversionFunctionList)) {
 +			$ConversionFunctionList['ISO-8859-1']['UTF-8']    = 'iconv_fallback_iso88591_utf8';
 +			$ConversionFunctionList['ISO-8859-1']['UTF-16']   = 'iconv_fallback_iso88591_utf16';
 +			$ConversionFunctionList['ISO-8859-1']['UTF-16BE'] = 'iconv_fallback_iso88591_utf16be';
 +			$ConversionFunctionList['ISO-8859-1']['UTF-16LE'] = 'iconv_fallback_iso88591_utf16le';
 +			$ConversionFunctionList['UTF-8']['ISO-8859-1']    = 'iconv_fallback_utf8_iso88591';
 +			$ConversionFunctionList['UTF-8']['UTF-16']        = 'iconv_fallback_utf8_utf16';
 +			$ConversionFunctionList['UTF-8']['UTF-16BE']      = 'iconv_fallback_utf8_utf16be';
 +			$ConversionFunctionList['UTF-8']['UTF-16LE']      = 'iconv_fallback_utf8_utf16le';
 +			$ConversionFunctionList['UTF-16']['ISO-8859-1']   = 'iconv_fallback_utf16_iso88591';
 +			$ConversionFunctionList['UTF-16']['UTF-8']        = 'iconv_fallback_utf16_utf8';
 +			$ConversionFunctionList['UTF-16LE']['ISO-8859-1'] = 'iconv_fallback_utf16le_iso88591';
 +			$ConversionFunctionList['UTF-16LE']['UTF-8']      = 'iconv_fallback_utf16le_utf8';
 +			$ConversionFunctionList['UTF-16BE']['ISO-8859-1'] = 'iconv_fallback_utf16be_iso88591';
 +			$ConversionFunctionList['UTF-16BE']['UTF-8']      = 'iconv_fallback_utf16be_utf8';
 +		}
 +		if (isset($ConversionFunctionList[strtoupper($in_charset)][strtoupper($out_charset)])) {
 +			$ConversionFunction = $ConversionFunctionList[strtoupper($in_charset)][strtoupper($out_charset)];
 +			return self::$ConversionFunction($string);
 +		}
 +		throw new Exception('PHP does not have iconv() support - cannot convert from '.$in_charset.' to '.$out_charset);
 +	}
 +
 +
 +	public static function MultiByteCharString2HTML($string, $charset='ISO-8859-1') {
 +		$string = (string) $string; // in case trying to pass a numeric (float, int) string, would otherwise return an empty string
 +		$HTMLstring = '';
 +
 +		switch ($charset) {
 +			case '1251':
 +			case '1252':
 +			case '866':
 +			case '932':
 +			case '936':
 +			case '950':
 +			case 'BIG5':
 +			case 'BIG5-HKSCS':
 +			case 'cp1251':
 +			case 'cp1252':
 +			case 'cp866':
 +			case 'EUC-JP':
 +			case 'EUCJP':
 +			case 'GB2312':
 +			case 'ibm866':
 +			case 'ISO-8859-1':
 +			case 'ISO-8859-15':
 +			case 'ISO8859-1':
 +			case 'ISO8859-15':
 +			case 'KOI8-R':
 +			case 'koi8-ru':
 +			case 'koi8r':
 +			case 'Shift_JIS':
 +			case 'SJIS':
 +			case 'win-1251':
 +			case 'Windows-1251':
 +			case 'Windows-1252':
 +				$HTMLstring = htmlentities($string, ENT_COMPAT, $charset);
 +				break;
 +
 +			case 'UTF-8':
 +				$strlen = strlen($string);
 +				for ($i = 0; $i < $strlen; $i++) {
 +					$char_ord_val = ord($string{$i});
 +					$charval = 0;
 +					if ($char_ord_val < 0x80) {
 +						$charval = $char_ord_val;
 +					} elseif ((($char_ord_val & 0xF0) >> 4) == 0x0F  &&  $i+3 < $strlen) {
 +						$charval  = (($char_ord_val & 0x07) << 18);
 +						$charval += ((ord($string{++$i}) & 0x3F) << 12);
 +						$charval += ((ord($string{++$i}) & 0x3F) << 6);
 +						$charval +=  (ord($string{++$i}) & 0x3F);
 +					} elseif ((($char_ord_val & 0xE0) >> 5) == 0x07  &&  $i+2 < $strlen) {
 +						$charval  = (($char_ord_val & 0x0F) << 12);
 +						$charval += ((ord($string{++$i}) & 0x3F) << 6);
 +						$charval +=  (ord($string{++$i}) & 0x3F);
 +					} elseif ((($char_ord_val & 0xC0) >> 6) == 0x03  &&  $i+1 < $strlen) {
 +						$charval  = (($char_ord_val & 0x1F) << 6);
 +						$charval += (ord($string{++$i}) & 0x3F);
 +					}
 +					if (($charval >= 32) && ($charval <= 127)) {
 +						$HTMLstring .= htmlentities(chr($charval));
 +					} else {
 +						$HTMLstring .= '&#'.$charval.';';
 +					}
 +				}
 +				break;
 +
 +			case 'UTF-16LE':
 +				for ($i = 0; $i < strlen($string); $i += 2) {
 +					$charval = self::LittleEndian2Int(substr($string, $i, 2));
 +					if (($charval >= 32) && ($charval <= 127)) {
 +						$HTMLstring .= chr($charval);
 +					} else {
 +						$HTMLstring .= '&#'.$charval.';';
 +					}
 +				}
 +				break;
 +
 +			case 'UTF-16BE':
 +				for ($i = 0; $i < strlen($string); $i += 2) {
 +					$charval = self::BigEndian2Int(substr($string, $i, 2));
 +					if (($charval >= 32) && ($charval <= 127)) {
 +						$HTMLstring .= chr($charval);
 +					} else {
 +						$HTMLstring .= '&#'.$charval.';';
 +					}
 +				}
 +				break;
 +
 +			default:
 +				$HTMLstring = 'ERROR: Character set "'.$charset.'" not supported in MultiByteCharString2HTML()';
 +				break;
 +		}
 +		return $HTMLstring;
 +	}
 +
 +
 +
 +	public static function RGADnameLookup($namecode) {
 +		static $RGADname = array();
 +		if (empty($RGADname)) {
 +			$RGADname[0] = 'not set';
 +			$RGADname[1] = 'Track Gain Adjustment';
 +			$RGADname[2] = 'Album Gain Adjustment';
 +		}
 +
 +		return (isset($RGADname[$namecode]) ? $RGADname[$namecode] : '');
 +	}
 +
 +
 +	public static function RGADoriginatorLookup($originatorcode) {
 +		static $RGADoriginator = array();
 +		if (empty($RGADoriginator)) {
 +			$RGADoriginator[0] = 'unspecified';
 +			$RGADoriginator[1] = 'pre-set by artist/producer/mastering engineer';
 +			$RGADoriginator[2] = 'set by user';
 +			$RGADoriginator[3] = 'determined automatically';
 +		}
 +
 +		return (isset($RGADoriginator[$originatorcode]) ? $RGADoriginator[$originatorcode] : '');
 +	}
 +
 +
 +	public static function RGADadjustmentLookup($rawadjustment, $signbit) {
 +		$adjustment = $rawadjustment / 10;
 +		if ($signbit == 1) {
 +			$adjustment *= -1;
 +		}
 +		return (float) $adjustment;
 +	}
 +
 +
 +	public static function RGADgainString($namecode, $originatorcode, $replaygain) {
 +		if ($replaygain < 0) {
 +			$signbit = '1';
 +		} else {
 +			$signbit = '0';
 +		}
 +		$storedreplaygain = intval(round($replaygain * 10));
 +		$gainstring  = str_pad(decbin($namecode), 3, '0', STR_PAD_LEFT);
 +		$gainstring .= str_pad(decbin($originatorcode), 3, '0', STR_PAD_LEFT);
 +		$gainstring .= $signbit;
 +		$gainstring .= str_pad(decbin($storedreplaygain), 9, '0', STR_PAD_LEFT);
 +
 +		return $gainstring;
 +	}
 +
 +	public static function RGADamplitude2dB($amplitude) {
 +		return 20 * log10($amplitude);
 +	}
 +
 +
 +	public static function GetDataImageSize($imgData, &$imageinfo=array()) {
 +		static $tempdir = '';
 +		if (empty($tempdir)) {
 +			// yes this is ugly, feel free to suggest a better way
 +			require_once(dirname(__FILE__).'/getid3.php');
 +			$getid3_temp = new getID3();
 +			$tempdir = $getid3_temp->tempdir;
 +			unset($getid3_temp);
 +		}
 +		$GetDataImageSize = false;
 +		if ($tempfilename = tempnam($tempdir, 'gI3')) {
 +			if (is_writable($tempfilename) && is_file($tempfilename) && ($tmp = fopen($tempfilename, 'wb'))) {
 +				fwrite($tmp, $imgData);
 +				fclose($tmp);
 +				$GetDataImageSize = @getimagesize($tempfilename, $imageinfo);
 +			}
 +			unlink($tempfilename);
 +		}
 +		return $GetDataImageSize;
 +	}
 +
 +	public static function ImageExtFromMime($mime_type) {
 +		// temporary way, works OK for now, but should be reworked in the future
 +		return str_replace(array('image/', 'x-', 'jpeg'), array('', '', 'jpg'), $mime_type);
 +	}
 +
 +	public static function ImageTypesLookup($imagetypeid) {
 +		static $ImageTypesLookup = array();
 +		if (empty($ImageTypesLookup)) {
 +			$ImageTypesLookup[1]  = 'gif';
 +			$ImageTypesLookup[2]  = 'jpeg';
 +			$ImageTypesLookup[3]  = 'png';
 +			$ImageTypesLookup[4]  = 'swf';
 +			$ImageTypesLookup[5]  = 'psd';
 +			$ImageTypesLookup[6]  = 'bmp';
 +			$ImageTypesLookup[7]  = 'tiff (little-endian)';
 +			$ImageTypesLookup[8]  = 'tiff (big-endian)';
 +			$ImageTypesLookup[9]  = 'jpc';
 +			$ImageTypesLookup[10] = 'jp2';
 +			$ImageTypesLookup[11] = 'jpx';
 +			$ImageTypesLookup[12] = 'jb2';
 +			$ImageTypesLookup[13] = 'swc';
 +			$ImageTypesLookup[14] = 'iff';
 +		}
 +		return (isset($ImageTypesLookup[$imagetypeid]) ? $ImageTypesLookup[$imagetypeid] : '');
 +	}
 +
 +	public static function CopyTagsToComments(&$ThisFileInfo) {
 +
 +		// Copy all entries from ['tags'] into common ['comments']
 +		if (!empty($ThisFileInfo['tags'])) {
 +			foreach ($ThisFileInfo['tags'] as $tagtype => $tagarray) {
 +				foreach ($tagarray as $tagname => $tagdata) {
 +					foreach ($tagdata as $key => $value) {
 +						if (!empty($value)) {
 +							if (empty($ThisFileInfo['comments'][$tagname])) {
 +
 +								// fall through and append value
 +
 +							} elseif ($tagtype == 'id3v1') {
 +
 +								$newvaluelength = strlen(trim($value));
 +								foreach ($ThisFileInfo['comments'][$tagname] as $existingkey => $existingvalue) {
 +									$oldvaluelength = strlen(trim($existingvalue));
 +									if (($newvaluelength <= $oldvaluelength) && (substr($existingvalue, 0, $newvaluelength) == trim($value))) {
 +										// new value is identical but shorter-than (or equal-length to) one already in comments - skip
 +										break 2;
 +									}
 +								}
 +
 +							} elseif (!is_array($value)) {
 +
 +								$newvaluelength = strlen(trim($value));
 +								foreach ($ThisFileInfo['comments'][$tagname] as $existingkey => $existingvalue) {
 +									$oldvaluelength = strlen(trim($existingvalue));
 +									if (($newvaluelength > $oldvaluelength) && (substr(trim($value), 0, strlen($existingvalue)) == $existingvalue)) {
 +										$ThisFileInfo['comments'][$tagname][$existingkey] = trim($value);
 +										break 2;
 +									}
 +								}
 +
 +							}
 +							if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($value), $ThisFileInfo['comments'][$tagname])) {
 +								$value = (is_string($value) ? trim($value) : $value);
 +								$ThisFileInfo['comments'][$tagname][] = $value;
 +							}
 +						}
 +					}
 +				}
 +			}
 +
 +			// Copy to ['comments_html']
 +			foreach ($ThisFileInfo['comments'] as $field => $values) {
 +				if ($field == 'picture') {
 +					// pictures can take up a lot of space, and we don't need multiple copies of them
 +					// let there be a single copy in [comments][picture], and not elsewhere
 +					continue;
 +				}
 +				foreach ($values as $index => $value) {
 +					if (is_array($value)) {
 +						$ThisFileInfo['comments_html'][$field][$index] = $value;
 +					} else {
 +						$ThisFileInfo['comments_html'][$field][$index] = str_replace('�', '', self::MultiByteCharString2HTML($value, $ThisFileInfo['encoding']));
 +					}
 +				}
 +			}
 +		}
 +		return true;
 +	}
 +
 +
 +	public static function EmbeddedLookup($key, $begin, $end, $file, $name) {
 +
 +		// Cached
 +		static $cache;
 +		if (isset($cache[$file][$name])) {
 +			return (isset($cache[$file][$name][$key]) ? $cache[$file][$name][$key] : '');
 +		}
 +
 +		// Init
 +		$keylength  = strlen($key);
 +		$line_count = $end - $begin - 7;
 +
 +		// Open php file
 +		$fp = fopen($file, 'r');
 +
 +		// Discard $begin lines
 +		for ($i = 0; $i < ($begin + 3); $i++) {
 +			fgets($fp, 1024);
 +		}
 +
 +		// Loop thru line
 +		while (0 < $line_count--) {
 +
 +			// Read line
 +			$line = ltrim(fgets($fp, 1024), "\t ");
 +
 +			// METHOD A: only cache the matching key - less memory but slower on next lookup of not-previously-looked-up key
 +			//$keycheck = substr($line, 0, $keylength);
 +			//if ($key == $keycheck)  {
 +			//	$cache[$file][$name][$keycheck] = substr($line, $keylength + 1);
 +			//	break;
 +			//}
 +
 +			// METHOD B: cache all keys in this lookup - more memory but faster on next lookup of not-previously-looked-up key
 +			//$cache[$file][$name][substr($line, 0, $keylength)] = trim(substr($line, $keylength + 1));
 +			$explodedLine = explode("\t", $line, 2);
 +			$ThisKey   = (isset($explodedLine[0]) ? $explodedLine[0] : '');
 +			$ThisValue = (isset($explodedLine[1]) ? $explodedLine[1] : '');
 +			$cache[$file][$name][$ThisKey] = trim($ThisValue);
 +		}
 +
 +		// Close and return
 +		fclose($fp);
 +		return (isset($cache[$file][$name][$key]) ? $cache[$file][$name][$key] : '');
 +	}
 +
 +	public static function IncludeDependency($filename, $sourcefile, $DieOnFailure=false) {
 +		global $GETID3_ERRORARRAY;
 +
 +		if (file_exists($filename)) {
 +			if (include_once($filename)) {
 +				return true;
 +			} else {
 +				$diemessage = basename($sourcefile).' depends on '.$filename.', which has errors';
 +			}
 +		} else {
 +			$diemessage = basename($sourcefile).' depends on '.$filename.', which is missing';
 +		}
 +		if ($DieOnFailure) {
 +			throw new Exception($diemessage);
 +		} else {
 +			$GETID3_ERRORARRAY[] = $diemessage;
 +		}
 +		return false;
 +	}
 +
 +	public static function trimNullByte($string) {
 +		return trim($string, "\x00");
 +	}
 +
 +	public static function getFileSizeSyscall($path) {
 +		$filesize = false;
 +
 +		if (GETID3_OS_ISWINDOWS) {
 +			if (class_exists('COM')) { // From PHP 5.3.15 and 5.4.5, COM and DOTNET is no longer built into the php core.you have to add COM support in php.ini:
 +				$filesystem = new COM('Scripting.FileSystemObject');
 +				$file = $filesystem->GetFile($path);
 +				$filesize = $file->Size();
 +				unset($filesystem, $file);
 +			} else {
 +				$commandline = 'for %I in ('.escapeshellarg($path).') do @echo %~zI';
 +			}
 +		} else {
 +			$commandline = 'ls -l '.escapeshellarg($path).' | awk \'{print $5}\'';
 +		}
 +		if (isset($commandline)) {
 +			$output = trim(`$commandline`);
 +			if (ctype_digit($output)) {
 +				$filesize = (float) $output;
 +			}
 +		}
 +		return $filesize;
 +	}
 +
 +}
diff --cc 3rdparty/patches.txt
index 0000000,0000000..22ccb37
new file mode 100644
--- /dev/null
+++ b/3rdparty/patches.txt
@@@ -1,0 -1,0 +1,4 @@@
++Patches:
++
++- remove dompdf from phpdocx, because we already ship dompdf in the 3rdparty's root folder (see 3ae4904 and e1e3207)
++- some external entity patches from https://github.com/owncloud/3rdparty/pull/74 - they should get superseeded by updating the affected libraries.
diff --cc 3rdparty/phpdocx/classes/AutoLoader.inc
index 0cdd112,0000000..fa22afe
mode 100644,000000..100644
--- a/3rdparty/phpdocx/classes/AutoLoader.inc
+++ b/3rdparty/phpdocx/classes/AutoLoader.inc
@@@ -1,143 -1,0 +1,143 @@@
 +<?php
 +
 +/**
 + * Autoloader
 + *
 + * @category   Phpdocx
 + * @package    loader
 + * @copyright  Copyright (c) Narcea Producciones Multimedia S.L.
 + *             (http://www.2mdc.com)
 + * @license    LGPL
 + * @version    3.0
 + * @link       http://www.phpdocx.com
 + * @since      File available since Release 3.0
 + */
 +class AutoLoader
 +{
 +
 +    /**
 +     * Main tags of relationships XML
 +     *
 +     * @access public
 +     * @static
 +     */
 +    public static function load()
 +    {
 +        spl_autoload_register(array('AutoLoader', 'autoloadGenericClasses'));
 +        spl_autoload_register(array('AutoLoader', 'autoloadPhpdocx'));
 +        spl_autoload_register(array('AutoLoader', 'autoloadLog4php'));
 +        spl_autoload_register(array('AutoLoader', 'autoloadTcpdf'));
 +        spl_autoload_register(array('AutoLoader', 'autoloadPdf'));
 +        spl_autoload_register(array('AutoLoader', 'autoloadDompdf'));
 +        spl_autoload_register(array('AutoLoader', 'autoloadMht'));
 +    }
 +
 +    /**
 +     * Autoload dompdf
 +     *
 +     * @access public
 +     * @param string $className Class to load
 +     */
 +    public static function autoloadDompdf($className)
 +    {
-         $pathDompdf = dirname(__FILE__) . '/../pdf/dompdf_config.inc.php';
++        $pathDompdf = dirname(__FILE__) . '/../../dompdf/dompdf_config.inc.php';
 +        if (file_exists($pathDompdf)) {
 +            require_once $pathDompdf;
 +        }
 +    }
 +
 +    /**
 +     * Autoload phpdocx
 +     *
 +     * @access public
 +     * @param string $className Class to load
 +     */
 +    public static function autoloadGenericClasses($className)
 +    {
 +        $pathPhpdocx = dirname(__FILE__) . '/' . $className . '.inc';
 +        if (file_exists($pathPhpdocx)) {
 +            require_once $pathPhpdocx;
 +        }
 +    }
 +
 +    /**
 +     * Autoload log4php
 +     *
 +     * @access public
 +     * @param string $className Class to load
 +     */
 +    public static function autoloadLog4php($className)
 +    {
 +        $pathLogphp = dirname(__FILE__) . '/../lib/log4php/'
 +            . $className . '.php';
 +        if (file_exists($pathLogphp)) {
 +            require_once $pathLogphp;
 +        }
 +    }
 +
 +    /**
 +     * Autoload mht
 +     *
 +     * @access public
 +     * @param string $className Class to load
 +     */
 +    public static function autoloadMht($className)
 +    {
 +        $pathMht = dirname(__FILE__) . '/../lib/'
 +            . $className . '.php';
 +        if (file_exists($pathMht)) {
 +            require_once $pathMht;
 +        }
 +    }
 +
 +    /**
 +     * Autoload phpdocx
 +     *
 +     * @access public
 +     * @param string $className Class to load
 +     */
 +    public static function autoloadPdf($className)
 +    {
 +        $pathPDF = dirname(__FILE__) . '/pdf/' . $className . '.inc';
 +        if (file_exists($pathPDF)) {
 +            require_once $pathPDF;
 +        }
 +        $pathTCPDF = dirname(__FILE__) . '/../pdf/tcpdf/tcpdf.php';
 +        if (file_exists($pathTCPDF)) {
 +            require_once $pathTCPDF;
 +        }
 +        $pathFPDI = dirname(__FILE__) . '/../lib/fpdi/fpdi.php';
 +        if (file_exists($pathFPDI)) {
 +            require_once $pathFPDI;
 +        }
 +    }
 +
 +    /**
 +     * Autoload phpdocx
 +     *
 +     * @access public
 +     * @param string $className Class to load
 +     */
 +    public static function autoloadPhpdocx($className)
 +    {
 +        $pathPhpdocx = dirname(__FILE__) . '/docx/' . $className . '.inc';
 +        if (file_exists($pathPhpdocx)) {
 +            require_once $pathPhpdocx;
 +        }
 +    }
 +
 +    /**
 +     * Autoload Tcpdf
 +     *
 +     * @access public
 +     * @param string $className Class to load
 +     */
 +    public static function autoloadTcpdf($className)
 +    {
 +        $pathTcpdf = dirname(__FILE__) . '/../pdf/class.tcpdf.php';
 +        if (file_exists($pathTcpdf)) {
 +            require_once $pathTcpdf;
 +        }
 +    }
 +
 +}
diff --cc 3rdparty/phpdocx/classes/CreateDocx.inc
index 6b1edda,0000000..8befdf1
mode 100644,000000..100644
--- a/3rdparty/phpdocx/classes/CreateDocx.inc
+++ b/3rdparty/phpdocx/classes/CreateDocx.inc
@@@ -1,3719 -1,0 +1,3730 @@@
 +<?php
 +
 +/**
 + * Generate a DOCX file
 + *
 + * @category   Phpdocx
 + * @package    create
 + * @copyright  Copyright (c) Narcea Producciones Multimedia S.L.
 + *             (http://www.2mdc.com)
 + * @license    LGPL
 + * @version    3.0
 + * @link       http://www.phpdocx.com
 + * @since      File available since Release 3.0
 + */
 +
 +error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
 +require_once dirname(__FILE__) . '/AutoLoader.inc';
 +AutoLoader::load();
 +require_once dirname(__FILE__) . '/Phpdocx_config.inc';
 +
 +class CreateDocx extends CreateDocument
 +{
 +    const NAMESPACEWORD = 'w';
 +    const SCHEMA_IMAGEDOCUMENT =
 +    'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image';
 +    const SCHEMA_OFFICEDOCUMENT =
 +    'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument';
 +
 +    /**
 +     *
 +     * @var string
 +     * @access public
 +     * @static
 +     */
 +    public static $PHPDOCXStyles;
 +    /**
 +     *
 +     * @access public
 +     * @static
 +     * @var integer
 +     */
 +    public static $numUL;
 +    /**
 +     *
 +     * @access public
 +     * @var integer
 +     */
 +    public static $numOL;
 +    /**
 +     *
 +     * @var string
 +     * @access public
 +     * @static
 +     */
 +    public static $orderedListStyle;
 +    /**
 +     *
 +     * @var string
 +     * @access public
 +     * @static
 +     */
 +    public static $unorderedListStyle;
 +    /**
 +     *
 +     * @access public
 +     * @var array
 +     */
 +    public $fileGraphicTemplate;
 +    /**
 +     *
 +     * @access private
 +     * @var boolean
 +     */
 +    private $footerAdded;
 +    /**
 +     *
 +     * @access private
 +     * @var boolean
 +     */
 +    private $headerAdded;
 +    /**
 +     *
 +     * @access public
 +     * @var string
 +     */
 +    public $graphicTemplate;
 +    /**
 +     *
 +     * @access public
 +     * @static
 +     * @var int
 +     */
 +    public static $intIdWord;
 +    /**
 +     *
 +     * @access public
 +     * @static
 +     * @var Logger
 +     */
 +    public static $log;
 +    /**
 +     *
 +     * @access public
 +     * @static
 +     * @var array
 +     */
 +     public static $settings = array('w:writeProtection',
 +                                    'w:view',
 +                                    'w:zoom',
 +                                    'w:removePersonalInformation',
 +                                    'w:removeDateAndTime',
 +                                    'w:doNotDisplayPageBoundaries',
 +                                    'w:displayBackgroundShape',
 +                                    'w:printPostScriptOverText',
 +                                    'w:printFractionalCharacterWidth',
 +                                    'w:printFormsData',
 +                                    'w:embedTrueTypeFonts',
 +                                    'w:embedSystemFonts',
 +                                    'w:saveSubsetFonts',
 +                                    'w:saveFormsData',
 +                                    'w:mirrorMargins',
 +                                    'w:alignBordersAndEdges',
 +                                    'w:bordersDoNotSurroundHeader',
 +                                    'w:bordersDoNotSurroundFooter',
 +                                    'w:gutterAtTop',
 +                                    'w:hideSpellingErrors',
 +                                    'w:hideGrammaticalErrors',
 +                                    'w:activeWritingStyle',
 +                                    'w:proofState',
 +                                    'w:formsDesign',
 +                                    'w:attachedTemplate',
 +                                    'w:linkStyles',
 +                                    'w:stylePaneFormatFilter',
 +                                    'w:stylePaneSortMethod',
 +                                    'w:documentType',
 +                                    'w:mailMerge',
 +                                    'w:revisionView',
 +                                    'w:trackRevisions',
 +                                    'w:doNotTrackMoves',
 +                                    'w:doNotTrackFormatting',
 +                                    'w:documentProtection',
 +                                    'w:autoFormatOverride',
 +                                    'w:styleLockTheme',
 +                                    'w:styleLockQFSet',
 +                                    'w:defaultTabStop',
 +                                    'w:autoHyphenation',
 +                                    'w:consecutiveHyphenLimit',
 +                                    'w:hyphenationZone',
 +                                    'w:doNotHyphenateCaps',
 +                                    'w:showEnvelope',
 +                                    'w:summaryLength',
 +                                    'w:clickAndTypeStyle',
 +                                    'w:defaultTableStyle',
 +                                    'w:evenAndOddHeaders',
 +                                    'w:bookFoldRevPrinting',
 +                                    'w:bookFoldPrinting',
 +                                    'w:bookFoldPrintingSheets',
 +                                    'w:drawingGridHorizontalSpacing',
 +                                    'w:drawingGridVerticalSpacing',
 +                                    'w:displayHorizontalDrawingGridEvery',
 +                                    'w:displayVerticalDrawingGridEvery',
 +                                    'w:doNotUseMarginsForDrawingGridOrigin',
 +                                    'w:drawingGridHorizontalOrigin',
 +                                    'w:drawingGridVerticalOrigin',
 +                                    'w:doNotShadeFormData',
 +                                    'w:noPunctuationKerning',
 +                                    'w:characterSpacingControl',
 +                                    'w:printTwoOnOne',
 +                                    'w:strictFirstAndLastChars',
 +                                    'w:noLineBreaksAfter',
 +                                    'w:noLineBreaksBefore',
 +                                    'w:savePreviewPicture',
 +                                    'w:doNotValidateAgainstSchema',
 +                                    'w:saveInvalidXml',
 +                                    'w:ignoreMixedContent',
 +                                    'w:alwaysShowPlaceholderText',
 +                                    'w:doNotDemarcateInvalidXml',
 +                                    'w:saveXmlDataOnly',
 +                                    'w:useXSLTWhenSaving',
 +                                    'w:saveThroughXslt',
 +                                    'w:showXMLTags',
 +                                    'w:alwaysMergeEmptyNamespace',
 +                                    'w:updateFields',
 +                                    'w:hdrShapeDefaults',
 +                                    'w:footnotePr',
 +                                    'w:endnotePr',
 +                                    'w:compat',
 +                                    'w:docVars',
 +                                    'w:rsids',
 +                                    'm:mathPr',
 +                                    'w:uiCompat97To2003',
 +                                    'w:attachedSchema',
 +                                    'w:themeFontLang',
 +                                    'w:clrSchemeMapping',
 +                                    'w:doNotIncludeSubdocsInStats',
 +                                    'w:doNotAutoCompressPictures',
 +                                    'w:forceUpgrade',
 +                                    'w:captions',
 +                                    'w:readModeInkLockDown',
 +                                    'w:smartTagType',
 +                                    'sl:schemaLibrary',
 +                                    'w:shapeDefaults',
 +                                    'w:doNotEmbedSmartTags',
 +                                    'w:decimalSymbol',
 +                                    'w:listSeparator'
 +                                    );
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_background;
 +     /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_backgroundColor;
 +     /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_baseTemplateFilesPath;
 +   /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_baseTemplatePath;
 +   /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_baseTemplateZip;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_bookmarksIds;
 +   /**
 +     *
 +     * @access private
 +     * @var boolean
 +     */
 +    private $_compatibilityMode;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_contentTypeC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_defaultFont;
 +    /**
 +     *
 +     * @access private
 +     * @var Debug
 +     */
 +    private $_debug;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_defaultPHPDOCXStyles;
 +    /**
 +     *
 +     * @access private
 +     * @var boolean
 +     */
 +    private $_defaultTemplate;
 +    /**
 +     *
 +     * @access private
 +     * @var boolean
 +     */
 +    private $_docm;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_docPropsAppC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_docPropsAppT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_docPropsCoreC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_docPropsCoreT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_docPropsCustomC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_docPropsCustomT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private static $_encodeUTF;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_extension;
 +    /**
 +     *
 +     * @access private
 +     * @var int
 +     */
 +    private $_idImgHeader;
 +    /**
 +     *
 +     * @access private
 +     * @var int
 +     */
 +    private $_idRels;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_idWords;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_language;
 +    /**
 +     *
 +     * @access private
 +     * @var boolean
 +     */
 +    private $_macro;
 +    /**
 +     *
 +     * @access private
 +     * @var int
 +     */
 +    private $_markAsFinal;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_parsedStyles;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_phpdocxconfig;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_relsRelsC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_relsRelsT;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_relsHeader;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_relsHeaderFooterImage;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_relsHeaderFooterImageExternal;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_relsHeaderFooterLink;
 +     /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_relsFooter;
 +     /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_sectPr;
 +    /**
 +     * Directory path used for temporary files
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_tempDir;
 +    /**
 +     * Path of temp file to use as DOCX file
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_tempFile;
 +    /**
 +     * Paths of temps files to use as DOCX file
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_tempFileXLSX;
 +    /**
 +     * Numberings used by the replaceTemplateVariabeByHTML
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_templateNumberings;
 +    /**
 +     * Unique id for the insertion of new elements
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_uniqid;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordDocumentC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordDocumentT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordDocumentStyles;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordEndnotesC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordEndnotesT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordFontTableC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordFontTableT;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordFooterC;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordFooterT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordFootnotesC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordFootnotesT;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordHeaderC;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordHeaderT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordNumberingC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordNumberingT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordRelsDocumentRelsC;
 +    /**
 +     *
 +     * @access private
 +     * @var DOMDocument
 +     */
 +    private $_wordRelsDocumentRelsT;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordRelsFooterRelsC;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordRelsFooterRelsT;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordRelsHeaderRelsC;
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_wordRelsHeaderRelsT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordSettingsC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordSettingsT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordStylesC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordStylesT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordThemeThemeT;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordThemeThemeC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordWebSettingsC;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordWebSettingsT;
 +    /**
 +     *
 +     * @access private
 +     * @var ZipArchive
 +     */
 +    private $_zipDocx;
 +
 +    /**
 +     * Construct
 +     *
 +     * @access public
 +     * @param string $baseTemplatePath. Optional, basicTemplate.docx as default
 +     */
 +    public function __construct($baseTemplatePath = PHPDOCX_BASE_TEMPLATE)
 +    {
 +        $this->_debug = Debug::getInstance();
 +
 +        $this->_phpdocxconfig = PhpdocxUtilities::parseConfig();
 +
 +        $this->_background = '';
 +        $this->_backgroundColor = 'FFFFFF';
 +        $this->_baseTemplateFilesPath;
 +        if ($baseTemplatePath == 'docm') {
 +            $this->_baseTemplatePath = PHPDOCX_BASE_FOLDER.'phpdocxBaseTemplate.docm';
 +            $this->_docm = true;
 +            $this->_defaultTemplate = true;
 +            $this->_extension = 'docm';
 +        } else if($baseTemplatePath == 'docx') {
 +            $this->_baseTemplatePath = PHPDOCX_BASE_FOLDER.'phpdocxBaseTemplate.docx';
 +            $this->_docm = false;
 +            $this->_defaultTemplate = true;
 +            $this->_extension = 'docx';
 +        } else {
 +            if ($baseTemplatePath == PHPDOCX_BASE_TEMPLATE) {
 +                $this->_defaultTemplate = true;
 +            } else {
 +                $this->_defaultTemplate = false;
 +            }
 +            $this->_baseTemplatePath = $baseTemplatePath;
 +            $extensionArray = explode('.', $this->_baseTemplatePath);
 +            $extension = array_pop($extensionArray);
 +            $this->_extension = $extension;
 +            if ($extension == 'docm') {
 +                $this->_docm = true;
 +            } else if ($extension == 'docx') {
 +                $this->_docm = false;
 +            } else {
 +                PhpdocxLogger::logger('Invalid base template extension', 'fatal');
 +            }
 +        }
 +        $this->_baseTemplateZip = new ZipArchive();
 +        $this->_bookmarksIds = array();
 +        $this->_idRels = array();
 +        $this->_idWords = array();
 +        $this->_idImgHeader = 1;
 +        $this->_idRels = 1;
 +        self::$intIdWord = rand(9999999,99999999);
 +        self::$_encodeUTF = 0;
 +        $this->_language = 'en-US';
 +        $this->_markAsFinal = 0;
 +        $this->graphicTemplate = array();
 +        $this->fileGraphicTemplate = array();
 +        $this->_zipDocx = new ZipArchive();
 +        if ($this->_phpdocxconfig['settings']['temp_path']) {
 +            $this->_tempDir = $this->_phpdocxconfig['settings']['temp_path'];
 +        } else {
 +            $this->_tempDir = self::getTempDir();
 +        }
 +        $this->_tempFile = tempnam($this->_tempDir, 'document');
 +        $this->_templateNumberings;
 +        $this->_zipDocx->open($this->_tempFile, ZipArchive::OVERWRITE);
 +        $this->_compatibilityMode = false;
 +        PhpdocxLogger::logger('Create a temp file to use as initial ZIP file. ' .
 +            'DOCX is a ZIP file.', 'info');
 +        // sign is set false as default
 +        $this->_sign = false;
 +        $this->_relsRelsC = '';
 +        $this->_relsRelsT = '';
 +        $this->_contentTypeC = '';
 +        $this->_contentTypeT = NULL;
 +        $this->_defaultFont = '';
 +        $this->_docPropsAppC = '';
 +        $this->_docPropsAppT = '';
 +        $this->_docPropsCoreC = '';
 +        $this->_docPropsCoreT = '';
 +        $this->_docPropsCustomC = '';
 +        $this->_docPropsCustomT = '';
 +        $this->_macro = 0;
 +        $this->_relsHeader = array();
 +        $this->_relsFooter = array();
 +        $this->_parsedStyles = array();
 +        $this->_relsHeaderFooterImage = array();
 +        $this->_relsHeaderFooterImageExternal = array();
 +        $this->_relsHeaderFooterLink = array();
 +        $this->_sectPr = NULL;
 +        $this->_tempFileXLSX = array();
 +        $this->_uniqid = 'phpdocx_'.uniqid();
 +        $this->_wordDocumentT = '';
 +        $this->_wordDocumentC = '';
 +        $this->_wordDocumentStyles = '';
 +        $this->_wordEndnotesC = '';
 +        $this->_wordEndnotesT = '';
 +        $this->_wordFontTableT = '';
 +        $this->_wordFontTableC = '';
 +        $this->_wordFooterC = array();
 +        $this->_wordFooterT = array();
 +        $this->_wordFootnotesC = '';
 +        $this->_wordFootnotesT = '';
 +        $this->_wordHeaderC = array();
 +        $this->_wordHeaderT = array();
 +        $this->_wordNumberingC;
 +        $this->_wordNumberingT;
 +        $this->_wordRelsDocumentRelsC = '';
 +        $this->_wordRelsDocumentRelsT = NULL;
 +        $this->_wordRelsHeaderRelsC = array();
 +        $this->_wordRelsHeaderRelsT = array();
 +        $this->_wordRelsFooterRelsC = array();
 +        $this->_wordRelsFooterRelsT = array();
 +        $this->_wordSettingsT = '';
 +        $this->_wordSettingsC = '';
 +        $this->_wordStylesT = '';
 +        $this->_wordStylesC = '';
 +        $this->_wordThemeThemeT = '';
 +        $this->_wordThemeThemeC = '';
 +        $this->_wordWebSettingsT = '';
 +        $this->_wordWebSettingsC = '';
 +        $this->_defaultPHPDOCXStyles = array('Default Paragraph Font PHPDOCX', //This is the default paragraph font style used in multiple places
 +                                            'List Paragraph PHPDOCX', //This is the style used for the defolt ordered and unorderd lists
 +                                            'Title PHPDOCX', //This style is used by the addTitle method
 +                                            'Subtitle PHPDOCX', //This style is used by the addTitle method
 +                                            'Normal Table PHPDOCX', //This style is used for the basic table
 +                                            'Table Grid PHPDOCX', //This style is for basic tables and is also used to embed HTML tables with border="1"
 +                                            'footnote text PHPDOCX', //This style is used for default footnotes
 +                                            'footnote text Car PHPDOCX', //The character style for footnotes
 +                                            'footnote reference PHPDOCX', // The style for the footnote
 +                                            'endnote text PHPDOCX', //This style is used for default endnotes
 +                                            'endnote text Car PHPDOCX', //The character style for endnotes
 +                                            'endnote reference PHPDOCX'); // The style for the endnote
 +        //Some variables to control that some v2.4 keep working
 +        $this->footerAdded = false;
 +        $this->headerAdded = false;
 +        self::$PHPDOCXStyles = '<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" >
 +                                        <w:style w:type="character" w:styleId="DefaultParagraphFontPHPDOCX">
 +                                            <w:name w:val="Default Paragraph Font PHPDOCX"/>
 +                                            <w:uiPriority w:val="1"/>
 +                                            <w:semiHidden/>
 +                                            <w:unhideWhenUsed/>
 +                                        </w:style>
 +                                        <w:style w:type="paragraph" w:styleId="ListParagraphPHPDOCX">
 +                                            <w:name w:val="List Paragraph PHPDOCX"/>
 +                                            <w:basedOn w:val="Normal"/>
 +                                            <w:uiPriority w:val="34"/>
 +                                            <w:qFormat/>
 +                                            <w:rsid w:val="00DF064E"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="720"/>
 +                                                <w:contextualSpacing/>
 +                                            </w:pPr>
 +                                        </w:style>
 +                                        <w:style w:type="paragraph" w:styleId="TitlePHPDOCX">
 +                                            <w:name w:val="Title PHPDOCX"/>
 +                                            <w:basedOn w:val="Normal"/>
 +                                            <w:next w:val="Normal"/>
 +                                            <w:link w:val="TitleCarPHPDOCX"/>
 +                                            <w:uiPriority w:val="10"/>
 +                                            <w:qFormat/>
 +                                            <w:rsid w:val="00DF064E"/>
 +                                            <w:pPr>
 +                                                <w:pBdr>
 +                                                    <w:bottom w:val="single" w:sz="8" w:space="4" w:color="4F81BD" w:themeColor="accent1"/>
 +                                                </w:pBdr>
 +                                                <w:spacing w:after="300" w:line="240" w:lineRule="auto"/>
 +                                                <w:contextualSpacing/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi"/>
 +                                                <w:color w:val="17365D" w:themeColor="text2" w:themeShade="BF"/>
 +                                                <w:spacing w:val="5"/>
 +                                                <w:kern w:val="28"/>
 +                                                <w:sz w:val="52"/>
 +                                                <w:szCs w:val="52"/>
 +                                            </w:rPr>
 +                                        </w:style>
 +                                        <w:style w:type="character" w:customStyle="1" w:styleId="TitleCarPHPDOCX">
 +                                            <w:name w:val="Title Car PHPDOCX"/>
 +                                            <w:basedOn w:val="DefaultParagraphFontPHPDOCX"/>
 +                                            <w:link w:val="TitlePHPDOCX"/>
 +                                            <w:uiPriority w:val="10"/>
 +                                            <w:rsid w:val="00DF064E"/>
 +                                            <w:rPr>
 +                                                <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi"/>
 +                                                <w:color w:val="17365D" w:themeColor="text2" w:themeShade="BF"/>
 +                                                <w:spacing w:val="5"/>
 +                                                <w:kern w:val="28"/>
 +                                                <w:sz w:val="52"/>
 +                                                <w:szCs w:val="52"/>
 +                                            </w:rPr>
 +                                        </w:style>
 +                                        <w:style w:type="paragraph" w:styleId="SubtitlePHPDOCX">
 +                                            <w:name w:val="Subtitle PHPDOCX"/>
 +                                            <w:basedOn w:val="Normal"/>
 +                                            <w:next w:val="Normal"/>
 +                                            <w:link w:val="SubtitleCarPHPDOCX"/>
 +                                            <w:uiPriority w:val="11"/>
 +                                            <w:qFormat/>
 +                                            <w:rsid w:val="00DF064E"/>
 +                                            <w:pPr>
 +                                                <w:numPr>
 +                                                    <w:ilvl w:val="1"/>
 +                                                </w:numPr>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi"/>
 +                                                <w:i/>
 +                                                <w:iCs/>
 +                                                <w:color w:val="4F81BD" w:themeColor="accent1"/>
 +                                                <w:spacing w:val="15"/>
 +                                                <w:sz w:val="24"/>
 +                                                <w:szCs w:val="24"/>
 +                                            </w:rPr>
 +                                        </w:style>
 +                                        <w:style w:type="character" w:customStyle="1" w:styleId="SubtitleCarPHPDOCX">
 +                                            <w:name w:val="Subtitle Car PHPDOCX"/>
 +                                            <w:basedOn w:val="DefaultParagraphFontPHPDOCX"/>
 +                                            <w:link w:val="SubtitlePHPDOCX"/>
 +                                            <w:uiPriority w:val="11"/>
 +                                            <w:rsid w:val="00DF064E"/>
 +                                            <w:rPr>
 +                                                <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi"/>
 +                                                <w:i/>
 +                                                <w:iCs/>
 +                                                <w:color w:val="4F81BD" w:themeColor="accent1"/>
 +                                                <w:spacing w:val="15"/>
 +                                                <w:sz w:val="24"/>
 +                                                <w:szCs w:val="24"/>
 +                                            </w:rPr>
 +                                        </w:style>
 +                                        <w:style w:type="table" w:styleId="NormalTablePHPDOCX">
 +                                            <w:name w:val="Normal Table PHPDOCX"/>
 +                                            <w:uiPriority w:val="99"/>
 +                                            <w:semiHidden/>
 +                                            <w:unhideWhenUsed/>
 +                                            <w:qFormat/>
 +                                            <w:pPr>
 +                                                <w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
 +                                            </w:pPr>
 +                                            <w:tblPr>
 +                                                <w:tblInd w:w="0" w:type="dxa"/>
 +                                                <w:tblCellMar>
 +                                                    <w:top w:w="0" w:type="dxa"/>
 +                                                    <w:left w:w="108" w:type="dxa"/>
 +                                                    <w:bottom w:w="0" w:type="dxa"/>
 +                                                    <w:right w:w="108" w:type="dxa"/>
 +                                                </w:tblCellMar>
 +                                            </w:tblPr>
 +                                        </w:style>
 +                                        <w:style w:type="table" w:styleId="TableGridPHPDOCX">
 +                                            <w:name w:val="Table Grid PHPDOCX"/>
 +                                            <w:uiPriority w:val="59"/>
 +                                            <w:rsid w:val="00493A0C"/>
 +                                            <w:pPr>
 +                                                <w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
 +                                            </w:pPr>
 +                                            <w:tblPr>
 +                                                <w:tblInd w:w="0" w:type="dxa"/>
 +                                                <w:tblBorders>
 +                                                    <w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
 +                                                    <w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
 +                                                    <w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
 +                                                    <w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>
 +                                                    <w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>
 +                                                    <w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/>
 +                                                </w:tblBorders>
 +                                                <w:tblCellMar>
 +                                                    <w:top w:w="0" w:type="dxa"/>
 +                                                    <w:left w:w="108" w:type="dxa"/>
 +                                                    <w:bottom w:w="0" w:type="dxa"/>
 +                                                    <w:right w:w="108" w:type="dxa"/>
 +                                                </w:tblCellMar>
 +                                            </w:tblPr>
 +                                        </w:style>
 +                                        <w:style w:type="paragraph" w:styleId="footnoteTextPHPDOCX">
 +                                            <w:name w:val="footnote Text PHPDOCX"/>
 +                                            <w:basedOn w:val="Normal"/>
 +                                            <w:link w:val="footnoteTextCarPHPDOCX"/>
 +                                            <w:uiPriority w:val="99"/>
 +                                            <w:semiHidden/>
 +                                            <w:unhideWhenUsed/>
 +                                            <w:rsid w:val="006E0FDA"/>
 +                                            <w:pPr>
 +                                                <w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:sz w:val="20"/>
 +                                                <w:szCs w:val="20"/>
 +                                            </w:rPr>
 +                                        </w:style>
 +                                        <w:style w:type="character" w:customStyle="1" w:styleId="footnoteTextCarPHPDOCX">
 +                                            <w:name w:val="footnote Text Car PHPDOCX"/>
 +                                            <w:basedOn w:val="DefaultParagraphFontPHPDOCX"/>
 +                                            <w:link w:val="footnoteTextPHPDOCX"/>
 +                                            <w:uiPriority w:val="99"/>
 +                                            <w:semiHidden/>
 +                                            <w:rsid w:val="006E0FDA"/>
 +                                            <w:rPr>
 +                                                <w:sz w:val="20"/>
 +                                                <w:szCs w:val="20"/>
 +                                            </w:rPr>
 +                                        </w:style>
 +                                        <w:style w:type="character" w:styleId="footnoteReferencePHPDOCX">
 +                                        <w:name w:val="footnote Reference PHPDOCX"/>
 +                                        <w:basedOn w:val="DefaultParagraphFontPHPDOCX"/>
 +                                        <w:uiPriority w:val="99"/>
 +                                        <w:semiHidden/>
 +                                        <w:unhideWhenUsed/>
 +                                        <w:rsid w:val="006E0FDA"/>
 +                                        <w:rPr>
 +                                            <w:vertAlign w:val="superscript"/>
 +                                        </w:rPr>
 +                                    </w:style>
 +                                    <w:style w:type="paragraph" w:styleId="endnoteTextPHPDOCX">
 +                                        <w:name w:val="endnote Text PHPDOCX"/>
 +                                        <w:basedOn w:val="Normal"/>
 +                                        <w:link w:val="endnoteTextCarPHPDOCX"/>
 +                                        <w:uiPriority w:val="99"/>
 +                                        <w:semiHidden/>
 +                                        <w:unhideWhenUsed/>
 +                                        <w:rsid w:val="006E0FDA"/>
 +                                        <w:pPr>
 +                                            <w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
 +                                        </w:pPr>
 +                                        <w:rPr>
 +                                            <w:sz w:val="20"/>
 +                                            <w:szCs w:val="20"/>
 +                                        </w:rPr>
 +                                    </w:style>
 +                                    <w:style w:type="character" w:customStyle="1" w:styleId="endnoteTextCarPHPDOCX">
 +                                        <w:name w:val="endnote Text Car PHPDOCX"/>
 +                                        <w:basedOn w:val="DefaultParagraphFontPHPDOCX"/>
 +                                        <w:link w:val="endnoteTextPHPDOCX"/>
 +                                        <w:uiPriority w:val="99"/>
 +                                        <w:semiHidden/>
 +                                        <w:rsid w:val="006E0FDA"/>
 +                                        <w:rPr>
 +                                            <w:sz w:val="20"/>
 +                                            <w:szCs w:val="20"/>
 +                                        </w:rPr>
 +                                    </w:style>
 +                                    <w:style w:type="character" w:styleId="endnoteReferencePHPDOCX">
 +                                        <w:name w:val="endnote Reference PHPDOCX"/>
 +                                        <w:basedOn w:val="DefaultParagraphFontPHPDOCX"/>
 +                                        <w:uiPriority w:val="99"/>
 +                                        <w:semiHidden/>
 +                                        <w:unhideWhenUsed/>
 +                                        <w:rsid w:val="006E0FDA"/>
 +                                        <w:rPr>
 +                                            <w:vertAlign w:val="superscript"/>
 +                                        </w:rPr>
 +                                    </w:style>
 +                                 </w:styles>';
 +
 +          self::$unorderedListStyle = '<w:abstractNum w:abstractNumId="" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" >
 +                                        <w:multiLevelType w:val="hybridMultilevel"/>
 +                                        <w:lvl w:ilvl="0" w:tplc="">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val=""/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="720" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="1" w:tplc="0C0A0003" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val="o"/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="1440" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="2" w:tplc="0C0A0005" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val=""/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="2160" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Wingdings" w:hAnsi="Wingdings" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="3" w:tplc="0C0A0001" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val=""/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="2880" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="4" w:tplc="0C0A0003" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val="o"/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="3600" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="5" w:tplc="0C0A0005" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val=""/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="4320" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Wingdings" w:hAnsi="Wingdings" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="6" w:tplc="0C0A0001" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val=""/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="5040" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="7" w:tplc="0C0A0003" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val="o"/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="5760" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="8" w:tplc="0C0A0005" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="bullet"/>
 +                                            <w:lvlText w:val=""/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="6480" w:hanging="360"/>
 +                                            </w:pPr>
 +                                            <w:rPr>
 +                                                <w:rFonts w:ascii="Wingdings" w:hAnsi="Wingdings" w:hint="default"/>
 +                                            </w:rPr>
 +                                        </w:lvl>
 +                                    </w:abstractNum>';
 +
 +        self::$orderedListStyle ='<w:abstractNum w:abstractNumId="" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" >
 +                                        <w:multiLevelType w:val="hybridMultilevel"/>
 +                                        <w:lvl w:ilvl="0" w:tplc="">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="decimal"/>
 +                                            <w:lvlText w:val="%1."/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="720" w:hanging="360"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="1" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="lowerLetter"/>
 +                                            <w:lvlText w:val="%2."/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="1440" w:hanging="360"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="2" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="lowerRoman"/>
 +                                            <w:lvlText w:val="%3."/>
 +                                            <w:lvlJc w:val="right"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="2160" w:hanging="180"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="3" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="decimal"/>
 +                                            <w:lvlText w:val="%4."/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="2880" w:hanging="360"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="4" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="lowerLetter"/>
 +                                            <w:lvlText w:val="%5."/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="3600" w:hanging="360"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="5" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="lowerRoman"/>
 +                                            <w:lvlText w:val="%6."/>
 +                                            <w:lvlJc w:val="right"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="4320" w:hanging="180"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="6" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="decimal"/>
 +                                            <w:lvlText w:val="%7."/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="5040" w:hanging="360"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="7" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="lowerLetter"/>
 +                                            <w:lvlText w:val="%8."/>
 +                                            <w:lvlJc w:val="left"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="5760" w:hanging="360"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                        <w:lvl w:ilvl="8" w:tplc="" w:tentative="1">
 +                                            <w:start w:val="1"/>
 +                                            <w:numFmt w:val="lowerRoman"/>
 +                                            <w:lvlText w:val="%9."/>
 +                                            <w:lvlJc w:val="right"/>
 +                                            <w:pPr>
 +                                                <w:ind w:left="6480" w:hanging="180"/>
 +                                            </w:pPr>
 +                                        </w:lvl>
 +                                    </w:abstractNum>';
 +
 +
 +        //We now try to open the zip file defined as base template
 +        try {
 +            $openBaseTemplate = $this->_baseTemplateZip->open($this->_baseTemplatePath);
 +            if ($openBaseTemplate !== true) {
 +                throw new Exception('Error while opening the Base Template: please, check the path');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +
 +        //We now extract the contents of the base template into a temp dir for further manipulation
 +        try {
 +            $this->_baseTemplateFilesPath = $this->_tempDir.'/'.uniqid(true);
 +            $extractBaseTemplate =$this->_baseTemplateZip->extractTo($this->_baseTemplateFilesPath);
 +            if ($extractBaseTemplate !== true) {
 +                throw new Exception('Error while extracting the Base Template: there may be problems writing in the default tmp folder');
 +            }
 +        }
 +        catch (Exception $e) {
 +          PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +
 +        //We should now check if there is any structured content as front page  to include it in the resulting document
 +
 +        try{
 +            $baseTemplateDocumentT = $this->_baseTemplateZip->getFromName('word/document.xml');
 +            if ($baseTemplateDocumentT == '') {
 +                throw new Exception('Error while extracting the document.xml file from the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +        $baseDocument = new DOMDocument();
++	libxml_disable_entity_loader(true);
 +        $baseDocument->loadXML($baseTemplateDocumentT);
 +        $docXpath = new DOMXPath($baseDocument);
 +        $docXpath->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');
 +        $queryDoc = '//w:body/w:sdt';
 +        $docNodes = $docXpath->query($queryDoc);
 +
 +        if ($docNodes->length > 0){
 +            if($docNodes->item(0)->nodeName == 'w:sdt'){
 +                $tempDoc = new DomDocument();
 +                $sdt =$tempDoc->importNode($docNodes->item(0), true);
 +                $newNode = $tempDoc->appendChild($sdt);
 +                $frontPage = $tempDoc->saveXML($newNode);
 +                $this->_wordDocumentC .= $frontPage;
 +            }
 +        }
 +
 +        //Let us extract now the section information to include it at the end of the document.xml file
 +
 +        $sectPr = $baseDocument->getElementsByTagName('sectPr')->item(0);
 +        $this->_sectPr = new DOMDocument();
 +        $sectNode = $this->_sectPr->importNode($sectPr, true);
 +        $this->_sectPr->appendChild($sectNode);
 +
 +        //Let us extract the contents of the [Content_Types].xml file for further manipulation
 +
 +        try {
 +            $baseTemplateContentTypeT = $this->_baseTemplateZip->getFromName('[Content_Types].xml');
 +            if ($baseTemplateContentTypeT  == '') {
 +                throw new Exception('Error while extracting the [Content_Types].xml file from the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +        $this->_contentTypeT = new DOMDocument();
++        libxml_disable_entity_loader(true);
 +        $this->_contentTypeT->loadXML($baseTemplateContentTypeT);
 +
 +        //We are going to include the standard image defaults
 +
 +        $this->generateDEFAULT('gif', 'image/gif');
 +        $this->generateDEFAULT('jpg', 'image/jpg');
 +        $this->generateDEFAULT('png', 'image/png');
 +        $this->generateDEFAULT('jpeg', 'image/jpeg');
 +        $this->generateDEFAULT('bmp', 'image/bmp');
 +
 +
 +        //Let us extract the document.xml.rels for further manipulation
 +        try {
 +            $baseTemplateDocumentRelsT = $this->_baseTemplateZip->getFromName('word/_rels/document.xml.rels');
 +            if ($baseTemplateDocumentRelsT == '') {
 +                throw new Exception('Error while extracting the document.xml.rels file from the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +
 +        $this->_wordRelsDocumentRelsT = new DOMDocument();
++        libxml_disable_entity_loader(true);
 +        $this->_wordRelsDocumentRelsT->loadXML($baseTemplateDocumentRelsT);
 +        $relationships = $this->_wordRelsDocumentRelsT->getElementsByTagName('Relationship');
 +
 +        //Now we have to take care of the case that the template used is not one of the default preprocessed templates
 +
 +        if ($this->_defaultTemplate) {
 +            self::$numUL = 1;
 +            self::$numOL = rand(9999, 999999999);
 +
 +            //Let's get the original template numbering.xml file as a DOMdocument
 +            try {
 +                $this->_wordNumberingT = $this->_baseTemplateZip->getFromName('word/numbering.xml');
 +                if ($this->_wordNumberingT == '') {
 +                    throw new Exception('Error while extracting the numbering file from the base template');
 +                }
 +            }
 +            catch (Exception $e) {
 +                PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +            }
 +        } else {
 +            //We should do now some cleaning of the files from the base template zip
 +            //Let us first look at the document.xml.rels file to analyze the contents
 +            //Let us analyze its structure
 +            //In order to do that we should parse word/_rels/document.xml.rels
 +            $counter = $relationships->length -1;
 +
 +            for ($j=$counter; $j > -1; $j--) {
 +                $completeType = $relationships->item($j)->getAttribute('Type');
 +                $target = $relationships->item($j)->getAttribute('Target');
 +                $tempArray = explode('/', $completeType);
 +                $type = array_pop($tempArray);
 +                //This array holds the data that has to be changed in settings.xml
 +                $arrayCleaner = array();
 +
 +                switch($type){
 +                    case 'header':
 +                        //TODO: this should be changed if we use default templates with headers
 +                        array_push($this->_relsHeader,$target);
 +                        break;
 +                    case 'footer':
 +                        //TODO: this should be changed if we use default templates with footers
 +                        array_push($this->_relsFooter,$target);
 +                        break;
 +                    case 'chart':
 +                        $this->recursiveDelete($this->_baseTemplateFilesPath.'/word/charts');
 +                        $this->_wordRelsDocumentRelsT->documentElement->removeChild($relationships->item($j));
 +                        break;
 +                    case 'embeddings':
 +                        $this->recursiveDelete($this->_baseTemplateFilesPath.'/word/embeddings');
 +                        $this->_wordRelsDocumentRelsT->documentElement->removeChild($relationships->item($j));
 +                        break;
 +                }
 +
 +            }
 +
 +           //Let us now manage the numbering.xml and style.xml files
 +           // We are going to use some default styles, for example, in the creation of lists, footnotes, titles, ...
 +           // So we should make sure that it is included in the styles.xml document
 +           $this->importStyles(PHPDOCX_BASE_TEMPLATE, 'merge', $this->_defaultPHPDOCXStyles);
 +           //Let us first check if the base template file has a numbering.xml file
 +           $numRef = rand(9999999, 99999999);
 +           self::$numUL = $numRef;
 +           self::$numOL = $numRef +1;
 +
 +           if(file_exists($this->_baseTemplateFilesPath.'/word/numbering.xml')) {
 +                //Let's get the original template numbering.xml file as a DOMdocument
 +                try {
 +                    $this->_wordNumberingT = $this->_baseTemplateZip->getFromName('word/numbering.xml');
 +                    if ($this->_wordNumberingT == '') {
 +                        throw new Exception('Error while extracting the numbering file from the base template');
 +                    }
 +                } catch (Exception $e) {
 +                    PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +                }
 +                $this->_wordNumberingT = $this->importSingleNumbering($this->_wordNumberingT, self::$unorderedListStyle, self::$numUL);
 +                $this->_wordNumberingT = $this->importSingleNumbering($this->_wordNumberingT, self::$orderedListStyle, self::$numOL);
 +            }else{
 +                $this->_wordNumberingT = $this->generateBaseWordNumbering();
 +                $this->_wordNumberingT = $this->importSingleNumbering($this->_wordNumberingT, self::$unorderedListStyle, self::$numUL);
 +                $this->_wordNumberingT = $this->importSingleNumbering($this->_wordNumberingT, self::$orderedListStyle, self::$numOL);
 +                //Now we should include the corresponding relationshipand Override
 +                    $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +                     'rId' . rand(99999999, 999999999), 'numbering', 'numbering.xml'
 +                    );
 +                    $this->generateOVERRIDE('/word/numbering.xml','application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml');
 +            }
 +
 +            //Let us now make sure that there are the corresponding xmls, with all their relationships for endnotes and footnotes
 +            if(!file_exists($this->_baseTemplateFilesPath.'/word/endnotes.xml') || !file_exists($this->_baseTemplateFilesPath.'/word/footnotes.xml')){
 +                $notesZip = new ZipArchive();
 +                try {
 +                    $openNotesZip = $notesZip->open(PHPDOCX_BASE_TEMPLATE);
 +                    if ($openNotesZip !== true){
 +                    throw new Exception('Error while opening the standard base template to extract the word/footnotes.xml  and word/endnotes.xml file');
 +                    }
 +                }
 +                catch (Exception $e) {
 +                    PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +                }
 +
 +                $arraySettings = array();
 +                if(!file_exists($this->_baseTemplateFilesPath.'/word/footnotes.xml')){
 +                    $notesZip->extractTo($this->_baseTemplateFilesPath, 'word/footnotes.xml');
 +                    //Now we should include the corresponding relationshipand Override
 +                    $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +                     'rId' . rand(99999999, 999999999), 'footnotes', 'footnotes.xml'
 +                    );
 +                   $this->generateOVERRIDE('/word/footnotes.xml','application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml');
 +                   array_push($arraySettings, '<w:footnotePr><w:footnote w:id="-1" /><w:footnote w:id="0" /></w:footnotePr>');
 +                }
 +                if(!file_exists($this->_baseTemplateFilesPath.'/word/endnotes.xml')){
 +                    $notesZip->extractTo($this->_baseTemplateFilesPath, 'word/endnotes.xml');
 +                    //Now we should include the corresponding relationshipand Override
 +                    $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +                     'rId' . rand(99999999, 999999999), 'endnotes', 'endnotes.xml'
 +                    );
 +                   $this->generateOVERRIDE('/word/endnotes.xml','application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml');
 +                   array_push($arraySettings,'<w:endnotePr><w:endnote w:id="-1" /><w:endnote w:id="0" /></w:endnotePr>');
 +                }
 +
 +                //$this->includeSettings($arraySettings)
 +            }
 +        }
 +        $this->setLanguage($this->_phpdocxconfig['settings']['language']);
 +
 +    }
 +
 +    /**
 +     * Destruct
 +     *
 +     * @access public
 +     */
 +    public function __destruct()
 +    {
 +
 +    }
 +
 +    /**
 +     * Magic method, returns current word XML
 +     *
 +     * @access public
 +     * @return string Return current word
 +     */
 +    public function __toString()
 +    {
 +        $this->generateTemplateWordDocument();
 +        PhpdocxLogger::logger('Get document template content.', 'debug');
 +        return $this->_wordDocumentT;
 +    }
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setExtension($extension)
 +    {
 +        $this->_extension = $extension;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getExtension()
 +    {
 +        return $this->_extension;
 +    }
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setTemporaryDirectory($tempDir)
 +    {
 +        $this->_tempDir = $tempDir;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getTemporaryDirectory()
 +    {
 +        return $this->_tempDir;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlContentTypes($xmlContentTypes)
 +    {
 +        $this->_contentTypeC = $xmlContentTypes;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlContentTypes()
 +    {
 +        return $this->_contentTypeC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlRelsRels($xmlRelsRels)
 +    {
 +        $this->_relsRelsC = $xmlRelsRels;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlRelsRels()
 +    {
 +        return $this->_relsRelsC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlDocPropsApp($xmlDocPropsApp)
 +    {
 +        $this->_docPropsAppC = $xmlDocPropsApp;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlDocPropsApp()
 +    {
 +        return $this->_docPropsAppC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlDocPropsCore($xmlDocPropsCore)
 +    {
 +        $this->_docPropsCoreC = $xmlDocPropsCore;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlDocPropsCore()
 +    {
 +        return $this->_docPropsCoreC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlDocPropsCustom($xmlDocPropsCustom)
 +    {
 +        $this->_docPropsCustomC = $xmlDocPropsCustom;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlDocPropsCustom()
 +    {
 +        return $this->_docPropsCustomC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordDocument($xmlWordDocument)
 +    {
 +        $this->_wordDocumentC = $xmlWordDocument;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordDocumentContent()
 +    {
 +        return $this->_wordDocumentC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordDocumentStyles($xmlWordDocumentStyles)
 +    {
 +        $this->_wordDocumentStyles = $xmlWordDocumentStyles;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordDocumentStyles()
 +    {
 +        return $this->_wordDocumentStyles;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordEndnotes($xmlWordEndnotes)
 +    {
 +        $this->_wordEndnotesC = $xmlWordEndnotes;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordEndnotes()
 +    {
 +        return $this->_wordEndnotesC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordFontTable($xmlWordFontTable)
 +    {
 +        $this->_wordFontTableC = $xmlWordFontTable;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordFontTable()
 +    {
 +        return $this->_wordFontTableC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordFooter1($xmlWordFooter)
 +    {
 +        $this->_wordFooterC = $xmlWordFooter;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordFooter1()
 +    {
 +        return $this->_wordFooterC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordHeader1($xmlWordHeader)
 +    {
 +        $this->_wordHeaderC = $xmlWordHeader;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordHeader1()
 +    {
 +        return $this->_wordHeaderC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordRelsDocumentRels($xmlWordRelsDocumentRels)
 +    {
 +        $this->_wordRelsDocumentRelsC = $xmlWordRelsDocumentRels;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordRelsDocumentRels()
 +    {
 +        return $this->_wordRelsDocumentRelsC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordSettings($xmlWordSettings)
 +    {
 +        $this->_wordSettingsC = $xmlWordSettings;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordSettings()
 +    {
 +        return $this->_wordSettingsC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordStyles($xmlWordStyles)
 +    {
 +        $this->_wordStylesC = $xmlWordStyles;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordStyles()
 +    {
 +        return $this->_wordStylesC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordThemeTheme1($xmlWordThemeTheme)
 +    {
 +        $this->_wordThemeThemeC = $xmlWordThemeTheme;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getXmlWordThemeTheme1()
 +    {
 +        return $this->_wordThemeThemeC;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setXmlWordWebSettings($xmlWordWebSettings)
 +    {
 +        $this->_wordWebSettingsC = $xmlWordWebSettings;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function getXml_Word_WebSettings()
 +    {
 +        return $this->_wordWebSettingsC;
 +    }
 +
 +    /**
 +     * Add a break
 +     *
 +     * @access public
 +     * @example ../examples/easy/PageBreak.php
 +     * @param string $options
 +     *  Values:
 +     * 'type' (line, page, column)
 +     */
 +    public function addBreak($options = array('type' => 'line'))
 +    {
 +        $break = CreatePage::getInstance();
 +        $break->generatePageBreak($options['type']);
 +        PhpdocxLogger::logger('Add break to word document.', 'info');
 +        $this->_wordDocumentC .= (string) $break;
 +    }
 +
 +    /**
 +     * Add a chart
 +     *
 +     * @access public
 +     * @example ../examples/easy/Chart.php
 +     * @example ../examples/easy/Chart_bar.php
 +     * @param array $options
 +     *  Values: 'color' (1, 2, 3...) color scheme,
 +     *  'perspective' (20, 30...),
 +     *  'rotX' (20, 30...),
 +     *  'rotY' (20, 30...),
 +     *  'data' (array of values),
 +     *  'float' (left, right, center) floating image. It only applies if textWrap is not inline (default value).
 +     *  'font' (Arial, Times New Roman...),
 +     *  'groupBar' (clustered, stacked, percentStacked),
 +     *  'horizontalOffset' (int) given in emus (1cm = 360000 emus)
 +     *  'jc' (center, left, right),
 +     *  'showPercent' (0, 1),
 +     *  'sizeX' (10, 11, 12...),
 +     *  'sizeY' (10, 11, 12...),
 +     *  'textWrap' (0 (inline), 1 (square), 2 (front), 3 (back), 4 (up and bottom)),
 +     *  'verticalOffset' (int) given in emus (1cm = 360000 emus)
 +     *  'title',
 +     *  'type' (barChart, pieChart)
 +     *  'legendPos' (r, l, t, b, none),
 +     *  'legendOverlay' (0, 1),
 +     *  'border' (0, 1),
 +     *  'haxLabel' horizontal axis label,
 +     *  'vaxLabel' vertical axis label,
 +     *  'showtable' (0, 1) shows the table of values,
 +     *  'vaxLabelDisplay' (rotated, vertical, horizontal),
 +     *  'haxLabelDisplay' (rotated, vertical, horizontal),
 +     *  'hgrid' (0, 1, 2, 3),
 +     *  'vgrid' (0, 1, 2, 3),
 +     *  'style' this work only in radar charts.
 +     *  'gapWidth' distance between the pie and the second chart(ofpiechart)
 +     *  'secondPieSize' : size of the second chart(ofpiechart)
 +     *  'splitType' how decide to split the values :auto(Default Split), cust(Custom Split), percent(Split by Percentage), pos(Split by Position), val(Split by Value)
 +     *  'splitPos' split position , integer or float
 +     *  'custSplit' array of index to split
 +     *  'subtype' type of the second chart pie or bar
 +     *  'explosion' distance between the diferents values
 +     *  'holeSize' size of the hole in doughnut type
 +     *  'symbol'  array of symbols(scatter chart)
 +     *  'symbolSize' the size of the simbols
 +     *  'smooth' smooth the line (scatter chart)
 +     *  'wireframe' boolean(surface chart)to remove content color and only leave the border colors
 +     *  'showValue' (0,1) shows the values inside the chart
 +     *  'showCategory' (0,1) shows the category inside the chart
 +     */
 +    public function addChart($options = array())
 +    {
 +        PhpdocxLogger::logger('Create chart.', 'debug');
 +        try {
 +            if (isset($options['data']) && isset($options['type'])) {
 +                self::$intIdWord++;
 +                PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . Chart.', 'debug');
 +                $type = $options['type'];
 +                if(strpos($type, 'Chart') === false)
 +                    $type .= 'Chart';
 +
 +                $graphic = CreateChartFactory::createObject($type);
 +
 +                if ($graphic->createGraphic(self::$intIdWord, $options) != false) {
 +                    PhpdocxLogger::logger('Add chart word/charts/chart' . self::$intIdWord .
 +                        '.xml to DOCX.', 'info');
 +                    $this->_zipDocx->addFromString(
 +                        'word/charts/chart' . self::$intIdWord . '.xml',
 +                        $graphic->getXmlChart()
 +                    );
 +                    $this->_wordRelsDocumentRelsC .=
 +                        $this->generateRELATIONSHIP(
 +                            'rId' . self::$intIdWord, 'chart',
 +                            'charts/chart' . self::$intIdWord . '.xml'
 +                        );
 +                    $this->generateDEFAULT('xlsx', 'application/octet-stream');
 +                    $this->generateOVERRIDE(
 +                        '/word/charts/chart' . self::$intIdWord . '.xml',
 +                        'application/vnd.openxmlformats-officedocument.' .
 +                        'drawingml.chart+xml'
 +                    );
 +                } else {
 +                    throw new Exception(
 +                        'There was an error related to the chart.'
 +                    );
 +                }
 +                $excel = $graphic->getXlsxType();
 +
 +                $this->_tempFileXLSX[self::$intIdWord] =
 +                    tempnam($this->_tempDir, 'documentxlsx');
 +                if (
 +                    $excel->createXlsx(
 +                        $this->_tempFileXLSX[self::$intIdWord],
 +                        $options['data']
 +                    ) != false
 +                ) {
 +                    $this->_zipDocx->addFile(
 +                        $this->_tempFileXLSX[self::$intIdWord],
 +                        'word/embeddings/datos' . self::$intIdWord . '.xlsx'
 +                    );
 +
 +                    $chartRels = CreateChartRels::getInstance();
 +                    $chartRels->createRelationship(self::$intIdWord);
 +                    $this->_zipDocx->addFromString(
 +                        'word/charts/_rels/chart' . self::$intIdWord .
 +                        '.xml.rels',
 +                        (string) $chartRels
 +                    );
 +                }
 +                $this->_wordDocumentC .= (string) $graphic;
 +            } else {
 +                throw new Exception(
 +                    'Images must have "data" and "type" values.'
 +                );
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +    }
 +
 +    /**
 +     * Add an image
 +     *
 +     * @access public
 +     * @example ../examples/easy/Image.php
 +     * @param array $data
 +     * Values:
 +     * 'border'(int) 1, 2, 3...
 +     * 'borderDiscontinuous' (0, 1)
 +     * 'float' (left, right, center) floating image. It only applies if textWrap is not inline (default value).
 +     * 'font' (string) Arial, Times New Roman...
 +     * 'horizontalOffset' (int) given in emus (1cm = 360000 emus). Only applies if there is the image is not floating
 +     * 'jc' (center, left, right, inside, outside)
 +     * 'name' (string) path to a local image
 +     * 'scaling' (int) 50, 100, ..
 +     * 'sizeX' (int) 10, 11, 12...
 +     * 'sizeY' (int) 10, 11, 12...
 +     * 'dpi' (int) dots per inch
 +     * 'spacingTop' (int) 10, 11...
 +     * 'spacingBottom' (int) 10, 11...
 +     * 'spacingLeft' (int) 10, 11...
 +     * 'spacingRight' (int) 10, 11...
 +     * 'textWrap' 0 (inline), 1 (square), 2 (front), 3 (back), 4 (up and bottom))
 +     * 'target' (string): document (default value), defaultHeader, firstHeader, evenHeader, defaultFooter, firstFooter, evenFooter
 +     * 'verticalOffset' (int) given in emus (1cm = 360000 emus)
 +     */
 +    public function addImage($data = '')
 +    {
 +        if(!isset($data['target'])){
 +           $data['target'] = 'document';
 +        }
 +        PhpdocxLogger::logger('Create image.', 'debug');
 +        try {
 +            if (isset($data['name']) && file_exists($data['name']) == 'true') {
 +                $attrImage = getimagesize($data['name']);
 +                try {
 +                    if ($attrImage['mime'] == 'image/jpg' ||
 +                        $attrImage['mime'] == 'image/jpeg' ||
 +                        $attrImage['mime'] == 'image/png' ||
 +                        $attrImage['mime'] == 'image/gif'
 +                    ) {
 +                        self::$intIdWord++;
 +                        PhpdocxLogger::logger('New ID rId' . self::$intIdWord . ' . Image.', 'debug');
 +                        $image = CreateImage::getInstance();
 +                        $data['rId'] = self::$intIdWord;
 +                        $image->createImage($data);
 +                        $dir = $this->parsePath($data['name']);
 +                        PhpdocxLogger::logger('Add image word/media/imgrId' .
 +                            self::$intIdWord . '.' . $dir['extension'] .
 +                            '.xml to DOCX.', 'info');
 +                        $this->_zipDocx->addFile(
 +                            $data['name'], 'word/media/imgrId' .
 +                            self::$intIdWord . '.' .
 +                            $dir['extension']
 +                        );
 +                        $this->generateDEFAULT(
 +                            $dir['extension'], $attrImage['mime']
 +                        );
 +                        if ((string) $image != ''){
 +                            //Here we consider the case where the image will be included in a header or footer
 +                            if($data['target'] == 'defaultHeader' ||
 +                               $data['target'] == 'firstHeader' ||
 +                               $data['target'] == 'evenHeader' ||
 +                               $data['target'] == 'defaultFooter' ||
 +                               $data['target'] == 'firstFooter' ||
 +                               $data['target'] == 'evenFooter'){
 +                                $this->_relsHeaderFooterImage[$data['target']][] =
 +                                array('rId' => 'rId' . self::$intIdWord, 'extension' => $dir['extension']);
 +                            }else{
 +                                $this->_wordRelsDocumentRelsC .=
 +                                    $this->generateRELATIONSHIP(
 +                                        'rId' . self::$intIdWord, 'image',
 +                                        'media/imgrId' . self::$intIdWord . '.'
 +                                        . $dir['extension']
 +                                    );
 +                            }
 +                        }
 +                        $this->_wordDocumentC .= (string) $image;
 +                    } else {
 +                        throw new Exception('Image format is not supported.');
 +                    }
 +                }
 +                catch (Exception $e) {
 +                    PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +                }
 +            } else {
 +                throw new Exception('Image does not exist.');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +    }
 +
 +    /**
 +     * Add a link
 +     *
 +     * @access public
 +     * @example ../examples/easy/Link.php
 +     * @param array $options
 +     * @see addText
 +     * additional parameter:
 +     * 'url' (string) URL or #bookmarkName
 +     *
 +     */
 +    public function addLink($text, $options = array('url' => '',
 +                                                    'font' => '',
 +                                                    'sz' => '',
 +                                                    'color' => '0000ff',
 +                                                    'u' => 'single',
 +                                                    ))
 +    {
 +        if(substr($options['url'], 0, 1) == '#'){
 +            $url = 'HYPERLINK \l "' . substr($options['url'], 1) . '"';
 +        }else{
 +            $url = 'HYPERLINK "' . $options['url'] . '"';
 +        }
 +        if ($text == '') {
 +            PhpdocxLogger::logger('The linked text is missing', 'fatal');
 +        } else if($options['url'] == '') {
 +            PhpdocxLogger::logger('The URL is missing', 'fatal');
 +        }
 +        if (isset($options['color'])) {
 +            $color = $options['color'];
 +        } else {
 +            $color = '0000ff';
 +        }
 +        if (isset($options['u'])) {
 +            $u = $options['u'];
 +        } else {
 +            $u = 'single';
 +        }
 +        $textOptions = $options;
 +        $textLink = CreateText::getInstance();
 +        $textLink->createText($text, $textOptions);
 +        $link = (string) $textLink;
 +        $link = preg_replace('/__[A-Z]+__/', '', $link);
 +        $startNodes ='<w:r><w:fldChar w:fldCharType="begin" /></w:r><w:r>
 +        <w:instrText xml:space="preserve">'.$url.'</w:instrText>
 +        </w:r><w:r><w:fldChar w:fldCharType="separate" /></w:r>';
 +        if(strstr($link, '</w:pPr>')){
 +            $link = preg_replace('/<\/w:pPr>/', '</w:pPr>'.$startNodes, $link);
 +        }else{
 +            $link = preg_replace('/<w:p>/', '<w:p>'.$startNodes, $link);
 +        }
 +        $endNode = '<w:r><w:fldChar w:fldCharType="end" /></w:r>';
 +        $link = preg_replace('/<\/w:p>/', $endNode . '</w:p>', $link);
 +        PhpdocxLogger::logger('Add link to word document.', 'info');
 +        $this->_wordDocumentC .= (string) $link;
 +    }
 +
 +    /**
 +     * Add a list
 +     *
 +     * @access public
 +     * @example ../examples/easy/List.php
 +     * @param array $data Values of the list
 +     * @param array $options
 +     *  Values:
 +     * 'font' (string), Arial, Times New Roman, ...
 +     * 'val' (int), 0 (clear), 1 (inordinate), 2(numerical)
 +     * 'bullets' (array) 1 (), 2 (o), 3 ()
 +     */
 +    public function addList($data, $options = array())
 +    {
 +        $list = CreateList::getInstance();
 +
 +        if ($options['val'] == 2){
 +            self::$numOL++;
 +            $this->_wordNumberingT = $this->importSingleNumbering($this->_wordNumberingT, self::$orderedListStyle, self::$numOL);
 +        }
 +        $list->createList($data, $options);
 +        PhpdocxLogger::logger('Add list to word document.', 'info');
 +        $this->_wordDocumentC .= (string) $list;
 +
 +        if (!empty($options['bullets'])
 +            && is_array($options['bullets'])
 +            && $options['val'] == 1
 +        ) {
 +            for ($i = 0; $i <= CreateList::MAXDEPTH; $i++) {
 +                $bullets = $options['bullets'];
 +                        if (isset($bullets[$i])) {
 +                            $styleId = $bullets[$i];
 +                        } else {
 +                            $styleId = $i;
 +                        }
 +                $list->createListStyles($i, $styleId);
 +                PhpdocxLogger::logger('Add list styles to word document.', 'info');
 +                $this->_wordDocumentStyles .= (string) $list;
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Add a raw WordML
 +     *
 +     * @access public
 +     * @param string $wml WordML to add
 +     * @deprecated See addWordML
 +     */
 +    public function addRawWordML($wml)
 +    {
 +        PhpdocxLogger::logger('Add raw WordML.', 'info');
 +        $this->_wordDocumentC .= $wml;
 +    }
 +
 +    /**
 +     * Add a table.
 +     *
 +     * @access public
 +     * @example ../examples/easy/Table.php
 +     * @param array $tableData an array of arrays with the table data organized by rows
 +     * Each cell content may be a string or array.
 +     * If the cell contents are in the form of an array its keys and posible values are:
 +     *      'value' (string)
 +     *      'rowspan' (int)
 +     *      'colspan' (int)
 +     *      'width' (int) in twentieths of a point
 +     *      'border' (none, single, double, dashed, threeDEngrave, threeDEmboss, outset, inset)
 +     *      'border_color' (ffffff, ff0000)
 +     *      'border_spacing' (0, 1, 2...)
 +     *      'border_sz' (10, 11...) in eights of a point
 +     *      'border_<side>' (none, single, double, dashed, threeDEngrave, threeDEmboss, outset, inset) where the side may be: top, left, right or bottom
 +     *      'border_<side>_color' (ffffff, ff0000)
 +     *      'border_<side>_spacing' (0, 1, 2...)
 +     *      'border_<side>_sz' (10, 11...)
 +     *      'background_color' (ffffff, ff0000)
 +     *      'noWrap' (boolean)
 +     *      'cellMargin' (mixed) an integer value or an array:
 +     *          'top' (int) in twentieths of a point
 +     *          'right' (int) in twentieths of a point
 +     *          'bottom' (int) in twentieths of a point
 +     *          'left' (int) in twentieths of a point
 +     *      'textDirection' (string) available values are: tbRl and btLr
 +     *      'fitText' (boolean) if true fits the text to the size of the cell
 +     *      'vAlign' (string) vertical align of text: top, center, both or bottom
 +     *
 +     * @param array $tableProperties Parameters to use
 +     *  Values:
 +     *  'border' (none, single, double, dashed, threeDEngrave, threeDEmboss, outset, inset)
 +     *  'border_color' (ffffff, ff0000)
 +     *  'border_spacing' (0, 1, 2...)
 +     *  'border_sz' (10, 11...) in eights of a point
 +     *  'border_settings' (all, outside, inside) if all (default value) the border styles apply to all table borders.
 +     *  If the value is set to outside or inside the border styles will only apply to the outside or inside boreders respectively.
 +     *  'cantSplitRows' (boolean) set global row split properties (can be overriden by rowProperties)
 +     *  'cellMargin' (array) the keys are top, right, bottom and left and the values is given in twips (twentieths of a point)
 +     *  'cellSpacing' (int) given in twips (twentieths of a point)
 +     *  'float' (array) with the following keys and values:
 +     *      'textMargin_top' (int) in twentieths of a point
 +     *      'textMargin_right' (int) in twentieths of a point
 +     *      'textMargin_bottom' (int) in twentieths of a point
 +     *      'textMargin_left' (int) in twentieths of a point
 +     *      'align' (string) posible values are: left, center, right, outside, inside
 +     *  'font' (Arial, Times New Roman...)
 +     *  'indent' (int) given in twips (twentieths of a point)
 +     *  'jc' (center, left, right)
 +     *  'decimalTab'
 +     *  'size_col': column width fix (int)
 +     *              column width variable (array)
 +     *  'tableWidth' (array) its posible keys and values are:
 +     *      'type' (pct, dxa) pct if the value refers to percentage and dxa if the value is given in twentieths of a point (twips)
 +     *      'value' (int)
 +     *  'TBLSTYLEval' (string) Word table style
 +     *
 +     * @param array $rowProperties (array) a cero based array. Each entry is an array with keys and values:
 +     *      'cantSplit' (boolean)
 +     *      'minHeight' (int) in twentieths of a point
 +     *      'height' (int) in twentieths of a point
 +     *      'tblHeader' (boolean) if true this row repeats at the beguinning of each new page
 +     */
 +    public function addTable($tableData, $tableProperties= array(), $rowProperties = array())
 +    {
 +        $table = CreateTable::getInstance();
 +        $table->createTable($tableData, $tableProperties, $rowProperties);
 +        PhpdocxLogger::logger('Add table to Word document.', 'info');
 +        $this->_wordDocumentC .= (string) $table;
 +    }
 +
 +    /**
 +     * Add a text
 +     *
 +     * @access public
 +     * @example ../examples/easy/Text.php
 +     * @example ../examples/easy/Text_cursive.php
 +     * @param mixed $textParams if a string just the text to be included, if an
 +     * array is or an array of arrays with each element containing
 +     * the text to be inserted and their formatting properties
 +     * Array values:
 +     * 'text' (string) the run of text to be inserted
 +     * 'b' (on, off)
 +     * 'caps' (on, off) display text in capital letters
 +     * 'color' (ffffff, ff0000...)
 +     * 'columnBreak' (before, after, both) inserts a column break before, after or both, a run of text
 +     * 'font' (Arial, Times New Roman...)
 +     * 'i' (on, off)
 +     * 'lineBreak' (before, after, both) inserts a line break before, after or both, a run of text
 +     * 'sz' (1, 2, 3...)
 +     * 'tab' (boolean) inserts a tab. Default value is false
 +     * 'spaces': number of spaces at the beguinning of the run of text
 +     * 'u' (none, dash, dotted, double, single, wave, words)
 +     * @param array $paragraphParams Style options to apply to the whole paragraph
 +     *  Values:
 +     * 'pStyle' (string) Word style to be used. Run parseStyles() to check all available paragraph styles
 +     * 'b' (on, off)
 +     * 'caps' (on, off) display text in capital letters
 +     * 'color' (ffffff, ff0000...)
 +     * 'contextualSpacing' (on, off) ignore spacing above and below when using identical styles
 +     * 'font' (Arial, Times New Roman...)
 +     * 'i' (on, off)
 +     * 'indent_left' 100...,
 +     * 'indent_right' 100...
 +     * 'jc' (both, center, distribute, left, right)
 +     * 'keepLines' (on, off) keep all paragraph lines on the same page
 +     * 'keepNext' (on, off) keep in the same page the current paragraph with next paragraph
 +     * 'lineSpacing' 120, 240 (standard), 360, 480, ...
 +     * 'pageBreakBefore' (on, off)
 +     * 'spacingBottom' (int) bottom margin in twentieths of a point
 +     * 'spacingTop' (int) top margin in twentieths of a point
 +     * 'sz' (8, 9, 10, ...) size in points
 +     * 'tabPositions' (array) each entry is an associative array with the following keys and values
 +     *      'type' (string) can be clear, left (default), center, right, decimal, bar and num
 +     *      'leader' (string) can be none (default), dot, hyphen, underscore, heavy and middleDot
 +     *      'position' (int) given in twentieths of a point
 +     * if there is a tab and the tabPositions array is not defined the standard tab position (default of 708) will be used
 +     * 'textDirection' (lrTb, tbRl, btLr, lrTbV, tbRlV, tbLrV) text flow direction
 +     * 'u' (none, dash, dotted, double, single, wave, words)
 +     * 'widowControl' (on, off)
 +     */
 +    public function addText($textParams, $paragraphParams = array())
 +    {
 +        $text = CreateText::getInstance();
 +        $text->createText($textParams, $paragraphParams);
 +        PhpdocxLogger::logger('Add text to word document.', 'info');
 +        $this->_wordDocumentC .= (string) $text;
 +    }
 +
 +    /**
 +     * Generate a new DOCX file
 +     *
 +     * @access public
 +     * @example ../examples/easy/Text.php
 +     * @param string $args[0] File name
 +     * @param string $args[1] Page style
 +     *  Values: 'bottom' (4000, 4001...), 'columns' (1, 2, 3), 'left' (4000, 4001...),
 +     *  'orient' (landscape), 'right' (4000, 4001), 'titlePage' (1),
 +     *  'top' (4000, 4001)
 +     */
 +    public function createDocx()
 +    {
 +        $args = func_get_args();
 +        if (!empty($args[0])) {
 +            $fileName = $args[0];
 +        } else {
 +            $fileName = 'document';
 +        }
 +        PhpdocxLogger::logger('Set DOCX name to: ' . $fileName . '.', 'info');
 +        PhpdocxLogger::logger('DOCX is a new file, not a template.', 'debug');
 +        //We copy the rels content into the respective file
 +        $relsHandler = fopen($this->_baseTemplateFilesPath.'/word/_rels/document.xml.rels', "w+");
 +        fwrite($relsHandler, $this->_wordRelsDocumentRelsT->saveXML());
 +        fclose($relsHandler);
 +        //We also copy the contents of the [Content_types].xml file
 +        $contentTypesHandler = fopen($this->_baseTemplateFilesPath.'/[Content_Types].xml', "w+");
 +        fwrite($contentTypesHandler, $this->_contentTypeT->saveXML());
 +        fclose($contentTypesHandler);
 +        $arrArgsPage = array();
 +        $this->generateTemplateWordDocument($arrArgsPage);
 +        if ($this->_debug->getActive() == 1) {
 +            PhpdocxLogger::logger('Debug is active, add messages to objDebug.', 'debug');
 +            libxml_use_internal_errors(true);
++            libxml_disable_entity_loader(true);
 +            simplexml_load_string(
 +                $this->_wordDocumentT, 'SimpleXMLElement', LIBXML_NOWARNING
 +            );
 +            $xmlErrors = libxml_get_errors();
 +            if (is_array($xmlErrors)) {
 +                $this->_debug->addMessage($xmlErrors);
 +                libxml_clear_errors();
 +            }
 +        }
 +        PhpdocxLogger::logger('Add word/document.xml content to DOCX file.', 'info');
 +        $documentHandler = fopen($this->_baseTemplateFilesPath.'/word/document.xml', "w+");
 +        if (self::$_encodeUTF) {
 +            $contentDocumentXML = utf8_encode($this->_wordDocumentT);
 +            //TODO: sot out encoding problems
 +            fwrite($documentHandler, utf8_encode($this->_wordDocumentT));
 +        } else {
 +            if ($this->_phpdocxconfig['settings']['encode_to_UTF8'] == 'true' && !PhpdocxUtilities::isUtf8($this->_wordDocumentT)) {
 +                $contentDocumentXML = utf8_encode($this->_wordDocumentT);
 +            } else {
 +                $contentDocumentXML = $this->_wordDocumentT;
 +            }
 +            fwrite($documentHandler, $this->_wordDocumentT);
 +        }
 +        fclose($documentHandler);
 +        if($this->_wordFootnotesC != ''){
 +            PhpdocxLogger::logger('Add word/footnote.xml content to DOCX file.', 'info');
 +            $footnoteHandler = fopen($this->_baseTemplateFilesPath.'/word/footnote.xml', "w+");
 +                if (self::$_encodeUTF) {
 +                //TODO: sot out encoding problems
 +                    fwrite($footnoteHandler, utf8_encode($this->_wordFootnotesT));
 +                } else {
 +                    if ($this->_phpdocxconfig['settings']['encode_to_UTF8'] == 'true') {
 +                        if (!PhpdocxUtilities::isUtf8($this->_wordFootnotesT)) {
 +                            $this->_wordFootnotesT = utf8_encode($this->_wordFootnotesT);
 +                        }
 +                    }
 +                    fwrite($footnoteHandler, $this->_wordFootnotesT);
 +                }
 +            fclose($documentHandler);
 +            }
 +        $numberingHandler = fopen($this->_baseTemplateFilesPath.'/word/numbering.xml', "w+");
 +        fwrite($numberingHandler, $this->_wordNumberingT);
 +        fclose($numberingHandler);
 +        PhpdocxLogger::logger('Close ZIP file', 'info');
 +        $this->recursiveInsert($this->_zipDocx, $this->_baseTemplateFilesPath, $this->_baseTemplateFilesPath);
 +        //Lets now insert the photos inserted by the embedHTML method
 +        if (is_dir($this->_baseTemplateFilesPath.'/word/mediaTemplate')){
 +            $contentsDir = scandir($this->_baseTemplateFilesPath.'/word/mediaTemplate');
 +            $predefinedExtensions = explode(',', PHPDOCX_ALLOWED_IMAGE_EXT);
 +            foreach($contentsDir as $element){
 +                $arrayExtension = explode('.', $element);
 +                $extension = strtolower(array_pop($arrayExtension));
 +                if (in_array($extension, $predefinedExtensions)){
 +                    $this->_zipDocx->addFile($this->_baseTemplateFilesPath.'/word/mediaTemplate/'.$element, 'word/media/'.$element);
 +                }
 +                //Now we remove the image from the mediaTemplate folder
 +                $this->_zipDocx->deleteName('word/mediaTemplate/'.$element);
 +            }
 +            //And now we delete the mediaTemplate folder
 +            $deleteMediaTemplate = $this->_zipDocx->deleteName('word/mediaTemplate/');
 +        }
 +        //Check if there are openbookmars and if so throw an error
 +        if (count($this->_bookmarksIds) > 0) {
 +            PhpdocxLogger::logger('There are unclosed bookmarks. Please, check that all open bookmarks tags are properly closed.', 'fatal');
 +        }
 +        $this->_zipDocx->close();
 +        $arrpathFile = pathinfo($fileName);
 +        PhpdocxLogger::logger('Copy DOCX file using a new name.', 'info');
 +        copy(
 +            $this->_tempFile,
 +            $fileName . '.' . $this->_extension
 +        );
 +        if ($this->_debug->getActive() == 1) {
 +            PhpdocxLogger::logger('Debug is active, show messages.', 'debug');
 +            echo $this->_debug;
 +        }
 +        // delete temp file
 +        if (is_file($this->_tempFile) && is_writable($this->_tempFile)) {
 +            unlink($this->_tempFile);
 +        }
 +    }
 +
 +    /**
 +     *
 +     * Transform a word document to a text file
 +     *
 +     * @example ../examples/easy/Docx2Text.php
 +     * @param string $path. Path to the docx from which we wish to import the content
 +     * @param string $path. Path to the text file output
 +     * @param array styles.
 +     * keys: table => true/false,list => true/false, paragraph => true/false, footnote => true/false, endnote => true/false, chart => (0=false,1=array,2=table)
 +     */
 +    public static function docx2txt($from, $to, $options = array()) {
 +        $text = new Docx2Text($options);
 +        $text->setDocx($from);
 +        $text->extract($to);
 +    }
 +
 +    /**
 +     * Imports an existing style sheet from an existing docx document.
 +     *
 +     * @access private
 +     * @param string $path. Must be a valid path to an existing .docx, .dotx o .docm document
 +     * @param string $type. You may choose 'replace' (overwrites the current styles) or 'merge' (adds the selected styles)
 +     * @param array $myStyles. A list of specific styles to be merged. If it is empty or the choosen type is 'replace' it will be ignored.
 +     */
 +    private function importStyles($path, $type= 'replace', $myStyles= array(), $styleIdentifier = 'styleName')
 +    {
 +        $zipStyles = new ZipArchive();
 +       try {
 +        $openStyle = $zipStyles->open($path);
 +        if ($openStyle !== true) {
 +           throw new Exception('Error while opening the Style Template: please, check the path');
 +         }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +        if ($type == 'replace') {
 +            //Now we overwrite the original styles file
 +            try {
 +                $extractingStyleFile = $zipStyles->extractTo($this->_baseTemplateFilesPath.'/','word/styles.xml');
 +                if (!$extractingStyleFile) {
 +                    throw new Exception('Error while trying to overwrite the styles.xml of the base template');
 +                }
 +            }
 +            catch (Exception $e) {
 +                PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +            }
 +            //In order not to loose certain styles needed for certain PHPDOCX methods we should merge them
 +            $this->importStyles(PHPDOCX_BASE_TEMPLATE, 'merge', $this->_defaultPHPDOCXStyles);
 +        } else {
 +            //We will first extract the new styles from the external docx
 +            try {
 +                $newStyles = $zipStyles->getFromName('word/styles.xml');
 +                if ($newStyles == '') {
 +                    throw new Exception('Error while extracting the styles from the external docx');
 +                }
 +            }
 +            catch (Exception $e) {
 +                PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +            }
 +        //let's parse the different styles via XPath
 +        $newStylesDoc = new DOMDocument();
++        libxml_disable_entity_loader(true);
 +        $newStylesDoc->loadXML($newStyles);
 +        $stylesXpath = new DOMXPath($newStylesDoc);
 +        $stylesXpath->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');
 +        $queryStyle = '//w:style';
 +        $styleNodes = $stylesXpath->query($queryStyle);
 +
 +        //Let's get the original styles as a DOMdocument
 +        try{
 +            $styleHandler = fopen($this->_baseTemplateFilesPath.'/word/styles.xml', 'r');
 +            $styleXML = fread($styleHandler, filesize($this->_baseTemplateFilesPath.'/word/styles.xml'));
 +            fclose($styleHandler);
 +            $this->_wordStylesT = $styleXML;
 +            if ($styleXML == '') {
 +                throw new Exception('Error while extracting the style file from the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +        $stylesDocument = new DomDocument();
++        libxml_disable_entity_loader(true);
 +        $stylesDocument->loadXML($this->_wordStylesT);
 +        $baseNode = $stylesDocument->documentElement;
 +        $stylesDocumentXPath = new DOMXPath($stylesDocument);
 +        $stylesDocumentXPath->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');
 +        $query = '//w:style';
 +        $originalNodes = $stylesDocumentXPath->query($query);
 +
 +        //Now we start to insert the new styles at the end of the styles.xml
 +        foreach($styleNodes as $node){
 +           // in order to avoid duplicated Ids we first remove from the
 +           // original styles.xml any duplicity with the new ones
 +           // TODO: check performance
 +            foreach($originalNodes as $oldNode){
 +                if($styleIdentifier == 'styleID'){
 +                    if($oldNode->getAttribute('w:styleId') == $node->getAttribute('w:styleId')
 +                       &&  in_array($oldNode->getAttribute('w:styleId'), $myStyles)){
 +                        $oldNode->parentNode->removeChild($oldNode);
 +                    }
 +                }else{
 +                    $oldName = $oldNode->getElementsByTagName('w:name');
 +                    if($oldNode->getAttribute('w:styleId') == $node->getAttribute('w:styleId')
 +                       &&  in_array($oldName, $myStyles)){
 +                        $oldNode->parentNode->removeChild($oldNode);
 +                    }
 +                }
 +            }
 +           if(count($myStyles)>0){
 +               //Lets insert the selected styles
 +               if($styleIdentifier == 'styleID'){
 +                   if(in_array($node->getAttribute('w:styleId'), $myStyles)){
 +                    $insertNode = $stylesDocument->importNode($node, true);
 +                    $baseNode->appendChild($insertNode);
 +                   }
 +               }else{
 +               $nodeChilds = $node->childNodes;
 +               foreach($nodeChilds as $child){
 +                   if ($child->nodeName == 'w:name'){
 +                       $styleName = $child->getAttribute('w:val');
 +                       if(in_array($styleName, $myStyles)){
 +                        $insertNode = $stylesDocument->importNode($node, true);
 +                        $baseNode->appendChild($insertNode);
 +                       }
 +                    }
 +                  }
 +               }
 +           }else{
 +           $insertNode = $stylesDocument->importNode($node, true);
 +           $baseNode->appendChild($insertNode);
 +           }
 +        }
 +        $this->_wordStylesT = $stylesDocument->saveXML();
 +        try {
 +            $stylesFile=fopen($this->_baseTemplateFilesPath.'/word/styles.xml', 'w');
 +            if ($stylesFile == false) {
 +                throw new Exception('Error while opening the base template styles.xml file');
 +            }
 +        } catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +        try {
 +            $writeStyles = fwrite($stylesFile,$this->_wordStylesT);
 +            if ($writeStyles == 0) {
 +                throw new Exception('There were no new styles written');
 +            }
 +        } catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +
 +      }
 +      PhpdocxLogger::logger('Importing styles from an external docx.', 'info');
 +    }
 +
 +    /**
 +     * Imports an existing theme from an existing docx document.
 +     *
 +     * @access private
 +     * @param string $path. Must be a valid path to an existing .docx, .dotx o .docm document
 +     */
 +    private function importThemeXML($path){
 +        try {
 +            $zipTheme = new ZipArchive();
 +            $extractingThemeFile = $zipTheme->extractTo($this->_baseTemplateFilesPath.'/','word/theme/theme1.xml');
 +            if (!$extractingThemeFile) {
 +                throw new Exception('Error while trying to overwrite the theme1.xml of the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +    }
 +
 +    /**
 +     * Imports an existing webSettings.xml file from an existing docx document.
 +     *
 +     * @access private
 +     * @param string $path. Must be a valid path to an existing .docx, .dotx o .docm document
 +     */
 +    private function importWebSettingsXML($path){
 +        try {
 +            $zipWebSettings = new ZipArchive();
 +            $extractingWebSettingsFile = $zipTheme->extractTo($this->_baseTemplateFilesPath.'/','word/webSettings.xml');
 +            if (!$extractingWebSettingsFile) {
 +                throw new Exception('Error while trying to overwrite the webSettings.xml of the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +    }
 +
 +    /**
 +     * Imports an existing settings.xml file from an existing docx document.
 +     *
 +     * @access private
 +     * @param string $path. Must be a valid path to an existing .docx, .dotx o .docm document
 +     */
 +    private function importSettingsXML($path){
 +        try {
 +            $zipSettings = new ZipArchive();
 +            $extractingSettingsFile = $zipTheme->extractTo($this->_baseTemplateFilesPath.'/','word/settings.xml');
 +            if (!$extractingSettingsFile) {
 +                throw new Exception('Error while trying to overwrite the settings.xml of the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +    }
 +
 +    /**
 +     * Imports an existing fontTable.xml file from an existing docx document.
 +     *
 +     * @access private
 +     * @param string $path. Must be a valid path to an existing .docx, .dotx o .docm document
 +     */
 +    private function importFontTableXML($path){
 +        try {
 +            $zipFontTable = new ZipArchive();
 +            $extractingFontTableFile = $zipTheme->extractTo($this->_baseTemplateFilesPath.'/','word/fontTable.xml');
 +            if (!$extractingFontTableFile) {
 +                throw new Exception('Error while trying to overwrite the fontTable.xml of the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +    }
 +
 +    /**
 +     * Transform to UTF-8 charset
 +     *
 +     * @access public
 +     */
 +    public function setEncodeUTF8()
 +    {
 +        self::$_encodeUTF = 1;
 +    }
 +
 +    /**
 +     * Change default language.
 +     * @example ../examples/easy/Language.php
 +     * @param $lang Locale: en-US, es-ES...
 +     * @access public
 +     */
 +    public function setLanguage($lang = null)
 +    {
 +        if (!$lang) {
 +            $lang = 'en-US';
 +        }
 +        //Let's get the original styles as a DOMdocument
 +        try{
 +            $styleHandler = fopen($this->_baseTemplateFilesPath.'/word/styles.xml', 'r');
 +            $styleXML = fread($styleHandler, 10000000);
 +            fclose($styleHandler);
 +            $this->_wordStylesT = $styleXML;
 +            if ($styleXML == '') {
 +                throw new Exception('Error while extracting the style file from the base template to stablish default language');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +        $stylesDocument = new DomDocument();
++        libxml_disable_entity_loader(true);
 +        $stylesDocument->loadXML($this->_wordStylesT);
 +        $langNode = $stylesDocument->getElementsByTagName('lang');
 +        $langNode->item(0)->setAttribute('w:val', $lang);
 +        $langNode->item(0)->setAttribute('w:eastAsia', $lang);
 +
 +        $this->_wordStylesT = $stylesDocument->saveXML();
 +        try {
 +            $stylesFile=fopen($this->_baseTemplateFilesPath.'/word/styles.xml', 'w');
 +            if ($stylesFile == false) {
 +                throw new Exception('Error while opening the base template styles.xml file');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +        try {
 +            $writeStyles = fwrite($stylesFile,$this->_wordStylesT );
 +            if ($writeStyles == 0) {
 +                throw new Exception('There was an error while trying to set the default language');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +
 +        PhpdocxLogger::logger('Set language.', 'info');
 +    }
 +
 +    /**
 +     * Add style
 +     *
 +     * @param string lang Language
 +     * @access private
 +     */
 +    private function addStyle($lang = 'en-US')
 +    {
 +        $style = CreateStyle::getInstance();
 +        $style->createStyle($lang);
 +        PhpdocxLogger::logger('Add styles to styles document.', 'info');
 +        $this->_wordStylesC .= (string) $style;
 +    }
 +
 +    /**
 +     * Imports styles into the template stylesheet.
 +     *
 +     * @access private
 +     * @param string $templateStyles
 +     * @param DOMDocument $importedStylesheet
 +     */
 +    private function addStylesTemplate($templateStyles, $importedStylesheet)
 +    {
 +
 +        $templateStylesheet = new DomDocument();
++        libxml_disable_entity_loader(true);
 +        $templateStylesheet->loadXML($templateStyles);
 +        //let's parse the different styles via XPath
 +
 +        $stylesXpath = new DOMXPath($importedStylesheet);
 +        $stylesXpath->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');
 +        $queryStyle = '//w:style';
 +        $styleNodes = $stylesXpath->query($queryStyle);
 +
 +        //Let's get the original styles as a DOMNode
 +        $stylesDocument = new DomDocument();
++        libxml_disable_entity_loader(true);
 +        $stylesDocument->loadXML($templateStyles);
 +        $baseNode = $stylesDocument->documentElement;
 +
 +        //Now we start to insert the new styles at the end of the styles.xml
 +        foreach ($styleNodes as $node) {
 +           // in order to avoid duplicated Ids we first remove from the
 +           // original styles any duplicity with the new ones
 +            $originalNodes = $stylesDocument->childNodes;
 +            foreach($originalNodes as $oldNode) {
 +                if ($oldNode->getAttribute('w:styleId') == $node->getAttribute('w:styleId')) {
 +                    $oldNode->parent->removeChild($oldNode);
 +                }
 +            }
 +            $insertNode = $stylesDocument->importNode($node, true);
 +            $baseNode->appendChild($insertNode);
 +        }
 +        PhpdocxLogger::logger('Importing styles into the template stylesheet.', 'info');
 +
 +        return $stylesDocument->saveXML();
 +    }
 +
 +    /**
 +     * Generate content type
 +     *
 +     * @access private
 +     */
 +    private function generateContentType()
 +    {
 +        $this->generateDEFAULT(
 +            'rels', 'application/vnd.openxmlformats-package.relationships+xml'
 +        );
 +        $this->generateDEFAULT('xml', 'application/xml');
 +        $this->generateDEFAULT('htm', 'application/xhtml+xml');
 +        $this->generateDEFAULT('rtf', 'application/rtf');
 +        $this->generateDEFAULT('zip', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml');
 +        $this->generateDEFAULT('mht', 'message/rfc822');
 +        $this->generateDEFAULT('wml', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml');
 +        $this->generateOVERRIDE(
 +            '/word/numbering.xml',
 +            'application/vnd.openxmlformats-officedocument.wordprocessingml.' .
 +            'numbering+xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/word/styles.xml',
 +            'application/vnd.openxmlformats-officedocument.wordprocessingml' .
 +            '.styles+xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/docProps/app.xml',
 +            'application/vnd.openxmlformats-officedocument.extended-' .
 +            'properties+xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/docProps/custom.xml',
 +            'application/vnd.openxmlformats-officedocument.' .
 +            'custom-properties+xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/word/settings.xml', 'application/' .
 +            'vnd.openxmlformats-officedocument.wordprocessingml.settings+xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/word/theme/theme1.xml',
 +            'application/vnd.openxmlformats-officedocument.theme+xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/word/fontTable.xml',
 +            'application/vnd.openxmlformats-officedocument.wordprocessingml.' .
 +            'fontTable+xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/word/webSettings.xml',
 +            'application/vnd.openxmlformats-officedocument.wordprocessingml' .
 +            '.webSettings+xml'
 +        );
 +        if ($this->_wordFooterC != '' || $this->_wordHeaderC != '') {
 +            $this->generateOVERRIDE(
 +                '/word/header.xml',
 +                'application/vnd.openxmlformats-officedocument.' .
 +                'wordprocessingml.header+xml'
 +            );
 +            $this->generateOVERRIDE(
 +                '/word/footer.xml',
 +                'application/vnd.openxmlformats-officedocument.' .
 +                'wordprocessingml.footer+xml'
 +            );
 +            $this->generateOVERRIDE(
 +                '/word/footnotes.xml',
 +                'application/vnd.openxmlformats-officedocument.' .
 +                'wordprocessingml.footnotes+xml'
 +            );
 +            $this->generateOVERRIDE(
 +                '/word/endnotes.xml',
 +                'application/vnd.openxmlformats-officedocument.' .
 +                'wordprocessingml.endnotes+xml'
 +            );
 +        }
 +        $this->generateOVERRIDE(
 +            '/docProps/core.xml',
 +            'application/vnd.openxmlformats-package.core-properties+xml'
 +        );
 +    }
 +
 +    /**
 +     * Generate DEFAULT
 +     *
 +     * @access private
 +     */
 +    private function generateDEFAULT($extension, $contentType)
 +    {
 +        $strContent = $this->_contentTypeT->saveXML();
 +        if (
 +            strpos($strContent, 'Extension="' . $extension)
 +            === false
 +        ) {
 +            $strContentTypes = '<Default Extension="'.$extension .'" ContentType="'. $contentType .'"> </Default>';
 +            $tempNode = $this->_contentTypeT->createDocumentFragment();
 +            $tempNode->appendXML($strContentTypes);
 +            $this->_contentTypeT->documentElement->appendChild($tempNode);
 +        }
 +    }
 +
 +    /**
 +     *
 +     *
 +     * @access private
 +     */
 +    private function generateDefaultFonts()
 +    {
 +        $font = array(
 +            'name' => 'Calibri', 'pitch' => 'variable', 'usb0' => 'A00002EF',
 +            'usb1' => '4000207B', 'usb2' => '00000000', 'usb3' => '00000000',
 +            'csb0' => '0000009F', 'csb1' => '00000000', 'family' => 'swiss',
 +            'charset' => '00', 'panose1' => '020F0502020204030204'
 +        );
 +        $this->addFont($font);
 +        $font = array(
 +            'name' => 'Times New Roman', 'pitch' => 'variable',
 +            'usb0' => 'E0002AEF', 'usb1' => 'C0007841', 'usb2' => '00000009',
 +            'usb3' => '00000000', 'csb0' => '000001FF', 'csb1' => '00000000',
 +            'family' => 'roman', 'charset' => '00',
 +            'panose1' => '02020603050405020304'
 +        );
 +        $this->addFont($font);
 +        $font = array(
 +            'name' => 'Cambria', 'pitch' => 'variable', 'usb0' => 'A00002EF',
 +            'usb1' => '4000004B', 'usb2' => '00000000', 'usb3' => '00000000',
 +            'csb0' => '0000009F', 'csb1' => '00000000', 'family' => 'roman',
 +            'charset' => '00', 'panose1' => '02040503050406030204'
 +        );
 +        $this->addFont($font);
 +    }
 +
 +    /**
 +     * Generate DefaultWordRels
 +     *
 +     * @access private
 +     */
 +    private function generateDefaultWordRels()
 +    {
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . numbering.xml.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'numbering', 'numbering.xml'
 +        );
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . theme/theme1.xml.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'theme', 'theme/theme1.xml'
 +        );
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . numbering.xml.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'webSettings', 'webSettings.xml'
 +        );
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . webSettings.xml.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'fontTable', 'fontTable.xml'
 +        );
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . fontTable.xml.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'settings', 'settings.xml'
 +        );
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . settings.xml.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'styles', 'styles.xml'
 +        );
 +    }
 +
 +
 +    /**
 +     * Generate OVERRIDE
 +     *
 +     * @access private
 +     * @param string $partName
 +     * @param string $contentType
 +     */
 +    private function generateOVERRIDE($partName, $contentType)
 +    {
 +        $strContent = $this->_contentTypeT->saveXML();
 +        if (
 +            strpos($strContent, 'PartName="' . $partName . '"')
 +            === false
 +        ) {
 +            $strContentTypes = '<Override PartName="'.$partName.'" ContentType="'.$contentType.'" />';
 +            $tempNode = $this->_contentTypeT->createDocumentFragment();
 +            $tempNode->appendXML($strContentTypes);
 +            $this->_contentTypeT->documentElement->appendChild($tempNode);
 +        }
 +    }
 +
 +    /**
 +     * Generate RELATIONSHIP
 +     *
 +     * @access private
 +     */
 +    private function generateRELATIONSHIP()
 +    {
 +        $arrArgs = func_get_args();
 +        if ($arrArgs[1] == 'vbaProject') {
 +            $type =
 +            'http://schemas.microsoft.com/office/2006/relationships/vbaProject';
 +        } else {
 +            $type =
 +            'http://schemas.openxmlformats.org/officeDocument/2006/' .
 +            'relationships/' . $arrArgs[1];
 +        }
 +
 +        if (!isset($arrArgs[3])) {
 +            $nodeWML = '<Relationship Id="' . $arrArgs[0] . '" Type="' . $type .
 +               '" Target="' . $arrArgs[2] . '"></Relationship>';
 +
 +        } else {
 +            $nodeWML = '<Relationship Id="' . $arrArgs[0] . '" Type="' . $type .
 +               '" Target="' . $arrArgs[2] . '" ' . $arrArgs[3] .
 +               '></Relationship>';
 +        }
 +      $relsNode = $this->_wordRelsDocumentRelsT->createDocumentFragment();
 +       $relsNode->appendXML($nodeWML);
 +       $this->_wordRelsDocumentRelsT->documentElement->appendChild($relsNode);
 +
 +
 +    }
 +
 +        /**
 +     * Gnerate RELATIONSHIP
 +     *
 +     * @access private
 +     */
 +    private function generateRELATIONSHIPTemplate()
 +    {
 +        $arrArgs = func_get_args();
 +        if ($arrArgs[1] == 'vbaProject') {
 +            $type =
 +            'http://schemas.microsoft.com/office/2006/relationships/vbaProject';
 +        } else {
 +            $type =
 +            'http://schemas.openxmlformats.org/officeDocument/2006/' .
 +            'relationships/' . $arrArgs[1];
 +        }
 +
 +        if (!isset($arrArgs[3])) {
 +            $nodeWML = '<Relationship Id="' . $arrArgs[0] . '" Type="' . $type .
 +               '" Target="' . $arrArgs[2] . '"></Relationship>';
 +
 +        } else {
 +            $nodeWML = '<Relationship Id="' . $arrArgs[0] . '" Type="' . $type .
 +               '" Target="' . $arrArgs[2] . '" ' . $arrArgs[3] .
 +               '></Relationship>';
 +        }
 +
 +       return $nodeWML;
 +    }
 +
 +    /**
 +     * Generate SECTPR
 +     *
 +     * @access private
 +     * @param array $args Section style
 +     */
 +    private function generateSECTPR($args = '')
 +    {
 +        $page = CreatePage::getInstance();
 +        $page->createSECTPR($args);
 +        $this->_wordDocumentC .= (string) $page;
 +    }
 +
 +    /**
 +     * Generates an element in settings.xml
 +     *
 +     * @access private
 +     */
 +    private function generateSetting($tag)
 +    {
 +        if((!in_array($tag, self::$settings))){
 +           self::$log->fatal('Incorrect setting tag');
 +        }
 +        $settingIndex = array_search($tag, self::$settings);
 +        try{
 +            $settings = fopen($this->_baseTemplateFilesPath.'/word/settings.xml', "r");
 +            $baseTemplateSettingsT = fread($settings, 1000000);
 +            fclose($settings);
 +            if ($baseTemplateSettingsT == '') {
 +                throw new Exception('Error while extracting settings.xml file from the base template to insert the selected element');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +
 +        $this->_wordSettingsT = new DOMDocument();
++        libxml_disable_entity_loader(true);
 +        $this->_wordSettingsT->loadXML($baseTemplateSettingsT);
 +        $selectedElements = $this->_wordSettingsT->documentElement->getElementsByTagName($tag);
 +        if($selectedElements->length == 0){
 +            $settingsElement = $this->_wordSettingsT->createDocumentFragment();
 +            $settingsElement->appendXML('<' . $tag . ' xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" />');
 +            $childNodes = $this->_wordSettingsT->documentElement->childNodes;
 +            $index = false;
 +            foreach($childNodes as $node){
 +                $name = $node->nodeName;
 +                $index = array_search($node->nodeName, self::$settings);
 +                if($index > $settingIndex){
 +                    $node->parentNode->insertBefore($settingsElement, $node);
 +                    break;
 +                }
 +            }
 +            //in case no node was found (pretty unlikely)we should append the node
 +            if (!$index) {
 +                $this->_wordSettingsT->documentElement->appendChild($settingsElement);
 +            }
 +            $newSettings = $this->_wordSettingsT->saveXML();
 +            $settingsHandle = fopen($this->_baseTemplateFilesPath.'/word/settings.xml', "w+");
 +            $contents = fwrite($settingsHandle, $newSettings);
 +            fclose($settingsHandle);
 +        }
 +
 +    }
 +
 +    /**
 +     * Generate ContentType XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateContentType()
 +    {
 +        $this->_wordContentTypeT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>' .
 +            '<Types xmlns="http://schemas.openxmlformats.org/package/2006/' .
 +            'content-types">' . $this->_contentTypeC . '</Types>';
 +    }
 +
 +    /**
 +     * Generate DocPropsApp XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateDocPropsApp()
 +    {
 +        $this->_docPropsAppT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<Properties xmlns="http://schemas.openxmlformats.org/' .
 +            'officeDocument/2006/extended-properties" xmlns:vt="' .
 +            'http://schemas.openxmlformats.org/officeDocument/2006/' .
 +            'docPropsVTypes"><Template>Normal.dotm</Template><TotalTime>' .
 +            '0</TotalTime><Pages>1</Pages><Words>1</Words><Characters>1'
 +            . '</Characters><Application>Microsoft Office Word</Application>' .
 +            '<DocSecurity>4</DocSecurity><Lines>1</Lines><Paragraphs>1' .
 +            '</Paragraphs><ScaleCrop>false</ScaleCrop>';
 +        if ($this->_docPropsAppC) {
 +            $this->_docPropsAppT .= $this->_docPropsAppC;
 +        } else {
 +            $this->_docPropsAppT .= '<Company>Company</Company>';
 +        }
 +        $this->_docPropsAppT .= '<LinksUpToDate>false</LinksUpToDate>' .
 +            '<CharactersWithSpaces>1</CharactersWithSpaces><SharedDoc>' .
 +            'false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged>' .
 +            '<AppVersion>12.0000</AppVersion></Properties>';
 +    }
 +
 +    /**
 +     * Generate DocPropsCore XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateDocPropsCore()
 +    {
 +        date_default_timezone_set('UTC');
 +        if ($this->_markAsFinal) {
 +            $this->_docPropsCoreT =
 +                '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +                '<cp:coreProperties xmlns:cp="http://schemas.openxmlformats' .
 +                '.org/package/2006/metadata/core-properties" ' .
 +                'xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms' .
 +                '="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl' .
 +                '.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XML' .
 +                'Schema-instance"><dc:title>Title</dc:title><dc:subject>' .
 +                'Subject</dc:subject><dc:creator>2mdc</dc:creator>' .
 +                '<dc:description>Description</dc:description>' .
 +                '<cp:lastModifiedBy>user</cp:lastModifiedBy><cp:revision>1' .
 +                '</cp:revision><dcterms:created xsi:type="dcterms:W3CDTF">' .
 +                date('c') . '</dcterms:created><dcterms:modified ' .
 +                'xsi:type="dcterms:W3CDTF">' . date('c') .
 +                '</dcterms:modified><cp:contentStatus>Final' .
 +                '</cp:contentStatus></cp:coreProperties>';
 +        } else {
 +            $this->_docPropsCoreT =
 +                '<?xml version="1.0" encoding="UTF-8" standalone="yes"?> ' .
 +                '<cp:coreProperties xmlns:cp="http://schemas.openxmlformats' .
 +                '.org/package/2006/metadata/core-properties" ' .
 +                'xmlns:dc="http://purl.org/dc/elements/1.1/" ' .
 +                'xmlns:dcterms="http://purl.org/dc/terms/" ' .
 +                'xmlns:dcmitype="http://purl.org/dc/dcmitype/" ' .
 +                'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' .
 +                '<dc:title>Title</dc:title><dc:subject>Subject</dc:subject>' .
 +                '<dc:creator>2mdc</dc:creator><dc:description>Description' .
 +                '</dc:description><cp:lastModifiedBy>user' .
 +                '</cp:lastModifiedBy><cp:revision>1</cp:revision>' .
 +                '<dcterms:created xsi:type="dcterms:W3CDTF">' . date('c') .
 +                '</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF' .
 +                '">' . date('c') . '</dcterms:modified></cp:coreProperties>';
 +        }
 +    }
 +
 +    /**
 +     * Generate DocPropsCustom XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateDocPropsCustom()
 +    {
 +        $this->_docPropsCustomT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<Properties xmlns="http://schemas.openxmlformats.org/' .
 +            'officeDocument/2006/custom-properties" xmlns:vt="http://' .
 +            'schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">' .
 +            '<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" ' .
 +            'pid="2" name="_MarkAsFinal"><vt:bool>true</vt:bool></property>' .
 +            '</Properties>';
 +    }
 +
 +    /**
 +     * Generate RelsRels XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateRelsRels()
 +    {
 +        $this->_relsRelsT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<Relationships xmlns="http://schemas.openxmlformats.org/package/' .
 +            '2006/relationships">' .
 +            $this->generateRELATIONSHIP(
 +                'rId3', 'extended-properties', 'docProps/app.xml'
 +            ) .
 +            '<Relationship Id="rId2" Type="http://schemas.openxmlformats' .
 +            '.org/package/2006/relationships/metadata/core-properties"' .
 +            ' Target="docProps/core.xml"/>' .
 +            $this->generateRELATIONSHIP(
 +                'rId1', 'officeDocument', 'word/document.xml'
 +            );
 +        if ($this->_markAsFinal) {
 +            $this->_relsRelsT .=
 +                '<Relationship Id="rId4" Type="http://schemas' .
 +                '.openxmlformats.org/officeDocument/2006/relationships/' .
 +                'custom-properties" Target="docProps/custom.xml"/>';
 +        }
 +        $this->_relsRelsT .= '</Relationships>';
 +    }
 +
 +    /**
 +     * Generate WordDocument XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordDocument()
 +    {
 +        $arrArgs = func_get_args();
 +        //$this->generateSECTPR($arrArgs[0]);
 +        $this->_wordDocumentC .= $this->_sectPr->saveXML($this->_sectPr->documentElement);//FIXME: I am insertying by hand the sections of the base template
 +        if (!empty($this->_wordHeaderC)) {
 +            $this->_wordDocumentC = str_replace(
 +                '__GENERATEHEADERREFERENCE__',
 +                '<' . CreateDocx::NAMESPACEWORD . ':headerReference ' .
 +                CreateDocx::NAMESPACEWORD . ':type="default" r:id="rId' .
 +                $this->_idWords['header'] . '"></' .
 +                CreateDocx::NAMESPACEWORD . ':headerReference>',
 +                $this->_wordDocumentC
 +            );
 +        }
 +        if (!empty($this->_wordFooterC)) {
 +            $this->_wordDocumentC = str_replace(
 +                '__GENERATEFOOTERREFERENCE__',
 +                '<' . CreateDocx::NAMESPACEWORD . ':footerReference ' .
 +                CreateDocx::NAMESPACEWORD . ':type="default" r:id="rId' .
 +                $this->_idWords['footer'] . '"></' .
 +                CreateDocx::NAMESPACEWORD . ':footerReference>',
 +                $this->_wordDocumentC
 +            );
 +        }
 +        $this->_wordDocumentT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<' . CreateDocx::NAMESPACEWORD . ':document xmlns:ve=' .
 +            '"http://schemas.openxmlformats.org/markup-compatibility/2006" ' .
 +            'xmlns:o="urn:schemas-microsoft-com:office:office"' .
 +            ' xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006' .
 +            '/relationships" xmlns:m="http://schemas.openxmlformats.org/' .
 +            'officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml"'.
 +            ' xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/' .
 +            'wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:' .
 +            'office:word" xmlns:w="http://schemas.openxmlformats.org/' .
 +            'wordprocessingml/2006/main" xmlns:wne="http://schemas' .
 +            '.microsoft.com/office/word/2006/wordml">' .
 +            $this->_background.
 +            '<' . CreateDocx::NAMESPACEWORD . ':body>' .
 +            $this->_wordDocumentC .
 +            '</' . CreateDocx::NAMESPACEWORD . ':body>' .
 +            '</' . CreateDocx::NAMESPACEWORD . ':document>';
 +    }
 +
 +    /**
 +     * Generate WordEndnotes XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordEndnotes()
 +    {
 +        $this->_wordEndnotesT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<' . CreateDocx::NAMESPACEWORD . ':endnotes xmlns:ve' .
 +            '="http://schemas.openxmlformats.org/markup-compatibility/2006" ' .
 +            'xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="' .
 +            'http://schemas.openxmlformats.org/officeDocument/2006/' .
 +            'relationships" xmlns:m="http://schemas.openxmlformats.org/' .
 +            'officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:' .
 +            'vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006' .
 +            '/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:' .
 +            'office:word" xmlns:w="http://schemas.openxmlformats.org/' .
 +            'wordprocessingml/2006/main" xmlns:wne="http://schemas' .
 +            '.microsoft.com/office/word/2006/wordml">' .
 +            $this->_wordEndnotesC .
 +            '</' . CreateDocx::NAMESPACEWORD . ':endnotes>';
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . Endnotes.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'endnotes', 'endnotes.xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/word/endnotes.xml',
 +            'application/vnd.openxmlformats-officedocument.wordprocessingml' .
 +            '.endnotes+xml'
 +        );
 +    }
 +
 +    /**
 +     * Generate WordFontTable XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordFontTable()
 +    {
 +        $this->_wordFontTableT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>' .
 +            '<' . CreateDocx::NAMESPACEWORD . ':fonts xmlns:r="http://' .
 +            'schemas.openxmlformats.org/officeDocument/2006/' .
 +            'relationships" xmlns:w="http://schemas.openxmlformats.org/' .
 +            'wordprocessingml/2006/main">' . $this->_wordFontTableC .
 +            '</' . CreateDocx::NAMESPACEWORD . ':fonts>';
 +    }
 +
 +    /**
 +     * Generate WordFooter XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordFooter()
 +    {
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . Footer.', 'debug');
 +        $this->_idWords['footer'] = self::$intIdWord;
 +        $this->_wordFooterT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 +            <' . CreateDocx::NAMESPACEWORD . ':ftr xmlns:ve' .
 +            '="http://schemas.openxmlformats.org/markup-compatibility/' .
 +            '2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns' .
 +            ':r="http://schemas.openxmlformats.org/officeDocument/2006/' .
 +            'relationships" xmlns:m="http://schemas.openxmlformats.org/' .
 +            'officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml' .
 +            '" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/' .
 +            'wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:' .
 +            'office:word" xmlns:w="http://schemas.openxmlformats.org/' .
 +            'wordprocessingml/2006/main" xmlns:wne="http://schemas' .
 +            '.microsoft.com/office/word/2006/wordml">' . $this->_wordFooterC .
 +            '</' . CreateDocx::NAMESPACEWORD . ':ftr>';
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'footer', 'footer.xml'
 +        );
 +
 +        return 'rId' . self::$intIdWord;
 +    }
 +
 +    /**
 +     * Generate WordFootnotes XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordFootnotes()
 +    {
 +        $this->_wordFootnotesT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<' . CreateDocx::NAMESPACEWORD . ':footnotes xmlns:ve="' .
 +            'http://schemas.openxmlformats.org/markup-compatibility/2006" ' .
 +            'xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="' .
 +            'http://schemas.openxmlformats.org/officeDocument/2006/' .
 +            'relationships" xmlns:m="http://schemas.openxmlformats.org/' .
 +            'officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:' .
 +            'vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006' .
 +            '/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:' .
 +            'office:word" xmlns:w="http://schemas.openxmlformats.org/' .
 +            'wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft' .
 +            '.com/office/word/2006/wordml">' . $this->_wordFootnotesC .
 +            '</' . CreateDocx::NAMESPACEWORD . ':footnotes>';
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . Footnotes.', 'debug');
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'footnotes', 'footnotes.xml'
 +        );
 +        $this->generateOVERRIDE(
 +            '/word/footnotes.xml',
 +            'application/vnd.openxmlformats-officedocument.wordprocessingml' .
 +            '.footnotes+xml'
 +        );
 +    }
 +
 +    /**
 +     * Generate WordHeader XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordHeader()
 +    {
 +        self::$intIdWord++;
 +        PhpdocxLogger::logger('New ID ' . self::$intIdWord . ' . Header.', 'debug');
 +        $this->_idWords['header'] = self::$intIdWord;
 +        $this->_wordHeaderT = '<?xml version="1.0" encoding="UTF-8" ' .
 +            'standalone="yes"?>' .
 +            '<' . CreateDocx::NAMESPACEWORD .
 +            ':hdr xmlns:ve="http://schemas.openxmlformats.org/markup' .
 +            '-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:' .
 +            'office:office" xmlns:r="http://schemas.openxmlformats.org/' .
 +            'officeDocument/2006/relationships" xmlns:m="http://schemas' .
 +            '.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:' .
 +            'schemas-microsoft-com:vml" xmlns:wp="http://schemas' .
 +            '.openxmlformats.org/drawingml/2006/wordprocessingDrawing" ' .
 +            'xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="' .
 +            'http://schemas.openxmlformats.org/wordprocessingml/2006/' .
 +            'main" xmlns:wne="http://schemas.microsoft.com/office/word/' .
 +            '2006/wordml"> ' . $this->_wordHeaderC .
 +            '</' . CreateDocx::NAMESPACEWORD . ':hdr>';
 +        $this->_wordRelsDocumentRelsC .= $this->generateRELATIONSHIP(
 +            'rId' . self::$intIdWord, 'header', 'header.xml'
 +        );
 +        return 'rId' . self::$intIdWord;
 +    }
 +
 +    /**
 +     * Generate WordNumbering XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordNumbering()
 +    {
 +        $this->_wordNumberingT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<w:numbering xmlns:ve="http://schemas.openxmlformats' .
 +            '.org/markup-compatibility/2006" xmlns:o="urn:schemas-' .
 +            'microsoft-com:office:office" xmlns:r="http://schemas' .
 +            '.openxmlformats.org/officeDocument/2006/relationships" ' .
 +            'xmlns:m="http://schemas.openxmlformats.org/officeDocument/' .
 +            '2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:' .
 +            'wp="http://schemas.openxmlformats.org/drawingml/2006/' .
 +            'wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com' .
 +            ':office:word" xmlns:w="http://schemas.openxmlformats.org/' .
 +            'wordprocessingml/2006/main" xmlns:wne="http://schemas.' .
 +            'microsoft.com/office/word/2006/wordml"><w:abstractNum w:'
 +            . 'abstractNumId="0"><w:nsid w:val="713727AE"/><w:multiLevelType' .
 +            ' w:val="hybridMultilevel"/><w:tmpl w:val="F0B4B6B8"/>' .
 +            '<w:lvl w:ilvl="0" w:tplc="0C0A0001"><w:start w:val="1"/>' .
 +            '<w:numFmt w:val="bullet"/><w:lvlText w:val=""/><w:lvlJc ' .
 +            'w:val="left"/><w:pPr><w:ind w:left="720" w:hanging="360"/>' .
 +            '</w:pPr><w:rPr><w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" ' .
 +            'w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1" ' .
 +            'w:tplc="0C0A0003" w:tentative="1"><w:start w:val="1"/>' .
 +            '<w:numFmt w:val="bullet"/><w:lvlText w:val="o"/><w:lvlJc ' .
 +            'w:val="left"/><w:pPr><w:ind w:left="1440" w:hanging="360"/>' . '
 +                </w:pPr><w:rPr><w:rFonts w:ascii="Courier New" w:hAnsi=' .
 +            '"Courier New" w:cs="Courier New" w:hint="default"/></w:rPr>' .
 +            '</w:lvl><w:lvl w:ilvl="2" w:tplc="0C0A0005" w:tentative="1">' .
 +            '<w:start w:val="1"/><w:numFmt w:val="bullet"/><w:lvlText ' .
 +            'w:val=""/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" ' .
 +            'w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:ascii="Wingdings" ' .
 +            'w:hAnsi="Wingdings" w:hint="default"/></w:rPr></w:lvl><w:lvl ' .
 +            'w:ilvl="3" w:tplc="0C0A0001" w:tentative="1"><w:start ' .
 +            'w:val="1"/><w:numFmt w:val="bullet"/><w:lvlText w:val=""/>' .
 +            '<w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging=' .
 +            '"360"/></w:pPr><w:rPr><w:rFonts w:ascii="Symbol" w:hAnsi=' .
 +            '"Symbol" w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4" ' .
 +            'w:tplc="0C0A0003" w:tentative="1"><w:start w:val="1"/>' .
 +            '<w:numFmt w:val="bullet"/><w:lvlText w:val="o"/><w:lvlJc ' .
 +            'w:val="left"/><w:pPr><w:ind w:left="3600" w:hanging="360"/>' .
 +            '</w:pPr><w:rPr><w:rFonts w:ascii="Courier New" w:hAnsi=' .
 +            '"Courier New" w:cs="Courier New" w:hint="default"/></w:rPr>' .
 +            '</w:lvl><w:lvl w:ilvl="5" w:tplc="0C0A0005" w:tentative="1">' .
 +            '<w:start w:val="1"/><w:numFmt w:val="bullet"/><w:lvlText ' .
 +            'w:val=""/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4320" ' .
 +            'w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:ascii="Wingdings" ' .
 +            'w:hAnsi="Wingdings" w:hint="default"/></w:rPr></w:lvl><w:lvl ' .
 +            'w:ilvl="6" w:tplc="0C0A0001" w:tentative="1"><w:start ' .
 +            'w:val="1"/><w:numFmt w:val="bullet"/><w:lvlText w:val=""/>' .
 +            '<w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5040" ' .
 +            'w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:ascii="Symbol" ' .
 +            'w:hAnsi="Symbol" w:hint="default"/></w:rPr></w:lvl><w:lvl ' .
 +            'w:ilvl="7" w:tplc="0C0A0003" w:tentative="1"><w:start ' .
 +            'w:val="1"/><w:numFmt w:val="bullet"/><w:lvlText w:val="o"/>' .
 +            '<w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" ' .
 +            'w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:ascii="Courier New" ' .
 +            'w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>' .
 +            '</w:rPr></w:lvl><w:lvl w:ilvl="8" w:tplc="0C0A0005" ' .
 +            'w:tentative="1"><w:start w:val="1"/><w:numFmt w:val="bullet"' .
 +            '/><w:lvlText w:val=""/><w:lvlJc w:val="left"/><w:pPr><w:ind ' .
 +            'w:left="6480" w:hanging="360"/></w:pPr><w:rPr><w:rFonts ' .
 +            'w:ascii="Wingdings" w:hAnsi="Wingdings" w:hint="default"/>' .
 +            '</w:rPr></w:lvl></w:abstractNum><w:num w:numId="1">' .
 +            '<w:abstractNumId w:val="0"/></w:num></w:numbering>';
 +    }
 +
 +    /**
 +     * Generate WordNumbering XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordNumberingStyles()
 +    {
 +        $this->_wordNumberingT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<w:numbering xmlns:ve="http://schemas.openxmlformats' .
 +            '.org/markup-compatibility/2006" xmlns:o="urn:schemas-' .
 +            'microsoft-com:office:office" xmlns:r="http://schemas' .
 +            '.openxmlformats.org/officeDocument/2006/relationships" ' .
 +            'xmlns:m="http://schemas.openxmlformats.org/officeDocument/' .
 +            '2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:' .
 +            'wp="http://schemas.openxmlformats.org/drawingml/2006/' .
 +            'wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com' .
 +            ':office:word" xmlns:w="http://schemas.openxmlformats.org/' .
 +            'wordprocessingml/2006/main" xmlns:wne="http://schemas.' .
 +            'microsoft.com/office/word/2006/wordml"><w:abstractNum w:'
 +            . 'abstractNumId="0"><w:nsid w:val="713727AE"/><w:multiLevelType' .
 +            ' w:val="hybridMultilevel"/><w:tmpl w:val="F0B4B6B8"/>' .
 +            $this->_wordDocumentStyles . '</w:abstractNum><w:num w:numId="1">' .
 +            '<w:abstractNumId w:val="0"/></w:num></w:numbering>';
 +    }
 +
 +    /**
 +     * Generate WordRelsDocumentRels XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordRelsDocumentRels()
 +    {
 +        $this->_wordRelsDocumentRelsT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<Relationships xmlns="http://schemas.openxmlformats.org/' .
 +            'package/2006/relationships">' . $this->_wordRelsDocumentRelsC .
 +            '</Relationships>';
 +    }
 +
 +    /**
 +     * Generate WordRelsFooterRels XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordRelsFooterRels()
 +    {
 +        $this->_wordRelsFooterRelsT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<Relationships xmlns="http://schemas.openxmlformats.org/' .
 +            'package/2006/relationships">' . $this->_wordRelsFooterRelsC .
 +            '</Relationships>';
 +    }
 +
 +    /**
 +     * Generate WordRelsHeaderRels XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordRelsHeaderRels()
 +    {
 +        $this->_wordRelsHeaderRelsT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
 +            '<Relationships xmlns="http://schemas.openxmlformats.org/' .
 +            'package/2006/relationships">' . $this->_wordRelsHeaderRelsC .
 +            '</Relationships>';
 +    }
 +
 +    /**
 +     * Generate WordSettings XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordSettings()
 +    {
 +        $this->_wordSettingsT = $this->_wordSettingsC;
 +    }
 +
 +    /**
 +     * Generate WordStyles XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordStyles()
 +    {
 +        $this->_wordStylesT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><' .
 +            CreateDocx::NAMESPACEWORD . ':styles xmlns:r="http://' .
 +            'schemas.openxmlformats.org/officeDocument/2006/relationships' .
 +            '" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/' .
 +            '2006/main">' . $this->_wordStylesC .
 +            '</' . CreateDocx::NAMESPACEWORD . ':styles>';
 +    }
 +
 +    /**
 +     * Generate WordThemeTheme1 XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordThemeTheme1()
 +    {
 +        $this->addTheme($this->_defaultFont);
 +        $this->_wordThemeThemeT =
 +            '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><' .
 +            CreateTheme1::NAMESPACEWORD . ':theme xmlns:a="http://' .
 +            'schemas.openxmlformats.org/drawingml/2006/main" name="' .
 +            'Tema de Office">' . $this->_wordThemeThemeC .
 +            '</' . CreateTheme1::NAMESPACEWORD . ':theme>';
 +    }
 +
 +    /**
 +     * Generate WordWebSettings XML template
 +     *
 +     * @access private
 +     */
 +    private function generateTemplateWordWebSettings()
 +    {
 +        $this->_wordWebSettingsT = $this->_wordWebSettingsC;
 +    }
 +
 +    /**
 +     * Generates a TitlePg element in SectPr
 +     *
 +     * @access private
 +     */
 +    private function generateTitlePg()
 +    {
 +        $foundNodes = $this->_sectPr->documentElement->getElementsByTagName('w:TitlePg');
 +        if($foundNodes->length == 0){
 +            $newSectNode = '<w:titlePg xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" />';
 +            $sectNode = $this->_sectPr->createDocumentFragment();
 +            $sectNode->appendXML($newSectNode);
 +            $refNode =$this->_sectPr->documentElement->appendChild($sectNode);
 +        }
 +    }
 +
 +    /**
 +     * To add support of sys_get_temp_dir for PHP versions under 5.2.1
 +     *
 +     * @access private
 +     * @return string
 +     */
 +    public static function getTempDir() {
 +        if ( !function_exists('sys_get_temp_dir')) {
 +            function sys_get_temp_dir() {
 +                if ($temp = getenv('TMP')) {
 +                    return $temp;
 +                }
 +                if ($temp = getenv('TEMP')) {
 +                    return $temp;
 +                }
 +                if ($temp = getenv('TMPDIR')) {
 +                    return $temp;
 +                }
 +                $temp = tempnam(__FILE__,'');
 +                if (file_exists($temp)) {
 +                    unlink($temp);
 +                    return dirname($temp);
 +                }
 +                return null;
 +            }
 +        } else {
 +            return sys_get_temp_dir();
 +        }
 +    }
 +
 +    /**
 +     * Parse path dir
 +     *
 +     * @access private
 +     * @param string $dir Directory path
 +     */
 +    private function parsePath($dir)
 +    {
 +        $slash = 0;
 +        $path = '';
 +        if (($slash = strrpos($dir, '/')) !== false) {
 +            $slash += 1;
 +            $path = substr($dir, 0, $slash);
 +        }
 +        $punto = strpos(substr($dir, $slash), '.');
 +
 +        $nombre = substr($dir, $slash, $punto);
 +        $extension = substr($dir, $punto + $slash + 1);
 +        return array(
 +            'path' => $path, 'nombre' => $nombre, 'extension' => $extension
 +        );
 +    }
 +
 +     /**
 +     * Delete a file or recursively delete a directory
 +     *
 +     * @param string $str path to file or directory
 +     */
 +    private function recursiveDelete($str){
 +        if(is_file($str)){
 +            return @unlink($str);
 +        }
 +        elseif(is_dir($str)){
 +            $scan = glob(rtrim($str,'/').'/*');
 +            foreach($scan as $index=>$path){
 +                $this->recursiveDelete($path);
 +            }
 +            return @rmdir($str);
 +        }
 +    }
 +
 +
 +     /**
 +     *
 +     * Adds directory contents recursively into a zip.
 +     *
 +     * @param string $fileName. The path to the dir to add.
 +     *
 +     * @param string $myZip. The zip where the contents of the dir should be added.
 +     *
 +     */
 +    private function recursiveInsert($myZip, $fileName, $basePath){
 +         $length = strlen($basePath);
 +         if(is_dir($fileName)){
 +            $contentsDir = scandir($fileName);
 +            foreach($contentsDir as $element){
 +              if($element != "." && $element !=".."){
 +                 $this->recursiveInsert($myZip, $fileName."/".$element, $basePath);
 +                 }
 +            }
 +         }else{
 +            $newName = substr($fileName, $length + 1);
 +            $myZip->addFile($fileName, $newName);
 +         }
 +     }
 +
 +     /**
 +     *
 +     * Includes data in the setting.xml file.
 +     *
 +     * @param array $settings. The string with the nodes that should be included in the settings.xml file.
 +     *
 +     */
 +    private function includeSettings($data){
 +        try{
 +            $baseSettings = $this->_baseTemplateZip->getFromName('word/settings.xml');
 +            if ($baseSettings == '') {
 +        throw new Exception('Error while extracting the settings.xml file from the base template');
 +            }
 +        }
 +        catch (Exception $e) {
 +            PhpdocxLogger::logger($e->getMessage(), 'fatal');
 +        }
 +
 +        $settingsDoc = new DOMDocument();
++        libxml_disable_entity_loader(true);
 +        $settingsDoc->loadXML($baseSettings);
 +        $settings = $settingsDoc->documentElement;
 +
 +        foreach($data as $key => $value){
 +            $newNode = $settingsDoc->createDocumentFragment();
 +            $newNode->appendXML($value);
 +            $settings->appendChild($newNode);
 +        }
 +
 +        $settingsHandler = fopen($this->_baseTemplateFilesPath.'/word/settings.xml', "w+");
 +        fwrite($settingsHandler, $settingsDoc->saveXML());
 +        fclose($documentHandler);
 +    }
 +}
diff --cc 3rdparty/phpdocx/classes/CreateMath.inc
index 145e71c,0000000..1af3461
mode 100644,000000..100644
--- a/3rdparty/phpdocx/classes/CreateMath.inc
+++ b/3rdparty/phpdocx/classes/CreateMath.inc
@@@ -1,142 -1,0 +1,143 @@@
 +<?php
 +
 +/**
 + * Add a math eq
 + *
 + * @category   Phpdocx
 + * @package    elements
 + * @copyright  Copyright (c) Narcea Producciones Multimedia S.L.
 + *             (http://www.2mdc.com)
 + * @license    LGPL
 + * @version    3.0
 + * @link       http://www.phpdocx.com
 + * @since      File available since Release 3.0
 + */
 +include_once dirname(__FILE__) . '/CreateElement.inc';
 +
 +class CreateMath extends CreateElement
 +{
 +
 +    /**
 +     *
 +     * @access private
 +     * @static
 +     */
 +    private static $_instance = null;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_mathML;
 +
 +    /**
 +     * Construct
 +     *
 +     * @access public
 +     */
 +    public function __construct()
 +    {
 +
 +    }
 +
 +    /**
 +     * Destruct
 +     *
 +     * @access public
 +     */
 +    public function __destruct()
 +    {
 +
 +    }
 +
 +    /**
 +     * Magic method, returns current MathML
 +     *
 +     * @access public
 +     * @return string Return current MathML
 +     */
 +    public function __toString()
 +    {
 +        return $this->_mathML;
 +    }
 +
 +    /**
 +     * Singleton, return instance of class
 +     *
 +     * @access public
 +     * @return CreateLink
 +     */
 +    public static function getInstance()
 +    {
 +        if (self::$_instance == NULL) {
 +            self::$_instance = new CreateMath();
 +        }
 +        return self::$_instance;
 +    }
 +
 +    /**
 +     * Getter. Access to mathXML var
 +     *
 +     * @access public
 +     * @return string
 +     */
 +    public function getMathXML()
 +    {
 +        return $this->_mathML;
 +    }
 +
 +
 +    /**
 +     * Getter. Access to mathXML var
 +     *
 +     * @access public
 +     * @param string $mathML
 +     */
 +    public function setMathXML($mathML)
 +    {
 +        $this->_mathML = $mathML;
 +    }
 +
 +    /**
 +     * Generate a new MathML eq
 +     *
 +     * @access public
 +     * @param string $arrArgs[0] Math eq
 +     */
 +    public function createMath()
 +    {
 +        $this->_xml = '';
 +        $arrArgs = func_get_args();
 +
 +        $this->transformMath($arrArgs[0]);
 +    }
 +
 +    /**
 +     * Transform a MathML eq using XSL
 +     *
 +     * @access protected
 +     * @param string $mathML Math eq
 +     */
 +    protected function transformMath($mathML)
 +    {
 +        $arrDeleteStrsMML = array('<mi>', '</mi>');
 +        $arrDeleteToStrsMML = array('<mn>', '</mn>');
 +        $mathML = str_replace($arrDeleteStrsMML, $arrDeleteToStrsMML, $mathML);
 +
 +        $rscXML = new DOMDocument();
++        libxml_disable_entity_loader(true);
 +        $rscXML->loadXML($mathML);
 +        $objXSLTProc = new XSLTProcessor();
 +        $objXSL = new DOMDocument();
 +        $objXSL->load('../xsl/MML2OMML_n.XSL');
 +        $objXSLTProc->importStylesheet($objXSL);
 +
 +        $this->_mathML = $objXSLTProc->transformToXML($rscXML);
 +        $arrOMML = array('<?xml version="1.0" encoding="UTF-8"?>',
 +            ' xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/'
 +            . 'math" xmlns:mml="http://www.w3.org/1998/Math/MathML"');
 +        $arrToOMML = array('', '');
 +        $this->_mathML = str_replace($arrOMML, $arrToOMML, $this->_mathML);
 +    }
 +
 +}
diff --cc 3rdparty/phpdocx/classes/Docx2Text.inc
index 1bfebf9,0000000..1e246f2
mode 100644,000000..100644
--- a/3rdparty/phpdocx/classes/Docx2Text.inc
+++ b/3rdparty/phpdocx/classes/Docx2Text.inc
@@@ -1,651 -1,0 +1,656 @@@
 +<?php
 +
 +/**
 + * Docx 2 text
 + *
 + * @category   Phpdocx
 + * @package    transform
 + * @copyright  Copyright (c) Narcea Producciones Multimedia S.L.
 + *             (http://www.2mdc.com)
 + * @license    LGPL
 + * @version    3.0
 + * @link       http://www.phpdocx.com
 + * @since      File available since Release 3.0
 + */
 +class Docx2Text
 +{
 +    const SEPARATOR_WINDOWS = PHP_EOL;
 +    const SEPARATOR_LINUX = "\n";//eol 
 +    const SEPARATOR_TAB = "\t";
 +    const DEBUG = 0;
 +    const SEPARATOR_WINDOWS_DEBUG = '\n\r';//End of line chars
 +    const SEPARATOR_LINUX_DEBUG = '\n';//constant 
 +    const SEPARATOR_TAB_DEBUG = '\t';
 +
 +    /**
 +     * object zipArchive 
 +     * @var string
 +     * @access private
 +     */
 +    private $docx;
 +
 +    /**
 +     * object domDocument from document.xml
 +     * @var string
 +     * @access private
 +     */
 +    private $domDocument;
 +    
 +    /**
 +     * xml from document.xml
 +     * @var string
 +     * @access private
 +     */
 +    private $_document; 
 +    
 +    /**
 +     * xml from numbering.xml
 +     * @var string
 +     * @access private
 +     */
 +    private $_numbering;
 +    
 +    /**
 +     *  xml from footnote
 +     * @var string
 +     * @access private
 +     */
 +    private $_footnote;
 +    
 +    /**
 +     *  xml from endnote
 +     * @var string
 +     * @access private
 +     */
 +    private $_endnote;
 +    
 +    /**
 +     * xml from word/_rels/document.rels.xml
 +     * @var string
 +     * @access private
 +     */
 +    private $_relations;
 +    
 +    /**
 +     * array of all the endnotes of the document
 +     * @var string
 +     * @access private
 +     */
 +    private $endnotes;
 +    
 +    /**
 +     * array of all the footnotes of the document
 +     * @var string
 +     * @access private
 +     */
 +    private $footnotes;
 +    
 +    /**
 +     * array of all the relations of the document
 +     * @var string
 +     * @access private
 +     */
 +    private $relations;
 +
 +    /**
 +     * array of characters to insert like a list
 +     * @var string
 +     * @access private
 +     */
 +    private $numberingList;
 +
 +    /**
 +     * the text content that will be exported
 +     * @var string
 +     * @access private
 +     */
 +    private $textOuput;
 +
 +    
 +    /**
 +     * boolean variable to know if a chart will be transformed to text
 +     * @var string
 +     * @access private
 +     */
 +    private $chart2text;
 +    
 +    /**
 +     * boolean variable to know if a table will be transformed to text
 +     * @var string
 +     * @access private
 +     */
 +    private $table2text;
 +    
 +    /**
 +     * boolean variable to know if a list will be transformed to text
 +     * @var string
 +     * @access private
 +     */
 +    private $list2text;
 +    
 +    /**
 +     * boolean variable to know if a paragraph will be transformed to text
 +     * @var string
 +     * @access private
 +     */
 +    private $paragraph2text;
 +    
 +    /**
 +     * boolean variable to know if footnotes will be extracteded 
 +     * @var string
 +     * @access private
 +     */
 +    private $footnote2text;
 +    
 +    /**
 +     * boolean variable to know if endnotes will be extracted
 +     * @var string
 +     * @access private
 +     */
 +    private $endnote2text;
 +
 +    /**
 +     * Construct
 +     * @param array of boolean values of which elements should be transformed or not
 +     * @access public
 +     */
 +
 +    public function __construct($boolTransforms = array()) 
 +    {
 +        //table,list, paragraph, footnote, endnote, chart
 +        if (isset($boolTransforms['table'])) {
 +            $this->table2text = $boolTransforms['table'];
 +        } else {
 +            $this->table2text = true;
 +        }
 +
 +        if (isset($boolTransforms['list'])) {
 +            $this->list2text = $boolTransforms['list'];
 +        } else {
 +            $this->list2text = true;
 +        }
 +        
 +        if (isset($boolTransforms['paragraph'])) {
 +            $this->paragraph2text = $boolTransforms['paragraph'];
 +        } else {
 +            $this->paragraph2text = true;
 +        }
 +
 +        if (isset($boolTransforms['footnote'])) {
 +            $this->footnote2text = $boolTransforms['footnote'];
 +        } else {
 +            $this->footnote2text = true;
 +        }
 +
 +        if (isset($boolTransforms['endnote'])) {
 +            $this->endnote2text = $boolTransforms['endnote'];
 +        } else {
 +            $this->endnote2text = true;
 +        }
 +
 +        if (isset($boolTransforms['chart'])) {
 +            $this->chart2text = $boolTransforms['chart'];
 +        } else {
 +            $this->chart2text = true;
 +        }
 +        
 +        $this->textOuput = '';  
 +        $this->docx = null;
 +        $this->_numbering = '';
 +        $this->numberingList= array();
 +        $this->endnotes = array();
 +        $this->footnotes = array();
 +        $this->relations = array();
 +        
 +    }
 +
 +    /** 
 +     * 
 +     * Extract the content of a word document and create a text file if the name is given
 +     * 
 +     * @access public
 +     * @param string $filename of the word document. 
 +     * 
 +     */  
 +
 +    public function extract($filename = '') 
 +    {
 +        if (empty($this->_document)) {
 +            //xml content from document.xml is not got
 +            CreateDocx::$log->fatal('There is no content from document.xml');
 +            exit();
 +        }
 +
 +        $this->domDocument = new DomDocument();
++        libxml_disable_entity_loader(true);
 +        $this->domDocument->loadXML($this->_document);
 +        //get the body node to check the content from all his children
 +        $bodyNode = $this->domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main', 'body');
 +        //We get the body node. it is known that there is only one body tag
 +        $bodyNode = $bodyNode->item(0);
 +        foreach($bodyNode->childNodes as $child){   
 +            //the children can be a table, a paragraph or a section. We only implement the 2 first option said.     
 +            if ($this->table2text && $child->tagName == 'w:tbl') {
 +                //this node is a table and  the content is split with tabs if the variable table2text from the class is true
 +                $this->textOuput .= $this->table($child) . $this->separator();
 +            } else {
 +                //this node is a paragraph
 +                $this->textOuput .= $this->printWP($child) . ($this->paragraph2text ? $this->separator() : '');
 +            }
 +        }
 +        if (!empty($filename)) {
 +            $this->writeFile($filename, $this->textOuput);
 +        } else {
 +            echo $this->textOuput;
 +        }
 +    }
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getDocument() 
 +    {
 +        return $this->_document;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setDocument($docu) 
 +    {
 +        $this->_document = $docu;
 +    }
 +
 +    /**
 +     * Getter
 +     *
 +     * @access public
 +     */
 +    public function getDocx() 
 +    {
 +        return $this->docx;
 +    }
 +
 +    /**
 +     * Setter
 +     *
 +     * @access public
 +     */
 +    public function setDocx($filename) 
 +    {
 +        $this->docx = new ZipArchive();
 +        $ret = $this->docx->open($filename);
 +        if ($ret === true) {
 +            $this->_document = $this->docx->getFromName('word/document.xml');            
 +        }
 +    }
 +
 +    /**
 +     * Write the file
 +     *
 +     * @access public
 +     * @param the name of the file which is going to write
 +     * @param the data of the file
 +     */
 +    public function writeFile($filename, $data) 
 +    {
 +        if (!$handle = fopen($filename, 'w+')) {
 +            CreateDocx::$log->fatal('Cannot open file ($filename)');
 +            exit();
 +        }
 +        // Write $data to our opened file.
 +        if (fwrite($handle, $data) === FALSE) {
 +            CreateDocx::$log->fatal('Cannot write to file ($filename)');
 +            exit();
 +        }
 +        fclose($handle);
 +    }
 +
 +    /**
 +     * extract the content to an array from endnote.xml
 +     *
 +     * @access private
 +     */
 +    private function loadEndNote() 
 +    {
 +        if (empty($this->endnotes)) {
 +            if (empty($this->_endnote)) {
 +                $this->_endnote = $this->docx->getFromName('word/endnotes.xml');
 +            }
 +            if (!empty($this->_endnote)) {
 +                $domDocument = new DomDocument();
++        	libxml_disable_entity_loader(true);
 +                $domDocument->loadXML($this->_endnote);
 +                $endnotes = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main', 'endnote');
 +                foreach ($endnotes as $endnote) {
 +                    $xml = $endnote->ownerDocument->saveXML($endnote);
 +                    $this->endnotes[$endnote->getAttribute('w:id')] =  trim(strip_tags($xml));
 +                }
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Extract the content to an array from footnote.xml
 +     *
 +     * @access private
 +     */
 +    private function loadFootNote() 
 +    {
 +        if (empty($this->footnotes)) {
 +            if (empty($this->_footnote)) {
 +                $this->_footnote = $this->docx->getFromName('word/footnotes.xml');
 +            }
 +            if (!empty($this->_footnote)) {
 +                $domDocument = new DomDocument();
++		libxml_disable_entity_loader(true);
 +                $domDocument->loadXML($this->_footnote);
 +                $footnotes = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main', 'footnote');
 +                foreach ($footnotes as $footnote) {
 +                    $xml = $footnote->ownerDocument->saveXML( $footnote );
 +                    $this->footnotes[$footnote->getAttribute('w:id')] =  trim(strip_tags ($xml));
 +                }
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Extract the styles of the list to an array
 +     *
 +     * @access private
 +     */
 +    private function listNumbering() 
 +    {
 +        $ids = array();
 +        $nums = array();
 +        //get the xml code from the zip archive
 +        $this->_numbering = $this->docx->getFromName('word/numbering.xml');
 +        if(!empty($this->_numbering)){
 +            //we use the domdocument to iterate the children of the numbering tag 
 +            $domDocument = new DomDocument();
++            libxml_disable_entity_loader(true);
 +            $domDocument->loadXML($this->_numbering);
 +            $numberings = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main', 'numbering');
 +            //there is only one numbering tag in the numbering.xml
 +            $numberings = $numberings->item(0);
 +            foreach ($numberings->childNodes as $child) {
 +                $flag = true;//boolean variable to know if the node is the first style of the list
 +                foreach ($child->childNodes as $son) {
 +                    if ($child->tagName == 'w:abstractNum' && $son->tagName == 'w:lvl') {
 +                        foreach ($son->childNodes as $daughter) {
 +                            if ($daughter->tagName == 'w:numFmt' && $flag) {
 +                                $nums[$child->getAttribute('w:abstractNumId')] = $daughter->getAttribute('w:val');//set the key with internal index for the listand the value it is the type of bullet
 +                                $flag = false;
 +                            }
 +                        }
 +                    } elseif ($child->tagName == 'w:num' && $son->tagName == 'w:abstractNumId') {
 +                        $ids[$son->getAttribute('w:val')] = $child->getAttribute('w:numId');//$ids is the index of the list
 +                    }
 +                }
 +            }
 +            //once we know what kind of list there is in the documents, is prepared the bullet that the library will use
 +            foreach ($ids as $ind => $id) {
 +                if ($nums[$ind] == 'decimal') {
 +                    //if the type is decimal it means that the bullet will be numbers
 +                    $this->numberingList[$id][0] = range(1, 10);
 +                    $this->numberingList[$id][1] = range(1, 10);
 +                    $this->numberingList[$id][2] = range(1, 10);
 +                    $this->numberingList[$id][3] = range(1, 10);
 +                } else {
 +                    //otherwise is *, and other characters
 +                    $this->numberingList[$id][0] = array('*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*');
 +                    $this->numberingList[$id][1] = array(chr(175),chr(175),chr(175),chr(175),chr(175),chr(175),chr(175),chr(175),chr(175),chr(175),chr(175),chr(175));
 +                    $this->numberingList[$id][2] = array(chr(237),chr(237),chr(237),chr(237),chr(237),chr(237),chr(237),chr(237),chr(237),chr(237),chr(237),chr(237));
 +                    $this->numberingList[$id][3] = array(chr(248),chr(248),chr(248),chr(248),chr(248),chr(248),chr(248),chr(248),chr(248),chr(248),chr(248));
 +                }
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Extract the content of word/_rels/document._rels.xml
 +     *
 +     * @access private
 +     */
 +    private function loadRelations() 
 +    {
 +        if (empty($this->relations)) {
 +            if (empty($this->_relations)) {
 +                $this->_relations = $this->docx->getFromName('word/_rels/document.xml.rels');
 +            }
 +            $domDocument = new DomDocument();
++            libxml_disable_entity_loader(true);
 +            $domDocument->loadXML($this->_relations);
 +            $relations = $domDocument->getElementsByTagName('Relationships');
 +            $relations = $relations->item(0);
 +            foreach ($relations->childNodes as $relation) {
 +                $this->relations[$relation->getAttribute('Id')]['file'] = $relation->getAttribute('Target');
 +                $this->relations[$relation->getAttribute('Id')]['type'] = $relation->getAttribute('Type');
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Print the data of the chart as formatted text
 +     *
 +     * @access private
 +     * @param $chart
 +     */
 +    private function printChartDataArray($chart)
 +    {
 +        $ret = $this->separator();
 +        $ret .= '[Chart => ' . $this->separator();
 +        $ret .= "\t" . 'Type: ' . $chart->getType() . $this->separator();
 +        $ret .= "\t" . 'Type Group: ' . $chart->getTypeGroup() . $this->separator();
 +        $ret .= "\t" . 'Data: ' . $this->separator();
 +        foreach ($chart->getData() as $key => $fila) {
 +            $ret .= "\t\t" .'"' . $key . '" => ' . $this->separator();
 +            foreach ($fila as $index => $value) {
 +                $ret .= "\t\t\t" . '"' . $index . '" => ' . $value . $this->separator();
 +            }            
 +        }
 +        $ret .= "]" . $this->separator();
 +        return $ret;
 +    }
 +
 +    /**
 +     * print the data of the chart as formatted text
 +     *
 +     * @access private
 +     * @param $chart
 +     */
 +    private function printChartDataTable($chart)
 +    {
 +        $ret = $this->separator();
 +        $ret .= '[Chart => ' . $this->separator();
 +        $ret .= "\t" . 'Type: ' . $chart->getType() . $this->separator();
 +        $ret .= "\t" . 'Type Group: ' . $chart->getTypeGroup() . $this->separator();
 +        $ret .= "\t" . 'Data: ' . $this->separator();
 +        $ret .= "\t\t";
 +        foreach ($chart->getData() as $key => $fila) {
 +            foreach ($fila as $index => $value) {
 +                $ret .= "\t" .'"' . $index .'"';
 +            }
 +            break;
 +        }
 +        $ret .= $this->separator();
 +        foreach ($chart->getData() as $key => $fila) {
 +            $ret .= "\t\t\t" .'"' . $key .'"';
 +            foreach ($fila as $index => $value) {
 +                $ret .= "\t" . $value;
 +            }            
 +            $ret .= $this->separator();
 +        }
 +        $ret .= "]" . $this->separator();
 +        return $ret;
 +    }
 +
 +    /**
 +     * Extract the content of a w:p tag
 +     * 
 +     * @access private
 +     * @param $node is an object DOMNode
 +     */
 +    private function printWP($node) 
 +    {
 +        $ilvl = $numId = -1;
 +        if ($this->list2text) {//transform the list in ooxml to formatted list with tabs and bullets
 +            if (empty($this->numberingList)) {//check if numbering.xml is extracted from the zip archive
 +                $this->listNumbering();
 +            }
 +            //use the xpath to get expecific children from a node
 +            $xpath = new DOMXPath($this->domDocument);
 +            $query = 'w:pPr/w:numPr';
 +            $xmlLists = $xpath->query($query, $node);
 +            $xmlLists = $xmlLists->item(0);
 +
 +            if (isset($xmlLists) && $xmlLists->tagName == 'w:numPr') {
 +                if ($xmlLists->hasChildNodes()) {
 +                    foreach ($xmlLists->childNodes as $child) {
 +                        if ($child->tagName == 'w:ilvl') {
 +                            $ilvl = $child->getAttribute('w:val'); 
 +                        }elseif ($child->tagName == 'w:numId') {
 +                            $numId = $child->getAttribute('w:val');
 +                        }
 +                    }
 +                }
 +            }
 +            if (($ilvl != -1) && ($numId != -1)) {
 +                //if is founded the style index of the list in the document and the kind of list
 +                $ret = '';
 +                for($i=-1; $i < $ilvl; $i++) {
 +                    if(self::DEBUG) {
 +                        $ret .= self::SEPARATOR_TAB_DEBUG;
 +                    }
 +                    else {
 +                        $ret .= self::SEPARATOR_TAB;
 +                    }
 +                }
 +                $ret .= array_shift($this->numberingList[$numId][$ilvl]) . ' ' . $this->toText($node);  //print the bullet
 +            } else {
 +                $ret = $this->toText($node);
 +            }
 +        } else{
 +            //if dont want to formatted lists, we strip from html tags
 +            $ret = $this->toText($node);
 +        }
 +
 +
 +        //get the data from the charts
 +        if ($this->chart2text) {
 +            $query = 'w:r/w:drawing/wp:inline';
 +            $xmlChart = $xpath->query($query, $node);
 +            //get the relation id from the document, to get the name of the xml chart file from the relations to extract the xml code.
 +            foreach ($xmlChart as $chart) {
 +                foreach ($chart->childNodes as $child) {
 +                    foreach ($child->childNodes as $child2) {
 +                        foreach ($child2->childNodes as $child3) {
 +                            $rid = $child3->getAttribute('r:id');
 +                        }
 +                    }
 +                }
 +            }
 +            if (!empty($rid)) {
 +                if (empty($this->relations)) {
 +                    $this->loadRelations();
 +                }
 +                //get the name of the chart xml file from the relations docuemnt
 +                $dataChart = new getDataFromXmlChart($this->docx->getFromName('word/' . $this->relations[$rid]['file']));
 +                if (in_array($this->chart2text, array(2,'table'))) {
 +                    $ret .= $this->printChartDataTable($dataChart);//formatted print of the chart data
 +                } else {
 +                    $ret .= $this->printChartDataArray($dataChart);//formatted print of the chart data
 +                }
 +            }
 +        }
 +        //extract the expecific endnote to insert with the text content
 +        if ($this->endnote2text) {
 +            if (empty($this->endnotes)) {
 +                $this->loadEndNote();
 +            }
 +            $query = 'w:r/w:endnoteReference';
 +            $xmlEndNote = $xpath->query($query, $node);
 +            foreach ($xmlEndNote as $note) {
 +                $ret .= '[' . $this->endnotes[$note->getAttribute('w:id')] . '] ';
 +            }
 +        }
 +        //extract the expecific footnote to insert with the text content
 +        if ($this->footnote2text) {
 +            if (empty($this->footnotes)) {
 +                $this->loadFootNote();
 +            }
 +            $query = 'w:r/w:footnoteReference';
 +            $xmlFootNote = $xpath->query($query, $node);
 +            foreach ($xmlFootNote as $note) {
 +                $ret .= '[' . $this->footnotes[$note->getAttribute('w:id')] . '] ';
 +            }
 +        }
 +        if((($ilvl != -1) && ($numId != -1)) || (1)) {
 +		  $ret .= $this->separator();
 +        }
 +
 +        return $ret;
 +    }
 +
 +    /**
 +     * return a text end of line
 +     *
 +     * @access private
 +     */
 +    private function separator() 
 +    {
 +	   return "\r\n";
 +    }
 +
 +    /** 
 +     * 
 +     * Extract the content of a table node from the document.xml and return a text content
 +     * 
 +     * @access private
 +     * @param $node is a object DOMNode
 +     * 
 +     */
 +    private function table($node) 
 +    {
 +        $output = '';
 +        if ($node->hasChildNodes()) {
 +            foreach ($node->childNodes as $child) {
 +                //start a new line of the table
 +                if ($child->tagName == 'w:tr') {
 +                    foreach ($child->childNodes as $cell) {
 +                        //start a new cell
 +                        if ($cell->tagName == 'w:tc') {
 +                            if ($cell->hasChildNodes()) {
 +                                //
 +                                foreach ($cell->childNodes as $p) {
 +                                    $output .= $this->printWP($p);
 +                                }
 +                                $output .= self::SEPARATOR_TAB;
 +                            }
 +                        }
 +                    }
 +                }
 +                $output .= $this->separator();
 +            }
 +        }
 +        return $output;
 +    }
 +
 +
 +    /** 
 +     * 
 +     * Extract the content of a node from the document.xml and return only the text content and. stripping the html tags
 +     * 
 +     * @access private
 +     * @param $node is a object DOMNode
 +     * 
 +     */
 +    private function toText($node) 
 +    {
 +        $xml = $node->ownerDocument->saveXML($node);
 +        return trim(strip_tags ($xml));
 +    }
 +}
diff --cc 3rdparty/phpdocx/classes/TransformDoc.inc
index 4237a2e,0000000..dd6e511
mode 100644,000000..100644
--- a/3rdparty/phpdocx/classes/TransformDoc.inc
+++ b/3rdparty/phpdocx/classes/TransformDoc.inc
@@@ -1,402 -1,0 +1,406 @@@
 +<?php
 +
 +/**
 + * Transform DOCX to PDF or XHTML
 + *
 + * @category   Phpdocx
 + * @package    transform
 + * @copyright  Copyright (c) Narcea Producciones Multimedia S.L.
 + *             (http://www.2mdc.com)
 + * @license    LGPL
 + * @version    3.0
 + * @link       http://www.phpdocx.com
 + * @since      File available since Release 3.0
 + */
 +
 +error_reporting(E_ALL & ~E_NOTICE);
 +
 +require_once dirname(__FILE__) . '/AutoLoader.inc';
 +AutoLoader::load();
 +
 +class TransformDoc
 +{
 +    const SCHEMA_IMAGEDOCUMENT =
 +    'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image';
 +    const SCHEMA_OFFICEDOCUMENT =
 +    'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument';
 +
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_document;
 +
 +    /**
 +     *
 +     * @access private
 +     * @var array
 +     */
 +    private $_docProps;
 +
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_xhtml;
 +
 +    /**
 +     * Construct
 +     *
 +     * @access public
 +     */
 +    public function __construct()
 +    {
 +        
 +    }
 +
 +    /**
 +     * Destruct
 +     *
 +     * @access public
 +     */
 +    public function __destruct()
 +    {
 +        
 +    }
 +
 +    /**
 +     * Getter. Document
 +     *
 +     * @access public
 +     */
 +    public function getDocument()
 +    {
 +        return $this->_document;
 +    }
 +
 +    /**
 +     * Getter. Document
 +     *
 +     * @access public
 +     */
 +    public function setDocument($document)
 +    {
 +        $this->_document = $document;
 +    }
 +
 +    /**
 +     * Getter. DocProps
 +     *
 +     * @access public
 +     */
 +    public function getDocProps()
 +    {
 +        return $this->_docProps;
 +    }
 +
 +    /**
 +     * Getter. DocProps
 +     *
 +     * @access public
 +     */
 +    public function setDocProps($props)
 +    {
 +        $this->_docProps = $props;
 +    }
 +
 +    /**
 +     * Getter. File
 +     *
 +     * @access public
 +     */
 +    public function getstrFile()
 +    {
 +        return $this->strFile;
 +    }
 +
 +    /**
 +     * Getter. XHTML
 +     *
 +     * @access public
 +     */
 +    public function getStrXHTML()
 +    {
 +        return $this->_xhtml;
 +    }
 +
 +    /**
 +     * Getter. Output file
 +     *
 +     * @access public
 +     */
 +    public function getStrOutputFile()
 +    {
 +        return $this->strOutputFile;
 +    }
 +
 +    /**
 +     * Setter. File
 +     *
 +     * @access public
 +     */
 +    public function setstrFile($file)
 +    {
 +        $this->strFile = $file;
 +    }
 +
 +    /**
 +     * Setter. XHTML
 +     *
 +     * @access public
 +     */
 +    public function setStrXHTML($strXHTML)
 +    {
 +        $this->_xhtml = $strXHTML;
 +    }
 +
 +    /**
 +     *
 +     * @param string $outputFile
 +     */
 +    public function setStrOutputFile($outputFile)
 +    {
 +        $this->strOutputFile = $outputFile;
 +    }
 +
 +    /**
 +     * Return zip path
 +     *
 +     * @access public
 +     * @return string
 +     */
 +    public function absoluteZipPath($path)
 +    {
 +        $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
 +        $parts = array_filter(
 +            explode(DIRECTORY_SEPARATOR, $path), 'strlen'
 +        );
 +        $arrAbsolutes = array();
 +        foreach ($parts as $datParts) {
 +            if ('.' == $datParts)
 +                continue;
 +            if ('..' == $datParts) {
 +                array_pop($arrAbsolutes);
 +            } else {
 +                $arrAbsolutes[] = $datParts;
 +            }
 +        }
 +        return implode('/', $arrAbsolutes);
 +    }
 +
 +    /**
 +     * Clean HTML
 +     *
 +     * @access public
 +     */
 +    public function cleanXHTML()
 +    {
 +        $sectionOne = explode('<head>', $this->_xhtml);
 +        $sectionTwo = explode('</head>', $this->_xhtml);
 +        $sectionTwo = str_replace(
 +            'src="?image="', 'src="imagen_not_found.jpg"', $sectionTwo
 +        );
 +        if (!isset($sectionTwo[1])) {
 +            $sectionTwo[1] = $this->_xhtml;
 +            $sectionOne[0] = '';
 +        }
 +        $this->_xhtml = $sectionOne[0] .
 +            '<head><meta http-equiv="Content-Type" ' .
 +            'content="text/html; charset=utf-8" /></head>' . $sectionTwo[1];
 +    }
 +
 +    /**
 +     * Return file name
 +     *
 +     * @access public
 +     */
 +    public function getFileName()
 +    {
 +        try {
 +            $partsFile = explode('/', $this->strFile);
 +            $divideFile = explode('.', array_pop($partsFile));
 +            $fileName = array_shift($divideFile);
 +        }
 +        catch (Exception $e) {
 +            $fileName = 'file';
 +        }
 +        return $fileName;
 +    }
 +
 +    /**
 +     * Convert DOCX to XHTML
 +     *
 +     * @access public
 +     */
 +    public function generateXHTML()
 +    {
 +        $package = new ZipArchive();
 +        if (!$package->open($this->strFile)) {
 +            echo 'Unable to find the DOCX file';
 +            exit();
 +        }
++        libxml_disable_entity_loader(true);
 +        $relations = simplexml_load_string(
 +            $package->getFromName('_rels/.rels')
 +        );
 +
 +        foreach ($relations->Relationship as $rel) {
 +            if ($rel["Type"] == TransformDoc::SCHEMA_OFFICEDOCUMENT) {
 +                $xml = $package->getFromName(
 +                    $this->absoluteZipPath(
 +                        dirname($rel['Target']) . '/' .
 +                        basename($rel['Target'])
 +                    )
 +                );
 +                $this->setDocument($xml);
 +                $xmlDOM = new DOMDocument();
 +                $xml = str_replace('</w:wordDocument>', '', $xml);
 +                $xml = preg_replace(
 +                    '/(<w:wordDocument)+(.)*(><w:body>)/', '<w:body>', $xml
 +                );
++        	libxml_disable_entity_loader(true);
 +                @$xmlDOM->loadXML($xml);
 +                $xsl = new DOMDocument();
 +                $xsl->load(dirname(__FILE__) . '/../xsl/docx2html.xsl');
 +
 +                $xsltProc = new XSLTProcessor();
 +                
 +                $xsltProc->importStylesheet($xsl);
 +                $this->_xhtml = $xsltProc->transformToXML($xmlDOM);
 +            }
 +        }
 +
 +        $pattern = "'src\s*=\s*([\"\'])?(?(1) (.*?)\\1 | ([^\s\>]+))'isx";
 +        preg_match_all($pattern, $this->_xhtml, $domImgs);
 +
 +        $idImgs = array();
 +        foreach ($domImgs[0] as $dats) {
 +            $datsFiltered = explode('"', $dats);
 +            if (preg_match('/^\?image=rId/', $datsFiltered[1])) {
 +                $datFiltered = explode('?image=', $dats);
 +                $idImgs[] = substr($datFiltered[1], 0, -1);
 +            }
 +        }
++        libxml_disable_entity_loader(true);
 +        $relationsImgs = simplexml_load_string(
 +            $package->getFromName('word/_rels/document.xml.rels')
 +        );
 +        $pathImgs = array();
 +        foreach ($relationsImgs->Relationship as $relImg) {
 +            if ($relImg["Type"] == TransformDoc::SCHEMA_IMAGEDOCUMENT) {
 +                $pathImgs[(string) $relImg["Id"]] =
 +                    (string) $relImg["Target"];
 +                $pathZip[] = 'word/' . (string) $relImg["Target"];
 +            }
 +        }
 +
 +        foreach ($idImgs as $datsIdImgs) {
 +            $this->_xhtml = str_replace(
 +                "src=\"?image=$datsIdImgs\"",
 +                "src=\"files/files_" .
 +                "$this->strFile/media/word/$pathImgs[$datsIdImgs]\"",
 +                $this->_xhtml
 +            );
 +        }
 +
 +        if (!empty($pathZip)) {
 +            $package->extractTo(
 +                "files/files_$this->strFile/media", $pathZip
 +            );
 +            $package->close();
 +        }
 +    }
 +
 +    /**
 +     * Convert DOCX to PDF, using dompdf. DOCX->XHTML->PDF
 +     *
 +     * @access public
 +     */
 +    public function generatePDF($path = '')
 +    {
 +        $this->generateXHTML();
 +        $this->cleanXHTML();
 +        $this->_extractProps();
 +        try {
 +            $domPDF = new DOMPDF();
 +            $domPDF->load_html($this->_xhtml);
 +            $docProps = $this->getDocProps();
 +            $domPDF->set_paper($docProps['size'], $docProps['orientation']);
 +            $domPDF->render();
 +            $fileName = $this->getFileName() . '.pdf';
 +            if($path == ''){
 +                $domPDF->stream($fileName);
 +            }else{
 +                file_put_contents($path, $domPDF->output()); 
 +            }
 +        }
 +        catch (Exception $err) {
 +            echo 'Unable to generate PDF file. ';
 +            echo $err;
 +        }
 +    }
 +
 +    /**
 +     * Validate HTML using tidy
 +     *
 +     * @access public
 +     */
 +    public function validatorXHTML()
 +    {
 +        ob_start();
 +        echo $this->_xhtml;
 +        $html = ob_get_clean();
 +        $config = array(
 +            'indent' => true,
 +            'output-xhtml' => true,
 +            'wrap' => 200);
 +        $tidy = new tidy();
 +        $tidy->parseString($html, $config, 'utf8');
 +        $tidy->cleanRepair();
 +        $this->_xhtml = $tidy;
 +    }
 +
 +    /**
 +     * Get the document properties
 +     *
 +     * @return array
 +     */
 +    private function _extractProps()
 +    {
 +        $xmlDOM = new DOMDocument();
++	libxml_disable_entity_loader(true);
 +        $xmlDOM->loadXML($this->getDocument());
 +        //Get the page size and orientation
 +        $node = $xmlDOM->getElementsByTagName('pgSz');
 +        $docProps = array();
 +        $width = number_format(
 +                $node->item(0)->getAttribute('w:w') / 20,
 +                2, '.', '');
 +        $height = number_format(
 +                $node->item(0)->getAttribute('w:h') / 20,
 +                2, '.', '');
 +        $orient = $node->item(0)->getAttribute('w:orient');
 +        if (empty($orient) || $orient == 'portrait') {
 +            $docProps['orientation'] = 'portrait';
 +            $docProps['size'] = array(0, 0, $width, $height);
 +        } else {
 +            $docProps['orientation'] = 'landscape';
 +            $docProps['size'] = array(0, 0, $height, $width);
 +        }
 +
 +        //Get the page margins
 +        $node = $xmlDOM->getElementsByTagName('pgMar');
 +        $margin = 'margin: ' .
 +                floor($node->item(0)->getAttribute('w:top') / 15) . 'px ' .
 +                floor($node->item(0)->getAttribute('w:right') / 15) . 'px ' .
 +                floor($node->item(0)->getAttribute('w:bottom') / 15) . 'px ' .
 +                floor($node->item(0)->getAttribute('w:left') / 15) . 'px;';
 +        $xml = str_replace('$MARGIN$', $margin, $this->getStrXHTML());
 +        $this->setStrXHTML($xml);
 +        
 +        $this->setDocProps($docProps);
 +    }
 +
- }
++}
diff --cc 3rdparty/phpdocx/classes/WordML.inc
index eb5c6af,0000000..5ab6527
mode 100644,000000..100644
--- a/3rdparty/phpdocx/classes/WordML.inc
+++ b/3rdparty/phpdocx/classes/WordML.inc
@@@ -1,114 -1,0 +1,115 @@@
 +<?php
 +
 +/**
 + * WordML
 + *
 + * @category   Phpdocx
 + * @package    elements
 + * @copyright  Copyright (c) Narcea Producciones Multimedia S.L.
 + *             (http://www.2mdc.com)
 + * @license    LGPL
 + * @version    3.0
 + * @link       http://www.phpdocx.com
 + * @since      File available since Release 3.0
 + */
 +include_once dirname(__FILE__) . '/CreateElement.inc';
 +
 +class WordML extends CreateElement
 +{
 +    
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private $_wordML;
 +    /**
 +     *
 +     * @access private
 +     * @var string
 +     */
 +    private static $_instance = NULL;
 +    
 +     /**
 +     *
 +     * @access public
 +     * @static
 +     * @var Logger
 +     */
 +    public static $log;
 +    
 +    
 +    /**
 +     * Construct
 +     *
 +     * @access public
 +     */
 +    public function __construct()
 +    {
 +        $this->_debug = Debug::getInstance();
 +        Logger::configure(dirname(__FILE__) . '/conf/log4php.properties');
 +        self::$log = Logger::getLogger('phpdocx_logger');
 +    }
 +
 +    /**
 +     * Destruct
 +     *
 +     * @access public
 +     */
 +    public function __destruct()
 +    {
 +
 +    }
 +
 +    /**
 +     * Magic method, returns current XML
 +     *
 +     * @access public
 +     * @return string Return current XML
 +     */
 +    public function __toString()
 +    {
 +        return $this->_wordML;
 +    }
 +
 +
 +    /**
 +     * Create raw WordML
 +     *
 +     * @access public
 +     * @param string $data
 +     */
 +    public function createRawWordML($data)
 +    {
 +        $this->_wordML = (string) $data;
 +    }
 +    
 +    /**
 +     * returns only the runs of content for embedding
 +     *
 +     * @access public
 +     * @param string $data
 +     */
 +    public function inlineWordML()
 +    {
 +        $wordMLChunk = new DOMDocument();
 +        $namespaces = 'xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.open [...]
 +        $wordML = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><w:root '.$namespaces.'>'.$this->_wordML;
 +        $wordML = $wordML.'</w:root>';
++        libxml_disable_entity_loader(true);
 +        $wordMLChunk->loadXML($wordML);
 +        $wordMLXpath = new DOMXPath($wordMLChunk);
 +        $wordMLXpath->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');
 +        $query= '//w:r';
 +        $wrNodes = $wordMLXpath->query($query); 
 +        $blockCleaned = '';
 +        foreach ($wrNodes as $node){
 +           $nodeR = $node->ownerDocument->saveXML($node);       
 +           $blockCleaned .= $nodeR;
 +        }
 +        
 +        return $blockCleaned;
 +    }
 +
 +    
 +}
diff --cc 3rdparty/phpdocx/pdf/load_font.php
index a145f2f,0000000..ed3cd6d
mode 100644,000000..100644
--- a/3rdparty/phpdocx/pdf/load_font.php
+++ b/3rdparty/phpdocx/pdf/load_font.php
@@@ -1,227 -1,0 +1,227 @@@
 +#!/usr/bin/php
 +<?php
 +/**
 + * DOMPDF - PHP5 HTML to PDF renderer
 + *
 + * File: $RCSfile: load_font.php,v $
 + * Created on: 2004-06-23
 + *
 + * Copyright (c) 2004 - Benj Carson <benjcarson at digitaljunkies.ca>
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU Lesser General Public
 + * License as published by the Free Software Foundation; either
 + * version 2.1 of the License, or (at your option) 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
 + * Lesser General Public License for more details.
 + *
 + * You should have received a copy of the GNU Lesser General Public License
 + * along with this library in the file LICENSE.LGPL; if not, write to the
 + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 + * 02111-1307 USA
 + *
 + * Alternatively, you may distribute this software under the terms of the
 + * PHP License, version 3.0 or later.  A copy of this license should have
 + * been distributed with this file in the file LICENSE.PHP .  If this is not
 + * the case, you can obtain a copy at http://www.php.net/license/3_0.txt.
 + *
 + * The latest version of DOMPDF might be available at:
 + * http://www.dompdf.com/
 + *
 + * @link http://www.dompdf.com/
 + * @copyright 2004 Benj Carson
 + * @author Benj Carson <benjcarson at digitaljunkies.ca>
 + * @package dompdf
 +
 + */
 +
- require_once("dompdf_config.inc.php");
++require_once(dirname(__FILE__) . '/../../dompdf_config.inc.php');
 +
 +/**
 + * @access private
 + */
 +define("_TTF2AFM", escapeshellarg(TTF2AFM) . " -a -GAef -OW ");
 +
 +if ( !file_exists(TTF2AFM) ) {
 +  die("Unable to locate the ttf2afm / ttf2pt1 executable (checked " . TTF2AFM . ").\n");
 +}
 +
 +
 +/**
 + * Display command line usage
 + *
 + */
 +function usage() {
 +
 +  echo <<<EOD
 +
 +Usage: {$_SERVER["argv"][0]} font_family [n_file [b_file] [i_file] [bi_file]]
 +
 +font_family:      the name of the font, e.g. Verdana, 'Times New Roman',
 +                  monospace, sans-serif. If it equals to "system_fonts", 
 +                  all the system fonts will be installed.
 +
 +n_file:           the .pfb or .ttf file for the normal, non-bold, non-italic
 +                  face of the font.
 +
 +{b|i|bi}_file:    the files for each of the respective (bold, italic,
 +                  bold-italic) faces.
 +
 +If the optional b|i|bi files are not specified, load_font.php will search
 +the directory containing normal font file (n_file) for additional files that
 +it thinks might be the correct ones (e.g. that end in _Bold or b or B).  If
 +it finds the files they will also be processed.  All files will be
 +automatically copied to the DOMPDF font directory, and afm files will be
 +generated using ttf2afm.
 +
 +Examples:
 +
 +./load_font.php silkscreen /usr/share/fonts/truetype/slkscr.ttf
 +./load_font.php 'Times New Roman' /mnt/c_drive/WINDOWS/Fonts/times.ttf
 +
 +EOD;
 +
 +}
 +
 +if ( $_SERVER["argc"] < 3 && $_SERVER["argv"][1] != "system_fonts" ) {
 +  usage();
 +  die();
 +}
 +
 +/**
 + * Installs a new font family
 + *
 + * This function maps a font-family name to a font.  It tries to locate the
 + * bold, italic, and bold italic versions of the font as well.  Once the
 + * files are located, ttf versions of the font are copied to the fonts
 + * directory.  Changes to the font lookup table are saved to the cache.
 + *
 + * @param string $fontname the font-family name
 + * @param string $normal the filename of the normal face font subtype
 + * @param string $bold   the filename of the bold face font subtype
 + * @param string $italic the filename of the italic face font subtype
 + * @param string $bold_italic the filename of the bold italic face font subtype
 + */
 +function install_font_family($fontname, $normal, $bold = null, $italic = null, $bold_italic = null) {
 +
 +  // Check if the base filename is readable
 +  if ( !is_readable($normal) )
 +    throw new DOMPDF_Exception("Unable to read '$normal'.");
 +
 +  $dir = dirname($normal);
 +  $basename = basename($normal);
 +  $last_dot = strrpos($basename, '.');
 +  if ($last_dot !== false) {
 +    $file = substr($basename, 0, $last_dot);
 +    $ext = strtolower(substr($basename, $last_dot));
 +  } else {
 +    $file = $basename;
 +    $ext = '';
 +  }
 +
 +  // Try $file_Bold.$ext etc.
 +  $path = "$dir/$file";
 +  
 +  $patterns = array(
 +    "bold"        => array("_Bold", "b", "B", "bd", "BD"),
 +    "italic"      => array("_Italic", "i", "I"),
 +    "bold_italic" => array("_Bold_Italic", "bi", "BI", "ib", "IB"),
 +  );
 +  
 +  foreach ($patterns as $type => $_patterns) {
 +    if ( !isset($$type) || !is_readable($$type) ) {
 +      foreach($_patterns as $_pattern) {
 +        if ( is_readable("$path$_pattern$ext") ) {
 +          $$type = "$path$_pattern$ext";
 +          break;
 +        }
 +      }
 +      if ( is_null($$type) )
 +        echo ("Unable to find $type face file.\n");
 +    }
 +  }
 +
 +  $fonts = compact("normal", "bold", "italic", "bold_italic");
 +  $entry = array();
 +
 +  if ( $ext === ".pfb" || $ext === ".ttf" || $ext === ".otf" ) {
 +
 +    // Copy the files to the font directory.
 +    foreach ($fonts as $var => $src) {
 +      if ( is_null($src) ) {
 +        $entry[$var] = DOMPDF_FONT_DIR . basename($normal);
 +        continue;
 +      }
 +
 +      // Verify that the fonts exist and are readable
 +      if ( !is_readable($src) )
 +        throw new DOMPDF_Exception("Requested font '$pathname' is not readable");
 +
 +      $dest = DOMPDF_FONT_DIR . basename($src);
 +      if ( !is_writeable(dirname($dest)) )
 +        throw new DOMPDF_Exception("Unable to write to destination '$dest'.");
 +
 +      echo "Copying $src to $dest...\n";
 +
 +      if ( !copy($src, $dest) )
 +        throw new DOMPDF_Exception("Unable to copy '$src' to '" . DOMPDF_FONT_DIR . "$dest'.");
 +
 +      $entry[$var] = $dest;
 +    }
 +
 +  } else
 +    throw new DOMPDF_Exception("Unable to process fonts of type '$ext'.");
 +
 +
 +  // If the extension is a ttf, try and convert the fonts to afm too
 +  if ( $ext === ".ttf" || $ext === ".otf" ) {
 +    foreach ($fonts as $var => $font) {
 +      if ( is_null($font) ) {
 +        $entry[$var] = DOMPDF_FONT_DIR . mb_substr(basename($normal), 0, -4);
 +        continue;
 +      }
 +      
 +      $dest = DOMPDF_FONT_DIR . mb_substr(basename($font), 0 , -4);
 +      $stdout = ( ( strpos(PHP_OS, "WIN") === false ) ? " >/dev/null" : " 2>&1" );
 +      $command = _TTF2AFM . " " . escapeshellarg($font) . " " . escapeshellarg($dest) . $stdout;
 +      echo "Generating .afm for $font...\n";
 +      //echo $command . "\n";
 +      exec( $command, $output, $ret );
 +
 +      $entry[$var] = $dest;
 +    }
 +  }
 +
 +  // FIXME: how to generate afms from pfb?
 +
 +  // Store the fonts in the lookup table
 +  Font_Metrics::set_font_family($fontname, $entry);
 +
 +  // Save the changes
 +  Font_Metrics::save_font_families();
 +}
 +
 +// If installing system fonts (may take a long time)
 +if ( $_SERVER["argv"][1] === "system_fonts" ) {
 +  $fonts = Font_Metrics::get_system_fonts();
 +  var_dump($fonts);
 +  foreach ( $fonts as $family => $files ) {
 +    echo " >> Installing '$family'... \n";
 +    
 +    if ( !isset($files["normal"]) ) {
 +      echo "No 'normal' style font file\n";
 +    }
 +    else {
 +      install_font_family( $family, @$files["normal"], @$files["bold"], @$files["italic"], @$files["bold_italic"]);
 +      echo "Done !\n";
 +    }
 +    
 +    echo "\n";
 +  }
 +}
 +else {
 +  call_user_func_array("install_font_family", array_slice($_SERVER["argv"], 1));
 +}
diff --cc apps/calendar/appinfo/app.php
index 26f9795,0000000..b7f6a2b
mode 100644,000000..100644
--- a/apps/calendar/appinfo/app.php
+++ b/apps/calendar/appinfo/app.php
@@@ -1,45 -1,0 +1,49 @@@
 +<?php
 +$l = OCP\Util::getL10N('calendar');
 +OC::$CLASSPATH['OC_Calendar_App'] = 'calendar/lib/app.php';
 +OC::$CLASSPATH['OC_Calendar_Calendar'] = 'calendar/lib/calendar.php';
 +OC::$CLASSPATH['OC_Calendar_Object'] = 'calendar/lib/object.php';
 +OC::$CLASSPATH['OC_Calendar_Hooks'] = 'calendar/lib/hooks.php';
 +OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'calendar/lib/sabre/backend.php';
 +OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarRoot'] = 'calendar/lib/sabre/calendarroot.php';
 +OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_UserCalendars'] = 'calendar/lib/sabre/usercalendars.php';
 +OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_Calendar'] = 'calendar/lib/sabre/calendar.php';
 +OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarObject'] = 'calendar/lib/sabre/object.php';
 +OC::$CLASSPATH['OC_Calendar_Repeat'] = 'calendar/lib/repeat.php';
 +OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'calendar/lib/search.php';
 +OC::$CLASSPATH['OC_Calendar_Export'] = 'calendar/lib/export.php';
 +OC::$CLASSPATH['OC_Calendar_Import'] = 'calendar/lib/import.php';
 +OC::$CLASSPATH['OC_Share_Backend_Calendar'] = 'calendar/lib/share/calendar.php';
 +OC::$CLASSPATH['OC_Share_Backend_Event'] = 'calendar/lib/share/event.php';
 +//General Hooks
 +OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'createUser');
 +OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
 +//Repeating Events Hooks
 +OCP\Util::connectHook('OC_Calendar', 'addEvent', 'OC_Calendar_Repeat', 'generate');
 +OCP\Util::connectHook('OC_Calendar', 'editEvent', 'OC_Calendar_Repeat', 'update');
 +OCP\Util::connectHook('OC_Calendar', 'deleteEvent', 'OC_Calendar_Repeat', 'clean');
 +OCP\Util::connectHook('OC_Calendar', 'moveEvent', 'OC_Calendar_Repeat', 'update');
 +OCP\Util::connectHook('OC_Calendar', 'deleteCalendar', 'OC_Calendar_Repeat', 'cleanCalendar');
 +
 +OCP\Util::addscript('calendar','loader');
 +OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
 +OCP\Util::addStyle("3rdparty", "chosen/chosen");
 +OCP\Util::addStyle('3rdparty/miniColors', 'jquery.miniColors');
 +OCP\Util::addscript('3rdparty/miniColors', 'jquery.miniColors.min');
 +OCP\App::addNavigationEntry( array(
 +  'id' => 'calendar_index',
 +  'order' => 10,
 +  'href' => OCP\Util::linkTo( 'calendar', 'index.php' ),
 +  'icon' => OCP\Util::imagePath( 'calendar', 'calendar.svg' ),
 +  'name' => $l->t('Calendar')));
 +OC_Search::registerProvider('OC_Search_Provider_Calendar');
 +OCP\Share::registerBackend('calendar', 'OC_Share_Backend_Calendar');
 +OCP\Share::registerBackend('event', 'OC_Share_Backend_Event');
 +
++if(\OCP\App::isEnabled('contacts')) {
++	\OCP\Share::registerBackend('addressbook', 'OCA\Contacts\Share\Addressbook', 'contact');
++}
++
 +Sabre\VObject\Property::$classMap['SUMMARY'] = 'OC\VObject\StringProperty';
 +Sabre\VObject\Property::$classMap['DESCRIPTION'] = 'OC\VObject\StringProperty';
 +Sabre\VObject\Property::$classMap['LOCATION'] = 'OC\VObject\StringProperty';
diff --cc apps/calendar/js/calendar.js
index 40f1478,0000000..12b4465
mode 100644,000000..100644
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@@ -1,959 -1,0 +1,959 @@@
 +/**
 + * Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
 + * Copyright (c) 2011 Bart Visscher <bartv at thisnet.nl>
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + * See the COPYING-README file.
 + */
 +
 +Calendar={
 +	Util:{
 +		sendmail: function(eventId, location, description, dtstart, dtend){
 +			Calendar.UI.loading(true);
 +			$.post(
 +			OC.filePath('calendar','ajax/event','sendmail.php'),
 +			{
 +				eventId:eventId,
 +				location:location,
 +				description:description,
 +				dtstart:dtstart,
 +				dtend:dtend
 +			},
 +			function(result){
 +				if(result.status !== 'success'){
 +					OC.dialogs.alert(result.data.message, 'Error sending mail');
 +				}
 +				Calendar.UI.loading(false);
 +			}
 +		);
 +		},
 +		dateTimeToTimestamp:function(dateString, timeString){
 +			dateTuple = dateString.split('-');
 +			timeTuple = timeString.split(':');
 +			
 +			var day, month, year, minute, hour;
 +			day = parseInt(dateTuple[0], 10);
 +			month = parseInt(dateTuple[1], 10);
 +			year = parseInt(dateTuple[2], 10);
 +			hour = parseInt(timeTuple[0], 10);
 +			minute = parseInt(timeTuple[1], 10);
 +			
 +			var date = new Date(year, month-1, day, hour, minute);
 +			
 +			return parseInt(date.getTime(), 10);
 +		},
 +		formatDate:function(year, month, day){
 +			if(day < 10){
 +				day = '0' + day;
 +			}
 +			if(month < 10){
 +				month = '0' + month;
 +			}
 +			return day + '-' + month + '-' + year;
 +		},
 +		formatTime:function(hour, minute){
 +			if(hour < 10){
 +				hour = '0' + hour;
 +			}
 +			if(minute < 10){
 +				minute = '0' + minute;
 +			}
 +			return hour + ':' + minute;
 +		}, 
 +		adjustDate:function(){
 +			var fromTime = $('#fromtime').val();
 +			var fromDate = $('#from').val();
 +			var fromTimestamp = Calendar.Util.dateTimeToTimestamp(fromDate, fromTime);
 +
 +			var toTime = $('#totime').val();
 +			var toDate = $('#to').val();
 +			var toTimestamp = Calendar.Util.dateTimeToTimestamp(toDate, toTime);
 +
 +			if(fromTimestamp >= toTimestamp){
 +				fromTimestamp += 30*60*1000;
 +				
 +				var date = new Date(fromTimestamp);
 +				movedTime = Calendar.Util.formatTime(date.getHours(), date.getMinutes());
 +				movedDate = Calendar.Util.formatDate(date.getFullYear(),
 +						date.getMonth()+1, date.getDate());
 +
 +				$('#to').val(movedDate);
 +				$('#totime').val(movedTime);
 +			}
 +		}
 +	},
 +	UI:{
 +		loading: function(isLoading){
 +			if (isLoading){
 +				$('#loading').show();
 +			}else{
 +				$('#loading').hide();
 +			}
 +		},
 +		startEventDialog:function(){
 +			Calendar.UI.loading(false);
 +			$('#fullcalendar').fullCalendar('unselect');
 +			Calendar.UI.lockTime();
 +			$( "#from" ).datepicker({
 +				dateFormat : 'dd-mm-yy',
 +				onSelect: function(){ Calendar.Util.adjustDate(); }
 +			});
 +			$( "#to" ).datepicker({
 +				dateFormat : 'dd-mm-yy'
 +			});
 +			$('#fromtime').timepicker({
 +				showPeriodLabels: false,
 +				onSelect: function(){ Calendar.Util.adjustDate(); }
 +			});
 +			$('#totime').timepicker({
 +				showPeriodLabels: false
 +			});
 +			$('#category').multiple_autocomplete({source: categories});
 +			Calendar.UI.repeat('init');
 +			$('#end').change(function(){
 +				Calendar.UI.repeat('end');
 +			});
 +			$('#repeat').change(function(){
 +				Calendar.UI.repeat('repeat');
 +			});
 +			$('#advanced_year').change(function(){
 +				Calendar.UI.repeat('year');
 +			});
 +			$('#advanced_month').change(function(){
 +				Calendar.UI.repeat('month');
 +			});
 +			$( "#event" ).tabs({ selected: 0});
 +			$('#event').dialog({
 +				width : 500,
 +				height: 600,
 +				resizable: false,
 +				draggable: false,
 +				close : function(event, ui) {
 +					$(this).dialog('destroy').remove();
 +				}
 +			});
 +			Calendar.UI.Share.init();
 +			$('#sendemailbutton').click(function() {
 +				Calendar.Util.sendmail($(this).attr('data-eventid'), $(this).attr('data-location'), $(this).attr('data-description'), $(this).attr('data-dtstart'), $(this).attr('data-dtend'));
 +			})
 +		},
 +		newEvent:function(start, end, allday){
 +			start = Math.round(start.getTime()/1000);
 +			if (end){
 +				end = Math.round(end.getTime()/1000);
 +			}
 +			if($('#event').dialog('isOpen') == true){
 +				// TODO: save event
 +				$('#event').dialog('destroy').remove();
 +			}else{
 +				Calendar.UI.loading(true);
 +				$('#dialog_holder').load(OC.filePath('calendar', 'ajax/event', 'new.form.php'), {start:start, end:end, allday:allday?1:0}, Calendar.UI.startEventDialog);
 +			}
 +		},
 +		editEvent:function(calEvent, jsEvent, view){
 +			if (calEvent.editable == false || calEvent.source.editable == false) {
 +				return;
 +			}
 +			var id = calEvent.id;
 +			if($('#event').dialog('isOpen') == true){
 +				// TODO: save event
 +				$('#event').dialog('destroy').remove();
 +			}else{
 +				Calendar.UI.loading(true);
 +				$('#dialog_holder').load(OC.filePath('calendar', 'ajax/event', 'edit.form.php'), {id: id}, Calendar.UI.startEventDialog);
 +			}
 +		},
 +		submitDeleteEventForm:function(url){
 +			var id = $('input[name="id"]').val();
 +			$('#errorbox').empty();
 +			Calendar.UI.loading(true);
 +			$.post(url, {id:id}, function(data){
 +					Calendar.UI.loading(false);
 +					if(data.status == 'success'){
 +						$('#fullcalendar').fullCalendar('removeEvents', $('#event_form input[name=id]').val());
 +						$('#event').dialog('destroy').remove();
 +					} else {
 +						$('#errorbox').html(t('calendar', 'Deletion failed'));
 +					}
 +
 +			}, "json");
 +		},
 +		validateEventForm:function(url){
 +			var post = $( "#event_form" ).serialize();
 +			$("#errorbox").empty();
 +			Calendar.UI.loading(true);
 +			$.post(url, post,
 +				function(data){
 +					Calendar.UI.loading(false);
 +					if(data.status == "error"){
 +						var output = missing_field + ": <br />";
 +						if(data.title == "true"){
 +							output = output + missing_field_title + "<br />";
 +						}
 +						if(data.cal == "true"){
 +							output = output + missing_field_calendar + "<br />";
 +						}
 +						if(data.from == "true"){
 +							output = output + missing_field_fromdate + "<br />";
 +						}
 +						if(data.fromtime == "true"){
 +							output = output + missing_field_fromtime + "<br />";
 +						}
 +						if(data.to == "true"){
 +							output = output + missing_field_todate + "<br />";
 +						}
 +						if(data.totime == "true"){
 +							output = output + missing_field_totime + "<br />";
 +						}
 +						if(data.endbeforestart == "true"){
 +							output = output + missing_field_startsbeforeends + "!<br/>";
 +						}
 +						if(data.dberror == "true"){
 +							output = "There was a database fail!";
 +						}
 +						$("#errorbox").html(output);
 +					} else
 +					if(data.status == 'success'){
 +						$('#event').dialog('destroy').remove();
 +						$('#fullcalendar').fullCalendar('refetchEvents');
 +					}
 +				},"json");
 +		},
 +		moveEvent:function(event, dayDelta, minuteDelta, allDay, revertFunc){
 +			Calendar.UI.loading(true);
 +			$.post(OC.filePath('calendar', 'ajax/event', 'move.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, allDay: allDay?1:0, lastmodified: event.lastmodified},
 +			function(data) {
 +				Calendar.UI.loading(false);
 +				if (data.status == 'success'){
 +					event.lastmodified = data.lastmodified;
 +					console.log("Event moved successfully");
 +				}else{
 +					revertFunc();
 +					$('#fullcalendar').fullCalendar('refetchEvents');
 +				}
 +			});
 +		},
 +		resizeEvent:function(event, dayDelta, minuteDelta, revertFunc){
 +			Calendar.UI.loading(true);
 +			$.post(OC.filePath('calendar', 'ajax/event', 'resize.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, lastmodified: event.lastmodified},
 +			function(data) {
 +				Calendar.UI.loading(false);
 +				if (data.status == 'success'){
 +					event.lastmodified = data.lastmodified;
 +					console.log("Event resized successfully");
 +				}else{
 +					revertFunc();
 +					$('#fullcalendar').fullCalendar('refetchEvents');
 +				}
 +			});
 +		},
 +		showadvancedoptions:function(){
 +			$("#advanced_options").slideDown('slow');
 +			$("#advanced_options_button").css("display", "none");
 +		},
 +		showadvancedoptionsforrepeating:function(){
 +			if($("#advanced_options_repeating").is(":hidden")){
 +				$('#advanced_options_repeating').slideDown('slow');
 +			}else{
 +				$('#advanced_options_repeating').slideUp('slow');
 +			}
 +		},
 +		getEventPopupText:function(event){
 +			if (event.allDay){
 +				var timespan = $.fullCalendar.formatDates(event.start, event.end, 'ddd d MMMM[ yyyy]{ - [ddd d] MMMM yyyy}', {monthNamesShort: monthNamesShort, monthNames: monthNames, dayNames: dayNames, dayNamesShort: dayNamesShort}); //t('calendar', "ddd d MMMM[ yyyy]{ - [ddd d] MMMM yyyy}")
 +			}else{
 +				var timespan = $.fullCalendar.formatDates(event.start, event.end, 'ddd d MMMM[ yyyy] ' + defaulttime + '{ - [ ddd d MMMM yyyy]' + defaulttime + '}', {monthNamesShort: monthNamesShort, monthNames: monthNames, dayNames: dayNames, dayNamesShort: dayNamesShort}); //t('calendar', "ddd d MMMM[ yyyy] HH:mm{ - [ ddd d MMMM yyyy] HH:mm}")
 +				// Tue 18 October 2011 08:00 - 16:00
 +			}
 +			var html =
 +				'<div class="summary">' + escapeHTML(event.title) + '</div>' +
 +				'<div class="timespan">' + timespan + '</div>';
 +			if (event.description){
 +				html += '<div class="description">' + escapeHTML(event.description) + '</div>';
 +			}
 +			return html;
 +		},
 +		lockTime:function(){
 +			if($('#allday_checkbox').is(':checked')) {
 +				$("#fromtime").attr('disabled', true)
 +					.addClass('disabled');
 +				$("#totime").attr('disabled', true)
 +					.addClass('disabled');
 +			} else {
 +				$("#fromtime").attr('disabled', false)
 +					.removeClass('disabled');
 +				$("#totime").attr('disabled', false)
 +					.removeClass('disabled');
 +			}
 +		},
 +		showCalDAVUrl:function(username, calname){
- 			$('#caldav_url').val(totalurl + '/' + username + '/' + calname);
++			$('#caldav_url').val(totalurl + '/' + encodeURIComponent(username) + '/' + encodeURIComponent(calname));
 +			$('#caldav_url').show();
 +			$("#caldav_url_close").show();
 +		},
 +		repeat:function(task){
 +			if(task=='init'){
 +				$('#byweekno').multiselect({
 +					header: false,
 +					noneSelectedText: $('#advanced_byweekno').attr('title'),
 +					selectedList: 2,
 +					minWidth:'auto'
 +				});
 +				$('#weeklyoptions').multiselect({
 +					header: false,
 +					noneSelectedText: $('#weeklyoptions').attr('title'),
 +					selectedList: 2,
 +					minWidth:'auto'
 +				});
 +				$('input[name="bydate"]').datepicker({
 +					dateFormat : 'dd-mm-yy'
 +				});
 +				$('#byyearday').multiselect({
 +					header: false,
 +					noneSelectedText: $('#byyearday').attr('title'),
 +					selectedList: 2,
 +					minWidth:'auto'
 +				});
 +				$('#bymonth').multiselect({
 +					header: false,
 +					noneSelectedText: $('#bymonth').attr('title'),
 +					selectedList: 2,
 +					minWidth:'auto'
 +				});
 +				$('#bymonthday').multiselect({
 +					header: false,
 +					noneSelectedText: $('#bymonthday').attr('title'),
 +					selectedList: 2,
 +					minWidth:'auto'
 +				});
 +				Calendar.UI.repeat('end');
 +				Calendar.UI.repeat('month');
 +				Calendar.UI.repeat('year');
 +				Calendar.UI.repeat('repeat');
 +			}
 +			if(task == 'end'){
 +				$('#byoccurrences').css('display', 'none');
 +				$('#bydate').css('display', 'none');
 +				if($('#end option:selected').val() == 'count'){
 +					$('#byoccurrences').css('display', 'block');
 +				}
 +				if($('#end option:selected').val() == 'date'){
 +					$('#bydate').css('display', 'block');
 +				}
 +			}
 +			if(task == 'repeat'){
 +				$('#advanced_month').css('display', 'none');
 +				$('#advanced_weekday').css('display', 'none');
 +				$('#advanced_weekofmonth').css('display', 'none');
 +				$('#advanced_byyearday').css('display', 'none');
 +				$('#advanced_bymonth').css('display', 'none');
 +				$('#advanced_byweekno').css('display', 'none');
 +				$('#advanced_year').css('display', 'none');
 +				$('#advanced_bymonthday').css('display', 'none');
 +				if($('#repeat option:selected').val() == 'monthly'){
 +					$('#advanced_month').css('display', 'block');
 +					Calendar.UI.repeat('month');
 +				}
 +				if($('#repeat option:selected').val() == 'weekly'){
 +					$('#advanced_weekday').css('display', 'block');
 +				}
 +				if($('#repeat option:selected').val() == 'yearly'){
 +					$('#advanced_year').css('display', 'block');
 +					Calendar.UI.repeat('year');
 +				}
 +				if($('#repeat option:selected').val() == 'doesnotrepeat'){
 +					$('#advanced_options_repeating').slideUp('slow');
 +				}
 +			}
 +			if(task == 'month'){
 +				$('#advanced_weekday').css('display', 'none');
 +				$('#advanced_weekofmonth').css('display', 'none');
 +				if($('#advanced_month_select option:selected').val() == 'weekday'){
 +					$('#advanced_weekday').css('display', 'block');
 +					$('#advanced_weekofmonth').css('display', 'block');
 +				}
 +			}
 +			if(task == 'year'){
 +				$('#advanced_weekday').css('display', 'none');
 +				$('#advanced_byyearday').css('display', 'none');
 +				$('#advanced_bymonth').css('display', 'none');
 +				$('#advanced_byweekno').css('display', 'none');
 +				$('#advanced_bymonthday').css('display', 'none');
 +				if($('#advanced_year_select option:selected').val() == 'byyearday'){
 +					//$('#advanced_byyearday').css('display', 'block');
 +				}
 +				if($('#advanced_year_select option:selected').val() == 'byweekno'){
 +					$('#advanced_byweekno').css('display', 'block');
 +				}
 +				if($('#advanced_year_select option:selected').val() == 'bydaymonth'){
 +					$('#advanced_bymonth').css('display', 'block');
 +					$('#advanced_bymonthday').css('display', 'block');
 +					$('#advanced_weekday').css('display', 'block');
 +				}
 +			}
 +
 +		},
 +		setViewActive: function(view){
 +			$('#view input[type="button"]').removeClass('active');
 +			var id;
 +			switch (view) {
 +				case 'agendaWeek':
 +					id = 'oneweekview_radio';
 +					break;
 +				case 'month':
 +					id = 'onemonthview_radio';
 +					break;
 +				case 'agendaDay':
 +					id = 'onedayview_radio';
 +					break;
 +			}
 +			$('#'+id).addClass('active');
 +		},
 +		categoriesChanged:function(newcategories){
 +			categories = $.map(newcategories, function(v) {return v.name;});
 +			console.log('Calendar categories changed to: ' + categories);
 +			$('#category').multiple_autocomplete('option', 'source', categories);
 +		},
 +		Calendar:{
 +			overview:function(){
 +				if($('#choosecalendar_dialog').dialog('isOpen') == true){
 +					$('#choosecalendar_dialog').dialog('moveToTop');
 +				}else{
 +					Calendar.UI.loading(true);
 +					$('#dialog_holder').load(OC.filePath('calendar', 'ajax/calendar', 'overview.php'), function(){
 +						$('#choosecalendar_dialog').dialog({
 +							width : 600,
 +							height: 400,
 +							close : function(event, ui) {
 +								$(this).dialog('destroy').remove();
 +							}
 +						});
 +						Calendar.UI.loading(false);
 +					});
 +				}
 +			},
 +			activation:function(checkbox, calendarid)
 +			{
 +				Calendar.UI.loading(true);
 +				$.post(OC.filePath('calendar', 'ajax/calendar', 'activation.php'), { calendarid: calendarid, active: checkbox.checked?1:0 },
 +				  function(data) {
 +					Calendar.UI.loading(false);
 +					if (data.status == 'success'){
 +						checkbox.checked = data.active == 1;
 +						if (data.active == 1){
 +							$('#fullcalendar').fullCalendar('addEventSource', data.eventSource);
 +						}else{
 +							$('#fullcalendar').fullCalendar('removeEventSource', data.eventSource.url);
 +						}
 +					}
 +				  });
 +			},
 +			newCalendar:function(object){
 +				var tr = $(document.createElement('tr'))
 +					.load(OC.filePath('calendar', 'ajax/calendar', 'new.form.php'),
 +						function(){Calendar.UI.Calendar.colorPicker(this)});
 +				$(object).closest('tr').after(tr).hide();
 +			},
 +			edit:function(object, calendarid){
 +				var tr = $(document.createElement('tr'))
 +					.load(OC.filePath('calendar', 'ajax/calendar', 'edit.form.php'), {calendarid: calendarid},
 +						function(){Calendar.UI.Calendar.colorPicker(this)});
 +				$(object).closest('tr').after(tr).hide();
 +			},
 +			deleteCalendar:function(calid){
 +				var check = confirm("Do you really want to delete this calendar?");
 +				if(check == false){
 +					return false;
 +				}else{
 +					$.post(OC.filePath('calendar', 'ajax/calendar', 'delete.php'), { calendarid: calid},
 +					  function(data) {
 +						if (data.status == 'success'){
 +							var url = 'ajax/events.php?calendar_id='+calid;
 +							$('#fullcalendar').fullCalendar('removeEventSource', url);
 +							$('#choosecalendar_dialog').dialog('destroy').remove();
 +							Calendar.UI.Calendar.overview();
 +							$('#calendar tr[data-id="'+calid+'"]').fadeOut(400,function(){
 +								$('#calendar tr[data-id="'+calid+'"]').remove();
 +							});
 +							$('#fullcalendar').fullCalendar('refetchEvents');
 +						}
 +					  });
 +				}
 +			},
 +			submit:function(button, calendarid){
 +				var displayname = $.trim($("#displayname_"+calendarid).val());
 +				//var active = $("#edit_active_"+calendarid+":checked").length;
 +				var active =0;
 +				if( $("#edit_active_"+calendarid).is(':checked') ){
 +					 active =1;
 +				}
 +				
 +				var description = $("#description_"+calendarid).val();
 +				var calendarcolor = $("#calendarcolor_"+calendarid).val();
 +				if(displayname == ''){
 +					$("#displayname_"+calendarid).css('background-color', '#FF2626');
 +					$("#displayname_"+calendarid).focus(function(){
 +						$("#displayname_"+calendarid).css('background-color', '#F8F8F8');
 +					});
 +				}
 +
 +				var url;
 +				if (calendarid == 'new'){
 +					url = OC.filePath('calendar', 'ajax/calendar', 'new.php');
 +				}else{
 +					url = OC.filePath('calendar', 'ajax/calendar', 'update.php');
 +				}
 +				$.post(url, { id: calendarid, name: displayname, active: active, description: description, color: calendarcolor },
 +					function(data){
 +						if(data.status == 'success'){
 +							$(button).closest('tr').prev().html(data.page).show().next().remove();
 +							$('#fullcalendar').fullCalendar('removeEventSource', data.eventSource.url);
 +							$('#fullcalendar').fullCalendar('addEventSource', data.eventSource);
 +							if (calendarid == 'new'){
 +								$('#calendar > table:first').append('<tr><td colspan="6"><a href="#" id="chooseCalendar"><input type="button" value="' + newcalendar + '"></a></td></tr>');
 +							}
 +						}else{
 +							$("#displayname_"+calendarid).css('background-color', '#FF2626');
 +							$("#displayname_"+calendarid).focus(function(){
 +								$("#displayname_"+calendarid).css('background-color', '#F8F8F8');
 +							});
 +						}
 +					}, 'json');
 +			},
 +			cancel:function(button, calendarid){
 +				$(button).closest('tr').prev().show().next().remove();
 +			},
 +			colorPicker:function(container){
 +				// based on jquery-colorpicker at jquery.webspirited.com
 +				var obj = $('.colorpicker', container);
 +				var picker = $('<div class="calendar-colorpicker"></div>');
 +				//build an array of colors
 +				var colors = {};
 +				$(obj).children('option').each(function(i, elm) {
 +					colors[i] = {};
 +					colors[i].color = $(elm).val();
 +					colors[i].label = $(elm).text();
 +				});
 +				for (var i in colors) {
 +					picker.append('<span class="calendar-colorpicker-color ' + (colors[i].color == $(obj).children(":selected").val() ? ' active' : '') + '" rel="' + colors[i].label + '" style="background-color: ' + colors[i].color + ';"></span>');
 +				}
 +				picker.delegate(".calendar-colorpicker-color", "click", function() {
 +					$(obj).val($(this).attr('rel'));
 +					$(obj).change();
 +					picker.children('.calendar-colorpicker-color.active').removeClass('active');
 +					$(this).addClass('active');
 +				});
 +				$(obj).after(picker);
 +				$(obj).css({
 +					position: 'absolute',
 +					left: -10000
 +				});
 +			}
 +		},
 +		Share:{
 +			init:function(){
 +				if(typeof OC.Share !== typeof undefined){
 +					var itemShares = [OC.Share.SHARE_TYPE_USER, OC.Share.SHARE_TYPE_GROUP];
 +					$('#sharewith').autocomplete({minLength: 1, source: function(search, response) {
 +						$.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getShareWith', search: search.term, itemShares: itemShares }, function(result) {
 +							if (result.status == 'success' && result.data.length > 0) {
 +								response(result.data);
 +							}
 +						});
 +					},
 +					focus: function(event, focused) {
 +						event.preventDefault();
 +					},
 +					select: function(event, selected) {
 +						var itemType = 'event';
 +						var itemSource = $('#sharewith').data('item-source');
 +						var shareType = selected.item.value.shareType;
 +						var shareWith = selected.item.value.shareWith;
 +						$(this).val(shareWith);
 +						// Default permissions are Read and Share
 +						var permissions = OC.PERMISSION_READ | OC.PERMISSION_SHARE;
 +						OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function(data) {
 +							var newitem = '<li data-item-type="event"'
 +								+ 'data-share-with="'+shareWith+'" '
 +								+ 'data-permissions="'+permissions+'" '
 +								+ 'data-share-type="'+shareType+'">'
 +								+ shareWith
 +								+ (shareType === OC.Share.SHARE_TYPE_GROUP ? ' ('+t('core', 'group')+')' : '')
 +								+ '<span class="shareactions">'
 +								+ '<label><input class="update" type="checkbox" checked="checked">'+t('core', 'can edit')+'</label>'
 +								+ '<label><input class="share" type="checkbox" checked="checked">'+t('core', 'can share')+'</label>'
 +								+ '<img class="svg action delete" title="Unshare"src="'+ OC.imagePath('core', 'actions/delete.svg') +'"></span></li>';
 +							$('.sharedby.eventlist').append(newitem);
 +							$('#sharedWithNobody').remove();
 +							$('#sharewith').val('');
 +						});
 +						return false;
 +					}
 +					});
 +	
 +					$('.shareactions > input:checkbox').change(function() {
 +						var container = $(this).parents('li').first();
 +						var permissions = parseInt(container.data('permissions'));
 +						var itemType = container.data('item-type');
 +						var shareType = container.data('share-type');
 +						var itemSource = container.data('item');
 +						var shareWith = container.data('share-with');
 +						var permission = null;
 +						if($(this).hasClass('update')) {
 +							permission = OC.PERMISSION_UPDATE;
 +							permission = OC.PERMISSION_DELETE;
 +						} else if($(this).hasClass('share')) {
 +							permission = OC.PERMISSION_SHARE;
 +						}
 +						// This is probably not the right way, but it works :-P
 +						if($(this).is(':checked')) {
 +							permissions += permission;
 +						} else {
 +							permissions -= permission;
 +						}
 +						
 +						container.data('permissions',permissions);
 +						
 +						OC.Share.setPermissions(itemType, itemSource, shareType, shareWith, permissions);
 +					});
 +	
 +					$('.shareactions > .delete').click(function() {
 +						var container = $(this).parents('li').first();
 +						var itemType = container.data('item-type');
 +						var shareType = container.data('share-type');
 +						var itemSource = container.data('item');
 +						var shareWith = container.data('share-with');
 +						OC.Share.unshare(itemType, itemSource, shareType, shareWith, function() {
 +							container.remove();
 +						});
 +					});
 +				}
 +			}
 +		},
 +		Drop:{
 +			init:function(){
 +				if (typeof window.FileReader === 'undefined') {
 +					console.log('The drop-import feature is not supported in your browser :(');
 +					return false;
 +				}
 +				droparea = document.getElementById('fullcalendar');
 +				droparea.ondrop = function(e){
 +					e.preventDefault();
 +					Calendar.UI.Drop.drop(e);
 +				}
 +				console.log('Drop initialized successfully');
 +			},
 +			drop:function(e){
 +				var files = e.dataTransfer.files;
 +				for(var i = 0;i < files.length;i++){
 +					var file = files[i];
 +					var reader = new FileReader();
 +					reader.onload = function(event){
 +						Calendar.UI.Drop.doImport(event.target.result);
 +						$('#fullcalendar').fullCalendar('refetchEvents');
 +					}
 +					reader.readAsDataURL(file);
 +				}
 +			},
 +			doImport:function(data){
 +				$.post(OC.filePath('calendar', 'ajax/import', 'dropimport.php'), {'data':data},function(result) {
 +					if(result.status == 'success'){
 +						$('#fullcalendar').fullCalendar('addEventSource', result.eventSource);
 +						$('#notification').html(result.message);
 +						$('#notification').slideDown();
 +						window.setTimeout(function(){$('#notification').slideUp();}, 5000);
 +						return true;
 +					}else{
 +						$('#notification').html(result.message);
 +						$('#notification').slideDown();
 +						window.setTimeout(function(){$('#notification').slideUp();}, 5000);
 +					}
 +				});
 +			}
 +		}
 +	},
 +	Settings:{
 +		//
 +	},
 +
 +}
 +$.fullCalendar.views.list = ListView;
 +function ListView(element, calendar) {
 +	var t = this;
 +
 +	// imports
 +	jQuery.fullCalendar.views.month.call(t, element, calendar);
 +	var opt = t.opt;
 +	var trigger = t.trigger;
 +	var eventElementHandlers = t.eventElementHandlers;
 +	var reportEventElement = t.reportEventElement;
 +	var formatDate = calendar.formatDate;
 +	var formatDates = calendar.formatDates;
 +	var addDays = $.fullCalendar.addDays;
 +	var cloneDate = $.fullCalendar.cloneDate;
 +	function skipWeekend(date, inc, excl) {
 +		inc = inc || 1;
 +		while (!date.getDay() || (excl && date.getDay()==1 || !excl && date.getDay()==6)) {
 +			addDays(date, inc);
 +		}
 +		return date;
 +	}
 +
 +	// overrides
 +	t.name='list';
 +	t.render=render;
 +	t.renderEvents=renderEvents;
 +	t.setHeight=setHeight;
 +	t.setWidth=setWidth;
 +	t.clearEvents=clearEvents;
 +
 +	function setHeight(height, dateChanged) {
 +	}
 +
 +	function setWidth(width) {
 +	}
 +
 +	function clearEvents() {
 +		this.reportEventClear();
 +	}
 +
 +	// main
 +	function sortEvent(a, b) {
 +		return a.start - b.start;
 +	}
 +
 +	function render(date, delta) {
 +		if (!t.start){
 +			t.start = addDays(cloneDate(date, true), -7);
 +			t.end = addDays(cloneDate(date, true), 7);
 +		}
 +		if (delta) {
 +			if (delta < 0){
 +				addDays(t.start, -7);
 +				addDays(t.end, -7);
 +				if (!opt('weekends')) {
 +					skipWeekend(t.start, delta < 0 ? -1 : 1);
 +				}
 +			}else{
 +				addDays(t.start, 7);
 +				addDays(t.end, 7);
 +				if (!opt('weekends')) {
 +					skipWeekend(t.end, delta < 0 ? -1 : 1);
 +				}
 +			}
 +		}
 +		t.title = formatDates(
 +			t.start,
 +			t.end,
 +			opt('titleFormat', 'week')
 +		);
 +		t.visStart = cloneDate(t.start);
 +		t.visEnd = cloneDate(t.end);
 +	}
 +
 +	function eventsOfThisDay(events, theDate) {
 +		var start = cloneDate(theDate, true);
 +		var end = addDays(cloneDate(start), 1);
 +		var retArr = new Array();
 +		for (i in events) {
 +			var event_end = t.eventEnd(events[i]);
 +			if (events[i].start < end && event_end >= start) {
 +				retArr.push(events[i]);
 +			}
 +		}
 +		return retArr;
 +	}
 +
 +	function renderEvent(event) {
 +		if (event.allDay) { //all day event
 +			var time = opt('allDayText');
 +		}
 +		else {
 +			var time = formatDates(event.start, event.end, opt('timeFormat', 'agenda'));
 +		}
 +		var classes = ['fc-event', 'fc-list-event'];
 +		classes = classes.concat(event.className);
 +		if (event.source) {
 +			classes = classes.concat(event.source.className || []);
 +		}
 +		var html = '<tr>' +
 +			'<td> </td>' +
 +			'<td class="fc-list-time">' +
 +			time +
 +			'</td>' +
 +			'<td> </td>' +
 +			'<td class="fc-list-event">' +
 +			'<span id="list' + event.id + '"' +
 +			' class="' + classes.join(' ') + '"' +
 +			'>' +
 +			'<span class="fc-event-title">' +
 +			escapeHTML(event.title) +
 +			'</span>' +
 +			'</span>' +
 +			'</td>' +
 +			'</tr>';
 +		return html;
 +	}
 +
 +	function renderDay(date, events) {
 +		var dayRows = $('<tr>' +
 +			'<td colspan="4" class="fc-list-date">' +
 +			'<span>' +
 +			formatDate(date, opt('titleFormat', 'day')) +
 +			'</span>' +
 +			'</td>' +
 +			'</tr>');
 +		for (i in events) {
 +			var event = events[i];
 +			var eventElement = $(renderEvent(event));
 +			triggerRes = trigger('eventRender', event, event, eventElement);
 +			if (triggerRes === false) {
 +				eventElement.remove();
 +			}else{
 +				if (triggerRes && triggerRes !== true) {
 +					eventElement.remove();
 +					eventElement = $(triggerRes);
 +				}
 +				$.merge(dayRows, eventElement);
 +				eventElementHandlers(event, eventElement);
 +				reportEventElement(event, eventElement);
 +			}
 +		}
 +		return dayRows;
 +	}
 +
 +	function renderEvents(events, modifiedEventId) {
 +		events = events.sort(sortEvent);
 +
 +		var table = $('<table class="fc-list-table"></table>');
 +		var total = events.length;
 +		if (total > 0) {
 +			var date = cloneDate(t.visStart);
 +			while (date <= t.visEnd) {
 +				var dayEvents = eventsOfThisDay(events, date);
 +				if (dayEvents.length > 0) {
 +					table.append(renderDay(date, dayEvents));
 +				}
 +				date=addDays(date, 1);
 +			}
 +		}
 +
 +		this.element.html(table);
 +	}
 +}
 +$(document).ready(function(){
 +	$('#fullcalendar').fullCalendar({
 +		header: false,
 +		firstDay: firstDay,
 +		editable: true,
 +		defaultView: defaultView,
 +		timeFormat: {
 +			agenda: agendatime,
 +			'': defaulttime
 +			},
 +		columnFormat: {
 +			month: t('calendar', 'ddd'),    // Mon
 +			week: t('calendar', 'ddd M/d'), // Mon 9/7
 +			day: t('calendar', 'dddd M/d')  // Monday 9/7
 +			},
 +		titleFormat: {
 +			month: t('calendar', 'MMMM yyyy'),
 +					// September 2009
 +			week: t('calendar', "MMM d[ yyyy]{ '–'[ MMM] d yyyy}"),
 +					// Sep 7 - 13 2009
 +			day: t('calendar', 'dddd, MMM d, yyyy'),
 +					// Tuesday, Sep 8, 2009
 +			},
 +		axisFormat: defaulttime,
 +		monthNames: monthNames,
 +		monthNamesShort: monthNamesShort,
 +		dayNames: dayNames,
 +		dayNamesShort: dayNamesShort,
 +		allDayText: allDayText,
 +		viewDisplay: function(view) {
 +			$('#datecontrol_date').val($('<p>').html(view.title).text());
 +			if (view.name != defaultView) {
 +				$.post(OC.filePath('calendar', 'ajax', 'changeview.php'), {v:view.name});
 +				defaultView = view.name;
 +			}
 +			if(view.name === 'agendaDay') {
 +				$('td.fc-state-highlight').css('background-color', '#ffffff');
 +			} else{
 +				$('td.fc-state-highlight').css('background-color', '#ffc');
 +			}
 +			Calendar.UI.setViewActive(view.name);
 +			if (view.name == 'agendaWeek') {
 +				$('#fullcalendar').fullCalendar('option', 'aspectRatio', 0.1);
 +			}
 +			else {
 +				$('#fullcalendar').fullCalendar('option', 'aspectRatio', 1.35);
 +			}
 +		},
 +		columnFormat: {
 +		    week: 'ddd d. MMM'
 +		},
 +		selectable: true,
 +		selectHelper: true,
 +		select: Calendar.UI.newEvent,
 +		eventClick: Calendar.UI.editEvent,
 +		eventDrop: Calendar.UI.moveEvent,
 +		eventResize: Calendar.UI.resizeEvent,
 +		eventRender: function(event, element) {
 +			element.find('.fc-event-title').text($("<div/>").html(escapeHTML(event.title)).text())
 +		},
 +		loading: Calendar.UI.loading,
 +		eventSources: eventSources
 +	});
 +	$('#datecontrol_date').datepicker({
 +		changeMonth: true,
 +		changeYear: true,
 +		showButtonPanel: true,
 +		beforeShow: function(input, inst) {
 +			var calendar_holder = $('#fullcalendar');
 +			var date = calendar_holder.fullCalendar('getDate');
 +			inst.input.datepicker('setDate', date);
 +			inst.input.val(calendar_holder.fullCalendar('getView').title);
 +			return inst;
 +		},
 +		onSelect: function(value, inst) {
 +			var date = inst.input.datepicker('getDate');
 +			$('#fullcalendar').fullCalendar('gotoDate', date);
 +		}
 +	});
 +	fillWindow($('#content'));
 +
 +	$(OC.Tags).on('change', function(event, data) {
 +		if(data.type === 'event') {
 +			Calendar.UI.categoriesChanged(data.tags);
 +		}
 +	});
 +
 +	$('#oneweekview_radio').click(function(){
 +		$('#fullcalendar').fullCalendar('changeView', 'agendaWeek');
 +	});
 +	$('#onemonthview_radio').click(function(){
 +		$('#fullcalendar').fullCalendar('changeView', 'month');
 +	});
 +	$('#onedayview_radio').click(function(){
 +		$('#fullcalendar').fullCalendar('changeView', 'agendaDay');
 +	});
 +	$('#today_input').click(function(){
 +		$('#fullcalendar').fullCalendar('today');
 +	});
 +	$('#datecontrol_left').click(function(){
 +		$('#fullcalendar').fullCalendar('prev');
 +	});
 +	$('#datecontrol_today').click(function(){
 +		$('#fullcalendar').fullCalendar('today');
 +	});
 +	$('#datecontrol_right').click(function(){
 +		$('#fullcalendar').fullCalendar('next');
 +	});
 +	Calendar.UI.Share.init();
 +	Calendar.UI.Drop.init();
 +	$('#choosecalendar .generalsettings').on('click keydown', function(event) {
 +		event.preventDefault();
 +		OC.appSettings({appid:'calendar', loadJS:true, cache:false, scriptName:'settingswrapper.php'});
 +	});
 +	$('#fullcalendar').fullCalendar('option', 'height', $(window).height() - $('#controls').height() - $('#header').height() - 15);
 +});
diff --cc apps/calendar/lib/object.php
index 5880915,0000000..7d08260
mode 100644,000000..100644
--- a/apps/calendar/lib/object.php
+++ b/apps/calendar/lib/object.php
@@@ -1,1123 -1,0 +1,1145 @@@
 +<?php
 +/**
 + * Copyright (c) 2011 Jakob Sack <mail at jakobsack.de>
 + * Copyright (c) 2012 Bart Visscher <bartv at thisnet.nl>
 + * Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + * See the COPYING-README file.
 + */
 + /**
 + *
 + * The following SQL statement is just a help for developers and will not be
 + * executed!
 + *
 + * CREATE TABLE clndr_objects (
 + *     id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
 + *     calendarid INTEGER UNSIGNED NOT NULL,
 + *     objecttype VARCHAR(40) NOT NULL,
 + *     startdate DATETIME,
 + *     enddate DATETIME,
 + *     repeating INT(1),
 + *     summary VARCHAR(255),
 + *     calendardata TEXT,
 + *     uri VARCHAR(100),
 + *     lastmodified INT(11)
 + * );
 + *
 + */
 +
 +/**
 + * This class manages our calendar objects
 + */
 +class OC_Calendar_Object{
 +	/**
 +	 * @brief Returns all objects of a calendar
 +	 * @param integer $id
 +	 * @return array
 +	 *
 +	 * The objects are associative arrays. You'll find the original vObject in
 +	 * ['calendardata']
 +	 */
 +	public static function all($id) {
 +		$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*clndr_objects` WHERE `calendarid` = ?' );
 +		$result = $stmt->execute(array($id));
 +
 +		$calendarobjects = array();
 +		while( $row = $result->fetchRow()) {
 +			$calendarobjects[] = $row;
 +		}
 +
 +		return $calendarobjects;
 +	}
 +
 +	/**
 +	 * @brief Returns all objects of a calendar between $start and $end
 +	 * @param integer $id
 +	 * @param DateTime $start
 +	 * @param DateTime $end
 +	 * @return array
 +	 *
 +	 * The objects are associative arrays. You'll find the original vObject
 +	 * in ['calendardata']
 +	 */
 +	public static function allInPeriod($id, $start, $end) {
 +		$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*clndr_objects` WHERE `calendarid` = ? AND `objecttype`= ?' 
 +		.' AND ((`startdate` >= ? AND `enddate` <= ? AND `repeating` = 0)'
 +		.' OR (`enddate` >= ? AND `startdate` <= ? AND `repeating` = 0)'
 +		.' OR (`startdate` <= ? AND `repeating` = 1) )' );
 +		$start = self::getUTCforMDB($start);
 +		$end = self::getUTCforMDB($end);
 +		$result = $stmt->execute(array($id,'VEVENT',
 +					$start, $end,					
 +					$start, $end,
 +					$end));
 +
 +		$calendarobjects = array();
 +		while( $row = $result->fetchRow()) {
 +			$calendarobjects[] = $row;
 +		}
 +
 +		return $calendarobjects;
 +	}
 +
 +	/**
 +	 * @brief Returns an object
 +	 * @param integer $id
 +	 * @return associative array
 +	 */
 +	public static function find($id) {
 +		$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*clndr_objects` WHERE `id` = ?' );
 +		$result = $stmt->execute(array($id));
 +
 +		return $result->fetchRow();
 +	}
 +
 +	/**
 +	 * @brief finds an object by its DAV Data
 +	 * @param integer $cid Calendar id
 +	 * @param string $uri the uri ('filename')
 +	 * @return associative array
 +	 */
 +	public static function findWhereDAVDataIs($cid,$uri) {
 +		$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*clndr_objects` WHERE `calendarid` = ? AND `uri` = ?' );
 +		$result = $stmt->execute(array($cid,$uri));
 +
 +		return $result->fetchRow();
 +	}
 +
 +	/**
 +	 * @brief Adds an object
 +	 * @param integer $id Calendar id
 +	 * @param string $data  object
 +	 * @return insertid
 +	 */
 +	public static function add($id,$data) {
 +		$calendar = OC_Calendar_Calendar::find($id);
 +		if ($calendar['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $id);
 +			if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_CREATE)) {
 +				throw new Exception(
 +					OC_Calendar_App::$l10n->t(
 +						'You do not have the permissions to add events to this calendar.'
 +					)
 +				);
 +			}
 +		}
 +		$object = OC_VObject::parse($data);
 +		list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
 +
 +		if(is_null($uid)) {
 +			$object->setUID();
 +			$data = $object->serialize();
 +		}
 +
 +		$uri = 'owncloud-'.md5($data.rand().time()).'.ics';
 +
 +		$stmt = OCP\DB::prepare( 'INSERT INTO `*PREFIX*clndr_objects` (`calendarid`,`objecttype`,`startdate`,`enddate`,`repeating`,`summary`,`calendardata`,`uri`,`lastmodified`) VALUES(?,?,?,?,?,?,?,?,?)' );
 +		$stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
 +		$object_id = OCP\DB::insertid('*PREFIX*clndr_objects');
 +
 +		OC_Calendar_App::loadCategoriesFromVCalendar($object_id, $object);
 +
 +		OC_Calendar_Calendar::touchCalendar($id);
 +		OCP\Util::emitHook('OC_Calendar', 'addEvent', $object_id);
 +		return $object_id;
 +	}
 +
 +	/**
 +	 * @brief Adds an object with the data provided by sabredav
 +	 * @param integer $id Calendar id
 +	 * @param string $uri   the uri the card will have
 +	 * @param string $data  object
 +	 * @return insertid
 +	 */
 +	public static function addFromDAVData($id,$uri,$data) {
++		$shared = false;
 +		$calendar = OC_Calendar_Calendar::find($id);
 +		if ($calendar['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $id);
 +			if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_CREATE)) {
 +				throw new Sabre_DAV_Exception_Forbidden(
 +					OC_Calendar_App::$l10n->t(
 +						'You do not have the permissions to add events to this calendar.'
 +					)
 +				);
 +			}
++			$shared = true;
 +		}
 +		$object = OC_VObject::parse($data);
++		$vevent = self::getElement($object);
++
++		if($shared && isset($vevent->CLASS) && (string)$vevent->CLASS !== 'PUBLIC') {
++			throw new Sabre_DAV_Exception_PreconditionFailed(
++					OC_Calendar_App::$l10n->t(
++						'You do cannot add non-public events to a shared calendar.'
++					)
++			);
++		}
++
 +		list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
 +
 +		$stmt = OCP\DB::prepare( 'INSERT INTO `*PREFIX*clndr_objects` (`calendarid`,`objecttype`,`startdate`,`enddate`,`repeating`,`summary`,`calendardata`,`uri`,`lastmodified`) VALUES(?,?,?,?,?,?,?,?,?)' );
 +		$stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
 +		$object_id = OCP\DB::insertid('*PREFIX*clndr_objects');
 +
 +		OC_Calendar_Calendar::touchCalendar($id);
 +		OCP\Util::emitHook('OC_Calendar', 'addEvent', $object_id);
 +		return $object_id;
 +	}
 +
 +	/**
 +	 * @brief edits an object
 +	 * @param integer $id id of object
 +	 * @param string $data  object
 +	 * @return boolean
 +	 */
 +	public static function edit($id, $data) {
 +		$oldobject = self::find($id);
 +		$calid = self::getCalendarid($id);
 +		
 +		$calendar = OC_Calendar_Calendar::find($calid);
 +		$oldvobject = OC_VObject::parse($oldobject['calendardata']);
 +		if ($calendar['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $calid); //calid, not objectid !!!! 1111 one one one eleven
 +			$sharedAccessClassPermissions = OC_Calendar_Object::getAccessClassPermissions($oldvobject);
 +			if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_UPDATE) || !($sharedAccessClassPermissions & OCP\PERMISSION_UPDATE)) {
 +				throw new Exception(
 +					OC_Calendar_App::$l10n->t(
 +						'You do not have the permissions to edit this event.'
 +					)
 +				);
 +			}
 +		}
 +		$object = OC_VObject::parse($data);
 +		OC_Calendar_App::loadCategoriesFromVCalendar($id, $object);
 +		list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
 +
 +		$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*clndr_objects` SET `objecttype`=?,`startdate`=?,`enddate`=?,`repeating`=?,`summary`=?,`calendardata`=?,`lastmodified`= ? WHERE `id` = ?' );
 +		$stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$id));
 +
 +		OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
 +		OCP\Util::emitHook('OC_Calendar', 'editEvent', $id);
 +
 +		return true;
 +	}
 +
 +	/**
 +	 * @brief edits an object with the data provided by sabredav
 +	 * @param integer $id calendar id
 +	 * @param string $uri   the uri of the object
 +	 * @param string $data  object
 +	 * @return boolean
 +	 */
 +	public static function editFromDAVData($cid,$uri,$data) {
 +		$oldobject = self::findWhereDAVDataIs($cid,$uri);
 +
 +		$calendar = OC_Calendar_Calendar::find($cid);
 +		$oldvobject = OC_VObject::parse($oldobject['calendardata']);
 +		if ($calendar['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $cid);
 +			$sharedAccessClassPermissions = OC_Calendar_Object::getAccessClassPermissions($oldvobject);
 +			if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_UPDATE) || !($sharedAccessClassPermissions & OCP\PERMISSION_UPDATE)) {
 +				throw new Sabre_DAV_Exception_Forbidden(
 +					OC_Calendar_App::$l10n->t(
 +						'You do not have the permissions to edit this event.'
 +					)
 +				);
 +			}
 +		}
 +		$object = OC_VObject::parse($data);
 +		list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
 +
 +		$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*clndr_objects` SET `objecttype`=?,`startdate`=?,`enddate`=?,`repeating`=?,`summary`=?,`calendardata`=?,`lastmodified`= ? WHERE `id` = ?' );
 +		$stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$oldobject['id']));
 +
 +		OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
 +		OCP\Util::emitHook('OC_Calendar', 'editEvent', $oldobject['id']);
 +
 +		return true;
 +	}
 +
 +	/**
 +	 * @brief deletes an object
 +	 * @param integer $id id of object
 +	 * @return boolean
 +	 */
 +	public static function delete($id) {
 +		$oldobject = self::find($id);
 +		$calid = self::getCalendarid($id);
 +		
 +		$calendar = OC_Calendar_Calendar::find($calid);
 +		$oldvobject = OC_VObject::parse($oldobject['calendardata']);
 +		if ($calendar['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar',  $calid);
 +			$sharedAccessClassPermissions = OC_Calendar_Object::getAccessClassPermissions($oldvobject);
 +			if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_DELETE) || !($sharedAccessClassPermissions & OCP\PERMISSION_DELETE)) {
 +				throw new Exception(
 +					OC_Calendar_App::$l10n->t(
 +						'You do not have the permissions to delete this event.'
 +					)
 +				);
 +			}
 +		}
 +		$stmt = OCP\DB::prepare( 'DELETE FROM `*PREFIX*clndr_objects` WHERE `id` = ?' );
 +		$stmt->execute(array($id));
 +		OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
 +
 +		OCP\Share::unshareAll('event', $id);
 +
 +		OCP\Util::emitHook('OC_Calendar', 'deleteEvent', $id);
 +
 +		return true;
 +	}
 +
 +	/**
 +	 * @brief deletes an  object with the data provided by sabredav
 +	 * @param integer $cid calendar id
 +	 * @param string $uri the uri of the object
 +	 * @return boolean
 +	 */
 +	public static function deleteFromDAVData($cid,$uri) {
 +		$oldobject = self::findWhereDAVDataIs($cid, $uri);
 +		$calendar = OC_Calendar_Calendar::find($cid);
 +		if ($calendar['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $cid);
 +			if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_DELETE)) {
 +				throw new Sabre_DAV_Exception_Forbidden(
 +					OC_Calendar_App::$l10n->t(
 +						'You do not have the permissions to delete this event.'
 +					)
 +				);
 +			}
 +		}
 +		$stmt = OCP\DB::prepare( 'DELETE FROM `*PREFIX*clndr_objects` WHERE `calendarid`= ? AND `uri`=?' );
 +		$stmt->execute(array($cid,$uri));
 +		OC_Calendar_Calendar::touchCalendar($cid);
 +		OCP\Util::emitHook('OC_Calendar', 'deleteEvent', $oldobject['id']);
 +
 +		return true;
 +	}
 +
 +	public static function moveToCalendar($id, $calendarid) {
 +		$calendar = OC_Calendar_Calendar::find($calendarid);
 +		if ($calendar['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $calendarid);
 +			if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_DELETE)) {
 +				throw new Exception(
 +					OC_Calendar_App::$l10n->t(
 +						'You do not have the permissions to add events to this calendar.'
 +					)
 +				);
 +			}
 +		}
 +		$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*clndr_objects` SET `calendarid`=? WHERE `id`=?' );
 +		$stmt->execute(array($calendarid,$id));
 +
 +		OC_Calendar_Calendar::touchCalendar($calendarid);
 +		OCP\Util::emitHook('OC_Calendar', 'moveEvent', $id);
 +
 +		return true;
 +	}
 +
 +	/**
 +     * @brief Creates a UID
 +     * @return string
 +     */
 +    protected static function createUID() {
 +        return substr(md5(rand().time()),0,10);
 +    }
 +
 +	/**
 +	 * @brief Extracts data from a vObject-Object
 +	 * @param Sabre_VObject $object
 +	 * @return array
 +	 *
 +	 * [type, start, end, summary, repeating, uid]
 +	 */
 +	protected static function extractData($object) {
 +		$return = array('',null,null,'',0,null);
 +
 +		// Child to use
 +		$children = 0;
 +		$use = null;
 +		foreach($object->children as $property) {
 +			if($property->name == 'VEVENT') {
 +				$children++;
 +				$thisone = true;
 +
 +				foreach($property->children as &$element) {
 +					if($element->name == 'RECURRENCE-ID') {
 +						$thisone = false;
 +					}
 +				} unset($element);
 +
 +				if($thisone) {
 +					$use = $property;
 +				}
 +			}
 +			elseif($property->name == 'VTODO' || $property->name == 'VJOURNAL') {
 +				$return[0] = $property->name;
 +				foreach($property->children as &$element) {
 +					if($element->name == 'SUMMARY') {
 +						$return[3] = $element->value;
 +					}
 +					elseif($element->name == 'UID') {
 +						$return[5] = $element->value;
 +					}
 +				};
 +
 +				// Only one VTODO or VJOURNAL per object
 +				// (only one UID per object but a UID is required by a VTODO =>
 +				//    one VTODO per object)
 +				break;
 +			}
 +		}
 +
 +		// find the data
 +		if(!is_null($use)) {
 +			$return[0] = $use->name;
 +			foreach($use->children as $property) {
 +				if($property->name == 'DTSTART') {
 +					$return[1] = self::getUTCforMDB($property->getDateTime());
 +				}
 +				elseif($property->name == 'DTEND') {
 +					$return[2] = self::getUTCforMDB($property->getDateTime());
 +				}
 +				elseif($property->name == 'SUMMARY') {
 +					$return[3] = $property->value;
 +				}
 +				elseif($property->name == 'RRULE') {
 +					$return[4] = 1;
 +				}
 +				elseif($property->name == 'UID') {
 +					$return[5] = $property->value;
 +				}
 +			}
 +		}
 +
 +		// More than one child means reoccuring!
 +		if($children > 1) {
 +			$return[4] = 1;
 +		}
 +		return $return;
 +	}
 +
 +	/**
 +	 * @brief DateTime to UTC string
 +	 * @param DateTime $datetime The date to convert
 +	 * @returns date as YYYY-MM-DD hh:mm
 +	 *
 +	 * This function creates a date string that can be used by MDB2.
 +	 * Furthermore it converts the time to UTC.
 +	 */
 +	public static function getUTCforMDB($datetime) {
 +		return date('Y-m-d H:i', $datetime->format('U'));
 +	}
 +
 +	/**
 +	 * @brief returns the DTEND of an $vevent object
 +	 * @param object $vevent vevent object
 +	 * @return object
 +	 */
 +	public static function getDTEndFromVEvent($vevent) {
 +		if ($vevent->DTEND) {
 +			$dtend = $vevent->DTEND;
 +		}else{
 +			$dtend = clone $vevent->DTSTART;
 +			// clone creates a shallow copy, also clone DateTime
 +			$dtend->setDateTime(clone $dtend->getDateTime(), $dtend->getDateType());
 +			if ($vevent->DURATION) {
 +				$duration = strval($vevent->DURATION);
 +				$invert = 0;
 +				if ($duration[0] == '-') {
 +					$duration = substr($duration, 1);
 +					$invert = 1;
 +				}
 +				if ($duration[0] == '+') {
 +					$duration = substr($duration, 1);
 +				}
 +				$interval = new DateInterval($duration);
 +				$interval->invert = $invert;
 +				$dtend->getDateTime()->add($interval);
 +			}
 +		}
 +		return $dtend;
 +	}
 +
 +	/**
 +	 * @brief Remove all properties which should not be exported for the AccessClass Confidential
 +	 * @param string $id Event ID
 +	 * @param Sabre_VObject $vobject Sabre VObject
 +	 * @return object
 +	 */
 +	public static function cleanByAccessClass($id, $vobject) {
 +
 +		// Do not clean your own calendar
 +		if(OC_Calendar_Object::getowner($id) === OCP\USER::getUser()) {
 +			return $vobject;
 +		}
 +
 +		if(isset($vobject->VEVENT)) {
 +			$velement = $vobject->VEVENT;
 +		}
 +		elseif(isset($vobject->VJOURNAL)) {
 +			$velement = $vobject->VJOURNAL;
 +		}
 +		elseif(isset($vobject->VTODO)) {
 +			$velement = $vobject->VTODO;
 +		}
 +
 +		if(isset($velement->CLASS) && $velement->CLASS->value == 'CONFIDENTIAL') {
 +			foreach ($velement->children as &$property) {
 +				switch($property->name) {
 +					case 'CREATED':
 +					case 'DTSTART':
 +					case 'RRULE':
 +					case 'DURATION':
 +					case 'DTEND':
 +					case 'CLASS':
 +					case 'UID':
 +						break;
 +					case 'SUMMARY':
 +						$property->value = OC_Calendar_App::$l10n->t('Busy');
 +						break;
 +					default:
 +						$velement->__unset($property->name);
 +						unset($property);
 +						break;
 +				}
 +			}
 +		}
 +		return $vobject;
 +	}
 +
 +	/**
- 	 * @brief Get the permissions determined by the access class of an event/todo/journal
- 	 * @param Sabre_VObject $vobject Sabre VObject
- 	 * @return (int) $permissions - CRUDS permissions
- 	 * @see OCP\Share
++	 * Get the contained element VEVENT, VJOURNAL, VTODO
++	 *
++	 * @param Sabre_VObject $vobject
++	 * @return Sabre_VObject|null
 +	 */
- 	public static function getAccessClassPermissions($vobject) {
++	public static function getElement($vobject) {
 +		if(isset($vobject->VEVENT)) {
- 			$velement = $vobject->VEVENT;
++			return $vobject->VEVENT;
 +		}
 +		elseif(isset($vobject->VJOURNAL)) {
- 			$velement = $vobject->VJOURNAL;
++			return $vobject->VJOURNAL;
 +		}
 +		elseif(isset($vobject->VTODO)) {
- 			$velement = $vobject->VTODO;
++			return $vobject->VTODO;
 +		}
++	}
++
++	/**
++	 * @brief Get the permissions determined by the access class of an event/todo/journal
++	 * @param Sabre_VObject $vobject Sabre VObject
++	 * @return (int) $permissions - CRUDS permissions
++	 * @see OCP\Share
++	 */
++	public static function getAccessClassPermissions($vobject) {
++		$velement = self::getElement($vobject);
 +
 +		$accessclass = $velement->getAsString('CLASS');
 +
 +		return OC_Calendar_App::getAccessClassPermissions($accessclass);
 +	}
 +
 +	/**
 +	 * @brief returns the options for the access class of an event
 +	 * @return array - valid inputs for the access class of an event
 +	 */
 +	public static function getAccessClassOptions($l10n) {
 +		return array(
 +			'PUBLIC'       => (string)$l10n->t('Show full event'),
 +			'PRIVATE'      => (string)$l10n->t('Show only busy'),
 +			'CONFIDENTIAL' => (string)$l10n->t('Hide event')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for the repeat rule of an repeating event
 +	 * @return array - valid inputs for the repeat rule of an repeating event
 +	 */
 +	public static function getRepeatOptions($l10n) {
 +		return array(
 +			'doesnotrepeat' => (string)$l10n->t('Does not repeat'),
 +			'daily'         => (string)$l10n->t('Daily'),
 +			'weekly'        => (string)$l10n->t('Weekly'),
 +			'weekday'       => (string)$l10n->t('Every Weekday'),
 +			'biweekly'      => (string)$l10n->t('Bi-Weekly'),
 +			'monthly'       => (string)$l10n->t('Monthly'),
 +			'yearly'        => (string)$l10n->t('Yearly')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for the end of an repeating event
 +	 * @return array - valid inputs for the end of an repeating events
 +	 */
 +	public static function getEndOptions($l10n) {
 +		return array(
 +			'never' => (string)$l10n->t('never'),
 +			'count' => (string)$l10n->t('by occurrences'),
 +			'date'  => (string)$l10n->t('by date')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for an monthly repeating event
 +	 * @return array - valid inputs for monthly repeating events
 +	 */
 +	public static function getMonthOptions($l10n) {
 +		return array(
 +			'monthday' => (string)$l10n->t('by monthday'),
 +			'weekday'  => (string)$l10n->t('by weekday')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for an weekly repeating event
 +	 * @return array - valid inputs for weekly repeating events
 +	 */
 +	public static function getWeeklyOptions($l10n) {
 +		return array(
 +			'MO' => (string)$l10n->t('Monday'),
 +			'TU' => (string)$l10n->t('Tuesday'),
 +			'WE' => (string)$l10n->t('Wednesday'),
 +			'TH' => (string)$l10n->t('Thursday'),
 +			'FR' => (string)$l10n->t('Friday'),
 +			'SA' => (string)$l10n->t('Saturday'),
 +			'SU' => (string)$l10n->t('Sunday')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for an monthly repeating event which occurs on specific weeks of the month
 +	 * @return array - valid inputs for monthly repeating events
 +	 */
 +	public static function getWeekofMonth($l10n) {
 +		return array(
 +			'auto' => (string)$l10n->t('events week of month'),
 +			'1' => (string)$l10n->t('first'),
 +			'2' => (string)$l10n->t('second'),
 +			'3' => (string)$l10n->t('third'),
 +			'4' => (string)$l10n->t('fourth'),
 +			'5' => (string)$l10n->t('fifth'),
 +			'-1' => (string)$l10n->t('last')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for an yearly repeating event which occurs on specific days of the year
 +	 * @return array - valid inputs for yearly repeating events
 +	 */
 +	public static function getByYearDayOptions() {
 +		$return = array();
 +		foreach(range(1,366) as $num) {
 +			$return[(string) $num] = (string) $num;
 +		}
 +		return $return;
 +	}
 +
 +	/**
 +	 * @brief returns the options for an yearly or monthly repeating event which occurs on specific days of the month
 +	 * @return array - valid inputs for yearly or monthly repeating events
 +	 */
 +	public static function getByMonthDayOptions() {
 +		$return = array();
 +		foreach(range(1,31) as $num) {
 +			$return[(string) $num] = (string) $num;
 +		}
 +		return $return;
 +	}
 +
 +	/**
 +	 * @brief returns the options for an yearly repeating event which occurs on specific month of the year
 +	 * @return array - valid inputs for yearly repeating events
 +	 */
 +	public static function getByMonthOptions($l10n) {
 +		return array(
 +			'1'  => (string)$l10n->t('January'),
 +			'2'  => (string)$l10n->t('February'),
 +			'3'  => (string)$l10n->t('March'),
 +			'4'  => (string)$l10n->t('April'),
 +			'5'  => (string)$l10n->t('May'),
 +			'6'  => (string)$l10n->t('June'),
 +			'7'  => (string)$l10n->t('July'),
 +			'8'  => (string)$l10n->t('August'),
 +			'9'  => (string)$l10n->t('September'),
 +			'10' => (string)$l10n->t('October'),
 +			'11' => (string)$l10n->t('November'),
 +			'12' => (string)$l10n->t('December')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for an yearly repeating event
 +	 * @return array - valid inputs for yearly repeating events
 +	 */
 +	public static function getYearOptions($l10n) {
 +		return array(
 +			'bydate' => (string)$l10n->t('by events date'),
 +			'byyearday' => (string)$l10n->t('by yearday(s)'),
 +			'byweekno'  => (string)$l10n->t('by weeknumber(s)'),
 +			'bydaymonth'  => (string)$l10n->t('by day and month')
 +		);
 +	}
 +
 +	/**
 +	 * @brief returns the options for an yearly repeating event which occurs on specific week numbers of the year
 +	 * @return array - valid inputs for yearly repeating events
 +	 */
 +	public static function getByWeekNoOptions() {
 +		return range(1, 52);
 +	}
 +
 +	/**
 +	 * @brief validates a request
 +	 * @param array $request
 +	 * @return mixed (array / boolean)
 +	 */
 +	public static function validateRequest($request) {
 +		$errnum = 0;
 +		$errarr = array('title'=>'false', 'cal'=>'false', 'from'=>'false', 'fromtime'=>'false', 'to'=>'false', 'totime'=>'false', 'endbeforestart'=>'false');
 +		if($request['title'] == '') {
 +			$errarr['title'] = 'true';
 +			$errnum++;
 +		}
 +
 +		$fromday = substr($request['from'], 0, 2);
 +		$frommonth = substr($request['from'], 3, 2);
 +		$fromyear = substr($request['from'], 6, 4);
 +		if(!checkdate($frommonth, $fromday, $fromyear)) {
 +			$errarr['from'] = 'true';
 +			$errnum++;
 +		}
 +		$allday = isset($request['allday']);
 +		if(!$allday && self::checkTime(urldecode($request['fromtime']))) {
 +			$errarr['fromtime'] = 'true';
 +			$errnum++;
 +		}
 +
 +		$today = substr($request['to'], 0, 2);
 +		$tomonth = substr($request['to'], 3, 2);
 +		$toyear = substr($request['to'], 6, 4);
 +		if(!checkdate($tomonth, $today, $toyear)) {
 +			$errarr['to'] = 'true';
 +			$errnum++;
 +		}
 +		if($request['repeat'] != 'doesnotrepeat') {
 +			if(is_nan($request['interval']) && $request['interval'] != '') {
 +				$errarr['interval'] = 'true';
 +				$errnum++;
 +			}
 +			if(array_key_exists('repeat', $request) && !array_key_exists($request['repeat'], self::getRepeatOptions(OC_Calendar_App::$l10n))) {
 +				$errarr['repeat'] = 'true';
 +				$errnum++;
 +			}
 +			if(array_key_exists('advanced_month_select', $request) && !array_key_exists($request['advanced_month_select'], self::getMonthOptions(OC_Calendar_App::$l10n))) {
 +				$errarr['advanced_month_select'] = 'true';
 +				$errnum++;
 +			}
 +			if(array_key_exists('advanced_year_select', $request) && !array_key_exists($request['advanced_year_select'], self::getYearOptions(OC_Calendar_App::$l10n))) {
 +				$errarr['advanced_year_select'] = 'true';
 +				$errnum++;
 +			}
 +			if(array_key_exists('weekofmonthoptions', $request) && !array_key_exists($request['weekofmonthoptions'], self::getWeekofMonth(OC_Calendar_App::$l10n))) {
 +				$errarr['weekofmonthoptions'] = 'true';
 +				$errnum++;
 +			}
 +			if($request['end'] != 'never') {
 +				if(!array_key_exists($request['end'], self::getEndOptions(OC_Calendar_App::$l10n))) {
 +					$errarr['end'] = 'true';
 +					$errnum++;
 +				}
 +				if($request['end'] == 'count' && is_nan($request['byoccurrences'])) {
 +					$errarr['byoccurrences'] = 'true';
 +					$errnum++;
 +				}
 +				if($request['end'] == 'date') {
 +					list($bydate_day, $bydate_month, $bydate_year) = explode('-', $request['bydate']);
 +					if(!checkdate($bydate_month, $bydate_day, $bydate_year)) {
 +						$errarr['bydate'] = 'true';
 +						$errnum++;
 +					}
 +				}
 +			}
 +			if(array_key_exists('weeklyoptions', $request)) {
 +				foreach($request['weeklyoptions'] as $option) {
 +					if(!in_array($option, self::getWeeklyOptions(OC_Calendar_App::$l10n))) {
 +						$errarr['weeklyoptions'] = 'true';
 +						$errnum++;
 +					}
 +				}
 +			}
 +			if(array_key_exists('byyearday', $request)) {
 +				foreach($request['byyearday'] as $option) {
 +					if(!array_key_exists($option, self::getByYearDayOptions())) {
 +						$errarr['byyearday'] = 'true';
 +						$errnum++;
 +					}
 +				}
 +			}
 +			if(array_key_exists('weekofmonthoptions', $request)) {
 +				if(is_nan((double)$request['weekofmonthoptions'])) {
 +					$errarr['weekofmonthoptions'] = 'true';
 +					$errnum++;
 +				}
 +			}
 +			if(array_key_exists('bymonth', $request)) {
 +				foreach($request['bymonth'] as $option) {
 +					if(!in_array($option, self::getByMonthOptions(OC_Calendar_App::$l10n))) {
 +						$errarr['bymonth'] = 'true';
 +						$errnum++;
 +					}
 +				}
 +			}
 +			if(array_key_exists('byweekno', $request)) {
 +				foreach($request['byweekno'] as $option) {
 +					if(!array_key_exists($option, self::getByWeekNoOptions())) {
 +						$errarr['byweekno'] = 'true';
 +						$errnum++;
 +					}
 +				}
 +			}
 +			if(array_key_exists('bymonthday', $request)) {
 +				foreach($request['bymonthday'] as $option) {
 +					if(!array_key_exists($option, self::getByMonthDayOptions())) {
 +						$errarr['bymonthday'] = 'true';
 +						$errnum++;
 +					}
 +				}
 +			}
 +		}
 +		if(!$allday && self::checkTime(urldecode($request['totime']))) {
 +			$errarr['totime'] = 'true';
 +			$errnum++;
 +		}
 +		if($today < $fromday && $frommonth == $tomonth && $fromyear == $toyear) {
 +			$errarr['endbeforestart'] = 'true';
 +			$errnum++;
 +		}
 +		if($today == $fromday && $frommonth > $tomonth && $fromyear == $toyear) {
 +			$errarr['endbeforestart'] = 'true';
 +			$errnum++;
 +		}
 +		if($today == $fromday && $frommonth == $tomonth && $fromyear > $toyear) {
 +			$errarr['endbeforestart'] = 'true';
 +			$errnum++;
 +		}
 +		if(!$allday && $fromday == $today && $frommonth == $tomonth && $fromyear == $toyear) {
 +			list($tohours, $tominutes) = explode(':', $request['totime']);
 +			list($fromhours, $fromminutes) = explode(':', $request['fromtime']);
 +			if($tohours < $fromhours) {
 +				$errarr['endbeforestart'] = 'true';
 +				$errnum++;
 +			}
 +			if($tohours == $fromhours && $tominutes < $fromminutes) {
 +				$errarr['endbeforestart'] = 'true';
 +				$errnum++;
 +			}
 +		}
 +		if ($errnum)
 +		{
 +			return $errarr;
 +		}
 +		return false;
 +	}
 +
 +	/**
 +	 * @brief validates time
 +	 * @param string $time
 +	 * @return boolean
 +	 */
 +	protected static function checkTime($time) {
 +		if(strpos($time, ':') === false ) {
 +			return true;
 +		}
 +		list($hours, $minutes) = explode(':', $time);
 +		return empty($time)
 +			|| $hours < 0 || $hours > 24
 +			|| $minutes < 0 || $minutes > 60;
 +	}
 +
 +	/**
 +	 * @brief creates an VCalendar Object from the request data
 +	 * @param array $request
 +	 * @return object created $vcalendar
 +	 */	public static function createVCalendarFromRequest($request) {
 +		$vcalendar = new OC_VObject('VCALENDAR');
 +		$vcalendar->add('PRODID', 'ownCloud Calendar');
 +		$vcalendar->add('VERSION', '2.0');
 +
 +		$vevent = new OC_VObject('VEVENT');
 +		$vcalendar->add($vevent);
 +
 +		$vevent->setDateTime('CREATED', 'now', Sabre\VObject\Property\DateTime::UTC);
 +
 +		$vevent->setUID();
 +		return self::updateVCalendarFromRequest($request, $vcalendar);
 +	}
 +
 +	/**
 +	 * @brief updates an VCalendar Object from the request data
 +	 * @param array $request
 +	 * @param object $vcalendar
 +	 * @return object updated $vcalendar
 +	 */
 +	public static function updateVCalendarFromRequest($request, $vcalendar) {
 +		$accessclass = $request["accessclass"];
 +		$title = $request["title"];
 +		$location = $request["location"];
 +		$categories = $request["categories"];
 +		$allday = isset($request["allday"]);
 +		$from = $request["from"];
 +		$to  = $request["to"];
 +		if (!$allday) {
 +			$fromtime = $request['fromtime'];
 +			$totime = $request['totime'];
 +		}
 +		$vevent = $vcalendar->VEVENT;
 +		$description = $request["description"];
 +		$repeat = $request["repeat"];
 +		if($repeat != 'doesnotrepeat') {
 +			$rrule = '';
 +			$interval = $request['interval'];
 +			$end = $request['end'];
 +			$byoccurrences = $request['byoccurrences'];
 +			switch($repeat) {
 +				case 'daily':
 +					$rrule .= 'FREQ=DAILY';
 +					break;
 +				case 'weekly':
 +					$rrule .= 'FREQ=WEEKLY';
 +					if(array_key_exists('weeklyoptions', $request)) {
 +						$byday = '';
 +						$daystrings = array_flip(self::getWeeklyOptions(OC_Calendar_App::$l10n));
 +						foreach($request['weeklyoptions'] as $days) {
 +							if($byday == '') {
 +								$byday .= $daystrings[$days];
 +							}else{
 +								$byday .= ',' .$daystrings[$days];
 +							}
 +						}
 +						$rrule .= ';BYDAY=' . $byday;
 +					}
 +					break;
 +				case 'weekday':
 +					$rrule .= 'FREQ=WEEKLY';
 +					$rrule .= ';BYDAY=MO,TU,WE,TH,FR';
 +					break;
 +				case 'biweekly':
 +					$rrule .= 'FREQ=WEEKLY';
 +					$interval = $interval * 2;
 +					break;
 +				case 'monthly':
 +					$rrule .= 'FREQ=MONTHLY';
 +					if($request['advanced_month_select'] == 'monthday') {
 +						break;
 +					}elseif($request['advanced_month_select'] == 'weekday') {
 +						if($request['weekofmonthoptions'] == 'auto') {
 +							list($_day, $_month, $_year) = explode('-', $from);
 +							$weekofmonth = floor($_day/7);
 +						}else{
 +							$weekofmonth = $request['weekofmonthoptions'];
 +						}
 +						$days = array_flip(self::getWeeklyOptions(OC_Calendar_App::$l10n));
 +						$byday = '';
 +						foreach($request['weeklyoptions'] as $day) {
 +							if($byday == '') {
 +								$byday .= $weekofmonth . $days[$day];
 +							}else{
 +								$byday .= ',' . $weekofmonth . $days[$day];
 +							}
 +						}
 +						if($byday == '') {
 +							$byday = 'MO,TU,WE,TH,FR,SA,SU';
 +						}
 +						$rrule .= ';BYDAY=' . $byday;
 +					}
 +					break;
 +				case 'yearly':
 +					$rrule .= 'FREQ=YEARLY';
 +					if($request['advanced_year_select'] == 'bydate') {
 +
 +					}elseif($request['advanced_year_select'] == 'byyearday') {
 +						list($_day, $_month, $_year) = explode('-', $from);
 +						$byyearday = date('z', mktime(0,0,0, $_month, $_day, $_year)) + 1;
 +						if(array_key_exists('byyearday', $request)) {
 +							foreach($request['byyearday'] as $yearday) {
 +								$byyearday .= ',' . $yearday;
 +							}
 +						}
 +						$rrule .= ';BYYEARDAY=' . $byyearday;
 +					}elseif($request['advanced_year_select'] == 'byweekno') {
 +						list($_day, $_month, $_year) = explode('-', $from);
 +						$rrule .= ';BYDAY=' . strtoupper(substr(date('l', mktime(0,0,0, $_month, $_day, $_year)), 0, 2));
 +						$byweekno = '';
 +						foreach($request['byweekno'] as $weekno) {
 +							if($byweekno == '') {
 +								$byweekno = $weekno;
 +							}else{
 +								$byweekno .= ',' . $weekno;
 +							}
 +						}
 +						$rrule .= ';BYWEEKNO=' . $byweekno;
 +					}elseif($request['advanced_year_select'] == 'bydaymonth') {
 +						if(array_key_exists('weeklyoptions', $request)) {
 +							$days = array_flip(self::getWeeklyOptions(OC_Calendar_App::$l10n));
 +							$byday = '';
 +							foreach($request['weeklyoptions'] as $day) {
 +								if($byday == '') {
 +								      $byday .= $days[$day];
 +								}else{
 +								      $byday .= ',' . $days[$day];
 +								}
 +							}
 +							$rrule .= ';BYDAY=' . $byday;
 +						}
 +						if(array_key_exists('bymonth', $request)) {
 +							$monthes = array_flip(self::getByMonthOptions(OC_Calendar_App::$l10n));
 +							$bymonth = '';
 +							foreach($request['bymonth'] as $month) {
 +								if($bymonth == '') {
 +								      $bymonth .= $monthes[$month];
 +								}else{
 +								      $bymonth .= ',' . $monthes[$month];
 +								}
 +							}
 +							$rrule .= ';BYMONTH=' . $bymonth;
 +
 +						}
 +						if(array_key_exists('bymonthday', $request)) {
 +							$bymonthday = '';
 +							foreach($request['bymonthday'] as $monthday) {
 +								if($bymonthday == '') {
 +								      $bymonthday .= $monthday;
 +								}else{
 +								      $bymonthday .= ',' . $monthday;
 +								}
 +							}
 +							$rrule .= ';BYMONTHDAY=' . $bymonthday;
 +
 +						}
 +					}
 +					break;
 +				default:
 +					break;
 +			}
 +			if($interval != '') {
 +				$rrule .= ';INTERVAL=' . $interval;
 +			}
 +			if($end == 'count') {
 +				$rrule .= ';COUNT=' . $byoccurrences;
 +			}
 +			if($end == 'date') {
 +				list($bydate_day, $bydate_month, $bydate_year) = explode('-', $request['bydate']);
 +				$rrule .= ';UNTIL=' . $bydate_year . $bydate_month . $bydate_day;
 +			}
 +			$vevent->setString('RRULE', $rrule);
 +			$repeat = "true";
 +		}else{
 +			$repeat = "false";
 +		}
 +
 +
 +		$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre\VObject\Property\DateTime::UTC);
 +		$vevent->setDateTime('DTSTAMP', 'now', Sabre\VObject\Property\DateTime::UTC);
 +		$vevent->setString('SUMMARY', $title);
 +
 +		if($allday) {
 +			$start = new DateTime($from);
 +			$end = new DateTime($to.' +1 day');
 +			$vevent->setDateTime('DTSTART', $start, Sabre\VObject\Property\DateTime::DATE);
 +			$vevent->setDateTime('DTEND', $end, Sabre\VObject\Property\DateTime::DATE);
 +		}else{
 +			$timezone = OC_Calendar_App::getTimezone();
 +			$timezone = new DateTimeZone($timezone);
 +			$start = new DateTime($from.' '.$fromtime, $timezone);
 +			$end = new DateTime($to.' '.$totime, $timezone);
 +			$vevent->setDateTime('DTSTART', $start, Sabre\VObject\Property\DateTime::LOCALTZ);
 +			$vevent->setDateTime('DTEND', $end, Sabre\VObject\Property\DateTime::LOCALTZ);
 +		}
 +		unset($vevent->DURATION);
 +
 +		$vevent->setString('CLASS', $accessclass);
 +		$vevent->setString('LOCATION', $location);
 +		$vevent->setString('DESCRIPTION', $description);
 +		$vevent->setString('CATEGORIES', $categories);
 +
 +		/*if($repeat == "true") {
 +			$vevent->RRULE = $repeat;
 +		}*/
 +
 +		return $vcalendar;
 +	}
 +
 +	/**
 +	 * @brief returns the owner of an object
 +	 * @param integer $id
 +	 * @return string
 +	 */
 +	public static function getowner($id) {
 +		if ($id == 0) return null;
 +		$event = self::find($id);
 +		$cal = OC_Calendar_Calendar::find($event['calendarid']);
 +		if($cal === false || is_array($cal) === false){
 +			return null;
 +		}
 +		if(array_key_exists('userid', $cal)){
 +			return $cal['userid'];
 +		}else{
 +			return null;
 +		}
 +	}
 +
 +	/**
 +	 * @brief returns the calendarid of an object
 +	 * @param integer $id
 +	 * @return integer
 +	 */
 +	public static function getCalendarid($id) {
 +		$event = self::find($id);
 +		return $event['calendarid'];
 +	}
 +
 +	/**
 +	 * @brief checks if an object is repeating
 +	 * @param integer $id
 +	 * @return boolean
 +	 */
 +	public static function isrepeating($id) {
 +		$event = self::find($id);
 +		return ($event['repeating'] == 1)?true:false;
 +	}
 +
 +	/**
 +	 * @brief converts the start_dt and end_dt to a new timezone
 +	 * @param object $dtstart
 +	 * @param object $dtend
 +	 * @param boolean $allday
 +	 * @param string $tz
 +	 * @return array
 +	 */
 +	public static function generateStartEndDate($dtstart, $dtend, $allday, $tz) {
 +		$start_dt = $dtstart->getDateTime();
 +		$end_dt = $dtend->getDateTime();
 +		$return = array();
 +		if($allday) {
 +			$return['start'] = $start_dt->format('Y-m-d');
 +			$end_dt->modify('-1 minute');
 +			while($start_dt >= $end_dt) {
 +				$end_dt->modify('+1 day');
 +			}
 +			$return['end'] = $end_dt->format('Y-m-d');
 +		}else{
 +			if($dtstart->getDateType() !== Sabre\VObject\Property\DateTime::LOCAL) {
 +				$start_dt->setTimezone(new DateTimeZone($tz));
 +				$end_dt->setTimezone(new DateTimeZone($tz));
 +			}
 +			$return['start'] = $start_dt->format('Y-m-d H:i:s');
 +			$return['end'] = $end_dt->format('Y-m-d H:i:s');
 +		}
 +		return $return;
 +	}
 +}
diff --cc apps/calendar/lib/sabre/backend.php
index 9cd405a,0000000..09cc7c6
mode 100644,000000..100644
--- a/apps/calendar/lib/sabre/backend.php
+++ b/apps/calendar/lib/sabre/backend.php
@@@ -1,383 -1,0 +1,388 @@@
 +<?php
 +
 +class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract {
 +	/**
 +	 * List of CalDAV properties, and how they map to database fieldnames
 +	 *
 +	 * Add your own properties by simply adding on to this array
 +	 *
 +	 * @var array
 +	 */
 +	public $propertyMap = array(
 +		'{DAV:}displayname'						  => 'displayname',
 +		'{urn:ietf:params:xml:ns:caldav}calendar-timezone'	=> 'timezone',
 +		'{http://apple.com/ns/ical/}calendar-order'  => 'calendarorder',
 +		'{http://apple.com/ns/ical/}calendar-color'  => 'calendarcolor',
 +	);
 +
 +	/**
 +	 * Returns a list of calendars for a principal.
 +	 *
 +	 * Every project is an array with the following keys:
 +	 *  * id, a unique id that will be used by other functions to modify the
 +	 *	calendar. This can be the same as the uri or a database key.
 +	 *  * uri, which the basename of the uri with which the calendar is
 +	 *	accessed.
 +	 *  * principalUri. The owner of the calendar. Almost always the same as
 +	 *	principalUri passed to this method.
 +	 *
 +	 * Furthermore it can contain webdav properties in clark notation. A very
 +	 * common one is '{DAV:}displayname'.
 +	 *
 +	 * @param string $principalUri
 +	 * @return array
 +	 */
 +	public function getCalendarsForUser($principalUri) {
 +		$raw = OC_Calendar_Calendar::allCalendarsWherePrincipalURIIs($principalUri);
 +
 +		$calendars = array();
 +		foreach( $raw as $row ) {
 +			$components = explode(',',$row['components']);
 +
 +			if($row['userid'] != OCP\USER::getUser()) {
 +				$row['uri'] = $row['uri'] . '_shared_by_' . $row['userid'];
 +			}
 +			$calendar = array(
 +				'id' => $row['id'],
 +				'uri' => $row['uri'],
 +				'principaluri' => 'principals/'.$row['userid'],
 +				'{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $row['ctag']?$row['ctag']:'0',
 +				'{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set'
 +					=> new Sabre_CalDAV_Property_SupportedCalendarComponentSet($components),
 +			);
 +
 +			foreach($this->propertyMap as $xmlName=>$dbName) {
 +				$calendar[$xmlName] = $row[$dbName];
 +			}
 +
 +			$calendars[] = $calendar;
 +		}
 +		if(\OCP\App::isEnabled('contacts')) {
- 			\OCP\Share::registerBackend('addressbook', 'OCA\Contacts\Share\Addressbook', 'contact');
- 			$app = new \OCA\Contacts\App(\OCP\User::getUser());
++			$ctag = 0;
++			$app = new \OCA\Contacts\App();
++			$addressBooks = $app->getAddressBooksForUser();
++			foreach($addressBooks as $addressBook) {
++				$tmp = $addressBook->lastModified();
++				if(!is_null($tmp)) {
++					$ctag = max($ctag, $tmp);
++				}
++			}
 +			$calendars[] = array(
 +				'id' => 'contact_birthdays',
 +				'uri' => 'contact_birthdays',
 +				'{DAV:}displayname' => (string)OC_Calendar_App::$l10n->t('Contact birthdays'),
 +				'principaluri' => 'principals/contact_birthdays',
- 				'{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => '0',
++				'{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $ctag,
 +				'{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set'
 +					=> new Sabre_CalDAV_Property_SupportedCalendarComponentSet(array('VEVENT')),
 +			);
 +		}
 +		return $calendars;
 +	}
 +
 +	/**
 +	 * Creates a new calendar for a principal.
 +	 *
 +	 * If the creation was a success, an id must be returned that can be used to reference
 +	 * this calendar in other methods, such as updateCalendar
 +	 *
 +	 * @param string $principalUri
 +	 * @param string $calendarUri
 +	 * @param array $properties
 +	 * @return mixed
 +	 */
 +	public function createCalendar($principalUri,$calendarUri, array $properties) {
 +		$fieldNames = array(
 +			'principaluri',
 +			'uri',
 +			'ctag',
 +		);
 +		$values = array(
 +			':principaluri' => $principalUri,
 +			':uri'		  => $calendarUri,
 +			':ctag'		 => 1,
 +		);
 +
 +		// Default value
 +		$sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set';
 +		$fieldNames[] = 'components';
 +		if (!isset($properties[$sccs])) {
 +			$values[':components'] = 'VEVENT,VTODO';
 +		} else {
 +			if (!($properties[$sccs] instanceof Sabre_CalDAV_Property_SupportedCalendarComponentSet)) {
 +				throw new Sabre_DAV_Exception('The ' . $sccs . ' property must be of type: Sabre_CalDAV_Property_SupportedCalendarComponentSet');
 +			}
 +			$values[':components'] = implode(',',$properties[$sccs]->getValue());
 +		}
 +
 +		foreach($this->propertyMap as $xmlName=>$dbName) {
 +			if (isset($properties[$xmlName])) {
 +
 +				$myValue = $properties[$xmlName];
 +				$values[':' . $dbName] = $properties[$xmlName];
 +				$fieldNames[] = $dbName;
 +			}
 +		}
 +
 +		if(!isset($newValues['displayname'])) $newValues['displayname'] = 'unnamed';
 +		if(!isset($newValues['components'])) $newValues['components'] = 'VEVENT,VTODO';
 +		if(!isset($newValues['timezone'])) $newValues['timezone'] = null;
 +		if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = 0;
 +		if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null;
 +		if(!is_null($newValues['calendarcolor']) && strlen($newValues['calendarcolor']) == 9) {
 +			$newValues['calendarcolor'] = substr($newValues['calendarcolor'], 0, 7);
 +		}
 +
 +		return OC_Calendar_Calendar::addCalendarFromDAVData($principalUri,$calendarUri,$newValues['displayname'],$newValues['components'],$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']);
 +	}
 +
 +	/**
 +	 * Updates a calendars properties
 +	 *
 +	 * The properties array uses the propertyName in clark-notation as key,
 +	 * and the array value for the property value. In the case a property
 +	 * should be deleted, the property value will be null.
 +	 *
 +	 * This method must be atomic. If one property cannot be changed, the
 +	 * entire operation must fail.
 +	 *
 +	 * If the operation was successful, true can be returned.
 +	 * If the operation failed, false can be returned.
 +	 *
 +	 * Deletion of a non-existant property is always succesful.
 +	 *
 +	 * Lastly, it is optional to return detailed information about any
 +	 * failures. In this case an array should be returned with the following
 +	 * structure:
 +	 *
 +	 * array(
 +	 *   403 => array(
 +	 *	  '{DAV:}displayname' => null,
 +	 *   ),
 +	 *   424 => array(
 +	 *	  '{DAV:}owner' => null,
 +	 *   )
 +	 * )
 +	 *
 +	 * In this example it was forbidden to update {DAV:}displayname.
 +	 * (403 Forbidden), which in turn also caused {DAV:}owner to fail
 +	 * (424 Failed Dependency) because the request needs to be atomic.
 +	 *
 +	 * @param string $calendarId
 +	 * @param array $properties
 +	 * @return bool|array
 +	 */
 +	public function updateCalendar($calendarId, array $properties) {
 +
 +		$newValues = array();
 +		$result = array(
 +			200 => array(), // Ok
 +			403 => array(), // Forbidden
 +			424 => array(), // Failed Dependency
 +		);
 +
 +		$hasError = false;
 +
 +		foreach($properties as $propertyName=>$propertyValue) {
 +
 +			// We don't know about this property.
 +			if (!isset($this->propertyMap[$propertyName])) {
 +				$hasError = true;
 +				$result[403][$propertyName] = null;
 +				unset($properties[$propertyName]);
 +				continue;
 +			}
 +
 +			$fieldName = $this->propertyMap[$propertyName];
 +			$newValues[$fieldName] = $propertyValue;
 +
 +		}
 +
 +		// If there were any errors we need to fail the request
 +		if ($hasError) {
 +			// Properties has the remaining properties
 +			foreach($properties as $propertyName=>$propertyValue) {
 +				$result[424][$propertyName] = null;
 +			}
 +
 +			// Removing unused statuscodes for cleanliness
 +			foreach($result as $status=>$properties) {
 +				if (is_array($properties) && count($properties)===0) unset($result[$status]);
 +			}
 +
 +			return $result;
 +
 +		}
 +
 +		// Success
 +		if(!isset($newValues['displayname'])) $newValues['displayname'] = null;
 +		if(!isset($newValues['timezone'])) $newValues['timezone'] = null;
 +		if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = null;
 +		if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null;
 +		if(!is_null($newValues['calendarcolor']) && strlen($newValues['calendarcolor']) == 9) {
 +			$newValues['calendarcolor'] = substr($newValues['calendarcolor'], 0, 7);
 +		}
 +
 +		OC_Calendar_Calendar::editCalendar($calendarId,$newValues['displayname'],null,$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']);
 +
 +		return true;
 +
 +	}
 +
 +	/**
 +	 * Delete a calendar and all it's objects
 +	 *
 +	 * @param string $calendarId
 +	 * @return void
 +	 */
 +	public function deleteCalendar($calendarId) {
 +	    if(preg_match( '=iCal/[1-4]?.*Mac OS X/10.[1-6](.[0-9])?=', $_SERVER['HTTP_USER_AGENT'] )) {
 +	    	throw new Sabre_DAV_Exception_Forbidden("Action is not possible with OSX 10.6.x", 403);
 +		}
 +
 +		OC_Calendar_Calendar::deleteCalendar($calendarId);
 +	}
 +
 +	/**
 +	 * Returns all calendar objects within a calendar object.
 +	 *
 +	 * Every item contains an array with the following keys:
 +	 *   * id - unique identifier which will be used for subsequent updates
 +	 *   * calendardata - The iCalendar-compatible calnedar data
 +	 *   * uri - a unique key which will be used to construct the uri. This can be any arbitrary string.
 +	 *   * lastmodified - a timestamp of the last modification time
 +	 *   * etag - An arbitrary string, surrounded by double-quotes. (e.g.:
 +	 *   '  "abcdef"')
 +	 *   * calendarid - The calendarid as it was passed to this function.
 +	 *
 +	 * Note that the etag is optional, but it's highly encouraged to return for
 +	 * speed reasons.
 +	 *
 +	 * The calendardata is also optional. If it's not returned
 +	 * 'getCalendarObject' will be called later, which *is* expected to return
 +	 * calendardata.
 +	 *
 +	 * @param string $calendarId
 +	 * @return array
 +	 */
 +	public function getCalendarObjects($calendarId) {
 +		$data = array();
 +		if($calendarId === 'contact_birthdays') {
 +			$app = new \OCA\Contacts\App();
 +			$addressBooks = $app->getAddressBooksForUser();
 +			foreach($addressBooks as $addressBook) {
- 				if($addressBook->getBackend()->name !== 'local'
- 					|| !$addressBook->getBackend()->isActive($addressBook->getId())
- 				) {
- 					continue;
- 				}
 +				foreach($addressBook->getChildren() as $contact) {
 +					$vevent = $contact->getBirthdayEvent();
 +					if(is_null($vevent)) {
 +						continue;
 +					}
 +					$data[] = $this->OCAddETag(array(
 +						'id' => 0,
 +						'calendarid' => 'contact_birthdays',
 +						'uri' => $addressBook->getBackend()->name.'::'.$addressBook->getId().'::'.$contact->getId(),
 +						'lastmodified' => $contact->lastModified(),
 +						'summary' => $vevent->SUMMARY,
 +						'calendardata' => $vevent->serialize()
 +					));
 +				}
 +			}
 +		} else {
 +			foreach(OC_Calendar_Object::all($calendarId) as $row) {
 +				$data[] = $this->OCAddETag($row);
 +			}
 +		}
 +		return $data;
 +	}
 +
 +	/**
 +	 * Returns information from a single calendar object, based on it's object
 +	 * uri.
 +	 *
 +	 * The returned array must have the same keys as getCalendarObjects. The
 +	 * 'calendardata' object is required here though, while it's not required
 +	 * for getCalendarObjects.
 +	 *
 +	 * @param string $calendarId
 +	 * @param string $objectUri
 +	 * @return array
 +	 */
 +	public function getCalendarObject($calendarId,$objectUri) {
 +		if($calendarId === 'contact_birthdays') {
- 			$app = new \OCA\Contacts\App();
- 			list($backend, $addressBookId, $contactId) = explode('::', $objectUri);
- 			$contact = $app->getContact($backend, $addressBookId, $contactId);
- 			$vevent = $contact->getBirthdayEvent();
- 			if(is_null($vevent)) {
- 				return false;
++			$objectUriArray = explode('::', $objectUri);
++			if(count($objectUriArray) === 3) {
++				$app = new \OCA\Contacts\App();
++				list($backend, $addressBookId, $contactId) = $objectUriArray;
++				$contact = $app->getContact($backend, $addressBookId, $contactId);
++				$vevent = $contact->getBirthdayEvent();
++				if(is_null($vevent)) {
++					return false;
++				}
++				return $this->OCAddETag(array(
++					'id' => 0,
++					'calendarid' => 'contact_birthdays',
++					'uri' => $contact->getBackend()->name.'::'.$contact->getParent()->getId().'::'.$contact->getId(),
++					'lastmodified' => $contact->lastModified(),
++					'calendardata' => $vevent->serialize()
++				));
 +			}
- 			return $this->OCAddETag(array(
- 				'id' => 0,
- 				'calendarid' => 'contact_birthdays',
- 				'uri' => $contact->getBackend()->name.'::'.$contact->getParent()->getId().'::'.$contact->getId(),
- 				'lastmodified' => $contact->lastModified(),
- 				'calendardata' => $vevent->serialize()
- 			));
 +		}
 +		$data = OC_Calendar_Object::findWhereDAVDataIs($calendarId,$objectUri);
 +		if(is_array($data)) {
 +			$data = $this->OCAddETag($data);
 +			$object = OC_VObject::parse($data['calendardata']);
 +			if(!$object) {
 +				return false;
 +			}
 +			$object = OC_Calendar_Object::cleanByAccessClass($data['id'], $object);
 +			$data['calendardata'] = $object->serialize();
 +		}
 +		return $data;
 +	}
 +
 +	/**
 +	 * Creates a new calendar object.
 +	 *
 +	 * @param string $calendarId
 +	 * @param string $objectUri
 +	 * @param string $calendarData
 +	 * @return void
 +	 */
 +	public function createCalendarObject($calendarId,$objectUri,$calendarData) {
 +		OC_Calendar_Object::addFromDAVData($calendarId,$objectUri,$calendarData);
 +	}
 +
 +	/**
 +	 * Updates an existing calendarobject, based on it's uri.
 +	 *
 +	 * @param string $calendarId
 +	 * @param string $objectUri
 +	 * @param string $calendarData
 +	 * @return void
 +	 */
 +	public function updateCalendarObject($calendarId,$objectUri,$calendarData) {
 +		OC_Calendar_Object::editFromDAVData($calendarId,$objectUri,$calendarData);
 +	}
 +
 +	/**
 +	 * Deletes an existing calendar object.
 +	 *
 +	 * @param string $calendarId
 +	 * @param string $objectUri
 +	 * @return void
 +	 */
 +	public function deleteCalendarObject($calendarId,$objectUri) {
 +		OC_Calendar_Object::deleteFromDAVData($calendarId,$objectUri);
 +	}
 +
 +	/**
 +	 * @brief Creates a etag
 +	 * @param array $row Database result
 +	 * @returns associative array
 +	 *
 +	 * Adds a key "etag" to the row
 +	 */
 +	private function OCAddETag($row) {
 +		$row['etag'] = '"'.md5($row['calendarid'].$row['uri'].$row['calendardata'].$row['lastmodified']).'"';
 +		return $row;
 +	}
 +}
diff --cc apps/calendar/templates/part.eventform.php
index d40fc56,0000000..793e2e0
mode 100644,000000..100644
--- a/apps/calendar/templates/part.eventform.php
+++ b/apps/calendar/templates/part.eventform.php
@@@ -1,228 -1,0 +1,238 @@@
 +<script type="text/javascript" src="<?php print_unescaped(OC_Helper::linkTo('calendar/js', 'idtype.php'));?>?id=<?php p($_['eventid']); ?>"></script>
 +
 +
 +<ul>
 +	<li><a href="#tabs-1"><?php p($l->t('Eventinfo')); ?></a></li>
 +	<li><a href="#tabs-2"><?php p($l->t('Repeating')); ?></a></li>
 +	<!--<li><a href="#tabs-3"><?php p($l->t('Alarm')); ?></a></li>
 +	<li><a href="#tabs-4"><?php p($l->t('Attendees')); ?></a></li>-->
 +	<?php if($_['eventid'] != 'new' && $_['permissions'] & OCP\PERMISSION_SHARE) { ?>
 +	<li><a href="#tabs-5"><?php p($l->t('Share')); ?></a></li>
 +	<?php } ?>
 +</ul>
 +<div id="tabs-1">
 +	<input id="event-title" type="text" size="100"
 +		placeholder="<?php p($l->t('Title of the Event'));?>"
 +		value="<?php p(isset($_['title']) ? $_['title'] : '') ?>"
 +		maxlength="100" name="title" autofocus="autofocus"/>
 +
 +	<?php if(count($_['calendar_options']) > 1) { ?>
 +	<?php p($l->t("Calendar"));?>
 +	<select style="width:140px;" name="calendar">
 +		<?php if (!isset($_['calendar'])) {$_['calendar'] = false;}
- 		print_unescaped(OCP\html_select_options($_['calendar_options'], $_['calendar'], array('value'=>'id', 'label'=>'displayname'))); ?>
++		$enabledCalendars = array();
++		$disabledCalendars = array();
++		foreach($_['calendar_options'] as $calendar) {
++			if($calendar['active'] === '1') {
++				$enabledCalendars[] = $calendar;
++			}else{
++				$disabledCalendars[] = $calendar;
++			}
++		}
++		$sortedCalendars = array_merge($enabledCalendars, $disabledCalendars);
++		print_unescaped(OCP\html_select_options($sortedCalendars, $_['calendar'], array('value'=>'id', 'label'=>'displayname'))); ?>
 +	</select>
 +	<?php } else { ?>
 +	<input style="display:none;" type="hidden" name="calendar" value="<?php p($_['calendar_options'][0]['id']); ?>">
 +	<?php } ?>
 +
 +	<div id="event-time">
 +		<div id="event-time-from">
 +			<?php p($l->t('from'));?>
 +			<input type="text" value="<?php p($_['startdate']);?>" name="from" id="from">
 +			<input type="time" value="<?php p($_['starttime']);?>" name="fromtime" id="fromtime">
 +		</div>
 +		<div id="event-time-to">
 +			<?php p($l->t('to'));?>
 +			<input type="text" value="<?php p($_['enddate']);?>" name="to" id="to">
 +			<input type="time" value="<?php p($_['endtime']);?>" name="totime" id="totime">
 +		</div>
 +	</div>
 +
 +	<label id="event-allday">
 +		<input id="allday_checkbox" type="checkbox"<?php if($_['allday']) {print_unescaped('checked="checked"');} ?> name="allday">
 +		<?php p($l->t("All Day Event"));?>
 +	</label>
 +
 +	<input id="advanced_options_button" type="button" class="submit" value="<?php p($l->t('Advanced options')); ?>">
 +
 +	<div id="advanced_options" style="display: none;">
 +		<input id="event-location" type="text" size="100"
 +			placeholder="<?php p($l->t('Location'));?>"
 +			value="<?php p(isset($_['location']) ? $_['location'] : '') ?>"
 +			maxlength="100"  name="location" />
 +
 +		<input id="category" name="categories" type="text"
 +			placeholder="<?php p($l->t('Categories (separate by comma)')); ?>"
 +			value="<?php p(isset($_['categories']) ? $_['categories'] : '') ?>">
 +		<a class="action edit" id="editCategories" title="<?php p($l->t('Edit categories')); ?>">
 +		<img alt="<?php p($l->t('Edit categories')); ?>" src="<?php print_unescaped(OCP\image_path('core','actions/rename.svg'))?>" class="svg action" style="width: 16px; height: 16px;"></a>
 +
 +		<textarea id="event-description" placeholder="<?php p($l->t('Description'));?>" name="description"><?php p(isset($_['description']) ? $_['description'] : '') ?></textarea>
 +
 +		<input type="button" class="submit" id="editEvent-export"  name="export" value="<?php p($l->t('Export event'));?>" data-link="<?php print_unescaped(OCP\Util::linkTo('calendar', 'export.php')) ?>?eventid=<?php p($_['eventid']) ?>">
 +	</div>
 +</div>
 +
 +<div id="tabs-2">
 +	<table style="width:100%">
 +			<tr>
 +				<th width="75px"><?php p($l->t("Repeat"));?>:</th>
 +				<td>
 +				<select id="repeat" name="repeat">
 +					<?php
 +					print_unescaped(OCP\html_select_options($_['repeat_options'], $_['repeat']));
 +					?>
 +				</select></td>
 +				<td><input type="button" style="float:right;" class="submit" value="<?php p($l->t("Advanced")); ?>" id="advanced_options_button_repeat"></td>
 +			</tr>
 +		</table>
 +		<div id="advanced_options_repeating" style="display:none;">
 +			<table style="width:100%">
 +				<tr id="advanced_month" style="display:none;">
 +					<th width="75px"></th>
 +					<td>
 +						<select id="advanced_month_select" name="advanced_month_select">
 +							<?php
 +							print_unescaped(OCP\html_select_options($_['repeat_month_options'], $_['repeat_month']));
 +							?>
 +						</select>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr id="advanced_year" style="display:none;">
 +					<th width="75px"></th>
 +					<td>
 +						<select id="advanced_year_select" name="advanced_year_select">
 +							<?php
 +							print_unescaped(OCP\html_select_options($_['repeat_year_options'], $_['repeat_year']));
 +							?>
 +						</select>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr id="advanced_weekofmonth" style="display:none;">
 +					<th width="75px"></th>
 +					<td id="weekofmonthcheckbox">
 +						<select id="weekofmonthoptions" name="weekofmonthoptions">
 +							<?php
 +							print_unescaped(OCP\html_select_options($_['repeat_weekofmonth_options'], $_['repeat_weekofmonth']));
 +							?>
 +						</select>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr id="advanced_weekday" style="display:none;">
 +					<th width="75px"></th>
 +					<td id="weeklycheckbox">
 +						<select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" style="width: 150px;" title="<?php p($l->t("Select weekdays")) ?>">
 +							<?php
 +							if (!isset($_['weekdays'])) {$_['weekdays'] = array();}
 +							print_unescaped(OCP\html_select_options($_['repeat_weekly_options'], $_['repeat_weekdays'], array('combine'=>true)));
 +							?>
 +						</select>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr id="advanced_byyearday" style="display:none;">
 +					<th width="75px"></th>
 +					<td id="byyeardaycheckbox">
 +						<select id="byyearday" name="byyearday[]" multiple="multiple" title="<?php p($l->t("Select days")) ?>">
 +							<?php
 +							if (!isset($_['repeat_byyearday'])) {$_['repeat_byyearday'] = array();}
 +							print_unescaped(OCP\html_select_options($_['repeat_byyearday_options'], $_['repeat_byyearday'], array('combine'=>true)));
 +							?>
 +						</select><?php p($l->t('and the events day of year.')); ?>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr id="advanced_bymonthday" style="display:none;">
 +					<th width="75px"></th>
 +					<td id="bymonthdaycheckbox">
 +						<select id="bymonthday" name="bymonthday[]" multiple="multiple" title="<?php p($l->t("Select days")) ?>">
 +							<?php
 +							if (!isset($_['repeat_bymonthday'])) {$_['repeat_bymonthday'] = array();}
 +							print_unescaped(OCP\html_select_options($_['repeat_bymonthday_options'], $_['repeat_bymonthday'], array('combine'=>true)));
 +							?>
 +						</select><?php p($l->t('and the events day of month.')); ?>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr id="advanced_bymonth" style="display:none;">
 +					<th width="75px"></th>
 +					<td id="bymonthcheckbox">
 +						<select id="bymonth" name="bymonth[]" multiple="multiple" title="<?php p($l->t("Select months")) ?>">
 +							<?php
 +							if (!isset($_['repeat_bymonth'])) {$_['repeat_bymonth'] = array();}
 +							print_unescaped(OCP\html_select_options($_['repeat_bymonth_options'], $_['repeat_bymonth'], array('combine'=>true)));
 +							?>
 +						</select>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr id="advanced_byweekno" style="display:none;">
 +					<th width="75px"></th>
 +					<td id="bymonthcheckbox">
 +						<select id="byweekno" name="byweekno[]" multiple="multiple" title="<?php p($l->t("Select weeks")) ?>">
 +							<?php
 +							if (!isset($_['repeat_byweekno'])) {$_['repeat_byweekno'] = array();}
 +							print_unescaped(OCP\html_select_options($_['repeat_byweekno_options'], $_['repeat_byweekno'], array('combine'=>true)));
 +							?>
 +						</select><?php p($l->t('and the events week of year.')); ?>
 +					</td>
 +				</tr>
 +			</table>
 +			<table style="width:100%">
 +				<tr>
 +					<th width="75px"><?php p($l->t('Interval')); ?>:</th>
 +					<td>
 +						<input style="width:350px;" type="number" min="1" size="4" max="1000" value="<?php p(isset($_['repeat_interval']) ? $_['repeat_interval'] : '1'); ?>" name="interval">
 +					</td>
 +				</tr>
 +				<tr>
 +					<th width="75px"><?php p($l->t('End')); ?>:</th>
 +					<td>
 +						<select id="end" name="end">
 +							<?php
 +							if($_['repeat_end'] == '') $_['repeat_end'] = 'never';
 +							print_unescaped(OCP\html_select_options($_['repeat_end_options'], $_['repeat_end']));
 +							?>
 +						</select>
 +					</td>
 +				</tr>
 +				<tr>
 +					<th></th>
 +					<td id="byoccurrences" style="display:none;">
 +						<input type="number" min="1" max="99999" id="until_count" name="byoccurrences" value="<?php p($_['repeat_count']); ?>"><?php p($l->t('occurrences')); ?>
 +					</td>
 +				</tr>
 +				<tr>
 +					<th></th>
 +					<td id="bydate" style="display:none;">
 +						<input type="text" name="bydate" value="<?php p($_['repeat_date']); ?>">
 +					</td>
 +				</tr>
 +			</table>
 +		</div>
 +</div>
 +<!--<div id="tabs-3">//Alarm</div>
 +<div id="tabs-4">//Attendees</div>-->
 +<?php if($_['eventid'] != 'new' && $_['permissions'] & OCP\PERMISSION_SHARE) { ?>
 +<div id="tabs-5">
 +	<?php if($_['eventid'] != 'new') { print_unescaped($this->inc('part.share')); } ?>
 +
 +	<br>
 +	<?php p($l->t('Visibility to people shared with'));?>
 +	<select style="width:140px;" name="accessclass">
 +		<?php if (!isset($_['calendar'])) {$_['calendar'] = false;}
 +		print_unescaped(OCP\html_select_options($_['access_class_options'], $_['accessclass'])); ?>
 +	</select>
 +</div>
 +<?php } ?>
diff --cc apps/calendar/templates/settings.php
index a0b4af5,0000000..accdfd8
mode 100644,000000..100644
--- a/apps/calendar/templates/settings.php
+++ b/apps/calendar/templates/settings.php
@@@ -1,131 -1,0 +1,131 @@@
 +<form id="calendar">
 +	<p><b><?php p($l->t('Your calendars')); ?>:</b></p>
 +	<table width="100%" style="border: 0;">
 +	<?php
 +	$option_calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
 +	for($i = 0; $i < count($option_calendars); $i++) {
 +		print_unescaped("<tr data-id='".OC_Util::sanitizeHTML($option_calendars[$i]['id'])."'>");
 +		$tmpl = new OCP\Template('calendar', 'part.choosecalendar.rowfields');
 +		$tmpl->assign('calendar', $option_calendars[$i]);
 +		if ($option_calendars[$i]['userid'] != OCP\User::getUser()) {
 +			$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $option_calendars[$i]['id']);
 +			$shared = true;
 +		} else {
 +			$shared = false;
 +		}
 +		$tmpl->assign('shared', $shared);
 +		$tmpl->printpage();
 +		print_unescaped("</tr>");
 +	}
 +	?>
 +	<tr>
 +		<td colspan="6">
 +			<input type="button" value="<?php p($l->t('New Calendar')) ?>" id="newCalendar">
 +		</td>
 +	</tr>
 +	<tr>
 +		<td colspan="6">
 +			<p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="caldav_url" title="<?php p($l->t("CalDav Link")); ?>"><img id="caldav_url_close" style="height: 20px;vertical-align: middle;display: none;" src="<?php p(OCP\Util::imagePath('core', 'actions/delete.svg')) ?>" alt="close"/></p>
 +		</td>
 +	</tr>
 +	</table><br>
 +	</fieldset>
 +</form>
 +<h2 id="title_general"><?php p($l->t('General')); ?></h2>
 +<div id="general">
 +	<table class="nostyle">
 +		<tr>
 +			<td>
 +				<label for="timezone" class="bold"><?php p($l->t('Timezone'));?></label>
 +				  
 +			</td>
 +			<td>
 +				<select style="display: none;" id="timezone" name="timezone">
 +				<?php
 +				$continent = '';
 +				foreach($_['timezones'] as $timezone):
 +					$ex=explode('/', $timezone, 2);//obtain continent,city
 +					if (!isset($ex[1])) {
 +						$ex[1] = $ex[0];
 +						$ex[0] = "Other";
 +					}
 +					if ($continent!=$ex[0]):
 +						if ($continent!="") print_unescaped('</optgroup>');
 +						print_unescaped('<optgroup label="'.OC_Util::sanitizeHTML($ex[0]).'">');
 +					endif;
 +					$city=strtr($ex[1], '_', ' ');
 +					$continent=$ex[0];
 +					print_unescaped('<option value="'.OC_Util::sanitizeHTML($timezone).'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.OC_Util::sanitizeHTML($city).'</option>');
 +				endforeach;?>
 +				</select>
 +			</td>
 +		</tr>
 +		<tr>
 +			<td>
 +				  
 +			</td>
 +			<td>
 +				<input type="checkbox" name="timezonedetection" id="timezonedetection">
 +				 
 +				<label for="timezonedetection"><?php p($l->t('Update timezone automatically')); ?></label>
 +			</td>
 +		</tr>
 +		<tr>
 +			<td>
 +				<label for="timeformat" class="bold"><?php p($l->t('Time format'));?></label>
 +				  
 +			</td>
 +			<td>
 +				<select style="display: none; width: 60px;" id="timeformat" title="<?php p("timeformat"); ?>" name="timeformat">
 +					<option value="24" id="24h"><?php p($l->t("24h")); ?></option>
 +					<option value="ampm" id="ampm"><?php p($l->t("12h")); ?></option>
 +				</select>
 +			</td>
 +		</tr>
 +		<tr>
 +			<td>
 +				<label for="firstday" class="bold"><?php p($l->t('Start week on'));?></label>
 +				  
 +			</td>
 +			<td>
 +				<select style="display: none;" id="firstday" title="<?php p("First day"); ?>" name="firstday">
 +					<option value="mo" id="mo"><?php p($l->t("Monday")); ?></option>
 +					<option value="su" id="su"><?php p($l->t("Sunday")); ?></option>
 +					<option value="sa" id="sa"><?php p($l->t("Saturday")); ?></option>
 +				</select>
 +			</td>
 +		</tr>
 +		<tr class="advancedsettings">
 +			<td>
 +				<label for="" class="bold"><?php p($l->t('Cache'));?></label>
 +				  
 +			</td>
 +			<td>
 +				<input id="cleancalendarcache" type="button" class="button" value="<?php p($l->t('Clear cache for repeating events'));?>">
 +			</td>
 +		</tr>
 +	</table>
 +</div>
 +<h2 id="title_urls"><?php p($l->t('URLs')); ?></h2>
 +<div id="urls">
 +		<?php p($l->t('Calendar CalDAV syncing addresses')); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank" class="link"><?php p($l->t('more info')); ?></a>)
 +		<dl>
 +		<dt><?php p($l->t('Primary address (Kontact et al)')); ?></dt>
 +		<dd><input type="text" style="width: 90%;float: left;" value="<?php print_unescaped(OCP\Util::linkToRemote('caldav')); ?>" readonly></dd>
 +		<dt><?php p($l->t('iOS/OS X')); ?></dt>
- 		<dd><input type="text" style="width: 90%;float: left;" value="<?php print_unescaped(OCP\Util::linkToRemote('caldav')); ?>principals/<?php p(OCP\USER::getUser()); ?>/" readonly></dd>
++		<dd><input type="text" style="width: 90%;float: left;" value="<?php print_unescaped(OCP\Util::linkToRemote('caldav')); ?>principals/<?php p(urlencode(OCP\USER::getUser())); ?>/" readonly></dd>
 +		<dt><?php p($l->t('Read only iCalendar link(s)')); ?></dt>
 +		<dd>
 +			<?php foreach($_['calendars'] as $calendar) {
 +			if($calendar['userid'] == OCP\USER::getUser()){
 +				$uri = rawurlencode(html_entity_decode($calendar['uri'], ENT_QUOTES, 'UTF-8'));
 +			}else{
 +				$uri = rawurlencode(html_entity_decode($calendar['uri'], ENT_QUOTES, 'UTF-8')) . '_shared_by_' . $calendar['userid'];
 +			}
 +			?>
- 			<a href="<?php p(OCP\Util::linkToRemote('caldav').'calendars/'.OCP\USER::getUser().'/'.$uri) ?>?export" class="link"><?php p(OCP\Util::sanitizeHTML($calendar['displayname'])) ?></a><br />
++			<a href="<?php p(OCP\Util::linkToRemote('caldav').'calendars/'.urlencode(OCP\USER::getUser().'/'.$uri)) ?>?export" class="link"><?php p(OCP\Util::sanitizeHTML($calendar['displayname'])) ?></a><br />
 +			<?php } ?>
 +		</dd>
 +		</dl>
 +	</div>
 +</div>
diff --cc apps/contacts/Changelog
index 1957db7,0000000..61d067a
mode 100644,000000..100644
--- a/apps/contacts/Changelog
+++ b/apps/contacts/Changelog
@@@ -1,52 -1,0 +1,59 @@@
 +ownCloud Contacts Changelog
 +
++6.0.2
++- Many improvements for groups both front- and back-end.
++- Fix unusable app after import of contact with no name.
++
++6.0.1
++- Closed potential XSS issue with group name.
++
 +6.0
 + - Don't fire a request for every contacts when mass adding to/removing from groups.
 + - Don't have a request for each thumbnail.
 + - Only load default contact photo once.
 + - Added virtual group "Ungrouped".
 + - Groups can now be renamed. contacts#97
 + - Smoother and more failsafe importing.
 + - Rewritten backend to allow for multiple address book sources.
 + - Abstraction layer for address books and contacts.
 + - Partially ported to App Framework.
 + - Use updated app styles.
 + - Select single contacts by Ctrl/Cmd-click, or a range of contacts by Shift-click.
 + - Experimental contacts merge. Might eat kittens!
 + - Regression fixed: Address book rename added again.
 + - Regression fixed: Contacts can be moved between address books again; also with different backends. contacts#57
 +
 +5.0.8
 + - Regression fix: It is again possible to select which address book a new contact should
 +   be saved in.
 + - Regression fix: It is again possible to move contacts between address books.
 + - Fix: When users where deleted, any address books shared with them would also deleted.
 +
 +5.0.7:
 + - Feature: Delete button for single contacts in list. contacts#101
 + - Improvement: Cut ~40% off of initial rendering time.
 + - Fix: Thumbnail was not updated when changing PHOTO via CardDAV. contacts#120
 + - Fix: Drag item only worked on first drag. contacts#33
 + - Fix: The internal client side value for BDAY was malformed after adding a birthday. contacts#104
 + - Fix: URL and EMAIL event handlers reenabled: contacts#109
 + - Fix: Send correct lastModified. contacts#48 contacts#99
 + - Fix: Don't keep attaching event handler for uploaded photo. contacts#24
 + - Fix: Don't recreate default groups after user has deleted them. contacts#47
 + - Fix: Properly format and decode properties on update from 2.1. contacts#54
 + - Fix: When importing into a shared address book, groups were created for the "sharee"
 +   instead of the owner. contacts#39
 + - Fix: If a shared address book was selecting while creating a contacts a new group
 +   with the same name would be created. contacts#39
 + - Fix: Properties are now properly (un)escaped. contacts#42 contacts#7
 + - Fix: Add workaround for stale shares. core#2814 contacts#78
 + - Fix: Cached thumbnail wasn't removed when photo was delete. contacts#77
 +
 +5.0.6:
 + - Improvement: If contacts display name doesn't exists check first for ORG then EMAIL.
 + - Fix: Check for existing address books on migrate->import to avoid duplicate records..
 + - Fix: Older Firefox/Iceweasel didn't show email/tel/url because of missing outerHTML.
 + - Fix: Unescape variables in search results and generated birthday events.
 + - Fix: AddressbookProviders could have duplicate keys.
 + - Feature: Add support for IMPP:SIP aka Internet calls.
 + - Unescape variables in search results and generated birthday events.
 + - AddressbookProviders could have duplicate keys.
diff --cc apps/contacts/appinfo/app.php
index bf63bf4,0000000..363ebd6
mode 100644,000000..100644
--- a/apps/contacts/appinfo/app.php
+++ b/apps/contacts/appinfo/app.php
@@@ -1,60 -1,0 +1,60 @@@
 +<?php
 +
 +namespace OCA\Contacts;
 +use \OC\AppFramework\Core\API;
 +
 +//require_once __DIR__ . '/../lib/controller/pagecontroller.php';
 +\Sabre\VObject\Component::$classMap['VCARD']	= '\OCA\Contacts\VObject\VCard';
 +\Sabre\VObject\Property::$classMap['CATEGORIES'] = 'OCA\Contacts\VObject\GroupProperty';
 +\Sabre\VObject\Property::$classMap['FN']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['TITLE']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['ROLE']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['NOTE']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['NICKNAME']	= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['EMAIL']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['TEL']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['IMPP']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['URL']		= '\OC\VObject\StringProperty';
 +\Sabre\VObject\Property::$classMap['N']			= '\OC\VObject\CompoundProperty';
 +\Sabre\VObject\Property::$classMap['ADR']		= '\OC\VObject\CompoundProperty';
 +\Sabre\VObject\Property::$classMap['GEO']		= '\OC\VObject\CompoundProperty';
 +\Sabre\VObject\Property::$classMap['ORG']		= '\OC\VObject\CompoundProperty';
 +
 +\OC::$server->getNavigationManager()->add(array(
 +	'id' => 'contacts',
 +	'order' => 10,
 +	'href' => \OCP\Util::linkToRoute('contacts_index'),
 +	'icon' => \OCP\Util::imagePath( 'contacts', 'contacts.svg' ),
 +	'name' => \OCP\Util::getL10N('contacts')->t('Contacts')
 +	)
 +);
 +
 +$api = new API('contacts');
 +
 +$api->connectHook('OC_User', 'post_createUser', '\OCA\Contacts\Hooks', 'userCreated');
 +$api->connectHook('OC_User', 'post_deleteUser', '\OCA\Contacts\Hooks', 'userDeleted');
 +$api->connectHook('OCA\Contacts', 'pre_deleteAddressBook', '\OCA\Contacts\Hooks', 'addressBookDeletion');
 +$api->connectHook('OCA\Contacts', 'pre_deleteContact', '\OCA\Contacts\Hooks', 'contactDeletion');
 +$api->connectHook('OCA\Contacts', 'post_createContact', 'OCA\Contacts\Hooks', 'contactAdded');
 +$api->connectHook('OCA\Contacts', 'post_updateContact', '\OCA\Contacts\Hooks', 'contactUpdated');
 +$api->connectHook('OCA\Contacts', 'scanCategories', '\OCA\Contacts\Hooks', 'scanCategories');
 +$api->connectHook('OCA\Contacts', 'indexProperties', '\OCA\Contacts\Hooks', 'indexProperties');
 +$api->connectHook('OC_Calendar', 'getEvents', 'OCA\Contacts\Hooks', 'getBirthdayEvents');
 +$api->connectHook('OC_Calendar', 'getSources', 'OCA\Contacts\Hooks', 'getCalenderSources');
 +
 +\OCP\Util::addscript('contacts', 'loader');
 +
 +\OC_Search::registerProvider('OCA\Contacts\SearchProvider');
 +//\OCP\Share::registerBackend('contact', 'OCA\Contacts\Share_Backend_Contact');
 +\OCP\Share::registerBackend('addressbook', 'OCA\Contacts\Share\Addressbook', 'contact');
 +//\OCP\App::registerPersonal('contacts','personalsettings');
 +
 +if(\OCP\User::isLoggedIn()) {
 +	$app = new App($api->getUserId());
 +	$addressBooks = $app->getAddressBooksForUser();
 +	foreach($addressBooks as $addressBook)  {
- 		if($addressBook->getBackend()->name === 'local') {
++		//if($addressBook->getBackend()->name === 'local') {
 +			\OCP\Contacts::registerAddressBook(new AddressbookProvider($addressBook));
- 		}
++		//}
 +	}
 +}
diff --cc apps/contacts/js/addressbooks.js
index 66facb9,0000000..f5ed769
mode 100644,000000..100644
--- a/apps/contacts/js/addressbooks.js
+++ b/apps/contacts/js/addressbooks.js
@@@ -1,634 -1,0 +1,634 @@@
 +OC.Contacts = OC.Contacts || {};
 +
 +
 +(function(window, $, OC) {
 +	'use strict';
 +
 +	var AddressBook = function(storage, book, template, isFileAction) {
 +		this.isFileAction = isFileAction || false;
 +		this.storage = storage;
 +		this.book = book;
 +		this.$template = template;
 +	}
 +
 +	AddressBook.prototype.render = function() {
 +		var self = this;
 +		this.$li = this.$template.octemplate({
 +			id: this.book.id,
 +			displayname: this.book.displayname,
 +			backend: this.book.backend,
 +			permissions: this.book.permissions
 +		});
 +		if(this.isFileAction) {
 +			return this.$li;
 +		}
 +		this.$li.find('a.action').tipsy({gravity: 'w'});
 +		if(!this.hasPermission(OC.PERMISSION_DELETE)) {
 +			this.$li.find('a.action.delete').hide();
 +		}
 +		if(!this.hasPermission(OC.PERMISSION_UPDATE)) {
 +			this.$li.find('a.action.edit').hide();
 +		}
 +		this.$li.find('input:checkbox').prop('checked', this.book.active).on('change', function() {
 +			console.log('activate', self.getId());
 +			var checkbox = $(this).get(0);
 +			self.setActive(checkbox.checked, function(response) {
 +				if(!response.error) {
 +					self.book.active = checkbox.checked;
 +				} else {
 +					checkbox.checked = !checkbox.checked;
 +				}
 +			});
 +		});
 +		this.$li.find('a.action.download')
 +			.attr('href', OC.Router.generate(
 +				'contacts_address_book_export',
 +				{
 +					backend: this.getBackend(),
 +					addressBookId: this.getId()
 +				}
 +			));
 +		this.$li.find('a.action.delete').on('click keypress', function() {
 +			$('.tipsy').remove();
 +			console.log('delete', self.getId());
 +			self.destroy();
 +		});
 +		this.$li.find('a.action.globe').on('click keypress', function() {
 +			var uri = (self.book.owner === oc_current_user ) ? self.book.uri : self.book.uri + '_shared_by_' + self.book.owner;
 +			var link = OC.linkToRemote('carddav')+'/addressbooks/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(uri);
 +			var $dropdown = $('<li><div id="dropdown" class="drop"><input type="text" value="{link}" readonly /></div></li>')
 +				.octemplate({link:link}).insertAfter(self.$li);
 +			var $input = $dropdown.find('input');
 +			$input.focus().get(0).select();
 +			$input.on('blur', function() {
 +				$dropdown.hide('blind', function() {
 +					$dropdown.remove();
 +				});
 +			});
 +		});
 +		this.$li.find('a.action.edit').on('click keypress', function(event) {
 +			if($(this).data('open')) {
 +				return;
 +			}
 +			var editor = this;
 +			event.stopPropagation();
 +			event.preventDefault();
 +			var $dropdown = $('<li><div><input type="text" value="{name}" /></div></li>')
 +				.octemplate({name:self.getDisplayName()}).insertAfter(self.$li);
 +			var $input = $dropdown.find('input');
 +			//$input.focus().get(0).select();
 +			$input.addnew({
 +				autoOpen: true,
 +				//autoClose: false,
 +				addText: t('contacts', 'Save'),
 +				ok: function(event, name) {
 +					console.log('edit-address-book ok', name);
 +					$input.addClass('loading');
 +					self.update({displayname:name}, function(response) {
 +						console.log('response', response);
 +						if(response.error) {
 +							$(document).trigger('status.contacts.error', response);
 +						} else {
 +							self.setDisplayName(response.data.displayname);
 +							$input.addnew('close');
 +						}
 +						$input.removeClass('loading');
 +					});
 +				},
 +				close: function() {
 +					$dropdown.remove();
 +					$(editor).data('open', false);
 +				}
 +			});
 +			$(this).data('open', true);
 +		});
 +		return this.$li;
 +	};
 +
 +	AddressBook.prototype.getId = function() {
- 		return this.book.id;
++		return String(this.book.id);
 +	};
 +
 +	AddressBook.prototype.getBackend = function() {
 +		return this.book.backend;
 +	};
 +
 +	AddressBook.prototype.getDisplayName = function() {
 +		return this.book.displayname;
 +	};
 +
 +	AddressBook.prototype.setDisplayName = function(name) {
 +		this.book.displayname = name;
 +		this.$li.find('label').text(escapeHTML(name));
 +	};
 +
 +	AddressBook.prototype.getPermissions = function() {
 +		return this.book.permissions;
 +	};
 +
 +	AddressBook.prototype.hasPermission = function(permission) {
 +		return (this.getPermissions() & permission);
 +	};
 +
 +	AddressBook.prototype.getOwner = function() {
 +		return this.book.owner;
 +	};
 +
 +	AddressBook.prototype.getMetaData = function() {
 +		return {
 +			permissions:this.getPermissions,
 +			backend: this.getBackend(),
 +			id: this.getId(),
 +			displayname: this.getDisplayName()
 +		};
 +	};
 +
 +	/**
 +	 * Update address book in data store
 +	 * @param object properties An object current only supporting the property 'displayname'
 +	 * @param cb Optional callback function which
 +	 * @return An object with a boolean variable 'error'.
 +	 */
 +	AddressBook.prototype.update = function(properties, cb) {
 +		return $.when(this.storage.updateAddressBook(this.getBackend(), this.getId(), {properties:properties}))
 +			.then(function(response) {
 +			if(response.error) {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +			cb(response);
 +		});
 +	};
 +
 +	AddressBook.prototype.isActive = function() {
 +		return this.book.active;
 +	};
 +
 +	/**
 +	 * Save an address books active state to data store.
 +	 * @param bool state
 +	 * @param cb Optional callback function which
 +	 * @return An object with a boolean variable 'error'.
 +	 */
 +	AddressBook.prototype.setActive = function(state, cb) {
 +		var self = this;
 +		return $.when(this.storage.activateAddressBook(this.getBackend(), this.getId(), state))
 +			.then(function(response) {
 +			if(response.error) {
 +				$(document).trigger('status.contacts.error', response);
 +			} else {
 +				$(document).trigger('status.addressbook.activated', {
 +					addressbook: self,
 +					state: state
 +				});
 +			}
 +			cb(response);
 +		});
 +	};
 +
 +	/**
 +	 * Delete a list of contacts from the data store
 +	 * @param array contactsIds An array of contact ids to be deleted.
 +	 * @param cb Optional callback function which will be passed:
 +	 * @return An object with a boolean variable 'error'.
 +	 */
 +	AddressBook.prototype.deleteContacts = function(contactsIds, cb) {
 +		console.log('deleteContacts', contactsIds);
 +		return $.when(this.storage.deleteContacts(this.getBackend(), this.getId(), contactsIds))
 +			.then(function(response) {
 +			if(response.error) {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +			cb(response);
 +		});
 +	};
 +
 +	/**
 +	 * Delete address book from data store and remove it from the DOM
 +	 * @param cb Optional callback function which
 +	 * @return An object with a boolean variable 'error'.
 +	 */
 +	AddressBook.prototype.destroy = function(cb) {
 +		var self = this;
 +		$.when(this.storage.deleteAddressBook(this.getBackend(), self.getId()))
 +			.then(function(response) {
 +			if(!response.error) {
 +				self.$li.remove();
 +				$(document).trigger('status.addressbook.removed', {
 +					addressbook: self
 +				});
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		}).fail(function(response) {
 +			console.log(response.message);
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	/**
 +	 * Controls access to address books
 +	 */
 +	var AddressBookList = function(
 +			storage,
 +			bookTemplate,
 +			bookItemTemplate,
 +			isFileAction
 +  		) {
 +		var self = this;
 +		this.isFileAction = isFileAction || false;
 +		this.storage = storage;
 +		this.$bookTemplate = bookTemplate;
 +		this.$bookList = this.$bookTemplate.find('.addressbooklist');
 +		this.$bookItemTemplate = bookItemTemplate;
 +		this.$importIntoSelect = this.$bookTemplate.find('#import_into');
 +		this.$importProgress = this.$bookTemplate.find('#import-status-progress');
 +		this.$importStatusText = this.$bookTemplate.find('#import-status-text');
 +		this.addressBooks = [];
 +
 +		if(this.isFileAction) {
 +			return;
 +		}
 +		this.$importFileInput = this.$bookTemplate.find('#import_upload_start');
 +		var $addInput = this.$bookTemplate.find('#add-address-book');
 +		$addInput.addnew({
 +			ok: function(event, name) {
 +				console.log('add-address-book ok', name);
 +				$addInput.addClass('loading');
 +				self.add(name, function(response) {
 +					console.log('response', response);
 +					if(response.error) {
 +						$(document).trigger('status.contacts.error', response);
 +					} else {
 +						$(this).addnew('close');
 +					}
 +					$addInput.removeClass('loading');
 +				});
 +			}
 +		});
 +
 +		$(document).bind('status.addressbook.removed', function(e, data) {
 +			var addressBook = data.addressbook;
 +			self.addressBooks.splice(self.addressBooks.indexOf(addressBook), 1);
 +			self.buildImportSelect();
 +		});
 +		$(document).bind('status.addressbook.added', function(e) {
 +			self.buildImportSelect();
 +		});
 +		this.$importIntoSelect.on('change', function() {
 +			// Disable file input if no address book selected
 +			var value = $(this).val();
 +			self.$importFileInput.prop('disabled', value === '-1' );
 +			if(value !== '-1') {
 +				var url = OC.Router.generate(
 +					'contacts_import_upload',
 +					{addressBookId:value, backend: $(this).find('option:selected').data('backend')}
 +				);
 +				self.$importFileInput.fileupload('option', 'url', url);
 +				//self.$importFileInput.attr('data-url', url);
 +			}
 +		});
 +		this.$importFileInput.fileupload({
 +			dataType: 'json',
 +			start: function(e, data) {
 +				self.$importProgress.progressbar({value:false});
 +				$('.tipsy').remove();
 +				$('.import-upload').hide();
 +				$('.import-status').show();
 +				self.$importProgress.fadeIn();
 +				self.$importStatusText.text(t('contacts', 'Uploading...'));
 +			},
 +			done: function (e, data) {
 +				self.$importStatusText.text(t('contacts', 'Importing...'));
 +				console.log('Upload done:', data);
 +				self.doImport(self.storage.formatResponse(data.result, data.jqXHR));
 +			},
 +			fail: function(e, data) {
 +				console.log('fail', data);
 +				OC.notify({message:data.errorThrown + ': ' + data.textStatus});
 +				$('.import-upload').show();
 +				$('.import-status').hide();
 +			}
 +		});
 +	};
 +
 +	AddressBookList.prototype.count = function() {
 +		return this.addressBooks.length;
 +	};
 +
 +	/**
 +	 * For importing from oC filesyatem
 +	 */
 +	AddressBookList.prototype.prepareImport = function(backend, addressBookId, path, fileName) {
 +		console.log('prepareImport', backend, addressBookId, path, fileName);
 +		this.$importProgress.progressbar({value:false});
 +		this.$importStatusText.text(t('contacts', 'Preparing...'));
 +		return this.storage.prepareImport(
 +				backend, addressBookId,
 +				{filename:fileName, path:path}
 +			);
 +	};
 +
 +	AddressBookList.prototype.doImport = function(response) {
 +		console.log('doImport');
 +		var defer = $.Deferred();
 +		var done = false;
 +		var interval = null, isChecking = false;
 +		var self = this;
 +		var closeImport = function() {
 +			defer.resolve();
 +			self.$importProgress.fadeOut();
 +			setTimeout(function() {
 +				$('.import-upload').show();
 +				$('.import-status').hide();
 +				self.importCount = null;
 +				if(self.$importProgress.hasClass('ui-progressbar')) {
 +					self.$importProgress.progressbar('destroy');
 +				}
 +			}, 5000);
 +		};
 +		if(!response.error) {
 +			this.importCount = response.data.count;
 +			this.$importProgress.progressbar('value', 0);
 +			this.$importProgress.progressbar('option', 'max', this.importCount);
 +			var data = response.data;
 +			var getStatus = function(backend, addressbookid, progresskey, interval, done) {
 +				if(done) {
 +					clearInterval(interval);
 +					closeImport();
 +					return;
 +				}
 +				if(isChecking) {
 +					return;
 +				}
 +				isChecking = true;
 +				$.when(
 +					self.storage.importStatus(
 +						backend, addressbookid,
 +						{progresskey:progresskey}
 +					))
 +				.then(function(response) {
 +					if(!response.error) {
 +						self.$importProgress.progressbar('value', Number(response.data.progress));
 +						self.$importStatusText.text(t('contacts', 'Imported {count} of {total} contacts',
 +													  {count:response.data.progress, total: self.importCount}));
 +					} else {
 +						console.warn('Error', response.message);
 +						self.$importStatusText.text(response.message);
 +					}
 +					isChecking = false;
 +				}).fail(function(response) {
 +					console.log(response.message);
 +					$(document).trigger('status.contacts.error', response);
 +					isChecking = false;
 +				});
 +			};
 +			$.when(
 +				self.storage.startImport(
 +					data.backend, data.addressBookId,
 +					{filename:data.filename, progresskey:data.progresskey}
 +  				))
 +			.then(function(response) {
 +				console.log('response', response);
 +				if(!response.error) {
 +					console.log('Import done');
 +					self.$importStatusText.text(t('contacts', 'Imported {imported} contacts. {failed} failed.',
 +													  {imported:response.data.imported, failed: response.data.failed}));
 +					var addressBook = self.find({id:response.data.addressBookId, backend: response.data.backend});
 +					$(document).trigger('status.addressbook.imported', {
 +						addressbook: addressBook
 +					});
 +					defer.resolve();
 +				} else {
 +					defer.reject(response);
 +					self.$importStatusText.text(response.message);
 +					$(document).trigger('status.contacts.error', response);
 +				}
 +				done = true;
 +			}).fail(function(response) {
 +				defer.reject(response);
 +				console.log(response.message);
 +				$(document).trigger('status.contacts.error', response);
 +				done = true;
 +			});
 +			interval = setInterval(function() {
 +				getStatus(data.backend, data.addressBookId, data.progresskey, interval, done);
 +			}, 1500);
 +		} else {
 +			defer.reject(response);
 +			done = true;
 +			self.$importStatusText.text(response.message);
 +			closeImport();
 +			$(document).trigger('status.contacts.error', response);
 +		}
 +		return defer;
 +	}
 +
 +	/**
 +	 * Rebuild the select to choose which address book to import into.
 +	 */
 +	AddressBookList.prototype.buildImportSelect = function() {
 +		console.log('buildImportSelect');
 +		var self = this;
 +		this.$importIntoSelect.find('option:not([value="-1"])').remove();
 +		var addressBooks = this.selectByPermission(OC.PERMISSION_UPDATE);
 +		$.each(addressBooks, function(idx, book) {
 +			var $opt = $('<option />');
 +			$opt.val(book.getId()).text(book.getDisplayName()).data('backend', book.getBackend());
 +			self.$importIntoSelect.append($opt);
 +			console.log('appending', $opt, 'to', self.$importIntoSelect);
 +		});
 +		if(!this.isFileAction) {
 +			if(addressBooks.length === 1) {
 +				this.$importIntoSelect.val(this.$importIntoSelect.find('option:not([value="-1"])').first().val()).hide().trigger('change');
 +				self.$importFileInput.prop('disabled', false);
 +			} else {
 +				this.$importIntoSelect.show();
 +				self.$importFileInput.prop('disabled', true);
 +			}
 +		}
 +	}
 +
 +	/**
 +	 * Create an AddressBook object, save it in internal list and append it's rendered result to the list
 +	 *
 +	 * @param object addressBook
 +	 * @param bool rebuild If true rebuild the address book select for import.
 +	 * @return AddressBook
 +	 */
 +	AddressBookList.prototype.insertAddressBook = function(addressBook) {
 +		var book = new AddressBook(this.storage, addressBook, this.$bookItemTemplate, this.isFileAction);
 +		if(!this.isFileAction) {
 +			var result = book.render();
 +			this.$bookList.append(result);
 +		}
 +		this.addressBooks.push(book);
 +		return book;
 +	};
 +
 +	/**
 +	 * Get an AddressBook
 +	 *
 +	 * @param object info An object with the string  properties 'id' and 'backend'
 +	 * @return AddressBook|null
 +	 */
 +	AddressBookList.prototype.find = function(info) {
 +		console.log('AddressBookList.find', info);
 +		var addressBook = null;
 +		$.each(this.addressBooks, function(idx, book) {
- 			if(book.getId() === info.id && book.getBackend() === info.backend) {
++			if(book.getId() === String(info.id) && book.getBackend() === info.backend) {
 +				addressBook = book;
 +				return false; // break loop
 +			}
 +		});
 +		return addressBook;
 +	}
 +
 +	/**
 +	 * Move a contacts from one address book to another..
 +	 *
 +	 * @param Contact The contact to move
 +	 * @param object from An object with properties 'id' and 'backend'.
 +	 * @param object target An object with properties 'id' and 'backend'.
 +	 */
 +	AddressBookList.prototype.moveContact = function(contact, from, target) {
 +		console.log('AddressBookList.moveContact, contact', contact, from, target);
 +		var self = this;
 +		$.when(this.storage.moveContact(from.backend, from.id, contact.getId(), {target:target}))
 +			.then(function(response) {
 +			if(!response.error) {
 +				console.log('Contact moved', response);
 +				$(document).trigger('status.contact.moved', {
 +					contact: contact,
 +					data: response.data
 +				});
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		});
 +	}
 +
 +	/**
 +	 * Get an array of address books with at least the required permission.
 +	 *
 +	 * @param int permission
 +	 * @param bool noClone If true the original objects will be returned and can be manipulated.
 +	 */
 +	AddressBookList.prototype.selectByPermission = function(permission, noClone) {
 +		var books = [];
 +		var self = this;
 +		$.each(this.addressBooks, function(idx, book) {
 +			if(book.getPermissions() & permission) {
 +				// Clone the address book not to mess with with original
 +				books.push(noClone ? book : $.extend(true, {}, book));
 +			}
 +		});
 +		return books;
 +	};
 +
 +	/**
 +	 * Add a new address book.
 +	 *
 +	 * @param string name
 +	 * @param function cb
 +	 * @return jQuery.Deferred
 +	 * @throws Error
 +	 */
 +	AddressBookList.prototype.add = function(name, cb) {
 +		console.log('AddressBookList.add', name, typeof cb);
 +		var defer = $.Deferred();
 +		// Check for wrong, duplicate or empty name
 +		if(typeof name !== 'string') {
 +			throw new TypeError('BadArgument: AddressBookList.add() only takes String arguments.');
 +		}
 +		if(name.trim() === '') {
 +			throw new Error('BadArgument: Cannot add an address book with an empty name.');
 +		}
 +		var error = '';
 +		$.each(this.addressBooks, function(idx, book) {
 +			if(book.getDisplayName() == name) {
 +				console.log('Dupe');
 +				error = t('contacts', 'An address book called {name} already exists', {name:name});
 +				if(typeof cb === 'function') {
 +					cb({error:true, message:error});
 +				}
 +				defer.reject({error:true, message:error});
 +				return false; // break loop
 +			}
 +		});
 +		if(error.length) {
 +			console.warn('Error:', error);
 +			return defer;
 +		}
 +		var self = this;
 +		$.when(this.storage.addAddressBook('local',
 +		{displayname: name, description: ''})).then(function(response) {
 +			if(response.error) {
 +				error = response.message;
 +				if(typeof cb === 'function') {
 +					cb({error:true, message:error});
 +				}
 +				defer.reject(response);
 +			} else {
 +				var book = self.insertAddressBook(response.data);
 +				$(document).trigger('status.addressbook.added');
 +				if(typeof cb === 'function') {
 +					cb({error:false, addressbook: book});
 +				}
 +				defer.resolve({error:false, addressbook: book});
 +			}
 +		})
 +		.fail(function(jqxhr, textStatus, error) {
 +			$(this).removeClass('loading');
 +			var err = textStatus + ', ' + error;
 +			console.log( "Request Failed: " + err);
 +			error = t('contacts', 'Failed adding address book: {error}', {error:err});
 +			if(typeof cb === 'function') {
 +				cb({error:true, message:error});
 +			}
 +			defer.reject({error:true, message:error});
 +		});
 +		return defer;
 +	};
 +
 +	/**
 +	* Load address books
 +	*/
 +	AddressBookList.prototype.loadAddressBooks = function() {
 +		var self = this;
 +		var defer = $.Deferred();
 +		$.when(this.storage.getAddressBooksForUser()).then(function(response) {
 +			if(!response.error) {
 +				var num = response.data.addressbooks.length;
 +				$.each(response.data.addressbooks, function(idx, addressBook) {
 +					var book = self.insertAddressBook(addressBook);
 +				});
 +				self.buildImportSelect();
 +				console.log('After buildImportSelect');
 +				if(!self.isFileAction) {
 +					if(typeof OC.Share !== 'undefined') {
 +						OC.Share.loadIcons('addressbook');
 +					} else {
 +						self.$bookList.find('a.action.share').css('display', 'none');
 +					}
 +				}
 +				console.log('Before resolve');
 +				defer.resolve(self.addressBooks);
 +				console.log('After resolve');
 +			} else {
 +				defer.reject(response);
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		})
 +		.fail(function(response) {
 +			console.warn( "Request Failed:", response);
 +			defer.reject({
 +				error: true,
 +				message: t('contacts', 'Failed loading address books: {error}', {error:response.message})
 +			});
 +		});
 +		return defer.promise();
 +	};
 +
 +	OC.Contacts.AddressBookList = AddressBookList;
 +
 +})(window, jQuery, OC);
diff --cc apps/contacts/js/app.js
index 5b34b0e,0000000..81443b2
mode 100644,000000..100644
--- a/apps/contacts/js/app.js
+++ b/apps/contacts/js/app.js
@@@ -1,1622 -1,0 +1,1644 @@@
 +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;
++				case 'adr':
++					address = data.url.filter(function(n){return n});
++					var newWindow = window.open('http://open.mapquest.com/?q='+address, '_blank');
++					newWindow.focus();
++					break;
 +			}
 +		});
 +
 +		// A contact id was in the request
 +		$(document).bind('request.loadcontact', function(e, result) {
 +			console.log('request.loadcontact', result);
 +			if(self.numcontacts) {
 +				self.openContact(result.id);
 +			} else {
 +				// Contacts are not loaded yet, try again.
 +				console.log('waiting for contacts to load');
 +				setTimeout(function() {
 +					$(document).trigger('request.loadcontact', {
 +						id: result.id
 +					});
 +				}, 1000);
 +			}
 +		});
 +
 +		$(document).bind('request.contact.move', function(e, data) {
 +			console.log('contact', data, 'request.contact.move');
 +			var from = self.addressBooks.find(data.from);
 +			var to = self.addressBooks.find(data.target);
 +			self.addressBooks.moveContact(data.contact, data.from, data.target);
 +		});
 +
 +		$(document).bind('request.contact.setasfavorite', function(e, data) {
 +			console.log('contact', data.id, 'request.contact.setasfavorite');
 +			self.groups.setAsFavorite(data.id, data.state);
 +		});
 +
 +		$(document).bind('request.contact.addtogroup', function(e, data) {
 +			self.groups.addTo(data.id, data.groupid, function(response) {
 +				console.log('contact', data.id, 'request.contact.addtogroup', response);
 +			});
 +		});
 +
 +		$(document).bind('request.contact.removefromgroup', function(e, data) {
 +			console.log('contact', data.id, 'request.contact.removefromgroup');
 +			self.groups.removeFrom(data.id, data.groupid);
 +		});
 +
 +		$(document).bind('request.contact.export', function(e, data) {
 +			console.log('request.contact.export', data);
 +			document.location.href = OC.Router.generate('contacts_contact_export', data);
 +		});
 +
 +		$(document).bind('request.contact.close', function(e, data) {
 +			var id = String(data.id);
 +			console.log('contact', data.id, 'request.contact.close');
 +			self.closeContact(id);
 +		});
 +
 +		$(document).bind('request.contact.open', function(e, data) {
 +			var id = String(data.id);
 +			console.log('contact', data.id, 'request.contact.open');
 +			self.openContact(id);
 +		});
 +
 +		$(document).bind('request.contact.delete', function(e, data) {
 +			var id = String(data.contactId);
 +			console.log('contact', data, 'request.contact.delete');
 +			self.closeContact(id);
 +			self.contacts.delayedDelete(data);
 +			self.$contactList.removeClass('dim');
 +			self.hideActions();
 +		});
 +
 +		$(document).bind('request.contact.merge', function(e, data) {
 +			console.log('contact','request.contact.merge', data);
 +			var merger = self.contacts.findById(data.merger);
 +			var mergees = [];
 +			if(!merger) {
 +				$(document).trigger('status.contacts.error', {
 +					message: t('contacts', 'Merge failed. Cannot find contact: {id}', {id:data.merger})
 +				});
 +				return;
 +			}
 +			$.each(data.mergees, function(idx, id) {
 +				var contact = self.contacts.findById(id);
 +				if(!contact) {
 +					console.warn('cannot find', id, 'by id');
 +				}
 +				mergees.push(contact);
 +			});
 +			if(!merger.merge(mergees)) {
 +				$(document).trigger('status.contacts.error', {
 +					message: t('contacts', 'Merge failed.')
 +				});
 +				return;
 +			}
 +			merger.saveAll(function(response) {
 +				if(response.error) {
 +					$(document).trigger('status.contacts.error', {
 +						message: t('contacts', 'Merge failed. Error saving contact.')
 +					});
 +					return;
 +				} else {
 +					if(data.deleteOther) {
 +						self.contacts.delayedDelete(mergees);
 +					}
 +					console.log('merger', merger);
 +					self.openContact(merger.getId());
 +				}
 +			});
 +		});
 +
 +		$(document).bind('request.select.contactphoto.fromlocal', function(e, metadata) {
 +			console.log('request.select.contactphoto.fromlocal', metadata);
 +			$('#contactphoto_fileupload').trigger('click', metadata);
 +		});
 +
 +		$(document).bind('request.select.contactphoto.fromcloud', function(e, metadata) {
 +			console.log('request.select.contactphoto.fromcloud', metadata);
 +			OC.dialogs.filepicker(t('contacts', 'Select photo'), function(path) {
 +				self.cloudPhotoSelected(metadata, path);
 +			}, false, 'image', true);
 +		});
 +
 +		$(document).bind('request.edit.contactphoto', function(e, metadata) {
 +			console.log('request.edit.contactphoto', metadata);
 +			self.editCurrentPhoto(metadata);
 +		});
 +
 +		$(document).bind('request.groups.reload', function(e, result) {
 +			console.log('request.groups.reload', result);
 +			self.groups.loadGroups(function() {
 +				self.groups.triggerLastGroup();
 +			});
 +		});
 +
 +		$(document).bind('status.group.groupremoved', function(e, result) {
 +			console.log('status.group.groupremoved', result);
 +			if(parseInt(result.groupid) === parseInt(self.currentgroup)) {
 +				self.contacts.showContacts([]);
 +				self.currentgroup = 'all';
 +			}
 +			$.each(result.contacts, function(idx, contactid) {
 +				var contact = self.contacts.findById(contactid);
 +
 +				contact.removeFromGroup(result.groupname);
 +			});
 +		});
 +
 +		$(document).bind('status.group.grouprenamed', function(e, result) {
 +			console.log('status.group.grouprenamed', result);
 +			$.each(result.contacts, function(idx, contactid) {
 +				var contact = self.contacts.findById(contactid);
 +				if(!contact) {
 +					console.warn('Couldn\'t find contact', contactid)
 +					return true; // continue
 +				}
 +				contact.renameGroup(result.from, result.to);
 +			});
 +		});
 +
 +		$(document).bind('status.group.contactremoved', function(e, result) {
 +			console.log('status.group.contactremoved', result, self.currentgroup, result.groupid);
 +			var contact = self.contacts.findById(result.contactid);
 +			if(contact) {
 +				if(contact.inGroup(result.groupname)) {
 +					contact.removeFromGroup(result.groupname);
 +				}
 +				if(parseInt(self.currentgroup) === parseInt(result.groupid)) {
 +					console.log('Hiding', contact.getId());
 +					contact.hide();
 +				}
 +			}
 +		});
 +
 +		$(document).bind('status.group.contactadded', function(e, result) {
 +			console.log('status.group.contactadded', result);
 +			var contact = self.contacts.findById(result.contactid);
 +			if(contact) {
 +				if(!contact.inGroup(result.groupname)) {
 +					contact.addToGroup(result.groupname);
 +				}
 +				if(parseInt(self.currentgroup) === parseInt(result.groupid)) {
 +					console.log('Showing', contact.getId());
 +					contact.show();
 +				}
++				if(self.currentgroup === 'uncategorized') {
++					console.log('Hiding', contact.getId());
++					contact.hide();
++				}
 +			}
 +		});
 +
 +		// 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;
 +			}
 +
 +			var doDownload = function(contacts) {
 +				// Only get backend, addressbookid and contactid
 +				contacts = $.map(contacts, function(c) {return c.metaData();});
 +				var targets = {};
 +				// Try to shorten request URI
 +				$.each(contacts, function(idx, contact) {
 +					if(!targets[contact.backend]) {
 +						targets[contact.backend] = {};
 +					}
 +					if(!targets[contact.backend][contact.addressBookId]) {
 +						targets[contact.backend][contact.addressBookId] = [];
 +					}
 +					targets[contact.backend][contact.addressBookId].push(contact.contactId);
 +				});
 +				var url = OC.Router.generate('contacts_export_selected', {t:targets});
 +				//console.log('export url', url);
 +				document.location.href = url;
 +			};
 +			var contacts = self.contacts.getSelectedContacts();
 +			console.log('download', contacts.length);
 +
 +			// The 300 is just based on my little testing with Apache2
 +			// Other web servers may fail before.
 +			if(contacts.length > 300) {
 +				OC.notify({
 +					message:t('contacts',"You have selected over 300 contacts.\nThis will most likely fail! Click here to try anyway."),
 +					timeout:5,
 +					clickhandler:function() {
 +						doDownload(contacts);
 +					}
 +				});
 +			} else {
 +				doDownload(contacts);
 +			}
 +		});
 +
 +		this.$contactListHeader.on('click keydown', '.merge', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			console.log('merge');
 +			self.mergeSelectedContacts();
 +		});
 +
 +		this.$contactListHeader.on('click keydown', '.favorite', function(event) {
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +
 +			var contacts = self.contacts.getSelectedContacts();
 +
 +			self.setAllChecked(false);
 +			self.$toggleAll.prop('checked', false);
 +			if(!self.currentid) {
 +				self.hideActions();
 +			}
 +
 +			$.each(contacts, function(idx, contact) {
 +				if(!self.groups.isFavorite(contact.getId())) {
 +					self.groups.setAsFavorite(contact.getId(), true, function(result) {
 +						if(result.status !== 'success') {
 +							$(document).trigger('status.contacts.error', {message:
 +								t('contacts',
 +									'Error setting {name} as favorite.',
 +									{name:contact.getDisplayName()})
 +							});
 +						}
 +					});
 +				}
 +			});
 +
 +			self.hideActions();
 +		});
 +
 +		this.$contactList.on('mouseenter', 'td.email', function(event) {
 +			if($.trim($(this).text()).length > 3) {
 +				$(this).find('.mailto').css('display', 'inline-block'); //.fadeIn(100);
 +			}
 +		});
 +		this.$contactList.on('mouseleave', 'td.email', function(event) {
 +			$(this).find('.mailto').fadeOut(100);
 +		});
 +
 +		$('body').on('touchmove', function(event) {
 +			event.preventDefault();
 +		});
 +		
 +		$(document).on('keyup', function(event) {
 +			if(!$(event.target).is('body') || event.isPropagationStopped()) {
 +				return;
 +			}
 +			var keyCode = Math.max(event.keyCode, event.which);
 +			// TODO: This should go in separate method
 +			console.log(event, keyCode + ' ' + event.target.nodeName);
 +			/**
 +			* To add:
 +			* Shift-a: add addressbook
 +			* u (85): hide/show leftcontent
 +			* f (70): add field
 +			*/
 +			switch(keyCode) {
 +				case 13: // Enter?
 +					console.log('Enter?');
 +					if(!self.currentid && self.currentlistid) {
 +						self.openContact(self.currentlistid);
 +					}
 +					break;
 +				case 27: // Esc
 +					if(self.$ninjahelp.is(':visible')) {
 +						self.$ninjahelp.hide();
 +					} else if(self.currentid) {
 +						self.closeContact(self.currentid);
 +					}
 +					break;
 +				case 46: // Delete
 +					if(event.shiftKey) {
 +						self.contacts.delayedDelete(self.currentid);
 +					}
 +					break;
 +				case 40: // down
 +				case 74: // j
 +					console.log('next');
 +					if(!self.currentid && self.currentlistid) {
 +						self.contacts.contacts[self.currentlistid].next();
 +					}
 +					break;
 +				case 65: // a
 +					if(event.shiftKey) {
 +						console.log('add group?');
 +						break;
 +					}
 +					self.addContact();
 +					break;
 +				case 38: // up
 +				case 75: // k
 +					console.log('previous');
 +					if(!self.currentid && self.currentlistid) {
 +						self.contacts.contacts[self.currentlistid].prev();
 +					}
 +					break;
 +				case 34: // PageDown
 +				case 78: // n
 +					console.log('page down');
 +					break;
 +				case 79: // o
 +					console.log('open contact?');
 +					break;
 +				case 33: // PageUp
 +				case 80: // p
 +					// prev addressbook
 +					//OC.contacts.contacts.previousAddressbook();
 +					break;
 +				case 82: // r
 +					console.log('refresh - what?');
 +					break;
 +				case 63: // ? German.
 +					if(event.shiftKey) {
 +						self.$ninjahelp.toggle('fast');
 +					}
 +					break;
 +				case 171: // ? Danish
 +				case 191: // ? Standard qwerty
 +					self.$ninjahelp.toggle('fast').position({my: "center",at: "center",of: "#content"});
 +					break;
 +			}
 +
 +		});
 +
 +		// find all with a title attribute and tipsy them
 +		$('.tooltipped.downwards:not(.onfocus)').tipsy({gravity: 'n'});
 +		$('.tooltipped.upwards:not(.onfocus)').tipsy({gravity: 's'});
 +		$('.tooltipped.rightwards:not(.onfocus)').tipsy({gravity: 'w'});
 +		$('.tooltipped.leftwards:not(.onfocus)').tipsy({gravity: 'e'});
 +		$('.tooltipped.downwards.onfocus').tipsy({trigger: 'focus', gravity: 'n'});
 +		$('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'});
 +	},
 +	mergeSelectedContacts: function() {
 +		var contacts = this.contacts.getSelectedContacts();
 +		var self = this;
 +		this.$rightContent.append('<div id="merge_contacts_dialog"></div>');
 +		if(!this.$mergeContactsTmpl) {
 +			this.$mergeContactsTmpl = $('#mergeContactsTemplate');
 +		}
 +		var $dlg = this.$mergeContactsTmpl.octemplate();
 +		var $liTmpl = $dlg.find('li').detach();
 +		var $mergeList = $dlg.find('.mergelist');
 +		$.each(contacts, function(idx, contact) {
 +			var $li = $liTmpl
 +				.octemplate({idx: idx, id: contact.getId(), displayname: contact.getDisplayName()});
 +			if(!contact.data.thumbnail) {
 +				$li.addClass('thumbnail');
 +			} else {
 +				$li.css('background-image', 'url(data:image/png;base64,' + contact.data.thumbnail + ')');
 +			}
 +			if(idx === 0) {
 +				$li.find('input:radio').prop('checked', true);
 +			}
 +			$mergeList.append($li);
 +		});
 +		$('#merge_contacts_dialog').html($dlg).ocdialog({
 +			modal: true,
 +			closeOnEscape: true,
 +			title:  t('contacts', 'Merge contacts'),
 +			height: 'auto', width: 'auto',
 +			buttons: [
 +				{
 +					text: t('contacts', 'Merge contacts'),
 +					click:function() {
 +						// Do the merging, use $(this) to get dialog
 +						var contactid = $(this).find('input:radio:checked').val();
 +						var others = [];
 +						var deleteOther = $(this).find('#delete_other').prop('checked');
 +						console.log('Selected contact', contactid, 'Delete others', deleteOther);
 +						$.each($(this).find('input:radio:not(:checked)'), function(idx, item) {
 +							others.push($(item).val());
 +						});
 +						console.log('others', others);
 +						$(document).trigger('request.contact.merge', {
 +							merger: contactid,
 +							mergees: others,
 +							deleteOther: deleteOther
 +						});
 +
 +						$(this).ocdialog('close');
 +					},
 +					defaultButton: true
 +				},
 +				{
 +					text: t('contacts', 'Cancel'),
 +					click:function(dlg) {
 +						$(this).ocdialog('close');
 +						return false;
 +					}
 +				}
 +			],
 +			close: function(event, ui) {
 +				$(this).ocdialog('destroy').remove();
 +				$('#add_group_dialog').remove();
 +			},
 +			open: function(event, ui) {
 +				$dlg.find('input').focus();
 +			}
 +		});
 +	},
 +	addGroup: function(cb) {
 +		var self = this;
 +		this.$rightContent.append('<div id="add_group_dialog"></div>');
 +		if(!this.$addGroupTmpl) {
 +			this.$addGroupTmpl = $('#addGroupTemplate');
 +		}
 +		this.$contactList.addClass('dim');
 +		var $dlg = this.$addGroupTmpl.octemplate();
 +		$('#add_group_dialog').html($dlg).ocdialog({
 +			modal: true,
 +			closeOnEscape: true,
 +			title:  t('contacts', 'Add group'),
 +			height: 'auto', width: 'auto',
 +			buttons: [
 +				{
 +					text: t('contacts', 'OK'),
 +					click:function() {
 +						var name = $(this).find('input').val();
 +						if(name.trim() === '') {
 +							return false;
 +						}
 +						self.groups.addGroup(
 +							{name:$dlg.find('input:text').val()},
 +							function(response) {
 +								if(typeof cb === 'function') {
 +									cb(response);
 +								} else {
 +									if(response.error) {
 +										$(document).trigger('status.contacts.error', response);
 +									}
 +								}
 +							});
 +						$(this).ocdialog('close');
 +					},
 +					defaultButton: true
 +				},
 +				{
 +					text: t('contacts', 'Cancel'),
 +					click:function(dlg) {
 +						$(this).ocdialog('close');
 +						return false;
 +					}
 +				}
 +			],
 +			close: function(event, ui) {
 +				$(this).ocdialog('destroy').remove();
 +				$('#add_group_dialog').remove();
 +				self.$contactList.removeClass('dim');
 +			},
 +			open: function(event, ui) {
 +				$dlg.find('input').focus();
 +			}
 +		});
 +	},
 +	setAllChecked: function(checked) {
 +		var selector = checked ? 'input:checkbox:visible:not(checked)' : 'input:checkbox:visible:checked';
 +		$.each(this.$contactList.find(selector), function() {
 +			$(this).prop('checked', checked);
 +		});
 +		this.lastSelectedContacts = [];
 +	},
 +	jumpToContact: function(id) {
 +		this.$rightContent.scrollTop(this.contacts.contactPos(id)-30);
 +	},
 +	closeContact: function(id) {
 +		$(window).unbind('hashchange', this.hashChange);
 +		if(this.currentid === 'new') {
 +			this.tmpcontact.slideUp().remove();
 +			this.$contactList.show();
 +		} else {
 +			var contact = this.contacts.findById(id);
 +			if(contact) {
- 				contact.close();
++				// Only show the list element if contact is in current group
++				var showListElement = contact.inGroup(this.groups.nameById(this.currentgroup))
++					|| this.currentgroup === 'all'
++					|| (this.currentgroup === 'uncategorized' && contact.groups().length === 0);
++				contact.close(showListElement);
 +			}
 +		}
 +		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();
++		if(this.currentid) {
++			this.closeContact(this.currentid);
++		}
 +		console.log('Contacts.openContact', id, typeof id);
++		this.currentid = id;
++		var contact = this.contacts.findById(this.currentid);
++		// If opened from search we can't be sure the contact is in currentgroup
++		if(!contact.inGroup(this.groups.nameById(this.currentgroup))
++			&& ['all', 'fav', 'uncategorized'].indexOf(this.currentgroup) === -1
++		) {
++			this.groups.selectGroup({id:'all'});
++		}
 +		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');
++		console.assert(typeof this.currentid === 'string', 'Current ID not string:' + this.currentid);
 +		// Properties that the contact doesn't know
 +		var groupprops = {
 +			favorite: this.groups.isFavorite(this.currentid),
 +			groups: this.groups.categories,
 +			currentgroup: {id:this.currentgroup, name:this.groups.nameById(this.currentgroup)}
 +		};
- 		var contact = this.contacts.findById(this.currentid);
 +		if(!contact) {
 +			console.warn('Error opening', this.currentid);
 +			$(document).trigger('status.contacts.error', {
 +				message: t('contacts', 'Could not find contact: {id}', {id:this.currentid})
 +			});
 +			this.currentid = null;
 +			return;
 +		}
 +		var $contactelem = contact.renderContact(groupprops);
 +		var $listElement = contact.getListItemElement();
 +		console.log('selected element', $listElement);
 +		window.location.hash = this.currentid;
 +		self.jumpToContact(self.currentid);
 +		$contactelem.insertAfter($listElement).show().find('.fullname').focus();
 +		$listElement.hide();
 +		setTimeout(function() {
 +			$(window).bind('hashchange', self.hashChange);
 +		}, 500);
 +	},
 +	update: function() {
 +		console.log('update');
 +	},
 +	uploadPhoto:function(filelist) {
 +		console.log('uploadPhoto');
 +		var self = this;
 +		if(!filelist) {
 +			$(document).trigger('status.contacts.error', {message:t('contacts','No files selected for upload.')});
 +			return;
 +		}
 +		var file = filelist[0];
 +		var form = $('#file_upload_form');
 +		var totalSize=0;
 +		if(file.size > $('#max_upload').val()) {
 +			$(document).trigger('status.contacts.error', {
 +				message:t(
 +					'contacts',
 +					'The file you are trying to upload exceed the maximum size for file uploads on this server.')
 +			});
 +			return;
 +		} else {
 +			form.submit();
 +		}
 +	},
 +	cloudPhotoSelected:function(metadata, path) {
 +		var self = this;
 +		console.log('cloudPhotoSelected', metadata);
 +		var url = OC.Router.generate(
 +			'contacts_cache_fs_photo',
 +			{backend: metadata.backend, addressBookId: metadata.addressBookId, contactId: metadata.contactId, path: path}
 +		);
 +		var jqXHR = $.getJSON(url, function(response) {
 +			console.log('response', response);
 +			response = self.storage.formatResponse(response, jqXHR);
 +			if(!response.error) {
 +				self.editPhoto(metadata, response.data.tmp);
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		});
 +	},
 +	editCurrentPhoto:function(metadata) {
 +		var self = this;
 +		var url = OC.Router.generate(
 +			'contacts_cache_contact_photo',
 +			{backend: metadata.backend, addressBookId: metadata.addressBookId, contactId: metadata.contactId}
 +		);
 +		console.log('url', url);
 +		var jqXHR = $.getJSON(url, function(response) {
 +			response = self.storage.formatResponse(response, jqXHR)
 +			if(!response.error) {
 +				self.editPhoto(metadata, response.data.tmp);
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +			}
 +		});
 +	},
 +	editPhoto:function(metadata, tmpkey) {
 +		var $x, $y, $w, $h;
 +		console.log('editPhoto', metadata, tmpkey);
 +		$('.tipsy').remove();
 +		// Simple event handler, called from onChange and onSelect
 +		// event handlers, as per the Jcrop invocation below
 +		var showCoords = function(c) {
 +			$('#x').val(c.x);
 +			$('#y').val(c.y);
 +			$('#w').val(c.w);
 +			$('#h').val(c.h);
 +		};
 +
 +		var clearCoords = function() {
 +			$('#coords input').val('');
 +		};
 +
 +		var self = this;
 +		if(!this.$cropBoxTmpl) {
 +			this.$cropBoxTmpl = $('#cropBoxTemplate');
 +		}
 +		var $container = $('<div />').appendTo($('body'));
 +		var url = OC.Router.generate(
 +			'contacts_crop_contact_photo',
 +			{backend: metadata.backend, addressBookId: metadata.addressBookId, contactId: metadata.contactId, key: tmpkey}
 +		);
 +		var $dlg = this.$cropBoxTmpl.octemplate(
 +			{
 +				action: url,
 +				backend: metadata.backend,
 +				addressbookid: metadata.addressbookid,
 +				contactid: metadata.contactid,
 +				tmpkey: tmpkey
 +			}).prependTo($container);
 +
 +		$.when(this.storage.getTempContactPhoto(
 +			metadata.backend,
 +			metadata.addressBookId,
 +			metadata.contactId,
 +			tmpkey
 +		))
 +		.then(function(image) {
 +			var x = 5, y = 5, w = h = Math.min(image.width, image.height);
 +			//$dlg.css({'min-width': w, 'min-height': h});
 +			console.log(x,y,w,h);
 +			$(image).attr('id', 'cropbox').prependTo($dlg).show()
 +			.Jcrop({
 +				onChange:	showCoords,
 +				onSelect:	showCoords,
 +				onRelease:	clearCoords,
 +				//maxSize:	[w, h],
 +				bgColor:	'black',
 +				bgOpacity:	.4,
 +				boxWidth:	400,
 +				boxHeight:	400,
 +				setSelect:	[ x, y, w-10, h-10 ],
 +				aspectRatio: 1
 +			});
 +			$container.ocdialog({
 +				modal: true,
 +				closeOnEscape: true,
 +				title:  t('contacts', 'Edit profile picture'),
 +				height: image.height+100, width: image.width+20,
 +				buttons: [
 +					{
 +						text: t('contacts', 'Crop photo'),
 +						click:function() {
 +							self.savePhoto($(this), function() {
 +								$container.ocdialog('close');
 +							});
 +						},
 +						defaultButton: true
 +					}
 +				],
 +				close: function(event, ui) {
 +					$(this).ocdialog('destroy').remove();
 +					$container.remove();
 +				},
 +				open: function(event, ui) {
 +					showCoords({x:x,y:y,w:w-10,h:h-10});
 +				}
 +			});
 +		})
 +		.fail(function() {
 +			console.warn('Error getting temporary photo');
 +		});
 +	},
 +	savePhoto:function($dlg, cb) {
 +		var $form = $dlg.find('#cropform');
 +		var $target = $dlg.find('#crop_target');
 +		console.log('target', $target);
 +		$target.on('load', function() {
 +			console.log('submitted');
 +			var response = $.parseJSON($target.contents().text());
 +			console.log('response', response);
 +			if(response && response.status == 'success') {
 +				$(document).trigger('status.contact.photoupdated', {
 +					id: response.data.id,
 +					thumbnail: response.data.thumbnail
 +				});
 +			} else {
 +				if(!response) {
 +					$(document).trigger('status.contacts.error', {
 +						message:t('contacts', 'Network or server error. Please inform administrator.')
 +					});
 +				} else {
 +					$(document).trigger('status.contacts.error', response);
 +				}
 +			}
 +			cb();
 +		});
 +		$form.submit();
 +	},
 +};
 +
 +$(document).ready(function() {
 +
 +	OC.Router.registerLoadedCallback(function() {
 +		$.getScript(OC.Router.generate('contacts_jsconfig'))
 +		.done(function() {
 +			OC.Contacts.init();
 +		})
 +		.fail(function(jqxhr, settings, exception) {
 +			console.log('Failed loading settings.', jqxhr, settings, exception);
 +		});
 +	});
 +
 +});
diff --cc apps/contacts/js/config.php
index 5d7da36,0000000..c08d558
mode 100644,000000..100644
--- a/apps/contacts/js/config.php
+++ b/apps/contacts/js/config.php
@@@ -1,38 -1,0 +1,49 @@@
 +<?php
 +/**
 + * ownCloud - Addressbook
 + *
 + * @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/>.
 + *
 + */
 +
 +OCP\JSON::setContentTypeHeader('text/javascript');
 +OCP\JSON::checkLoggedIn();
 +OCP\JSON::checkAppEnabled('contacts');
 +
 +$user = OCP\User::getUser();
 +
- echo 'var contacts_groups_sortorder=[' . OCP\Config::getUserValue($user, 'contacts', 'groupsort', '') . '],';
++$groupsort = OCP\Config::getUserValue($user, 'contacts', 'groupsort', '');
++$groupsort = explode(',', $groupsort);
++$tmp = array();
++foreach($groupsort as $group) {
++	if(is_int($group)) {
++		$tmp[] = $group;
++	}
++}
++
++$groupsort = implode(',', $tmp);
++
++echo 'var contacts_groups_sortorder=[' . $groupsort . '],';
 +echo 'contacts_lastgroup=\'' . OCP\Config::getUserValue($user, 'contacts', 'lastgroup', 'all') . '\',';
 +echo 'contacts_sortby=\'' . OCP\Config::getUserValue($user, 'contacts', 'sortby', 'fn') . '\',';
 +echo 'contacts_properties_indexed = '
 +	. (OCP\Config::getUserValue($user, 'contacts', 'contacts_properties_indexed', 'no') === 'no'
 +	? 'false' : 'true') . ',';
 +echo 'contacts_categories_indexed = '
 +	. (OCP\Config::getUserValue($user, 'contacts', 'contacts_categories_indexed', 'no') === 'no'
 +	? 'false' : 'true') . ',';
 +echo 'lang=\'' . OCP\Config::getUserValue($user, 'core', 'lang', 'en') . '\';';
diff --cc apps/contacts/js/contacts.js
index e4b12c1,0000000..5116f39
mode 100644,000000..100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@@ -1,2502 -1,0 +1,2544 @@@
 +OC.Contacts = OC.Contacts || {};
 +
 +
 +(function(window, $, OC) {
 +	'use strict';
 +	/**
 +	* An item which binds the appropriate html and event handlers
 +	* @param parent the parent ContactList
 +	* @param id The integer contact id.
 +	* @param metadata An metadata object containing and 'owner' string variable, a 'backend' string variable and an integer 'permissions' variable.
 +	* @param data the data used to populate the contact
 +	* @param listtemplate the jquery object used to render the contact list item
 +	* @param fulltemplate the jquery object used to render the entire contact
 +	* @param detailtemplates A map of jquery objects used to render the contact parts e.g. EMAIL, TEL etc.
 +	*/
 +	var Contact = function(parent, id, metadata, data, listtemplate, dragtemplate, fulltemplate, detailtemplates) {
 +		//console.log('contact:', id, metadata, data); //parent, id, data, listtemplate, fulltemplate);
 +		this.parent = parent,
 +			this.storage = parent.storage,
 +			this.id = id,
 +			this.metadata = metadata,
 +			this.data = data,
 +			this.$dragTemplate = dragtemplate,
 +			this.$listTemplate = listtemplate,
 +			this.$fullTemplate = fulltemplate;
 +			this.detailTemplates = detailtemplates;
 +			this.displayNames = {};
 +			this.sortOrder = contacts_sortby || 'fn';
 +		this.undoQueue = [];
 +		this.multi_properties = ['EMAIL', 'TEL', 'IMPP', 'ADR', 'URL'];
 +	};
 +
 +	Contact.prototype.metaData = function() {
 +		return {
 +			contactId: this.id,
 +			addressBookId: this.metadata.parent,
 +			backend: this.metadata.backend
 +		}
 +	};
 +
 +	Contact.prototype.getDisplayName = function() {
 +		return this.displayNames[this.sortOrder];
 +	};
 +
 +	Contact.prototype.setDisplayMethod = function(method) {
 +		if(this.sortOrder === method) {
 +			return;
 +		}
 +		this.sortOrder = method;
 +		// ~30% faster than jQuery.
 +		try {
 +			this.$listelem.get(0).firstElementChild.getElementsByClassName('nametext')[0].innerHTML = escapeHTML(this.displayNames[method]);
 +		} catch(e) {
 +			var $elem = this.$listelem.find('.nametext').text(escapeHTML(this.displayNames[method]));
 +			$elem.text(escapeHTML(this.displayNames[method]));
 +		}
 +	};
 +
 +	Contact.prototype.getId = function() {
 +		return this.id;
 +	};
 +
 +	Contact.prototype.getOwner = function() {
 +		return this.metadata.owner;
 +	};
 +
 +	Contact.prototype.setOwner = function(owner) {
 +		this.metadata.owner = owner;
 +	};
 +
 +	Contact.prototype.getPermissions = function() {
 +		return this.metadata.permissions;
 +	};
 +
 +	Contact.prototype.hasPermission = function(permission) {
 +		//console.log('hasPermission', this.getPermissions(), permission, this.getPermissions() & permission);
 +		return (this.getPermissions() & permission);
 +	};
 +
 +	Contact.prototype.getParent = function() {
 +		return this.metadata.parent;
 +	};
 +
 +	Contact.prototype.setParent = function(parent) {
 +		this.metadata.parent = parent;
 +	};
 +
 +	Contact.prototype.getBackend = function() {
 +		return this.metadata.backend;
 +	};
 +
++	Contact.prototype.hasPhoto = function() {
++		return (this.data && this.data.photo) || false;
++	};
++
 +	Contact.prototype.setBackend = function(backend) {
 +		this.metadata.backend = backend;
 +	};
 +
 +	Contact.prototype.reload = function(data) {
 +		console.log('Contact.reload', data);
 +		this.id = data.metadata.id;
 +		this.metadata = data.metadata;
 +		this.data = data.data;
 +		/*if(this.$fullelem) {
 +			this.$fullelem.replaceWith(this.renderContact(this.groupprops));
 +		}*/
 +	};
 +
 +	Contact.prototype.merge = function(mergees) {
 +		console.log('Contact.merge, mergees', mergees);
 +		if(!mergees instanceof Array && !mergees instanceof Contact) {
 +			throw new TypeError('BadArgument: Contact.merge() only takes Contacts');
 +		} else {
 +			if(mergees instanceof Contact) {
 +				mergees = [mergees];
 +			}
 +		}
 +
 +		// For multi_properties
 +		var addIfNotExists = function(name, newproperty) {
 +			// If the property isn't set at all just add it and return.
 +			if(!self.data[name]) {
 +				self.data[name] = [newproperty];
 +				return;
 +			}
 +			var found = false;
 +			$.each(self.data[name], function(idx, property) {
 +				if(name === 'ADR') {
 +					// Do a simple string comparison
 +					if(property.value.join(';').toLowerCase() === newproperty.value.join(';').toLowerCase()) {
 +						found = true;
 +						return false; // break loop
 +					}
 +				} else {
 +					if(property.value.toLowerCase() === newproperty.value.toLowerCase()) {
 +						found = true;
 +						return false; // break loop
 +					}
 +				}
 +			});
 +			if(found) {
 +				return;
 +			}
 +			// Not found, so adding it.
 +			self.data[name].push(newproperty);
 +		}
 +
 +		var self = this;
 +		$.each(mergees, function(idx, mergee) {
 +			console.log('Contact.merge, mergee', mergee);
 +			if(!mergee instanceof Contact) {
 +				throw new TypeError('BadArgument: Contact.merge() only takes Contacts');
 +			}
 +			if(mergee === self) {
 +				throw new Error('BadArgument: Why should I merge with myself?');
 +			}
 +			$.each(mergee.data, function(name, properties) {
 +				if(self.multi_properties.indexOf(name) === -1) {
 +					if(self.data[name] && self.data[name].length > 0) {
 +						// If the property exists don't touch it.
 +						return true; // continue
 +					} else {
 +						// Otherwise add it.
 +						self.data[name] = properties;
 +					}
 +				} else {
 +					$.each(properties, function(idx, property) {
 +						addIfNotExists(name, property);
 +					});
 +				}
 +			});
 +			console.log('Merged', self.data);
 +		});
 +		return true;
 +	};
 +
 +	Contact.prototype.showActions = function(act) {
 +		this.$footer.children().hide();
 +		if(act && act.length > 0) {
 +			this.$footer.children('.'+act.join(',.')).show();
 +		}
 +	};
 +
 +	Contact.prototype.setAsSaving = function(obj, state) {
 +		if(!obj) {
 +			return;
 +		}
 +		$(obj).prop('disabled', state);
 +		$(obj).toggleClass('loading', state);
 +		/*if(state) {
 +			$(obj).addClass('loading');
 +		} else {
 +			$(obj).removeClass('loading');
 +		}*/
 +	};
 +
 +	Contact.prototype.handleURL = function(obj) {
 +		if(!obj) {
 +			return;
 +		}
 +		var $container = this.propertyContainerFor(obj);
 +		$(document).trigger('request.openurl', {
 +			type: $container.data('element'),
 +			url: this.valueFor(obj)
 +		});
 +	};
 +
 +	/**
 +	 * Update group name internally. No saving as this is done by groups backend.
 +	 */
 +	Contact.prototype.renameGroup = function(from, to) {
 +		if(!this.data.CATEGORIES.length) {
 +			console.warn(this.getDisplayName(), 'had no groups!?!');
 +			return;
 +		}
 +		var groups = this.data.CATEGORIES[0].value;
 +		var self = this;
 +		$.each(groups, function(idx, group) {
 +			if(from.toLowerCase() === group.toLowerCase()) {
 +				console.log('Updating group name for', self.getDisplayName(), group, to);
 +				self.data.CATEGORIES[0].value[idx] = to;
 +				return false; // break
 +			}
 +		});
 +		$(document).trigger('status.contact.updated', {
 +			property: 'CATEGORIES',
 +			contact: this
 +		});
 +	};
 +
 +	Contact.prototype.pushToUndo = function(params) {
 +		// Check if the same property has been changed before
 +		// and update it's checksum if so.
 +		if(typeof params.oldchecksum !== 'undefined') {
 +			$.each(this.undoQueue, function(idx, item) {
 +				if(item.checksum === params.oldchecksum) {
 +					item.checksum = params.newchecksum;
 +					if(params.action === 'delete') {
 +						item.action = 'delete';
 +					}
 +					return false; // Break loop
 +				}
 +			});
 +		}
 +		this.undoQueue.push({
 +			action:params.action, 
 +			name: params.name,
 +			checksum: params.newchecksum,
 +			newvalue: params.newvalue,
 +			oldvalue: params.oldvalue
 +		});
 +		//console.log('undoQueue', this.undoQueue);
 +	}
 +	
 +	Contact.prototype.addProperty = function($option, name) {
 +		console.log('Contact.addProperty', name)
 +		var $elem;
 +		switch(name) {
 +			case 'NICKNAME':
 +			case 'TITLE':
 +			case 'ORG':
 +			case 'BDAY':
 +			case 'NOTE':
 +				$elem = this.$fullelem.find('[data-element="' + name.toLowerCase() + '"]');
 +				$elem.addClass('new').show();
 +				$elem.find('input:not(:checkbox),textarea').first().focus();
 +				$option.prop('disabled', true);
 +				break;
 +			case 'TEL':
 +			case 'URL':
 +			case 'EMAIL':
 +				var $elem = this.renderStandardProperty(name.toLowerCase());
 +				var $list = this.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				$list.append($elem);
 +				$elem.find('input.value').addClass('new');
 +				$elem.find('input:not(:checkbox)').first().focus();
 +				break;
 +			case 'ADR':
 +				var $elem = this.renderAddressProperty();
 +				var $list = this.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				$list.append($elem);
 +				$elem.find('.display').trigger('click');
 +				$elem.find('input.value').addClass('new');
 +				$elem.find('input:not(:checkbox)').first().focus();
 +				break;
 +			case 'IMPP':
 +				var $elem = this.renderIMProperty();
 +				var $list = this.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				$list.append($elem);
 +				$elem.find('input.value').addClass('new');
 +				$elem.find('input:not(:checkbox)').first().focus();
 +				break;
 +		}
 +
 +		if($elem) {
 +			// If there's already a property of this type enable setting as preferred.
 +			if(this.multi_properties.indexOf(name) !== -1 && this.data[name] && this.data[name].length > 0) {
 +				var selector = 'li[data-element="' + name.toLowerCase() + '"]';
 +				$.each(this.$fullelem.find(selector), function(idx, elem) {
 +					$(elem).find('input.parameter[value="PREF"]').show();
 +				});
 +			} else if(this.multi_properties.indexOf(name) !== -1) {
 +				$elem.find('input.parameter[value="PREF"]').hide();
 +			}
 +			$elem.find('select.type[name="parameters[TYPE][]"]')
 +				.combobox({
 +					singleclick: true,
 +					classes: ['propertytype', 'float', 'label'],
 +				});
 +		}
 +	};
 +
 +	Contact.prototype.deleteProperty = function(params) {
 +		var obj = params.obj;
 +		if(!this.enabled) {
 +			return;
 +		}
 +		var element = this.propertyTypeFor(obj);
 +		var $container = this.propertyContainerFor(obj);
 +		console.log('Contact.deleteProperty, element', element, $container);
 +		var params = {
 +			name: element,
 +			value: null
 +		};
 +		if(this.multi_properties.indexOf(element) !== -1) {
 +			params['checksum'] = this.checksumFor(obj);
 +			if(params['checksum'] === 'new' && $.trim(this.valueFor(obj)) === '') {
 +				// If there's only one property of this type enable setting as preferred.
 +				if(this.data[element].length === 1) {
 +					var selector = 'li[data-element="' + element.toLowerCase() + '"]';
 +					this.$fullelem.find(selector).find('input.parameter[value="PREF"]').hide();
 +				}
 +				$container.remove();
 +				return;
 +			}
 +		}
 +		this.setAsSaving(obj, true);
 +		var self = this;
 +		$.when(this.storage.patchContact(this.metadata.backend, this.metadata.parent, this.id, params))
 +			.then(function(response) {
 +			if(!response.error) {
 +				if(self.multi_properties.indexOf(element) !== -1) {
 +					// First find out if an existing element by looking for checksum
 +					var checksum = self.checksumFor(obj);
 +					self.pushToUndo({
 +						action:'delete', 
 +						name: element,
 +						oldchecksum: self.checksumFor(obj),
 +						newvalue: self.valueFor(obj)
 +					});
 +					if(checksum) {
 +						for(var i in self.data[element]) {
 +							if(self.data[element][i].checksum === checksum) {
 +								// Found it
 +								self.data[element].splice(self.data[element].indexOf(self.data[element][i]), 1);
 +								break;
 +							}
 +						}
 +					}
 +					// If there's only one property of this type enable setting as preferred.
 +					if(self.data[element].length === 1) {
 +						var selector = 'li[data-element="' + element.toLowerCase() + '"]';
 +						self.$fullelem.find(selector).find('input.parameter[value="PREF"]').hide();
 +					}
 +					$container.remove();
 +				} else {
 +					self.pushToUndo({
 +						action:'delete', 
 +						name: element,
 +						newvalue: $container.find('input.value').val()
 +					});
 +					self.setAsSaving(obj, false);
 +					if(element === 'PHOTO') {
- 						self.data.PHOTO[0].value = false;
++						self.data.photo = false;
 +						self.data.thumbnail = null;
 +					} else {
 +						self.$fullelem.find('[data-element="' + element.toLowerCase() + '"]').hide();
 +						$container.find('input.value').val('');
 +						self.$addMenu.find('option[value="' + element.toUpperCase() + '"]').prop('disabled', false);
 +					}
 +				}
 +				$(document).trigger('status.contact.updated', {
 +					property: element,
 +					contact: self
 +				});
 +				return true;
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +				self.setAsSaving(obj, false);
 +				return false;
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log(response.message);
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +;
 +	};
 +
 +	/**
 +	 * @brief Save all properties. Used for merging contacts.
 +	 * If this is a new contact it will first be saved to the datastore and a
 +	 * new datastructure will be added to the object.
 +	 */
 +	Contact.prototype.saveAll = function(cb) {
 +		console.log('Contact.saveAll');
 +		if(!this.id) {
 +			var self = this;
 +			this.add({isnew:true}, function(response) {
 +				if(response.error) {
 +					console.warn('No response object');
 +					return false;
 +				}
 +				self.saveAll();
 +			});
 +			return;
 +		}
 +		var self = this;
 +		this.setAsSaving(this.$fullelem, true);
 +		var data = JSON.stringify(this.data);
 +		//console.log('stringified', data);
 +		$.when(this.storage.saveAllProperties(this.metadata.backend, this.metadata.parent, this.id, {data:this.data}))
 +			.then(function(response) {
 +			if(!response.error) {
 +				self.data = response.data.data;
 +				self.metadata = response.data.metadata;
 +				if(typeof cb === 'function') {
 +					cb({error:false});
 +				}
 +			} else {
 +				$(document).trigger('status.contacts.error', {
 +					message: response.message
 +				});
 +				if(typeof cb === 'function') {
 +					cb({error:true, message:response.message});
 +				}
 +			}
 +			self.setAsSaving(self.$fullelem, false);
 +		});
 +	}
 +
 +	/**
 +	 * @brief Act on change of a property.
 +	 * If this is a new contact it will first be saved to the datastore and a
 +	 * new datastructure will be added to the object.
 +	 * If the obj argument is not provided 'name' and 'value' MUST be provided
 +	 * and this is only allowed for single elements like N, FN, CATEGORIES.
 +	 * @param obj. The form form field that has changed.
 +	 * @param name. The optional name of the element.
 +	 * @param value. The optional value.
 +	 */
 +	Contact.prototype.saveProperty = function(params) {
 +		console.log('Contact.saveProperty', params);
 +		if(!this.id) {
 +			var self = this;
 +			this.add({isnew:true}, function(response) {
 +				if(!response || response.status === 'error') {
 +					console.warn('No response object');
 +					return false;
 +				}
 +				self.saveProperty(params);
 +				self.showActions(['close', 'add', 'export', 'delete']);
 +			});
 +			return;
 +		}
 +		var obj = null;
 +		var element = null;
 +		var args = [];
 +		if(params.obj) {
 +			obj = params.obj;
 +			args = this.argumentsFor(obj);
 +			//args['parameters'] = $.param(this.parametersFor(obj));
 +			element = this.propertyTypeFor(obj);
 +		} else {
 +			args = params;
 +			element = params.name;
 +			var value = utils.isArray(params.value)
 +				? $.param(params.value)
 +				: encodeURIComponent(params.value);
 +		}
 +		if(!args) {
 +			console.log('No arguments. returning');
 +			return false;
 +		}
 +		console.log('args', args);
 +		var self = this;
 +		this.setAsSaving(obj, true);
 +		$.when(this.storage.patchContact(this.metadata.backend, this.metadata.parent, this.id, args))
 +			.then(function(response) {
 +			if(!response.error) {
 +				if(!self.data[element]) {
 +					self.data[element] = [];
 +				}
 +				if(self.multi_properties.indexOf(element) !== -1) {
 +					// First find out if an existing element by looking for checksum
 +					var checksum = self.checksumFor(obj);
 +					var value = self.valueFor(obj);
 +					var parameters = self.parametersFor(obj);
 +					if(parameters['TYPE'] && parameters['TYPE'].indexOf('PREF') !== -1) {
 +						parameters['PREF'] = 1;
 +						parameters['TYPE'].splice(parameters['TYPE'].indexOf('PREF', 1));
 +					}
 +					if(checksum && checksum !== 'new') {
 +						self.pushToUndo({
 +							action:'save', 
 +							name: element,
 +							newchecksum: response.data.checksum,
 +							oldchecksum: checksum,
 +							newvalue: value,
 +							oldvalue: obj.defaultValue
 +						});
 +						$.each(self.data[element], function(i, el) {
 +							if(el.checksum === checksum) {
 +								self.data[element][i] = {
 +									name: element,
 +									value: value,
 +									parameters: parameters,
 +									checksum: response.data.checksum
 +								};
 +								return false;
 +							}
 +						});
 +					} else {
 +						$(obj).removeClass('new');
 +						self.pushToUndo({
 +							action:'add', 
 +							name: element,
 +							newchecksum: response.data.checksum,
 +							newvalue: value,
 +						});
 +						self.data[element].push({
 +							name: element,
 +							value: value,
 +							parameters: parameters,
 +							checksum: response.data.checksum,
 +						});
 +					}
 +					self.propertyContainerFor(obj).data('checksum', response.data.checksum);
 +				} else {
 +					// Save value and parameters internally
 +					var value = obj ? self.valueFor(obj) : params.value;
 +					self.pushToUndo({
 +						action: ((obj && obj.defaultValue) || self.data[element].length) ? 'save' : 'add', // FIXME
 +						name: element,
 +						newvalue: value,
 +					});
 +					switch(element) {
 +						case 'CATEGORIES':
 +							// We deal with this in addToGroup()
 +							break;
 +						case 'BDAY':
 +							// reverse order again.
 +							value = $.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate(datepickerFormatDate, value));
 +							self.data[element][0] = {
 +								name: element,
 +								value: value,
 +								parameters: self.parametersFor(obj),
 +								checksum: response.data.checksum
 +							};
 +							break;
 +						case 'FN':
 +							if(!self.data.FN || !self.data.FN.length) {
 +								self.data.FN = [{name:'FN', value:'', parameters:[]}];
 +							}
 +							self.data.FN[0]['value'] = value;
 +							var nempty = true;
 +							if(!self.data.N) {
 +								// TODO: Maybe add a method for constructing new elements?
 +								self.data.N = [{name:'N',value:['', '', '', '', ''],parameters:[]}];
 +							}
 +							$.each(self.data.N[0]['value'], function(idx, val) {
 +								if(val) {
 +									nempty = false;
 +									return false;
 +								}
 +							});
 +							if(nempty) {
 +								self.data.N[0]['value'] = ['', '', '', '', ''];
 +								var nvalue = value.split(' ');
 +								// Very basic western style parsing. I'm not gonna implement
 +								// https://github.com/android/platform_packages_providers_contactsprovider/blob/master/src/com/android/providers/contacts/NameSplitter.java ;)
 +								self.data.N[0]['value'][0] = nvalue.length > 2 && nvalue.slice(nvalue.length-1).toString() || nvalue[1] || '';
 +								self.data.N[0]['value'][1] = nvalue[0] || '';
 +								self.data.N[0]['value'][2] = nvalue.length > 2 && nvalue.slice(1, nvalue.length-1).join(' ') || '';
 +								setTimeout(function() {
 +									self.saveProperty({name:'N', value:self.data.N[0].value.join(';')});
- 									setTimeout(function() {
- 										self.$fullelem.find('.fullname').next('.action.edit').trigger('click');
- 										OC.notify({message:t('contacts', 'Is this correct?')});
- 									}, 1000);
- 								}
- 								, 500);
++								}, 500);
 +							}
 +							break;
 +						case 'N':
 +							if(!utils.isArray(value)) {
 +								value = value.split(';');
 +								// Then it is auto-generated from FN.
 +								var $nelems = self.$fullelem.find('.n.editor input');
 +								$.each(value, function(idx, val) {
 +									self.$fullelem.find('#n_' + idx).val(val).get(0).defaultValue = val;
 +								});
 +							}
 +							var $fullname = self.$fullelem.find('.fullname'), fullname = '';
 +							var update_fn = false;
 +							if(!self.data.FN) {
 +								self.data.FN = [{name:'FN', value:'', parameters:[]}];
 +							}
 +							/* If FN is empty fill it with the values from N.
 +							 * As N consists of several fields which each trigger a change/save
 +							 * also check if the contents of FN equals parts of N and fill
 +							 * out the rest.
 +							 */
 +							if(self.data.FN[0]['value'] === '') {
 +								self.data.FN[0]['value'] = value[1] + ' ' + value[0];
 +								$fullname.val(self.data.FN[0]['value']);
 +								update_fn = true;
 +							} else if($fullname.val() == value[1] + ' ') {
 +								self.data.FN[0]['value'] = value[1] + ' ' + value[0];
 +								$fullname.val(self.data.FN[0]['value']);
 +								update_fn = true;
 +							} else if($fullname.val() == ' ' + value[0]) {
 +								self.data.FN[0]['value'] = value[1] + ' ' + value[0];
 +								$fullname.val(self.data.FN[0]['value']);
 +								update_fn = true;
 +							}
 +							if(update_fn) {
 +								setTimeout(function() {
 +									self.saveProperty({name:'FN', value:self.data.FN[0]['value']});
 +								}, 1000);
 +							}
 +						case 'NICKNAME':
 +						case 'ORG':
 +							// Auto-fill FN if empty
 +							if(!self.data.FN) {
 +								self.data.FN = [{name:'FN', value:value, parameters:[]}];
 +								self.$fullelem.find('.fullname').val(value).trigger('change');
 +							}
 +						case 'TITLE':
 +						case 'NOTE':
 +							self.data[element][0] = {
 +								name: element,
 +								value: value,
 +								parameters: self.parametersFor(obj),
 +								checksum: response.data.checksum
 +							};
 +							break;
 +						default:
 +							break;
 +					}
 +				}
 +				self.setAsSaving(obj, false);
 +				$(document).trigger('status.contact.updated', {
 +					property: element,
 +					contact: self
 +				});
 +				return true;
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +				self.setAsSaving(obj, false);
 +				return false;
 +			}
 +		});
 +	};
 +
 +	/**
 +	 * Hide contact list element.
 +	 */
 +	Contact.prototype.hide = function() {
 +		this.getListItemElement().hide();
 +	};
 +
 +	/**
 +	 * Show contact list element.
 +	 */
 +	Contact.prototype.show = function() {
 +		this.getListItemElement().show();
 +	};
 +
 +	/**
 +	 * Remove any open contact from the DOM.
 +	 */
- 	Contact.prototype.close = function() {
++	Contact.prototype.close = function(showListElement) {
 +		$(document).unbind('status.contact.photoupdated');
 +		console.log('Contact.close', this);
 +		if(this.$fullelem) {
- 			this.$fullelem.hide().remove();
- 			this.getListItemElement().show();
- 			this.$fullelem = null;
++			this.$fullelem.remove();
++			if(showListElement) {
++				this.getListItemElement().show();
++			}
++			delete this.$fullelem;
 +			return true;
 +		} else {
 +			return false;
 +		}
 +	};
 +
 +	/**
 +	 * Remove any open contact from the DOM and detach it's list
 +	 * element from the DOM.
 +	 * @returns The contact object.
 +	 */
 +	Contact.prototype.detach = function() {
 +		if(this.$fullelem) {
 +			this.$fullelem.remove();
 +		}
 +		if(this.$listelem) {
 +			this.$listelem.detach();
 +			return this;
 +		}
 +	};
 +
 +	/**
 +	 * Set a contacts list element as (un)checked
 +	 * @returns The contact object.
 +	 */
 +	Contact.prototype.setChecked = function(checked) {
 +		if(this.$listelem) {
 +			this.$listelem.find('input:checkbox').prop('checked', checked);
 +			return this;
 +		}
 +	};
 +
 +	/**
 +	 * Set a contact to en/disabled depending on its permissions.
 +	 * @param boolean enabled
 +	 */
 +	Contact.prototype.setEnabled = function(enabled) {
 +		if(enabled) {
 +			this.$fullelem.find('#addproperty').show();
 +		} else {
 +			this.$fullelem.find('#addproperty,.action.delete,.action.edit').hide();
 +		}
 +		this.enabled = enabled;
 +		this.$fullelem.find('.value,.action,.parameter').each(function () {
 +			$(this).prop('disabled', !enabled);
 +		});
 +		$(document).trigger('status.contact.enabled', enabled);
 +	};
 +
 +	/**
 +	 * Add a contact to data store.
 +	 * @params params. An object which can contain the optional properties:
 +	 *		aid: The id of the addressbook to add the contact to. Per default it will be added to the first.
 +	 *		fn: The formatted name of the contact.
 +	 * @param cb Optional callback function which
 +	 * @returns The callback gets an object as argument with a variable 'status' of either 'success'
 +	 * or 'error'. On success the 'data' property of that object contains the contact id as 'id', the
 +	 * addressbook id as 'aid' and the contact data structure as 'details'.
 +	 */
 +	Contact.prototype.add = function(params, cb) {
 +		var self = this;
 +		$.when(this.storage.addContact(this.metadata.backend, this.metadata.parent))
 +			.then(function(response) {
 +			if(!response.error) {
 +				self.id = String(response.data.metadata.id);
 +				self.metadata = response.data.metadata;
 +				self.data = response.data.data;
 +				self.$groupSelect.multiselect('enable');
 +				// Add contact to current group
 +				if(self.groupprops
 +					&& ['all', 'fav', 'uncategorized'].indexOf(self.groupprops.currentgroup.id) === -1
 +				) {
 +					if(!self.data.CATEGORIES) {
 +						self.addToGroup(self.groupprops.currentgroup.name);
 +						$(document).trigger('request.contact.addtogroup', {
 +							id: self.id,
 +							groupid: self.groupprops.currentgroup.id
 +						});
 +						self.$groupSelect.find('option[value="' + self.groupprops.currentgroup.id + '"]')
 +							.attr('selected', 'selected');
 +						self.$groupSelect.multiselect('refresh');
 +					}
 +				}
 +				$(document).trigger('status.contact.added', {
 +					id: self.id,
 +					contact: self
 +				});
 +			} else {
 +				$(document).trigger('status.contacts.error', response);
 +				return false;
 +			}
 +			if(typeof cb == 'function') {
 +				cb(response);
 +			}
 +		});
 +	};
 +	/**
 +	 * Delete contact from data store and remove it from the DOM
 +	 * @param cb Optional callback function which
 +	 * @returns An object with a variable 'status' of either success
 +	 *	or 'error'
 +	 */
 +	Contact.prototype.destroy = function(cb) {
 +		var self = this;
 +		$.when(this.storage.deleteContact(
 +			this.metadata.backend,
 +			this.metadata.parent,
 +			this.id)
 +		).then(function(response) {
 +		//$.post(OC.filePath('contacts', 'ajax', 'contact/delete.php'),
 +		//	   {id: this.id}, function(response) {
 +			if(!response.error) {
 +				if(self.$listelem) {
 +					self.$listelem.remove();
 +				}
 +				if(self.$fullelem) {
 +					self.$fullelem.remove();
 +				}
 +			}
 +			if(typeof cb == 'function') {
 +				if(response.error) {
 +					cb(response);
 +				} else {
 +					cb({id:self.id});
 +				}
 +			}
 +		});
 +	};
 +
 +	Contact.prototype.argumentsFor = function(obj) {
 +		console.log('Contact.argumentsFor', $(obj));
 +		var args = {};
 +		var ptype = this.propertyTypeFor(obj);
 +		args['name'] = ptype;
 +
 +		if(this.multi_properties.indexOf(ptype) !== -1) {
 +			args['checksum'] = this.checksumFor(obj);
 +		}
 +
 +		if($(obj).hasClass('propertycontainer')) {
 +			if($(obj).is('select[data-element="categories"]')) {
 +				args['value'] = [];
 +				$.each($(obj).find(':selected'), function(idx, e) {
 +					args['value'].push($(e).text());
 +				});
 +			} else {
 +				args['value'] = $(obj).val();
 +			}
 +		} else {
 +			var $elements = this.propertyContainerFor(obj)
 +				.find('input.value,select.value,textarea.value');
 +			if($elements.length > 1) {
 +				args['value'] = [];
 +				$.each($elements, function(idx, e) {
 +					args['value'][parseInt($(e).attr('name').substr(6,1))] = $(e).val();
 +					//args['value'].push($(e).val());
 +				});
 +			} else {
 +				var value = $elements.val();
 +				switch(args['name']) {
 +					case 'BDAY':
 +						try {
 +							args['value'] = $.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate(datepickerFormatDate, value));
 +						} catch(e) {
 +							$(document).trigger(
 +								'status.contacts.error',
 +								{message:t('contacts', 'Error parsing date: {date}', {date:value})}
 +							);
 +							return false;
 +						}
 +						break;
 +					default:
 +						args['value'] = value;
 +						break;
 +				}
 +			}
 +		}
 +		args['parameters'] = this.parametersFor(obj);
 +		console.log('Contact.argumentsFor', args);
 +		return args;
 +	};
 +
 +	Contact.prototype.queryStringFor = function(obj) {
 +		var q = 'id=' + this.id;
 +		var ptype = this.propertyTypeFor(obj);
 +		q += '&name=' + ptype;
 +
 +		if(this.multi_properties.indexOf(ptype) !== -1) {
 +			q += '&checksum=' + this.checksumFor(obj);
 +		}
 +
 +		if($(obj).hasClass('propertycontainer')) {
 +			if($(obj).is('select[data-element="categories"]')) {
 +				$.each($(obj).find(':selected'), function(idx, e) {
 +					q += '&value=' + encodeURIComponent($(e).text());
 +				});
 +			} else {
 +				q += '&value=' + encodeURIComponent($(obj).val());
 +			}
 +		} else {
 +			var $elements = this.propertyContainerFor(obj)
 +				.find('input.value,select.value,textarea.value,.parameter');
 +			if($elements.length > 1) {
 +				q += '&' + $elements.serialize();
 +			} else {
 +				q += '&value=' + encodeURIComponent($elements.val());
 +			}
 +		}
 +		return q;
 +	};
 +
 +	Contact.prototype.propertyContainerFor = function(obj) {
 +		return $(obj).hasClass('propertycontainer')
 +			? $(obj)
 +			: $(obj).parents('.propertycontainer').first();
 +	};
 +
 +	Contact.prototype.checksumFor = function(obj) {
 +		return this.propertyContainerFor(obj).data('checksum');
 +	};
 +
 +	Contact.prototype.valueFor = function(obj) {
 +		var $container = this.propertyContainerFor(obj);
 +		console.assert($container.length > 0, 'Couldn\'t find container for ' + $(obj));
 +		return $container.is('input.value')
 +			? $container.val()
 +			: (function() {
 +				var $elem = $container.find('textarea.value,input.value:not(:checkbox)');
 +				console.assert($elem.length > 0, 'Couldn\'t find value for ' + $container.data('element'));
 +				if($elem.length === 1) {
 +					return $elem.val();
 +				} else if($elem.length > 1) {
 +					var retval = [];
 +					$.each($elem, function(idx, e) {
 +						retval[parseInt($(e).attr('name').substr(6,1))] = $(e).val();
 +					});
 +					return retval;
 +				}
 +			})();
 +	};
 +
 +	Contact.prototype.parametersFor = function(obj, asText) {
 +		var parameters = {};
 +		$.each(this.propertyContainerFor(obj)
 +			.find('select.parameter,input:checkbox:checked.parameter'),
 +			   function(i, elem) {
 +			var $elem = $(elem);
 +			var paramname = $elem.data('parameter');
 +			if(!parameters[paramname]) {
 +				parameters[paramname] = [];
 +			}
 +			if($elem.is(':checkbox')) {
 +				if(asText) {
 +					parameters[paramname].push($elem.attr('title'));
 +				} else {
 +					parameters[paramname].push($elem.attr('value'));
 +				}
 +			} else if($elem.is('select')) {
 +				$.each($elem.find(':selected'), function(idx, e) {
 +					if(asText) {
 +						parameters[paramname].push($(e).text());
 +					} else {
 +						parameters[paramname].push($(e).val());
 +					}
 +				});
 +			}
 +		});
 +		return parameters;
 +	};
 +
 +	Contact.prototype.propertyTypeFor = function(obj) {
 +		var ptype = this.propertyContainerFor(obj).data('element');
 +		return ptype ? ptype.toUpperCase() : null;
 +	};
 +
 +	/**
 +	 * Render an element item to be shown during drag.
 +	 * @return A jquery object
 +	 */
 +	Contact.prototype.renderDragItem = function() {
 +		if(typeof this.$dragelem === 'undefined') {
 +			this.$dragelem = this.$dragTemplate.octemplate({
 +				id: this.id,
 +				name: this.getPreferredValue('FN', '')
 +			});
 +		}
 +		this.setThumbnail(this.$dragelem);
 +		return this.$dragelem;
 +	}
 +
 +	/**
 +	 * Render the list item
 +	 * @return A jquery object to be inserted in the DOM
 +	 */
 +	Contact.prototype.renderListItem = function(isnew) {
 +		this.displayNames.fn = this.getPreferredValue('FN')
 +			|| this.getPreferredValue('ORG', []).pop()
 +			|| this.getPreferredValue('EMAIL')
 +			|| this.getPreferredValue('TEL');
 +
 +		this.displayNames.fl = this.getPreferredValue('N', [this.displayNames.fn])
 +			.slice(0, 2).reverse().join(' ');
 +
 +		this.displayNames.lf = this.getPreferredValue('N', [this.displayNames.fn])
- 			.slice(0, 2).join(', ');
++			.slice(0, 2).join(', ').trim();
++		// Fix misplaced comma if either first or last name is missing
++		if(this.displayNames.lf[0] === ',') {
++			this.displayNames.lf = this.displayNames.lf.substr(1);
++		}
++		if(this.displayNames.lf[this.displayNames.lf.length-1] === ',') {
++			this.displayNames.lf = this.displayNames.lf.substr(0, this.displayNames.lf.length-1);
++		}
 +
 +		this.$listelem = this.$listTemplate.octemplate({
 +			id: this.id,
 +			parent: this.metadata.parent,
 +			backend: this.metadata.backend,
 +			name: this.getDisplayName(),
 +			email: this.getPreferredValue('EMAIL', ''),
 +			tel: this.getPreferredValue('TEL', ''),
 +			adr: this.getPreferredValue('ADR', []).clean('').join(', '),
 +			categories: this.getPreferredValue('CATEGORIES', [])
 +				.clean('').join(' / ')
 +		});
 +		if(this.getOwner() !== OC.currentUser
 +				&& !(this.metadata.permissions & OC.PERMISSION_UPDATE
 +				|| this.metadata.permissions & OC.PERMISSION_DELETE)) {
 +			this.$listelem.find('input:checkbox').prop('disabled', true).css('opacity', '0');
 +		} else {
 +			var self = this;
 +			this.$listelem.find('td.name')
 +				.draggable({
 +					cursor: 'move',
 +					distance: 10,
 +					revert: 'invalid',
 +					helper: function (e,ui) {
 +						return self.renderDragItem().appendTo('body');
 +					},
 +					opacity: 1,
 +					scope: 'contacts'
 +				});
 +		}
 +		if(isnew) {
 +			this.setThumbnail();
 +		}
 +		this.$listelem.data('obj', this);
 +		return this.$listelem;
 +	};
 +
 +	/**
 +	 * Render the full contact
 +	 * @return A jquery object to be inserted in the DOM
 +	 */
 +	Contact.prototype.renderContact = function(groupprops) {
 +		var self = this;
 +		this.groupprops = groupprops;
 +		
 +		var buildGroupSelect = function(availableGroups) {
 +			//this.$groupSelect.find('option').remove();
 +			$.each(availableGroups, function(idx, group) {
 +				var $option = $('<option value="' + group.id + '">' + group.name + '</option>');
 +				if(self.inGroup(group.name)) {
 +					$option.attr('selected', 'selected');
 +				}
 +				self.$groupSelect.append($option);
 +			});
 +			self.$groupSelect.multiselect({
 +				header: false,
 +				selectedList: 3,
 +				noneSelectedText: self.$groupSelect.attr('title'),
 +				selectedText: t('contacts', '# groups')
 +			});
 +			self.$groupSelect.bind('multiselectclick', function(event, ui) {
 +				var action = ui.checked ? 'addtogroup' : 'removefromgroup';
 +				console.assert(typeof self.id === 'string', 'ID is not a string')
 +				$(document).trigger('request.contact.' + action, {
 +					id: self.id,
 +					groupid: parseInt(ui.value)
 +				});
 +				if(ui.checked) {
 +					self.addToGroup(ui.text);
 +				} else {
 +					self.removeFromGroup(ui.text);
 +				}
 +			});
 +			if(!self.id || !self.hasPermission(OC.PERMISSION_UPDATE)) {
 +				self.$groupSelect.multiselect('disable');
 +			}
 +		};
 +		
 +		var buildAddressBookSelect = function(availableAddressBooks) {
 +			console.log('address books', availableAddressBooks.length, availableAddressBooks);
 +			$.each(availableAddressBooks, function(idx, addressBook) {
 +				//console.log('addressBook', idx, addressBook);
 +				var $option = $('<option />')
 +					.val(addressBook.getId())
 +					.text(addressBook.getDisplayName() + '(' + addressBook.getBackend() + ')')
 +					.data('backend', addressBook.getBackend())
 +					.data('owner', addressBook.getOwner());
 +				if(self.metadata.parent === addressBook.getId()
 +					&& self.metadata.backend === addressBook.getBackend()) {
 +					$option.attr('selected', 'selected');
 +				}
 +				self.$addressBookSelect.append($option);
 +			});
 +			self.$addressBookSelect.multiselect({
 +				header: false,
 +				multiple: false,
 +				selectedList: 3,
 +				noneSelectedText: self.$addressBookSelect.attr('title')
 +			});
 +			self.$addressBookSelect.on('multiselectclick', function(event, ui) {
 +				console.log('AddressBook select', ui);
 +				self.$addressBookSelect.val(ui.value);
 +				var opt = self.$addressBookSelect.find(':selected');
 +				if(self.id) {
 +					console.log('AddressBook', opt);
 +					$(document).trigger('request.contact.move', {
 +						contact: self,
 +						from: {id:self.getParent(), backend:self.getBackend()},
 +						target: {id:opt.val(), backend:opt.data('backend')}
 +					});
 +				} else {
 +					self.setBackend(opt.data('backend'));
 +					self.setParent(opt.val());
 +					self.setOwner(opt.data('owner'));
 +				}
 +			});
 +			if(self.id) {
 +				//self.$addressBookSelect.multiselect('disable');
 +			}
 +		};
 +
 +		var values;
 +		if(this.data) {
 +			var n = this.getPreferredValue('N', ['', '', '', '', '']),
 +				bday = this.getPreferredValue('BDAY', '');
 +			if(bday.length >= 10) {
 +				try {
 +					bday = $.datepicker.parseDate('yy-mm-dd', bday.substring(0, 10));
 +					bday = $.datepicker.formatDate(datepickerFormatDate, bday);
 +				} catch (e) {
- 					var message = t('contacts', 'Error parsing birthday {bday}: {error}', {bday:bday, error: e});
- 					console.warn(message);
++					var message = t('contacts', 'Error parsing birthday {bday}', {bday:bday});
++					console.warn('Error parsing birthday', bday, e);
 +					bday = '';
 +					$(document).trigger('status.contacts.error', {
 +						status: 'error',
 +						message: message
 +					});
 +				}
 +			}
 +			values = {
 +				id: this.id,
 +				favorite:groupprops.favorite ? 'active' : '',
 +				name: this.getPreferredValue('FN', ''),
 +				n0: n[0]||'', n1: n[1]||'', n2: n[2]||'', n3: n[3]||'', n4: n[4]||'',
 +				nickname: this.getPreferredValue('NICKNAME', ''),
 +				title: this.getPreferredValue('TITLE', ''),
 +				org: this.getPreferredValue('ORG', []).clean('').join(', '), // TODO Add parts if more than one.
 +				bday: bday,
 +				note: this.getPreferredValue('NOTE', '')
 +			}
 +		} else {
 +			values = {id:'', favorite:'', name:'', nickname:'', title:'', org:'', bday:'', note:'', n0:'', n1:'', n2:'', n3:'', n4:''};
 +		}
 +		this.$fullelem = this.$fullTemplate.octemplate(values).data('contactobject', this);
 +
 +		this.$footer = this.$fullelem.find('footer');
 +
 +		this.$fullelem.find('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'});
 +		this.$fullelem.on('submit', function() {
 +			return false;
 +		});
 +		
 +		if(this.getOwner() === OC.currentUser) {
 +			this.$groupSelect = this.$fullelem.find('#contactgroups');
 +			buildGroupSelect(groupprops.groups);
 +		}
 +		
 +		var writeableAddressBooks = this.parent.addressBooks.selectByPermission(OC.PERMISSION_CREATE);
 +		if(writeableAddressBooks.length > 1 && this.hasPermission(OC.PERMISSION_DELETE)) {
 +			this.$addressBookSelect = this.$fullelem.find('#contactaddressbooks');
 +			buildAddressBookSelect(writeableAddressBooks);
 +		}
 +
 +		this.$addMenu = this.$fullelem.find('#addproperty');
 +		this.$addMenu.on('change', function(event) {
 +			//console.log('add', $(this).val());
 +			var $opt = $(this).find('option:selected');
 +			self.addProperty($opt, $(this).val());
 +			$(this).val('');
 +		});
 +		var $fullname = this.$fullelem.find('.fullname');
 +		this.$fullelem.find('.singleproperties').on('mouseenter', function() {
 +			$fullname.next('.edit').css('opacity', '1');
 +		}).on('mouseleave', function() {
 +			$fullname.next('.edit').css('opacity', '0');
 +		});
 +		$fullname.next('.edit').on('click keydown', function(event) {
 +			//console.log('edit name', event);
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			$(this).css('opacity', '0');
 +			var $editor = $(this).next('.n.editor').first();
 +			var bodyListener = function(e) {
 +				if($editor.find($(e.target)).length == 0) {
 +					$editor.toggle('blind');
 +					$('body').unbind('click', bodyListener);
 +				}
 +			};
 +			$editor.toggle('blind', function() {
 +				$('body').bind('click', bodyListener);
 +			});
 +		});
 +
 +		this.$fullelem.on('click keydown', '.delete', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			self.deleteProperty({obj:event.target});
 +		});
 +
 +		this.$fullelem.on('click keydown', '.globe,.mail', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			self.handleURL(event.target);
 +		});
 +
 +		this.$footer.on('click keydown', 'button', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			if($(this).is('.close') || $(this).is('.cancel')) {
 +				$(document).trigger('request.contact.close', {
 +					id: self.id
 +				});
 +			} else if($(this).is('.export')) {
 +				$(document).trigger('request.contact.export', self.metaData());
 +			} else if($(this).is('.delete')) {
 +				$(document).trigger('request.contact.delete', self.metaData());
 +			}
 +			return false;
 +		});
 +		this.$fullelem.on('keypress', '.value,.parameter', function(event) {
 +			if(event.keyCode === 13 && $(this).is('input')) {
 +				$(this).trigger('change');
 +				// Prevent a second save on blur.
 +				this.previousValue = this.defaultValue || '';
 +				this.defaultValue = this.value;
 +				return false;
 +			} else if(event.keyCode === 27) {
 +				$(document).trigger('request.contact.close', {
 +					id: self.id
 +				});
 +			}
 +		});
 +
 +		this.$fullelem.on('change', '.value,.parameter', function(event) {
 +			if($(this).hasClass('value') && this.value === this.defaultValue) {
 +				return;
 +			}
 +			//console.log('change', this.defaultValue, this.value);
 +			this.defaultValue = this.value;
 +			self.saveProperty({obj:event.target});
 +		});
 +
 +		var $bdayinput = this.$fullelem.find('[data-element="bday"]').find('input');
 +		$bdayinput.datepicker({
 +				dateFormat : datepickerFormatDate
 +		});
 +		$bdayinput.attr('placeholder', $.datepicker.formatDate(datepickerFormatDate, new Date()));
 +
 +		this.$fullelem.find('.favorite').on('click', function () {
 +			var state = $(this).hasClass('active');
 +			if(!self.data) {
 +				return;
 +			}
 +			if(state) {
 +				$(this).switchClass('active', 'inactive');
 +			} else {
 +				$(this).switchClass('inactive', 'active');
 +			}
 +			$(document).trigger('request.contact.setasfavorite', {
 +				id: self.id,
 +				state: !state
 +			});
 +		});
 +		this.loadPhoto();
 +		if(!this.data) {
 +			// A new contact
 +			this.setEnabled(true);
 +			this.showActions(['cancel']);
++			// Show some default properties
++			$.each(['email', 'tel'], function(idx, name) {
++				var $list = self.$fullelem.find('ul.' + name);
++				$list.removeClass('hidden');
++				var $property = self.renderStandardProperty(name);
++				$list.append($property);
++			});
++			var $list = self.$fullelem.find('ul.adr');
++			$list.removeClass('hidden');
++			var $property = self.renderAddressProperty(name);
++			$list.append($property);
++
++			// Hide some of the values
++			$.each(['bday', 'nickname', 'title'], function(idx, name) {
++				self.$fullelem.find('[data-element="' + name + '"]').hide();
++			});
++
 +			return this.$fullelem;
 +		}
 +		// Loop thru all single occurrence values. If not set hide the
 +		// element, if set disable the add menu entry.
 +		$.each(values, function(name, value) {
 +			if(typeof value === 'undefined') {
 +				return true; //continue
 +			}
 +			value = value.toString();
 +			if(self.multi_properties.indexOf(value.toUpperCase()) === -1) {
 +				if(!value.length) {
 +					self.$fullelem.find('[data-element="' + name + '"]').hide();
 +				} else {
 +					self.$addMenu.find('option[value="' + name.toUpperCase() + '"]').prop('disabled', true);
 +				}
 +			}
 +		});
 +		$.each(this.multi_properties, function(idx, name) {
 +			if(self.data[name]) {
 +				var $list = self.$fullelem.find('ul.' + name.toLowerCase());
 +				$list.show();
 +				for(var p in self.data[name]) {
 +					if(typeof self.data[name][p] === 'object') {
 +						var property = self.data[name][p];
 +						//console.log(name, p, property);
 +						var $property = null;
 +						switch(name) {
 +							case 'TEL':
 +							case 'URL':
 +							case 'EMAIL':
 +								$property = self.renderStandardProperty(name.toLowerCase(), property);
 +								if(self.data[name].length === 1) {
 +									$property.find('input:checkbox[value="PREF"]').hide();
 +								}
 +								break;
 +							case 'ADR':
 +								$property = self.renderAddressProperty(idx, property);
 +								break;
 +							case 'IMPP':
 +								$property = self.renderIMProperty(property);
 +								if(self.data[name].length === 1) {
 +									$property.find('input:checkbox[value="PREF"]').hide();
 +								}
 +								break;
 +						}
 +						if(!$property) {
 +							continue;
 +						}
 +						//console.log('$property', $property);
 +						var meta = [];
 +						if(property.label) {
 +							if(!property.parameters['TYPE']) {
 +								property.parameters['TYPE'] = [];
 +							}
 +							property.parameters['TYPE'].push(property.label);
 +							meta.push(property.label);
 +						}
 +						for(var param in property.parameters) {
 +							//console.log('param', param);
 +							if(param.toUpperCase() == 'PREF') {
 +								var $cb = $property.find('input[type="checkbox"]');
 +								$cb.attr('checked', 'checked');
 +								meta.push($cb.attr('title'));
 +							}
 +							else if(param.toUpperCase() == 'TYPE') {
 +								for(var etype in property.parameters[param]) {
 +									var found = false;
 +									var et = property.parameters[param][etype];
 +									if(typeof et !== 'string') {
 +										continue;
 +									}
 +									$property.find('select.type option').each(function() {
 +										if($(this).val().toUpperCase() === et.toUpperCase()) {
 +											$(this).attr('selected', 'selected');
 +											meta.push($(this).text());
 +											found = true;
 +										}
 +									});
 +									if(!found) {
 +										$property.find('select.type option:last-child').after('<option value="'+et+'" selected="selected">'+et+'</option>');
 +									}
 +								}
 +							}
 +							else if(param.toUpperCase() == 'X-SERVICE-TYPE') {
 +								//console.log('setting', $property.find('select.impp'), 'to', property.parameters[param].toLowerCase());
 +								$property.find('select.impp').val(property.parameters[param].toLowerCase());
 +							}
 +						}
 +						var $meta = $property.find('.meta');
 +						if($meta.length) {
 +							$meta.html(meta.join('/'));
 +						}
 +						if(self.metadata.owner === OC.currentUser
 +								|| self.metadata.permissions & OC.PERMISSION_UPDATE
 +								|| self.metadata.permissions & OC.PERMISSION_DELETE) {
 +							$property.find('select.type[name="parameters[TYPE][]"]')
 +								.combobox({
 +									singleclick: true,
 +									classes: ['propertytype', 'float', 'label']
 +								});
 +						}
 +						$list.append($property);
 +					}
 +				}
 +			}
 +		});
 +		if(this.metadata.owner !== OC.currentUser
 +			&& !(this.hasPermission(OC.PERMISSION_UPDATE)
 +				|| this.hasPermission(OC.PERMISSION_DELETE))) {
 +			this.setEnabled(false);
 +			this.showActions(['close', 'export']);
 +		} else {
 +			this.setEnabled(true);
 +			this.showActions(['close', 'add', 'export', 'delete']);
 +		}
 +		return this.$fullelem;
 +	};
 +
 +	Contact.prototype.isEditable = function() {
 +		return ((this.metadata.owner === OC.currentUser)
 +			|| (this.metadata.permissions & OC.PERMISSION_UPDATE
 +				|| this.metadata.permissions & OC.PERMISSION_DELETE));
 +	};
 +
 +	/**
 +	 * Render a simple property. Used for EMAIL and TEL.
 +	 * @return A jquery object to be injected in the DOM
 +	 */
 +	Contact.prototype.renderStandardProperty = function(name, property) {
 +		if(!this.detailTemplates[name]) {
 +			console.error('No template for', name);
 +			return;
 +		}
 +		var values = property
 +			? { value: property.value, checksum: property.checksum }
 +			: { value: '', checksum: 'new' };
 +		return this.detailTemplates[name].octemplate(values);
 +	};
 +
 +	/**
 +	 * Render an ADR (address) property.
 +	 * @return A jquery object to be injected in the DOM
 +	 */
 +	Contact.prototype.renderAddressProperty = function(idx, property) {
 +		if(!this.detailTemplates['adr']) {
 +			console.warn('No template for adr', this.detailTemplates);
 +			return;
 +		}
 +		if(typeof idx === 'undefined') {
 +			if(this.data && this.data.ADR && this.data.ADR.length > 0) {
 +				idx = this.data.ADR.length - 1;
 +			} else {
 +				idx = 0;
 +			}
 +		}
 +		var values = property ? {
 +				value: property.value.clean('').join(', '),
 +				checksum: property.checksum,
 +				adr0: property.value[0] || '',
 +				adr1: property.value[1] || '',
 +				adr2: property.value[2] || '',
 +				adr3: property.value[3] || '',
 +				adr4: property.value[4] || '',
 +				adr5: property.value[5] || '',
 +				adr6: property.value[6] || '',
 +				idx: idx
 +			}
 +			: {value:'', checksum:'new', adr0:'', adr1:'', adr2:'', adr3:'', adr4:'', adr5:'', adr6:'', idx: idx};
 +		var $elem = this.detailTemplates['adr'].octemplate(values);
 +		var self = this;
 +		$elem.find('.tooltipped.downwards:not(.onfocus)').tipsy({gravity: 'n'});
 +		$elem.find('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'});
 +		$elem.find('.display').on('click', function() {
 +			$(this).next('.listactions').hide();
 +			var $editor = $(this).siblings('.adr.editor').first();
 +			var $viewer = $(this);
 +			var bodyListener = function(e) {
 +				if($editor.find($(e.target)).length == 0) {
 +					$editor.toggle('blind');
 +					$viewer.slideDown(400, function() {
 +						var input = $editor.find('input').first();
 +						var val = self.valueFor(input);
 +						var params = self.parametersFor(input, true);
 +						$(this).find('.meta').html(params['TYPE'].join('/'));
 +						$(this).find('.adr').html(self.valueFor($editor.find('input').first()).clean('').join(', '));
 +						$(this).next('.listactions').css('display', 'inline-block');
 +						$('body').unbind('click', bodyListener);
 +					});
 +				}
 +			};
 +			$viewer.slideUp();
 +			$editor.toggle('blind', function() {
 +				$('body').bind('click', bodyListener);
 +			});
 +		});
 +		$elem.find('.value.city')
 +			.autocomplete({
 +				source: function( request, response ) {
 +					$.ajax({
 +						url: "http://ws.geonames.org/searchJSON",
 +						dataType: "jsonp",
 +						data: {
 +							featureClass: "P",
 +							style: "full",
 +							maxRows: 12,
 +							lang: $elem.data('lang'),
 +							name_startsWith: request.term
 +						},
 +						success: function( data ) {
 +							response( $.map( data.geonames, function( item ) {
 +								return {
 +									label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
 +									value: item.name,
 +									country: item.countryName
 +								};
 +							}));
 +						}
 +					});
 +				},
 +				minLength: 2,
 +				select: function( event, ui ) {
 +					if(ui.item && $.trim($elem.find('.value.country').val()).length == 0) {
 +						$elem.find('.value.country').val(ui.item.country);
 +					}
 +				}
 +			});
 +		$elem.find('.value.country')
 +			.autocomplete({
 +				source: function( request, response ) {
 +					$.ajax({
 +						url: "http://ws.geonames.org/searchJSON",
 +						dataType: "jsonp",
 +						data: {
 +							/*featureClass: "A",*/
 +							featureCode: "PCLI",
 +							/*countryBias: "true",*/
 +							/*style: "full",*/
 +							lang: lang,
 +							maxRows: 12,
 +							name_startsWith: request.term
 +						},
 +						success: function( data ) {
 +							response( $.map( data.geonames, function( item ) {
 +								return {
 +									label: item.name,
 +									value: item.name
 +								};
 +							}));
 +						}
 +					});
 +				},
 +				minLength: 2
 +			});
 +		return $elem;
 +	};
 +
 +	/**
 +	 * Render an IMPP (Instant Messaging) property.
 +	 * @return A jquery object to be injected in the DOM
 +	 */
 +	Contact.prototype.renderIMProperty = function(property) {
 +		if(!this.detailTemplates['impp']) {
 +			console.warn('No template for impp', this.detailTemplates);
 +			return;
 +		}
 +		var values = property ? {
 +			value: property.value,
 +			checksum: property.checksum
 +		} : {value: '', checksum: 'new'};
 +		return this.detailTemplates['impp'].octemplate(values);
 +	};
 +
 +	/**
 +	 * Set a thumbnail for the contact if a PHOTO property exists
 +	 */
 +	Contact.prototype.setThumbnail = function($elem, refresh) {
 +		if(!this.data.thumbnail && !refresh) {
 +			return;
 +		}
 +		if(!$elem) {
 +			$elem = this.getListItemElement().find('td.name');
 +		}
 +		if(!$elem.hasClass('thumbnail') && !refresh) {
 +			return;
 +		}
 +		if(this.data.thumbnail) {
 +			$elem.removeClass('thumbnail');
 +			$elem.css('background-image', 'url(data:image/png;base64,' + this.data.thumbnail + ')');
 +		} else {
 +			$elem.addClass('thumbnail');
 +			$elem.removeAttr('style');
 +		}
 +	}
 +
 +	/**
 +	 * Render the PHOTO property.
 +	 */
 +	Contact.prototype.loadPhoto = function() {
 +		var self = this;
 +		var id = this.id || 'new',
 +			backend = this.metadata.backend,
 +			parent = this.metadata.parent,
 +			src;
 +
 +		var $phototools = this.$fullelem.find('#phototools');
- 		if(!this.$photowrapper) {
- 			this.$photowrapper = this.$fullelem.find('#photowrapper');
- 		}
++		var $photowrapper = this.$fullelem.find('#photowrapper');
 +
 +		var finishLoad = function(image) {
 +			console.log('finishLoad', self.getDisplayName(), image.width, image.height);
 +			$(image).addClass('contactphoto');
- 			self.$photowrapper.removeClass('loading wait');
- 			self.$photowrapper.css({width: image.width + 10, height: image.height + 10});
++			$photowrapper.removeClass('loading wait');
++			$photowrapper.css({width: image.width + 10, height: image.height + 10});
 +			$(image).insertAfter($phototools).fadeIn();
 +		};
 +
- 		this.$photowrapper.addClass('loading').addClass('wait');
- 		if(this.getPreferredValue('PHOTO', null) === null) {
++		$photowrapper.addClass('loading').addClass('wait');
++		if(!this.hasPhoto()) {
 +			$.when(this.storage.getDefaultPhoto())
 +				.then(function(image) {
 +					$('img.contactphoto').detach();
 +					finishLoad(image);
 +				});
 +		} else {
 +			$.when(this.storage.getContactPhoto(backend, parent, id))
 +				.then(function(image) {
 +					$('img.contactphoto').remove();
 +					finishLoad(image);
 +				})
 +				.fail(function() {
 +					console.log('Error getting photo, trying default image');
 +					$('img.contactphoto').remove();
 +					$.when(self.storage.getDefaultPhoto())
 +						.then(function(image) {
 +							$('img.contactphoto').detach();
 +							finishLoad(image);
 +						});
 +				});
 +		}
 +
 +		if(this.isEditable()) {
- 			this.$photowrapper.on('mouseenter', function(event) {
++			$photowrapper.on('mouseenter', function(event) {
 +				if($(event.target).is('.favorite') || !self.data) {
 +					return;
 +				}
 +				$phototools.slideDown(200);
 +			}).on('mouseleave', function() {
 +				$phototools.slideUp(200);
 +			});
 +			$phototools.hover( function () {
 +				$(this).removeClass('transparent');
 +			}, function () {
 +				$(this).addClass('transparent');
 +			});
 +			$phototools.find('li a').tipsy();
 +
 +			$phototools.find('.action').off('click');
 +			$phototools.find('.edit').on('click', function() {
 +				$(document).trigger('request.edit.contactphoto', self.metaData());
 +			});
 +			$phototools.find('.cloud').on('click', function() {
 +				$(document).trigger('request.select.contactphoto.fromcloud', self.metaData());
 +			});
 +			$phototools.find('.upload').on('click', function() {
 +				$(document).trigger('request.select.contactphoto.fromlocal', self.metaData());
 +			});
- 			if(this.getPreferredValue('PHOTO', false)) {
++			if(this.hasPhoto()) {
 +				$phototools.find('.delete').show();
 +				$phototools.find('.edit').show();
 +			} else {
 +				$phototools.find('.delete').hide();
 +				$phototools.find('.edit').hide();
 +			}
 +			$(document).bind('status.contact.photoupdated', function(e, data) {
 +				console.log('status.contact.photoupdated', data);
- 				if(!self.data.PHOTO) {
++				if(!self.hasPhoto()) {
 +					self.data.PHOTO = [];
 +				}
 +				if(data.thumbnail) {
 +					self.data.thumbnail = data.thumbnail;
- 					self.data.PHOTO[0] = {value:true};
++					self.data.photo = true;
 +				} else {
 +					self.data.thumbnail = null;
- 					self.data.PHOTO[0] = {value:false};
++					self.data.photo = false;
 +				}
 +				self.loadPhoto(true);
 +				self.setThumbnail(null, true);
 +			});
 +		}
 +	};
 +
 +	/**
 +	 * Get the jquery element associated with this object
 +	 */
 +	Contact.prototype.getListItemElement = function() {
 +		if(!this.$listelem) {
 +			this.renderListItem();
 +		}
 +		return this.$listelem;
 +	};
 +
 +	/**
 +	 * Get the preferred value for a property.
 +	 * If a preferred value is not found the first one will be returned.
 +	 * @param string name The name of the property like EMAIL, TEL or ADR.
 +	 * @param def A default value to return if nothing is found.
 +	 */
 +	Contact.prototype.getPreferredValue = function(name, def) {
 +		var pref = def, found = false;
 +		if(this.data && this.data[name]) {
 +			var props = this.data[name];
 +			//console.log('props', props);
 +			$.each(props, function( i, prop ) {
 +				//console.log('prop:', i, prop);
 +				if(i === 0) { // Choose first to start with
 +					pref = prop.value;
 +				}
 +				for(var param in prop.parameters) {
 +					if(param.toUpperCase() == 'PREF') {
 +						found = true; //
 +						break;
 +					}
 +				}
 +				if(found) {
 +					return false; // break out of loop
 +				}
 +			});
 +		}
 +		if(name === 'N' && pref.join('').trim() === '') {
 +			return def;
 +		}
 +		return pref;
 +	};
 +
 +	/**
++	 * Returns an array with the names of the groups the contact is in
++	 *
++	 * @return Array
++	 */
++	Contact.prototype.groups = function() {
++		return this.getPreferredValue('CATEGORIES', []).clean('');
++	};
++
++
++	/**
 +	 * Returns true/false depending on the contact being in the
 +	 * specified group.
 +	 * @param String name The group name (not case-sensitive)
- 	 * @returns Boolean
++	 * @return Boolean
 +	 */
 +	Contact.prototype.inGroup = function(name) {
++		console.log('inGroup', name);
 +		var categories = this.getPreferredValue('CATEGORIES', []);
 +		var found = false;
 +
 +		$.each(categories, function(idx, category) {
 +			if(name.toLowerCase() == $.trim(category).toLowerCase()) {
 +				found = true
 +				return false;
 +			}
 +		});
 +
 +		return found;
 +	};
 +
 +	/**
 +	 * Add this contact to a group
 +	 * @param String name The group name
 +	 */
 +	Contact.prototype.addToGroup = function(name) {
 +		console.log('addToGroup', name);
 +		if(!this.data.CATEGORIES) {
 +			this.data.CATEGORIES = [{value:[name]}];
 +		} else {
 +			if(this.inGroup(name)) {
 +				return;
 +			}
 +			this.data.CATEGORIES[0].value.push(name);
 +			if(this.$listelem) {
 +				this.$listelem.find('td.categories')
 +					.text(this.getPreferredValue('CATEGORIES', []).clean('').join(' / '));
 +			}
 +		}
 +	};
 +
 +	/**
 +	 * Remove this contact from a group
 +	 * @param String name The group name
 +	 */
 +	Contact.prototype.removeFromGroup = function(name) {
 +		name = name.trim();
 +		if(!this.data.CATEGORIES) {
 +			console.warn('removeFromGroup. No groups found');
 +			return;
 +		} else {
 +			var found = false;
 +			var categories = [];
 +			$.each(this.data.CATEGORIES[0].value, function(idx, category) {
 +				category = category.trim();
 +				if(name.toLowerCase() === category.toLowerCase()) {
 +					found = true;
 +				} else {
 +					categories.push(category);
 +				}
 +			});
 +			if(!found) {
 +				return;
 +			}
 +			this.data.CATEGORIES[0].value = categories;
 +			if(this.$listelem) {
 +				this.$listelem.find('td.categories')
 +					.text(categories.join(' / '));
 +			}
 +		}
 +	};
 +
 +	Contact.prototype.setCurrent = function(on) {
 +		if(on) {
 +			this.$listelem.addClass('active');
 +		} else {
 +			this.$listelem.removeClass('active');
 +		}
 +		$(document).trigger('status.contact.currentlistitem', {
 +			id: this.id,
 +			pos: Math.round(this.$listelem.position().top),
 +			height: Math.round(this.$listelem.height())
 +		});
 +	};
 +
 +	Contact.prototype.setSelected = function(state) {
 +		//console.log('Selecting', this.getId(), state);
 +		var $elem = this.getListItemElement();
 +		var $input = $elem.find('input:checkbox');
 +		$input.prop('checked', state).trigger('change');
 +	};
 +
 +	Contact.prototype.next = function() {
 +		// This used to work..?
 +		//var $next = this.$listelem.next('tr:visible');
 +		var $next = this.$listelem.nextAll('tr').filter(':visible').first();
 +		if($next.length > 0) {
 +			this.$listelem.removeClass('active');
 +			$next.addClass('active');
 +			$(document).trigger('status.contact.currentlistitem', {
 +				id: String($next.data('id')),
 +				pos: Math.round($next.position().top),
 +				height: Math.round($next.height())
 +			});
 +		}
 +	};
 +
 +	Contact.prototype.prev = function() {
 +		//var $prev = this.$listelem.prev('tr:visible');
 +		var $prev = this.$listelem.prevAll('tr').filter(':visible').first();
 +		if($prev.length > 0) {
 +			this.$listelem.removeClass('active');
 +			$prev.addClass('active');
 +			$(document).trigger('status.contact.currentlistitem', {
 +				id: String($prev.data('id')),
 +				pos: Math.round($prev.position().top),
 +				height: Math.round($prev.height())
 +			});
 +		}
 +	};
 +
 +	var ContactList = function(
 +			storage,
 +			addressBooks,
 +			contactlist,
 +			contactlistitemtemplate,
 +			contactdragitemtemplate,
 +			contactfulltemplate,
 +			contactdetailtemplates
 +		) {
 +		//console.log('ContactList', contactlist, contactlistitemtemplate, contactfulltemplate, contactdetailtemplates);
 +		var self = this;
 +		this.length = 0;
 +		this.contacts = {};
 +		this.addressBooks = addressBooks;
 +		this.deletionQueue = [];
 +		this.storage = storage;
 +		this.$contactList = contactlist;
 +		this.$contactDragItemTemplate = contactdragitemtemplate;
 +		this.$contactListItemTemplate = contactlistitemtemplate;
 +		this.$contactFullTemplate = contactfulltemplate;
 +		this.contactDetailTemplates = contactdetailtemplates;
 +		this.$contactList.scrollTop(0);
 +		//this.getAddressBooks();
 +		$(document).bind('status.contact.added', function(e, data) {
 +			self.length += 1;
 +			self.contacts[String(data.id)] = data.contact;
 +			//self.insertContact(data.contact.renderListItem(true));
 +		});
 +		$(document).bind('status.contact.moved', function(e, data) {
 +			var contact = data.contact;
 +			var oldid = contact.getId();
 +			contact.close();
 +			contact.reload(data.data);
 +			self.contacts[contact.getId()] = contact;
 +			$(document).trigger('request.contact.open', {
 +				id: contact.getId()
 +			});
 +			console.log('status.contact.moved', data);
 +		});
 +		$(document).bind('request.contact.close', function(e, data) {
 +			self.currentContact = null;
 +		});
 +		$(document).bind('status.contact.updated', function(e, data) {
 +			if(['FN', 'EMAIL', 'TEL', 'ADR', 'CATEGORIES'].indexOf(data.property) !== -1) {
 +				data.contact.getListItemElement().remove();
 +				self.insertContact(data.contact.renderListItem(true));
 +			} else if(data.property === 'PHOTO') {
 +				$(document).trigger('status.contact.photoupdated', {
 +					id: data.contact.getId()
 +				});
 +			}
 +		});
 +		$(document).bind('status.addressbook.removed', function(e, data) {
 +			var addressBook = data.addressbook;
 +			self.purgeFromAddressbook(addressBook);
 +			$(document).trigger('request.groups.reload');
 +			$(document).trigger('status.contacts.deleted', {
 +				numcontacts: self.length
 +			});
 +		});
 +		$(document).bind('status.addressbook.imported', function(e, data) {
 +			console.log('status.addressbook.imported', data);
 +			var addressBook = data.addressbook;
 +			self.purgeFromAddressbook(addressBook);
 +			$.when(self.loadContacts(addressBook.getBackend(), addressBook.getId(), true))
 +			.then(function() {
 +				self.setSortOrder();
 +				$(document).trigger('request.groups.reload');
 +			});
 +		});
 +		$(document).bind('status.addressbook.activated', function(e, data) {
 +			console.log('status.addressbook.activated', data);
 +			var addressBook = data.addressbook;
 +			if(!data.state) {
 +				self.purgeFromAddressbook(addressBook);
 +				$(document).trigger('status.contacts.deleted', {
 +					numcontacts: self.length
 +				});
 +			} else {
 +				$.when(self.loadContacts(addressBook.getBackend(), addressBook.getId(), true))
 +				.then(function() {
 +					self.setSortOrder();
 +					$(document).trigger('request.groups.reload');
 +				});
 +			}
 +		});
 +	};
 +
 +	/**
 +	 * Get the number of contacts in the list
 +	 * @return integer
 +	 */
 +	ContactList.prototype.count = function() {
 +		return Object.keys(this.contacts.contacts).length
 +	};
 +
 +	/**
 +	* Remove contacts from the internal list and the DOM
 +	*
 +	* @param AddressBook addressBook
 +	*/
 +	ContactList.prototype.purgeFromAddressbook = function(addressBook) {
 +		var self = this;
 +		$.each(this.contacts, function(idx, contact) {
 +			if(contact.getBackend() === addressBook.getBackend()
 +				&& contact.getParent() === addressBook.getId()) {
 +				//console.log('Removing', contact);
 +				delete self.contacts[contact.getId()];
 +				//var c = self.contacts.splice(self.contacts.indexOf(contact.getId()), 1);
 +				//console.log('Removed', c);
 +				contact.detach();
 +				contact = null;
 +				self.length -= 1;
 +			}
 +		});
 +		$(document).trigger('status.contacts.count', {
 +			count: self.length
 +		});
 +	}
 +
 +	/**
 +	* Show/hide contacts belonging to an addressbook.
 +	* @param int aid. Addressbook id.
 +	* @param boolean show. Whether to show or hide.
 +	* @param boolean hideothers. Used when showing shared addressbook as a group.
 +	*/
 +	ContactList.prototype.showFromAddressbook = function(aid, show, hideothers) {
 +		console.log('ContactList.showFromAddressbook', aid, show);
 +		aid = String(aid);
 +		for(var contact in this.contacts) {
 +			if(this.contacts[contact].getParent() === aid) {
 +				this.contacts[contact].getListItemElement().toggle(show);
 +			} else if(hideothers) {
 +				this.contacts[contact].getListItemElement().hide();
 +			}
 +		}
 +		this.setSortOrder();
 +	};
 +
 +	/**
 +	* Show only uncategorized contacts.
 +	* @param int aid. Addressbook id.
 +	* @param boolean show. Whether to show or hide.
 +	* @param boolean hideothers. Used when showing shared addressbook as a group.
 +	*/
 +	ContactList.prototype.showUncategorized = function() {
 +		console.log('ContactList.showUncategorized');
 +		for(var contact in this.contacts) {
- 			if(this.contacts[contact].getPreferredValue('CATEGORIES', []).length === 0) {
++			if(this.contacts[contact].getPreferredValue('CATEGORIES', []).clean('').length === 0) {
 +				this.contacts[contact].getListItemElement().show();
++				this.contacts[contact].setThumbnail();
 +			} else {
 +				this.contacts[contact].getListItemElement().hide();
 +			}
 +		}
 +		this.setSortOrder();
 +	};
 +
 +	/**
 +	* Show/hide contacts belonging to shared addressbooks.
 +	* @param boolean show. Whether to show or hide.
 +	*/
 +	ContactList.prototype.showSharedAddressbooks = function(show) {
 +		console.log('ContactList.showSharedAddressbooks', show);
 +		for(var contact in this.contacts) {
 +			if(this.contacts[contact].metadata.owner !== OC.currentUser) {
 +				if(show) {
 +					this.contacts[contact].getListItemElement().show();
 +				} else {
 +					this.contacts[contact].getListItemElement().hide();
 +				}
 +			}
 +		}
 +		this.setSortOrder();
 +	};
 +
 +	/**
 +	* Show contacts in list
 +	* @param Array contacts. A list of contact ids.
 +	*/
 +	ContactList.prototype.showContacts = function(contacts) {
 +		console.log('showContacts', contacts);
 +		var self = this;
 +		if(contacts.length === 0) {
 +			// ~5 times faster
 +			$('tr:visible.contact').hide();
 +			return;
 +		}
 +		if(contacts === 'all') {
 +			// ~2 times faster
 +			var $elems = $('tr.contact:not(:visible)');
 +			$elems.show();
 +			$.each($elems, function(idx, elem) {
 +				try {
 +					var id = $(elem).data('id');
 +					self.contacts[id].setThumbnail();
 +				} catch(e) {
 +					console.warn('Failed getting id from', $elem, e);
 +				}
 +			});
 +			this.setSortOrder();
 +			return;
 +		}
 +		console.time('show');
 +		$('tr.contact').filter(':visible').hide();
 +		$.each(contacts, function(idx, id) {
 +			var contact =  self.findById(id);
 +			if(contact === null) {
 +				return true; // continue
 +			}
 +			contact.getListItemElement().show();
 +			contact.setThumbnail();
 +		});
 +		console.timeEnd('show');
 +
 +		// Amazingly this is slightly faster
 +		//console.time('show');
 +		for(var id in this.contacts) {
 +			var contact = this.findById(id);
 +			if(contact === null) {
 +				continue;
 +			}
 +			if(contacts.indexOf(String(id)) === -1) {
 +				contact.getListItemElement().hide();
 +			} else {
 +				contact.getListItemElement().show();
 +				contact.setThumbnail();
 +			}
 +		}
 +		//console.timeEnd('show');*/
 +
 +		this.setSortOrder();
 +	};
 +
 +	ContactList.prototype.contactPos = function(id) {
 +		var contact = this.findById(id);
 +		if(!contact) {
 +			return 0;
 +		}
 +		
 +		var $elem = contact.getListItemElement();
 +		var pos = Math.round($elem.offset().top - (this.$contactList.offset().top + this.$contactList.scrollTop()));
 +		console.log('contactPos', pos);
 +		return pos;
 +	};
 +
 +	ContactList.prototype.hideContact = function(id) {
 +		var contact = this.findById(id);
 +		if(contact === null) {
 +			return false;
 +		}
 +		contact.hide();
 +	};
 +
 +	ContactList.prototype.closeContact = function(id) {
 +		var contact = this.findById(id);
 +		if(contact === null) {
 +			return false;
 +		}
 +		contact.close();
 +	};
 +
 +	/**
 +	* Returns a Contact object by searching for its id
 +	* @param id the id of the node
 +	* @return the Contact object or undefined if not found.
 +	* FIXME: If continious loading is reintroduced this will have
 +	* to load the requested contact if not in list.
 +	*/
 +	ContactList.prototype.findById = function(id) {
 +		if(!id) {
 +			console.warn('ContactList.findById: id missing');
 +			return false;
 +		}
 +		id = String(id);
 +		if(typeof this.contacts[id] === 'undefined') {
 +			console.warn('Could not find contact with id', id);
 +			//console.trace();
 +			return null;
 +		}
 +		return this.contacts[String(id)];
 +	};
 +
 +	/**
 +	 * TODO: Instead of having a timeout the contacts should be moved to a "Trash" backend/address book
 +	 * https://github.com/owncloud/contacts/issues/107
 +	 * @param object|object[] data An object or array of objects containing contact identification
 +	 * {
 +	 * 	contactid: '1234',
 +	 * 	addressbookid: '4321',
 +	 * 	backend: 'local'
 +	 * }
 +	 */
 +	ContactList.prototype.delayedDelete = function(data) {
 +		console.log('delayedDelete, data:', typeof data, data);
 +		var self = this;
 +		if(!utils.isArray(data)) {
 +			this.currentContact = null;
 +			//self.$contactList.show();
 +			if(data instanceof Contact) {
 +				this.deletionQueue.push(data);
 +			} else {
 +				var contact = this.findById(data.contactId);
 +				if(contact instanceof Contact) {
 +					this.deletionQueue.push(contact);
 +				}
 +			}
 +		} else if(utils.isArray(data)) {
 +			$.each(data, function(idx, contact) {
 +				//console.log('delayedDelete, meta:', contact);
 +				if(contact instanceof Contact) {
 +					self.deletionQueue.push(contact);
 +				}
 +			});
 +			//$.extend(this.deletionQueue, data);
 +		} else {
 +			throw { name: 'WrongParameterType', message: 'ContactList.delayedDelete only accept objects or arrays.'};
 +		}
 +		//console.log('delayedDelete, deletionQueue', this.deletionQueue);
 +		$.each(this.deletionQueue, function(idx, contact) {
 +			//console.log('delayedDelete', contact);
 +			contact && contact.detach().setChecked(false);
 +		});
 +		//console.log('deletionQueue', this.deletionQueue);
 +		if(!window.onbeforeunload) {
 +			window.onbeforeunload = function(e) {
 +				e = e || window.event;
 +				var warn = t('contacts', 'Some contacts are marked for deletion, but not deleted yet. Please wait for them to be deleted.');
 +				if (e) {
 +					e.returnValue = String(warn);
 +				}
 +				return warn;
 +			};
 +		}
 +		if(this.$contactList.find('tr:visible').length === 0) {
 +			$(document).trigger('status.visiblecontacts');
 +		}
 +		OC.notify({
 +			message:t('contacts','Click to undo deletion of {num} contacts', {num: self.deletionQueue.length}),
 +			//timeout:5,
 +			timeouthandler:function() {
 +				//console.log('timeout');
 +				self.deleteContacts();
 +			},
 +			clickhandler:function() {
 +				//console.log('clickhandler');
 +				//OC.notify({cancel:true});
 +				OC.notify({cancel:true, message:t('contacts', 'Cancelled deletion of {num} contacts', {num: self.deletionQueue.length})});
 +				$.each(self.deletionQueue, function(idx, contact) {
 +					self.insertContact(contact.getListItemElement());
 +				});
 +				self.deletionQueue = [];
 +				window.onbeforeunload = null;
 +			}
 +		});
 +	};
 +
 +	/**
 +	* Delete contacts in the queue
 +	* TODO: Batch delete contacts instead of sending multiple requests.
 +	*/
 +	ContactList.prototype.deleteContacts = function() {
 +		var self = this,
 +			contact,
 +			contactMap = {};
 +		console.log('ContactList.deleteContacts, deletionQueue', this.deletionQueue);
 +
 +		if(this.deletionQueue.length === 1) {
 +			contact = this.deletionQueue.shift()
 +			// Let contact remove itself.
 +			var id = contact.getId();
 +			contact.destroy(function(response) {
 +				console.log('deleteContact', response, self.length);
 +				if(!response.error) {
 +					delete self.contacts[id];
 +					$(document).trigger('status.contact.deleted', {
 +						id: id
 +					});
 +					self.length -= 1;
 +					if(self.length === 0) {
 +						$(document).trigger('status.nomorecontacts');
 +					}
 +				} else {
 +					self.insertContact(contact.getListItemElement());
- 					OC.notify({message:response.message});
++					$(document).trigger('status.contacts.error', response);
 +				}
 +			});
 +		} else {
 +
 +			// Make a map of backends, address books and contacts for easier processing.
 +			while(contact = this.deletionQueue.shift()) {
 +				if(!contactMap[contact.getBackend()]) {
 +					contactMap[contact.getBackend()] = {};
 +				}
 +				if(!contactMap[contact.getBackend()][contact.getParent()]) {
 +					contactMap[contact.getBackend()][contact.getParent()] = [];
 +				}
 +				contactMap[contact.getBackend()][contact.getParent()].push(contact.getId());
 +			}
 +			console.log('map', contactMap);
 +
 +			// Call each backend/addressBook to delete contacts.
 +			$.each(contactMap, function(backend, addressBooks) {
 +				console.log(backend, addressBooks);
 +				$.each(addressBooks, function(addressBook, contacts) {
 +					console.log(addressBook, contacts);
 +					var ab = self.addressBooks.find({backend:backend, id:addressBook});
++					if(!ab) {
++						console.warn('Could not find address book!', addressBook);
++						$(document).trigger('status.contacts.error', {
++							message: t('contacts', 'Could not find address book!')
++						});
++						return true; // continue
++					}
 +					ab.deleteContacts(contacts, function(response) {
 +						console.log('response', response);
 +						if(!response.error) {
 +							// We get a result set back, so process all of them.
 +							$.each(response.data.result, function(idx, result) {
 +								console.log('deleting', idx, result.id);
 +								if(result.status === 'success') {
 +									delete self.contacts[result.id];
 +									$(document).trigger('status.contact.deleted', {
 +										id: result.id
 +									});
 +									self.length -= 1;
 +									if(self.length === 0) {
 +										$(document).trigger('status.nomorecontacts');
 +									}
 +								} else {
 +									// Error deleting, so re-insert element.
 +									// TODO: Collect errors and display them when done.
 +									self.insertContact(self.contacts[result.id].getListItemElement());
 +								}
 +							});
 +						}
 +					});
 +				});
 +			});
 +		}
 +
 +		window.onbeforeunload = null;
 +		return;
 +
 +	};
 +
 +	/**
 +	 * Insert a rendered contact list item into the list
 +	 * @param contact jQuery object.
 +	 */
 +	ContactList.prototype.insertContact = function($contact) {
 +		$contact.find('td.name').draggable({
 +			distance: 10,
 +			revert: 'invalid',
 +			//containment: '#content',
 +			helper: function (e,ui) {
 +				return $(this).clone().appendTo('body').css('zIndex', 5).show();
 +			},
 +			opacity: 0.8,
 +			scope: 'contacts'
 +		});
 +		var name = $contact.find('.nametext').text().toLowerCase();
 +		var added = false;
 +		this.$contactList.find('tr').each(function() {
 +			if ($(this).find('.nametext').text().toLowerCase().localeCompare(name) > 0) {
 +				$(this).before($contact);
 +				added = true;
 +				return false;
 +			}
 +		});
 +		if(!added) {
 +			this.$contactList.append($contact);
 +		}
 +		$contact.show();
 +		return $contact;
 +	};
 +
 +	/**
 +	* Add contact
 +	* @param object props
 +	*/
 +	ContactList.prototype.addContact = function(props) {
 +		// Get first address book
 +		var addressBooks = this.addressBooks.selectByPermission(OC.PERMISSION_UPDATE);
 +		var addressBook = addressBooks[0];
 +		var metadata = {
 +			parent: addressBook.getId(),
 +			backend: addressBook.getBackend(),
 +			permissions: addressBook.getPermissions(),
 +			owner: addressBook.getOwner()
 +		};
 +		var contact = new Contact(
 +			this,
 +			null,
 +			metadata,
 +			null,
 +			this.$contactListItemTemplate,
 +			this.$contactDragItemTemplate,
 +			this.$contactFullTemplate,
 +			this.contactDetailTemplates
 +		);
 +		if(this.currentContact) {
 +			this.contacts[this.currentContact].close();
 +		}
 +		return contact.renderContact(props);
 +	};
 +
 +	/**
 +	 * Get contacts selected in list
 +	 *
 +	 * @returns array of contact objects.
 +	 */
 +	ContactList.prototype.getSelectedContacts = function() {
 +		var contacts = [];
 +
 +		var self = this;
 +		$.each(this.$contactList.find('tbody > tr > td > input:checkbox:visible:checked'), function(idx, checkbox) {
 +			var id = String($(checkbox).val());
 +			var contact = self.contacts[id];
 +			if(contact) {
 +				contacts.push(contact);
 +			}
 +		});
 +		return contacts;
 +	};
 +
 +	ContactList.prototype.setCurrent = function(id, deselect_other) {
 +		console.log('ContactList.setCurrent', id);
 +		if(!id) {
 +			return;
 +		}
 +		var self = this;
 +		if(deselect_other === true) {
 +			$.each(this.contacts, function(contact) {
 +				self.contacts[contact].setCurrent(false);
 +			});
 +		}
 +		this.contacts[String(id)].setCurrent(true);
 +	};
 +
 +	/**
 +	 * (De)-select a contact
 +	 *
 +	 * @param string id
 +	 * @param bool state
 +	 * @param bool reverseOthers
 +	 */
 +	ContactList.prototype.setSelected = function(id, state, reverseOthers) {
 +		console.log('ContactList.setSelected', id);
 +		if(!id) {
 +			return;
 +		}
 +		var self = this;
 +		if(reverseOthers === true) {
 +			var $rows = this.$contactList.find('tr:visible.contact');
 +			$.each($rows, function(idx, row) {
 +				self.contacts[$(row).data('id')].setSelected(!state);
 +			});
 +		}
 +		this.contacts[String(id)].setSelected(state);
 +	};
 +
 +	/**
 +	 * Select a range of contacts by their id.
 +	 *
 +	 * @param string from
 +	 * @param string to
 +	 */
 +	ContactList.prototype.selectRange = function(from, to) {
 +		var self = this;
 +		var $rows = this.$contactList.find('tr:visible.contact');
 +		var index1 = $rows.index(this.contacts[String(from)].getListItemElement());
 +		var index2 = $rows.index(this.contacts[String(to)].getListItemElement());
 +		from = Math.min(index1, index2);
 +		to = Math.max(index1, index2)+1;
 +		$rows = $rows.slice(from, to);
 +		$.each($rows, function(idx, row) {
 +			self.contacts[$(row).data('id')].setSelected(true);
 +		});
 +	};
 +
 +	ContactList.prototype.setSortOrder = function(order) {
 +		order = order || contacts_sortby;
 +		//console.time('set name');
 +		var $rows = this.$contactList.find('tr:visible.contact');
 +		var self = this;
 +		$.each($rows, function(idx, row) {
 +			self.contacts[$(row).data('id')].setDisplayMethod(order);
 +		});
 +		//console.timeEnd('set name');
 +		if($rows.length > 1) {
 +			//console.time('sort');
 +			var rows = $rows.get();
 +			if(rows[0].firstElementChild && rows[0].firstElementChild.textContent) {
 +				rows.sort(function(a, b) {
 +					// 10 (TEN!) times faster than using jQuery!
 +					return a.firstElementChild.textContent.trim().toUpperCase()
 +						.localeCompare(b.firstElementChild.textContent.trim().toUpperCase());
 +				});
 +			} else {
 +				// IE8 doesn't support firstElementChild or textContent
 +				rows.sort(function(a, b) {
 +					return $(a).find('.nametext').text().toUpperCase()
 +						.localeCompare($(b).find('td.name').text().toUpperCase());
 +				});
 +			}
 +			this.$contactList.prepend(rows);
 +			//console.timeEnd('sort');
 +		}
 +	};
 +
 +	ContactList.prototype.insertContacts = function(contacts) {
 +		var self = this, items = [];
 +		$.each(contacts, function(c, contact) {
 +			var id = String(contact.metadata.id);
 +			self.contacts[id]
 +				= new Contact(
 +					self,
 +					id,
 +					contact.metadata,
 +					contact.data,
 +					self.$contactListItemTemplate,
 +					self.$contactDragItemTemplate,
 +					self.$contactFullTemplate,
 +					self.contactDetailTemplates
 +				);
 +			self.length +=1;
 +			var $item = self.contacts[id].renderListItem();
 +			if(!$item) {
 +				console.warn('Contact', contact, 'could not be rendered!');
 +				return true; // continue
 +			}
 +			items.push($item.get(0));
 +		});
 +		if(items.length > 0) {
 +			self.$contactList.append(items);
 +		}
 +		$(document).trigger('status.contacts.count', {
 +			count: self.length
 +		});
 +	}
 +
 +	/**
 +	* Load contacts
 +	* @param string backend Name of the backend ('local', 'ldap' etc.)
 +	* @param string addressBookId
 +	*/
 +	ContactList.prototype.loadContacts = function(backend, addressBookId, isActive) {
 +		if(!isActive) {
 +			return;
 +		}
 +		var self = this,
 +			contacts;
 +
 +		return $.when(self.storage.getAddressBook(backend, addressBookId, false))
 +			.then(function(response) {
 +			console.log('ContactList.loadContacts - fetching', response);
 +			if(!response.error) {
 +				if(response.data) {
 +					self.insertContacts(response.data.contacts);
 +				}
 +			} else {
 +				console.warn('ContactList.loadContacts - no data!!');
 +			}
 +		})
 +		.fail(function(response) {
 +			console.warn('Request Failed:', response.message);
 +			defer.reject({error: true, message: response.message});
 +		});
 +
 +	};
 +
 +	OC.Contacts.ContactList = ContactList;
 +
 +})(window, jQuery, OC);
diff --cc apps/contacts/js/groups.js
index c498b81,0000000..b8fd37e
mode 100644,000000..100644
--- a/apps/contacts/js/groups.js
+++ b/apps/contacts/js/groups.js
@@@ -1,788 -1,0 +1,801 @@@
 +OC.Contacts = OC.Contacts || {};
 +
 +
 +(function(window, $, OC) {
 +	'use strict';
 +
 +	/**
 +	 * GroupList object
 +	 * Currently all data but the categories array is saved in the jquery DOM elements.
 +	 * This may change in the future.
 +	 * Each group element has a data-id and a data-type attribute. data-type can be
 +	 * 'fav' for favorites, 'all' for all elements, 'category' for group and 'shared' for
 +	 * a shared addressbook.
 +	 * data-id can be 'fav', 'all' or a numeric group or addressbook id.
 +	 * In addition each elements holds data entries for:
 +	 *   'contacts': An array of contact ids belonging to that group
 +	 *   'obj': A reference to the groupList object.
 +	 */
 +	var GroupList = function(storage, groupList, listItemTmpl) {
 +		this.storage = storage;
 +		this.$groupList = groupList;
 +		var self = this;
 +		var numtypes = ['category', 'fav', 'all'];
 +		this.$groupList.on('click', 'li.group', function(event) {
 +			$('.tipsy').remove();
 +			if(wrongKey(event)) {
 +				return;
 +			}
 +			console.log('group click', $(this));
 +			if($(event.target).is('.action.delete')) {
 +				$('.tipsy').remove();
 +				$(this).addClass('loading').removeClass('active');
 +				event.stopPropagation();
 +				event.preventDefault();
 +				var id = $(event.target).parents('li').first().data('id');
 +				self.deleteGroup(id, function(response) {
 +					if(response.error) {
 +						OC.notify({message:response.message});
 +					}
 +				});
 +			} else if($(event.target).is('.action.edit')) {
 +				event.stopPropagation();
 +				event.preventDefault();
 +				self.editGroup($(this));
 +			} else {
 +				if($(this).is(':not(.editing)')) {
 +					self.selectGroup({element:$(this)});
 +				}
 +			}
 +		});
 +		var $addInput = this.$groupList.find('.add-group');
 +		$addInput.addnew({
 +			addText: t('core', 'Add'),
 +			ok: function(event, name) {
 +				$addInput.addClass('loading');
 +				name = escapeHTML(name);
 +				self.addGroup({name:name}, function(response) {
 +					if(response.error) {
 +						$(document).trigger('status.contacts.error', response);
 +					} else {
 +						$addInput.addnew('close');
 +					}
 +					$addInput.removeClass('loading');
 +				});
 +			}
 +		});
 +
 +		$(document).bind('status.contacts.count', function(e, data) {
 +			console.log('Num contacts:', data.count);
 +			self.findById('all').find('.numcontacts').text(data.count);
 +		});
 +
 +		this.$groupListItemTemplate = listItemTmpl;
 +		this.categories = [];
 +	};
 +
 +	/**
 +	 * Set a group as being currently selected
 +	 * 
 +	 * @param object params. A map containing either a group id
 +	 * or a jQuery group element.
 +	 * This triggers a 'status.group.selected' event unless if
 +	 * the group hasn't been saved/created yet.
 +	 */
 +	GroupList.prototype.selectGroup = function(params) {
 +		var self = this;
 +		/*if(!this.loaded) {
 +			console.log('Not loaded');
 +			setTimeout(function() {
 +				self.selectGroup(params);
 +			}, 100);
 +			return;
 +		}*/
 +		var id, $elem;
 +		if(typeof params.id !== 'undefined') {
 +			id = params.id;
 +			$elem = this.findById(id);
 +		} else if(typeof params.element !== 'undefined') {
 +			id = params.element.data('id');
 +			$elem = params.element;
 +		}
 +		if(!$elem.length) {
 +			self.selectGroup({id:'all'});
 +			return;
 +		}
 +		console.log('selectGroup', id, $elem);
 +		this.$groupList.find('li').removeClass('active');
 +		$elem.addClass('active');
 +		if(id === 'new') {
 +			return;
 +		}
 +		this.lastgroup = id;
 +		$(document).trigger('status.group.selected', {
 +			id: this.lastgroup,
 +			type: $elem.data('type'),
 +			contacts: $elem.data('contacts')
 +		});
 +	};
 +
 +	GroupList.prototype.triggerLastGroup = function() {
 +		this.selectGroup({id:this.lastgroup});
 +	}
 +
 +	/**
 +	 * Test if a group with this name exists (case-insensitive)
 +	 *
 +	 * @param string name
 +	 * @return bool
 +	 */
 +	GroupList.prototype.hasGroup = function(name) {
 +		return (this.findByName(name) !== null);
 +	}
 +
 +	/**
 +	 * Get the group name by id.
 +	 * 
 +	 * Kind of a hack. Need to get the immidiate text without the enclosed spans with number etc.
 +	 * Not sure this works in IE8 and maybe others.
 +	 * 
 +	 * @param integer id. The numeric group or addressbook id.
 +	 * @returns string The name of the group.
 +	 */
 +	GroupList.prototype.nameById = function(id) {
 +		return $.trim(this.findById(id).data('rawname'));
 +		//return $.trim(this.findById(id).clone().find("*").remove().end().text()); //.contents().filter(function(){ return(this.nodeType == 3); }).text().trim();
 +	};
 +
 +	/** Get the group element by name.
 +	 *
 +	 * @param string name. The name of the group to search for (case-insensitive).
 +	 * @returns object|null The jQuery object.
 +	 */
 +	GroupList.prototype.findByName = function(name) {
 +		var $elem = null;
 +		this.$groupList.find('li[data-type="category"]').each(function() {
 +			if ($(this).data('rawname').toLowerCase() === name.toLowerCase()) {
 +				$elem = $(this);
 +				return false; //break out of loop
 +			}
 +		});
 +		return $elem;
 +	};
 +
 +	/** Get the group element by id.
 +	 * 
 +	 * @param integer id. The numeric group or addressbook id.
 +	 * @returns object The jQuery object.
 +	 */
 +	GroupList.prototype.findById = function(id) {
 +		return this.$groupList.find('li[data-id="' + id + '"]');
 +	};
 +
 +	/**
 +	 * Check if a contact is favorited.
 +	 * @param integer contactid.
 +	 * @returns boolean.
 +	 */
 +	GroupList.prototype.isFavorite = function(contactid) {
 +		return this.inGroup(contactid, 'fav');
 +	};
 +
 +	/**
 +	 * Check if a contact is in a specfic group.
 +	 * @param integer contactid.
 +	 * @param integer groupid.
 +	 * @returns boolean.
 +	 */
 +	GroupList.prototype.inGroup = function(contactid, groupid) {
 +		var $groupelem = this.findById(groupid);
 +		var contacts = $groupelem.data('contacts');
 +		return (contacts.indexOf(contactid) !== -1);
 +	};
 +
 +	/**
 +	 * Mark/unmark a contact as favorite.
 +	 * 
 +	 * @param integer contactid.
 +	 * @param boolean state.
 +	 * @param function cb. Optional callback function.
 +	 */
 +	GroupList.prototype.setAsFavorite = function(contactid, state, cb) {
 +		var $groupelem = this.findById('fav');
 +		var contacts = $groupelem.data('contacts');
 +		if(state) {
 +			$.when(OC.Tags.addToFavorites(contactid, 'contact'))
 +			.then(function(response) {
 +				console.log(response);
 +				contacts.push(contactid);
 +				$groupelem.data('contacts', contacts);
 +				$groupelem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +				if(contacts.length > 0 && $groupelem.is(':hidden')) {
 +					$groupelem.show();
 +				}
 +				if(typeof cb === 'function') {
 +					cb(response);
 +				}
 +			})
 +			.fail(function(response) {
 +				console.warn(response);
 +			});
 +		} else {
 +			$.when(OC.Tags.removeFromFavorites(contactid, 'contact'))
 +			.then(function(response) {
 +				contacts.splice(contacts.indexOf(contactid), 1);
 +				//console.log('contacts', contacts, contacts.indexOf(id), contacts.indexOf(String(id)));
 +				$groupelem.data('contacts', contacts);
 +				$groupelem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +				if(contacts.length === 0 && $groupelem.is(':visible')) {
 +					$groupelem.hide();
 +				}
 +				if(typeof cb === 'function') {
 +					cb(response);
 +				}
 +			})
 +			.fail(function(response) {
 +				console.warn(response);
 +			});
 +		}
 +	};
 +
 +	/**
 +	* Add one or more contact ids to a group
 +	* @param integer|array contactid. An integer id or an array of integer ids.
 +	* @param integer groupid. The integer id of the group
 +	* @param function cb. Optional call-back function
 +	*/
 +	GroupList.prototype.addTo = function(contactid, groupid, cb) {
 +		console.log('GroupList.addTo', contactid, groupid);
 +		var $groupelem = this.findById(groupid);
 +		var contacts = $groupelem.data('contacts');
 +		var ids = [];
 +		if(!contacts) {
 +			console.log('Contacts not found, adding list!!!');
 +			contacts = [];
 +		}
 +		var self = this;
 +		var doPost = false;
 +		if(typeof contactid === 'string') {
 +			if(contacts.indexOf(contactid) === -1) {
 +				ids.push(contactid);
 +				doPost = true;
 +			} else {
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contact is already in this group.')});
 +				}
 +			}
 +		} else if(utils.isArray(contactid)) {
 +			$.each(contactid, function(i, id) {
 +				if(contacts.indexOf(id) === -1) {
 +					ids.push(id);
 +				}
 +			});
 +			if(ids.length > 0) {
 +				doPost = true;
 +			} else {
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contacts are already in this group.')});
 +				}
 +			}
 +		} else {
 +			console.warn('Invalid data type: ' + typeof contactid);
 +		}
 +		if(doPost) {
 +			var groupname = self.nameById(groupid);
 +			$.when(this.storage.addToGroup(ids, groupid, groupname)).then(function(response) {
 +				if(!response.error) {
 +					contacts = contacts.concat(ids).sort();
 +					$groupelem.data('contacts', contacts);
 +					var $numelem = $groupelem.find('.numcontacts');
 +					$numelem.text(contacts.length > 0 && contacts.length || '').switchClass('', 'active', 200);
 +					setTimeout(function() {
 +						$numelem.switchClass('active', '', 1000);
 +					}, 2000);
 +					if(typeof cb === 'function') {
 +						cb({ids:ids});
 +					}
 +					$.each(ids, function(idx, contactid) {
 +						$(document).trigger('status.group.contactadded', {
 +							contactid: contactid,
 +							groupid: groupid,
 +							groupname: groupname
 +						});
 +					});
 +				} else {
 +					if(typeof cb == 'function') {
 +						cb({error:true, message:response.message});
 +					}
 +				}
 +			});
 +		}
 +	};
 +
 +	/**
 +	* Removes one or more contact ids from a group
 +	* TODO: When deleting contacts this method should just remove the contact id
 +	* from its internal list without saving.
 +	* @param integer|array contactid. An integer id or an array of integer ids.
 +	* @param integer groupid. The integer id of the group
 +	* @param boolean onlyInternal If true don't save to backend
 +	* @param function cb. Optional call-back function
 +	*/
 +	GroupList.prototype.removeFrom = function(contactid, groupid, onlyInternal, cb) {
 +		console.log('GroupList.removeFrom', contactid, groupid);
 +		var $groupelem = this.findById(groupid);
 +		var groupname = this.nameById(groupid);
 +		var contacts = $groupelem.data('contacts');
 +		var ids = [];
 +
 +		// If it's the 'all' group simply decrement the number
 +		if(groupid === 'all') {
 +			var $numelem = $groupelem.find('.numcontacts');
 +			$numelem.text(parseInt($numelem.text()-1)).switchClass('', 'active', 200);
 +			setTimeout(function() {
 +				$numelem.switchClass('active', '', 1000);
 +			}, 2000);
 +			if(typeof cb === 'function') {
 +				cb({ids:[id]});
 +			}
 +		}
 +		// If the contact is in the category remove it from internal list.
 +		if(!contacts) {
 +			if(typeof cb === 'function') {
 +				cb({error:true, message:t('contacts', 'Couldn\'t get contact list.')});
 +			}
 +			return;
 +		}
 +		var doPost = false;
 +		if(typeof contactid === 'string') {
 +			if(contacts.indexOf(contactid) !== -1) {
 +				ids.push(contactid);
 +				doPost = true;
 +			} else {
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contact is not in this group.')});
 +				}
 +			}
 +		} else if(utils.isArray(contactid)) {
 +			$.each(contactid, function(i, id) {
 +				if(contacts.indexOf(id) !== -1) {
 +					ids.push(id);
 +				}
 +			});
 +			if(ids.length > 0) {
 +				doPost = true;
 +			} else {
 +				console.log(contactid, 'not in', contacts);
 +				if(typeof cb == 'function') {
 +					cb({error:true, message:t('contacts', 'Contacts are not in this group.')});
 +				}
 +			}
 +		}
 +		$.each(ids, function(idx, id) {
 +			contacts.splice(contacts.indexOf(id), 1);
 +		});
 +		$groupelem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +		//console.log('contacts', contacts, contacts.indexOf(id), contacts.indexOf(String(id)));
 +		$groupelem.data('contacts', contacts);
 +		if(doPost) {
 +			// If a group is selected the contact has to be removed from the list
 +			$.each(ids, function(idx, contactid) {
 +				$(document).trigger('status.group.contactremoved', {
 +					contactid: contactid,
 +					groupid: parseInt(groupid),
 +					groupname: groupname
 +				});
 +			});
 +			if(!onlyInternal) {
 +				$.when(this.storage.removeFromGroup(ids, groupid, groupname)).then(function(response) {
 +					if(!response.error) {
 +						if(typeof cb === 'function') {
 +							cb({ids:ids});
 +						}
 +					} else {
 +						if(typeof cb == 'function') {
 +							cb({error:true, message:response.message});
 +						}
 +					}
 +				});
 +			}
 +		}
 +	};
 +
 +	/**
 +	 * Remove a contact from all groups. Used on contact deletion.
 +	 * 
 +	 * @param integer contactid.
 +	 * @param boolean alsoSpecial. Whether the contact should also be
 +	 *    removed from non 'category' groups.
 +	 * @param boolean onlyInternal If true don't save to backend
 +	 */
 +	GroupList.prototype.removeFromAll = function(contactid, alsoSpecial, onlyInternal) {
 +		var self = this;
 +		var selector = alsoSpecial ? 'li' : 'li[data-type="category"]';
 +		$.each(this.$groupList.find(selector), function(i, group) {
 +			self.removeFrom(contactid, $(this).data('id'), onlyInternal);
 +		});
 +	};
 +
 +	/**
 +	 * Handler that will be called by OCCategories if any groups have changed.
 +	 * This is called when categories are edited by the generic categories edit
 +	 * dialog, and will probably not be used in this app.
 +	 */
 +	GroupList.prototype.categoriesChanged = function(newcategories) {
 +		console.log('GroupList.categoriesChanged, I should do something');
 +	};
 +
 +	/**
 +	 * Drop handler for for adding contact to group/favorites.
 +	 * FIXME: The drag helper object goes below the group elements
 +	 * during drag, and the drop target is hard to hit.
 +	 */
 +	GroupList.prototype.contactDropped = function(event, ui) {
 +		var dragitem = ui.draggable, droptarget = $(this);
 +		console.log('dropped', dragitem);
 +		if(dragitem.is('.name')) {
 +			var id = String(dragitem.parent().data('id'));
 +			console.log('contact dropped', id, 'on', $(this).data('id'));
 +			if($(this).data('type') === 'fav') {
 +				$(this).data('obj').setAsFavorite(id, true);
 +			} else {
 +				$(this).data('obj').addTo(id, $(this).data('id'));
 +			}
 +		}
 +	};
 +
 +	/**
 +	 * Remove a group from backend.
 +	 * 
 +	 * On success this triggers a 'status.group.groupremoved' event with an object
 +	 * containing the properties:
 +	 * 
 +	 *   groupid: The numeric id of the removed group
 +	 *   groupname: The string value of the group.
 +	 *   newgroupid: The id of the group that is selected after deletion.
 +	 *   contacts: An array of integer ids of contacts that must updated.
 +	 * 
 +	 * The handler for that event must take care of updating all contact objects
 +	 * internal CATEGORIES value and saving them to backend.
 +	 * 
 +	 * @param integer groupid.
 +	 * @param function cb. Optional callback function.
 +	 */
 +	GroupList.prototype.deleteGroup = function(groupid, cb) {
 +		var $elem = this.findById(groupid);
 +		var $newelem = $elem.prev('li');
 +		var name = this.nameById(groupid);
 +		var contacts = $elem.data('contacts');
 +		var self = this;
 +		console.log('delete group', $elem, groupid, contacts);
 +		$.when(this.storage.deleteGroup(name)).then(function(response) {
 +			if (!response.error) {
 +				$.each(self.categories, function(idx, category) {
 +					if(category.id === groupid) {
 +						self.categories.splice(self.categories.indexOf(category), 1);
 +						return false; // Break loop
 +					}
 +				});
 +				$(document).trigger('status.group.groupremoved', {
 +					groupid: groupid,
 +					newgroupid: parseInt($newelem.data('id')),
 +					groupname: name,
 +					contacts: contacts
 +				});
 +				$elem.remove();
 +				self.selectGroup({element:$newelem});
 +			} else {
 +				console.log('Error', response);
 +			}
 +			if(typeof cb === 'function') {
 +				cb(response);
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed: " + response.message);
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	/**
 +	 * Edit a groups name.
 +	 * 
 +	 * @param object $element jQuery element
 +	 */
 +	GroupList.prototype.editGroup = function($element) {
 +		console.log('editGroup', $element);
 +		var self = this;
 +		var oldname = $element.data('rawname');
 +		var id = $element.data('id');
 +
 +		var $editInput = $('<input type="text" />').val(oldname);
 +		$element.hide();
 +		$editInput.insertBefore($element).wrap('<li class="group editing" />');
 +		var $tmpelem = $editInput.parent('li');
 +		console.log('tmpelem', $tmpelem);
 +
 +		$editInput.addnew({
 +			autoOpen: true,
 +			addText: t('contacts', 'Save'),
 +			ok: function(event, newname) {
 +				console.log('New name', newname);
++				if(self.hasGroup(newname)) {
++					$(document).trigger('status.contacts.error', {
++						error: true,
++						message: t('contacts', 'A group named "{group}" already exists', {group: escapeHTML(newname)})
++					});
++					return;
++				}
 +				$editInput.addClass('loading');
 +				self.renameGroup(oldname, newname, function(response) {
 +					if(response.error) {
 +						$(document).trigger('status.contacts.error', response);
 +					} else {
 +						$editInput.addnew('close');
 +						$(document).trigger('status.group.grouprenamed', {
 +							groupid: id,
 +							from: oldname,
 +							to: newname,
 +							contacts: $element.data('contacts')
 +						});
 +						$element.data('rawname', newname);
 +						$element.find('.name').text(escapeHTML(newname));
 +					}
 +					$editInput.removeClass('loading');
 +				});
 +			},
 +			cancel: function(event) {
 +				console.log('cancel');
 +				$editInput.removeClass('loading');
 +			},
 +			close: function() {
 +				console.log('close');
 +				$tmpelem.remove();
 +				$element.show();
 +			}
 +		});
 +
 +	};
 +
 +	/**
 +	 * Rename a group.
 +	 *
 +	 * @param string from
 +	 * @param string to
 +	 * @param function cb
 +	 */
 +	GroupList.prototype.renameGroup = function(from, to, cb) {
 +		$.when(this.storage.renameGroup(from, to)).then(function(response) {
 +			cb({error:false});
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed: " + response);
 +			cb({error:true});
 +			response.message = t('contacts', 'Failed renaming group: {error}', {error:response.message});
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	/**
 +	 * Add a new group.
 +	 * 
 +	 * After the addition a group element will be inserted in the list of group
 +	 * elements with data-type="category".
 +	 * NOTE: The element is inserted (semi) alphabetically, but since group elements
 +	 * can now be rearranged by dragging them it should probably be dropped.
 +	 * 
 +	 * @param object params. Map that can have the following properties:
 +	 *   'name': Mandatory. If a group with the same name already exists
 +	 *       (not case sensitive) the callback will be called with its 'status'
 +	 *       set to 'error' and the function returns.
 +	 *   'element': A jQuery group element. If this property isn't present
 +	 *       a new element will be created.
 +	 * @param function cb. On success the only parameter is an object with
 +	 *    'status': 'success', id: new id from the backend and 'name' the group name.
 +	 *     On error 'status' will be 'error' and 'message' will hold any error message
 +	 *     from the backend.
 +	 */
 +	GroupList.prototype.addGroup = function(params, cb) {
 +		//console.log('GroupList.addGroup', params);
 +		var name = params.name;
 +		var contacts = []; // $.map(contacts, function(c) {return parseInt(c)});
 +		var self = this;
 +		if(this.hasGroup(name)) {
 +			if(typeof cb === 'function') {
- 				cb({error:true, message:t('contacts', 'A group named {group} already exists', {group: escapeHTML(name)})});
++				cb({error:true, message:t('contacts', 'A group named "{group}" already exists', {group: escapeHTML(name)})});
 +			}
 +			return;
 +		}
 +		$.when(this.storage.addGroup(name)).then(function(response) {
 +			if (!response.error) {
 +				name = response.data.name;
 +				var id = response.data.id;
 +				var tmpl = self.$groupListItemTemplate;
 +				var $elem = (tmpl).octemplate({
 +						id: id,
 +						type: 'category',
 +						num: (contacts.length > 0 && contacts.length || ''),
 +						name: escapeHTML(name)
 +					});
 +				self.categories.push({id: id, name: name});
 +				$elem.data('obj', self);
 +				$elem.data('contacts', contacts);
 +				$elem.data('rawname', name);
 +				$elem.data('id', id);
++				$elem.droppable({
++					drop: self.contactDropped,
++					activeClass: 'ui-state-active',
++					hoverClass: 'ui-state-hover',
++					scope: 'contacts'
++				});
 +				var added = false;
 +				self.$groupList.find('li.group[data-type="category"]').each(function() {
 +					if ($(this).data('rawname').toLowerCase().localeCompare(name.toLowerCase()) > 0) {
 +						$(this).before($elem);
 +						added = true;
 +						return false;
 +					}
 +				});
 +				if(!added) {
 +					var $insertAfter = self.$groupList.find('li.group[data-type="category"]').last()
 +						|| self.$groupList.find('li.group[data-id="fav"]')
 +						|| self.$groupList.find('li.group[data-id="all"]');
 +					$elem.insertAfter($insertAfter);
 +				}
 +				self.selectGroup({element:$elem});
 +				$elem.tipsy({trigger:'manual', gravity:'w', fallback: t('contacts', 'You can drag groups to\narrange them as you like.')});
 +				$elem.tipsy('show');
 +				if(typeof cb === 'function') {
 +					cb({id:parseInt(id), name:name});
 +				}
 +			} else {
 +				if(typeof cb === 'function') {
 +					cb({error:true, message:response.data.message});
 +				}
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed: " + response);
 +			response.message = t('contacts', 'Failed adding group: {error}', {error:response.message})
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	GroupList.prototype.loadGroups = function(cb) {
 +		var self = this;
 +		var acceptdrop = '.dragContact';
 +		var $groupList = this.$groupList;
 +		var tmpl = this.$groupListItemTemplate;
 +
 +		if(!this.findById('all').length) {
 +			tmpl.octemplate({id: 'all', type: 'all', num: '', name: t('contacts', 'All')}).appendTo($groupList);
 +		}
 +		return $.when(this.storage.getGroupsForUser()).then(function(response) {
 +			if (response && !response.error) {
 +				self.lastgroup = response.data.lastgroup;
 +				self.sortorder = contacts_groups_sortorder;
 +				console.log('sortorder', self.sortorder);
 +				// Favorites
 +				// Map to strings to easier lookup in contacts list.
 +				var contacts = $.map(response.data.favorites, function(c) {return String(c);});
 +				var $elem = self.findById('fav');
 +				$elem = $elem.length ? $elem : tmpl.octemplate({
 +					id: 'fav',
 +					type: 'fav',
 +					num: contacts.length > 0 && contacts.length || '',
 +					name: t('contacts', 'Favorites')
 +				}).appendTo($groupList);
 +				$elem.data('obj', self);
 +				$elem.data('rawname', t('contacts', 'Favorites'));
 +				if(!$elem.find('.starred').length) {
 +					$elem.data('contacts', contacts).find('.numcontacts').before('<span class="starred action" />');
 +				}
 +				$elem.droppable({
 +							drop: self.contactDropped,
 +							over: function( event, ui ) {
 +								console.log('over favorites', ui.draggable);
 +							},
 +							activeClass: 'ui-state-active',
 +							hoverClass: 'ui-state-hover',
 +							scope: 'contacts'
 +						});
 +				if(contacts.length === 0) {
 +					$elem.hide();
 +				}
 +				console.log('favorites', $elem.data('contacts'));
 +				// Normal groups
 +				$.each(response.data.categories, function(c, category) {
 +					var contacts = $.map(category.contacts, function(c) {return String(c);});
 +					var $elem = self.findById(category.id);
 +					if($elem.length) {
 +						$elem.find('.numcontacts').text(contacts.length > 0 && contacts.length || '');
 +					} else {
 +						$elem = $elem.length ? $elem : (tmpl).octemplate({
 +							id: category.id,
 +							type: 'category',
 +							num: contacts.length > 0 && contacts.length || '',
 +							name: category.name
 +						});
 +						self.categories.push({id: category.id, name: category.name});
 +						$elem.data('obj', self);
 +						$elem.data('rawname', category.name);
 +						$elem.data('id', category.id);
 +						$elem.droppable({
 +										drop: self.contactDropped,
 +										over: function( event, ui ) {
 +											console.log('over group', ui.draggable);
 +										},
 +										activeClass: 'ui-state-active',
 +										hoverClass: 'ui-state-hover',
 +										scope: 'contacts'
 +									});
 +						$elem.appendTo($groupList);
 +					}
 +					$elem.data('contacts', contacts);
 +				});
 +
 +				var elems = $groupList.find('li[data-type="category"]').get();
 +
 +				elems.sort(function(a, b) {
 +					return self.sortorder.indexOf(parseInt($(a).data('id'))) > self.sortorder.indexOf(parseInt($(b).data('id')));
 +				});
 +
 +				$.each(elems, function(index, elem) {
 +					$groupList.append(elem);
 +				});
 +
 +				// Shared addressbook
 +				$.each(response.data.shared, function(c, shared) {
 +					var sharedindicator = '<img class="shared svg" src="' + OC.imagePath('core', 'actions/shared') + '"'
 +						+ 'title="' + t('contacts', 'Shared by {owner}', {owner:shared.owner}) + '" />';
 +					var $elem = self.findById(shared.id);
 +					$elem = $elem.length ? $elem : (tmpl).octemplate({
 +						id: shared.id,
 +						type: 'shared',
 +						num: response.data.shared.length,
 +						name: shared.displayname
 +					});
 +					$elem.find('.numcontacts').after(sharedindicator);
 +					$elem.data('obj', self);
 +					$elem.data('rawname', shared.displayname);
 +					$elem.data('id', shared.id);
 +					$elem.appendTo($groupList);
 +				});
 +				if(!self.findById('uncategorized').length) {
 +					tmpl.octemplate({id: 'uncategorized', type: 'uncategorized', num: '', name: t('contacts', 'Not grouped')}).appendTo($groupList);
 +				}
 +				$groupList.sortable({
 +					items: 'li[data-type="category"]',
 +					stop: function() {
 +						console.log('stop sorting', $(this));
 +						var ids = [];
 +						$.each($(this).children('li[data-type="category"]'), function(i, elem) {
 +							var id = $(elem).data('id');
 +							if(typeof id === 'number' && id % 1 == 0) {
 +								ids.push(id);
 +							}
 +						});
 +						self.sortorder = ids;
 +						$(document).trigger('status.groups.sorted', {
 +							sortorder: self.sortorder.join(',')
 +						});
 +					}
 +				});
 +				var $elem = self.findById(self.lastgroup);
 +				$elem.addClass('active');
 +				self.loaded = true;
 +			} // TODO: else
 +			if(typeof cb === 'function') {
 +				cb();
 +			}
 +		})
 +		.fail(function(response) {
 +			console.log( "Request Failed:", response);
 +			response.message = t('contacts', 'Failed loading groups: {error}', {error:response.message});
 +			$(document).trigger('status.contacts.error', response);
 +		});
 +	};
 +
 +	OC.Contacts.GroupList = GroupList;
 +
 +})(window, jQuery, OC);
diff --cc apps/contacts/lib/backend/database.php
index ac894da,0000000..ff88fd0
mode 100644,000000..100644
--- a/apps/contacts/lib/backend/database.php
+++ b/apps/contacts/lib/backend/database.php
@@@ -1,811 -1,0 +1,812 @@@
 +<?php
 +/**
 + * ownCloud - Database backend for Contacts
 + *
 + * @author Thomas Tanghus
 + * @copyright 2013 Thomas Tanghus (thomas at tanghus.net)
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 + * License as published by the Free Software Foundation; either
 + * version 3 of the License, or any later version.
 + *
 + * This library is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 + *
 + * You should have received a copy of the GNU Affero General Public
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + *
 + */
 +
 +namespace OCA\Contacts\Backend;
 +
 +use OCA\Contacts\Contact,
 +	OCA\Contacts\VObject\VCard,
 +	OCA\Contacts\Utils\Properties,
 +	Sabre\VObject\Reader;
 +
 +/**
 + * Subclass this class for Cantacts backends
 + */
 +
 +class Database extends AbstractBackend {
 +
 +	public $name = 'local';
 +	static private $preparedQueries = array();
 +
 +	/**
 +	* Sets up the backend
 +	*
 +	* @param string $addressBooksTableName
 +	* @param string $cardsTableName
 +	*/
 +	public function __construct(
 +		$userid = null,
 +		$options = array(
 +			'addressBooksTableName' => '*PREFIX*contacts_addressbooks',
 +			'cardsTableName' => '*PREFIX*contacts_cards',
 +			'indexTableName' => '*PREFIX*contacts_cards_properties'
 +		)
 +	) {
 +		$this->userid = $userid ? $userid : \OCP\User::getUser();
 +		$this->addressBooksTableName = $options['addressBooksTableName'];
 +		$this->cardsTableName = $options['cardsTableName'];
 +		$this->indexTableName = $options['indexTableName'];
 +		$this->addressbooks = array();
 +	}
 +
 +	/**
 +	 * Returns the list of addressbooks for a specific user.
 +	 *
 +	 * @see AbstractBackend::getAddressBooksForUser
 +	 * @return array
 +	 */
 +	public function getAddressBooksForUser(array $options = array()) {
 +
 +		try {
 +			if(!isset(self::$preparedQueries['addressbooksforuser'])) {
 +				$sql = 'SELECT `id`, `displayname`, `description`, `ctag` AS `lastmodified`, `userid` AS `owner`, `uri` FROM `'
 +					. $this->addressBooksTableName
 +					. '` WHERE `userid` = ? ORDER BY `displayname`';
 +				self::$preparedQueries['addressbooksforuser'] = \OCP\DB::prepare($sql);
 +			}
 +			$result = self::$preparedQueries['addressbooksforuser']->execute(array($this->userid));
 +			if (\OCP\DB::isError($result)) {
- 				\OCP\Util::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
++				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return $this->addressbooks;
 +			}
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.' exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			return $this->addressbooks;
 +		}
 +
 +		while($row = $result->fetchRow()) {
 +			$row['permissions'] = \OCP\PERMISSION_ALL;
 +			$this->addressbooks[$row['id']] = $row;
 +		}
 +		return $this->addressbooks;
 +	}
 +
 +	public function getAddressBook($addressbookid, array $options = array()) {
 +		//\OCP\Util::writeLog('contacts', __METHOD__.' id: '
 +		//	. $addressbookid, \OCP\Util::DEBUG);
 +		if($this->addressbooks && isset($this->addressbooks[$addressbookid])) {
 +			//print(__METHOD__ . ' ' . __LINE__ .' addressBookInfo: ' . print_r($this->addressbooks[$addressbookid], true));
 +			return $this->addressbooks[$addressbookid];
 +		}
 +		// Hmm, not found. Lets query the db.
 +		try {
 +			$query = 'SELECT `id`, `displayname`, `description`, `userid` AS `owner`, `ctag` AS `lastmodified`, `uri` FROM `'
 +				. $this->addressBooksTableName
 +				. '` WHERE `id` = ?';
 +			if(!isset(self::$preparedQueries['getaddressbook'])) {
 +				self::$preparedQueries['getaddressbook'] = \OCP\DB::prepare($query);
 +			}
 +			$result = self::$preparedQueries['getaddressbook']->execute(array($addressbookid));
 +			if (\OCP\DB::isError($result)) {
- 				\OCP\Util::write('contacts', __METHOD__. 'DB error: '
++				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: '
 +					. \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return null;
 +			}
 +			if((int)$result->numRows() === 0) {
 +				throw new \Exception('Address Book not found', 404);
 +			}
 +			$row = $result->fetchRow();
 +			$row['permissions'] = \OCP\PERMISSION_ALL;
 +			$row['backend'] = $this->name;
 +			$this->addressbooks[$addressbookid] = $row;
 +			return $row;
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.' exception: '
 +				. $e->getMessage(), \OCP\Util::ERROR);
 +			return null;
 +		}
 +		return null;
 +	}
 +
 +	public function hasAddressBook($addressbookid, array $options = array()) {
 +		// First check if it's already cached
 +		if($this->addressbooks && isset($this->addressbooks[$addressbookid])) {
 +			return true;
 +		}
 +		return count($this->getAddressBook($addressbookid)) > 0;
 +	}
 +
 +	/**
 +	 * Updates an addressbook's properties
 +	 *
 +	 * @param string $addressbookid
 +	 * @param array $changes
 +	 * @return bool
 +	 */
 +	public function updateAddressBook($addressbookid, array $changes, array $options = array()) {
 +		if(count($changes) === 0) {
 +			return false;
 +		}
 +
 +		$query = 'UPDATE `' . $this->addressBooksTableName . '` SET ';
 +
 +		$updates = array();
 +
 +		if(isset($changes['displayname'])) {
 +			$query .= '`displayname` = ?, ';
 +			$updates[] = $changes['displayname'];
 +			if($this->addressbooks && isset($this->addressbooks[$addressbookid])) {
 +				$this->addressbooks[$addressbookid]['displayname'] = $changes['displayname'];
 +			}
 +		}
 +
 +		if(isset($changes['description'])) {
 +			$query .= '`description` = ?, ';
 +			$updates[] = $changes['description'];
 +			if($this->addressbooks && isset($this->addressbooks[$addressbookid])) {
 +				$this->addressbooks[$addressbookid]['description'] = $changes['description'];
 +			}
 +		}
 +
 +		$query .= '`ctag` = ? + 1 WHERE `id` = ?';
 +		$updates[] = time();
 +		$updates[] = $addressbookid;
 +
 +		try {
 +			$stmt = \OCP\DB::prepare($query);
 +			$result = $stmt->execute($updates);
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts',
 +					__METHOD__. 'DB error: '
 +					. \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return false;
 +			}
- 		} catch(Exception $e) {
++		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts',
 +				__METHOD__ . ', exception: '
 +				. $e->getMessage(), \OCP\Util::ERROR);
 +			return false;
 +		}
 +
 +		return true;
 +	}
 +
 +	/**
 +	 * Creates a new address book
 +	 *
 +	 * Supported properties are 'displayname', 'description' and 'uri'.
 +	 * 'uri' is supported to allow to add from CardDAV requests, and MUST
 +	 * be used for the 'uri' database field if present.
 +	 * 'displayname' MUST be present.
 +	 *
 +	 * @param array $properties
 +	 * @param array $options - Optional (backend specific options)
 +	 * @return string|false The ID if the newly created AddressBook or false on error.
 +	 */
 +	public function createAddressBook(array $properties, array $options = array()) {
 +
 +		if(count($properties) === 0 || !isset($properties['displayname'])) {
 +			return false;
 +		}
 +
 +		$query = 'INSERT INTO `' . $this->addressBooksTableName . '` '
 +			. '(`userid`,`displayname`,`uri`,`description`,`ctag`) VALUES(?,?,?,?,?)';
 +
 +		$updates = array($this->userid, $properties['displayname']);
 +		$updates[] = isset($properties['uri'])
 +			? $properties['uri']
 +			: $this->createAddressBookURI($properties['displayname']);
 +		$updates[] = isset($properties['description']) ? $properties['description'] : '';
 +		$ctag = time();
 +		$updates[] = $ctag;
 +
 +		try {
 +			if(!isset(self::$preparedQueries['createaddressbook'])) {
 +				self::$preparedQueries['createaddressbook'] = \OCP\DB::prepare($query);
 +			}
 +			$result = self::$preparedQueries['createaddressbook']->execute($updates);
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return false;
 +			}
- 		} catch(Exception $e) {
++		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__ . ', exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			return false;
 +		}
 +
 +		$newid = \OCP\DB::insertid($this->addressBooksTableName);
 +		if($this->addressbooks) {
 +			$updates['id'] = $newid;
 +			$updates['ctag'] = $ctag;
 +			$updates['lastmodified'] = $ctag;
 +			$updates['permissions'] = \OCP\PERMISSION_ALL;
 +			$this->addressbooks[$newid] = $updates;
 +		}
 +		return $newid;
 +	}
 +
 +	/**
 +	 * Deletes an entire addressbook and all its contents
 +	 *
 +	 * NOTE: For efficience this method bypasses the cleanup hooks and deletes
 +	 * property indexes and category/group relations by itself.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param array $options - Optional (backend specific options)
 +	 * @return bool
 +	 */
 +	public function deleteAddressBook($addressbookid, array $options = array()) {
 +
 +		// Get all contact ids for this address book
 +		$ids = array();
 +		$result = null;
 +		$stmt = \OCP\DB::prepare('SELECT `id` FROM `' . $this->cardsTableName . '`'
 +					. ' WHERE `addressbookid` = ?');
 +		try {
 +			$result = $stmt->execute(array($addressbookid));
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: '
 +					. \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return false;
 +			}
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.
 +				', exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			return false;
 +		}
 +
 +		if(!is_null($result)) {
 +			while($id = $result->fetchOne()) {
 +				$ids[] = $id;
 +			}
 +		}
 +
 +		\OCP\Util::emitHook('OCA\Contacts', 'pre_deleteAddressBook',
 +			array('addressbookid' => $addressbookid, 'contactids' => $ids)
 +		);
 +
 +		// Delete contacts in address book.
 +		if(!isset(self::$preparedQueries['deleteaddressbookcontacts'])) {
 +			self::$preparedQueries['deleteaddressbookcontacts'] =
 +				\OCP\DB::prepare('DELETE FROM `' . $this->cardsTableName
 +					. '` WHERE `addressbookid` = ?');
 +		}
 +		try {
 +			self::$preparedQueries['deleteaddressbookcontacts']
 +				->execute(array($addressbookid));
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.
 +				', exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			return false;
 +		}
 +
 +		// Delete the address book.
 +		if(!isset(self::$preparedQueries['deleteaddressbook'])) {
 +			self::$preparedQueries['deleteaddressbook'] =
 +				\OCP\DB::prepare('DELETE FROM `'
 +					. $this->addressBooksTableName . '` WHERE `id` = ?');
 +		}
 +		try {
 +			self::$preparedQueries['deleteaddressbook']
 +				->execute(array($addressbookid));
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.
 +				', exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			return false;
 +		}
 +
 +		if($this->addressbooks && isset($this->addressbooks[$addressbookid])) {
 +			unset($this->addressbooks[$addressbookid]);
 +		}
 +
 +		return true;
 +	}
 +
 +	/**
 +	 * @brief Updates ctag for addressbook
 +	 * @param integer $id
 +	 * @return boolean
 +	 */
 +	public function setModifiedAddressBook($id) {
 +		$query = 'UPDATE `' . $this->addressBooksTableName
 +			. '` SET `ctag` = ? + 1 WHERE `id` = ?';
 +		if(!isset(self::$preparedQueries['touchaddressbook'])) {
 +			self::$preparedQueries['touchaddressbook'] = \OCP\DB::prepare($query);
 +		}
 +		$ctag = time();
 +		self::$preparedQueries['touchaddressbook']->execute(array($ctag, $id));
 +
 +		return true;
 +	}
 +
 +	public function lastModifiedAddressBook($addressbookid) {
 +		if($this->addressbooks && isset($this->addressbooks[$addressbookid])) {
 +			return $this->addressbooks[$addressbookid]['lastmodified'];
 +		}
 +		$addressBook = $this->getAddressBook($addressbookid);
 +		return $addressBook ? $addressBook['lastmodified'] : null;
 +	}
 +
 +	/**
 +	 * Returns the number of contacts in a specific address book.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param bool $omitdata Don't fetch the entire carddata or vcard.
 +	 * @return array
 +	 */
 +	public function numContacts($addressbookid) {
 +		$query = 'SELECT COUNT(*) AS `count` FROM `' . $this->cardsTableName . '` WHERE '
 +			. '`addressbookid` = ?';
 +
 +		if(!isset(self::$preparedQueries['count'])) {
 +			self::$preparedQueries['count'] = \OCP\DB::prepare($query);
 +		}
 +		$result = self::$preparedQueries['count']->execute(array($addressbookid));
 +		if (\OCP\DB::isError($result)) {
 +			\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +			return null;
 +		}
 +		return (int)$result->fetchOne();
 +	}
 +
 +	/**
 +	 * Returns all contacts for a specific addressbook id.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param array $options - Optional (backend specific options)
 +	 * @param bool $omitdata Don't fetch the entire carddata or vcard.
 +	 * @return array
 +	 */
 +	public function getContacts($addressbookid, array $options = array() ) {
 +		//\OCP\Util::writeLog('contacts', __METHOD__.' addressbookid: ' . $addressbookid, \OCP\Util::DEBUG);
 +		$cards = array();
 +		try {
 +			$omitdata = isset($options['omitdata']) ? $options['omitdata'] : false;
 +			$qfields = $omitdata ? '`id`, `fullname` AS `displayname`' : '*';
 +			$query = 'SELECT ' . $qfields . ' FROM `' . $this->cardsTableName
 +				. '` WHERE `addressbookid` = ? ORDER BY `fullname`';
 +			$stmt = \OCP\DB::prepare(
 +				$query,
 +				isset($options['limit']) ? $options['limit'] : null,
 +				isset($options['offset']) ? $options['offset'] : null
 +			);
 +			$result = $stmt->execute(array($addressbookid));
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return $cards;
 +			}
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.', exception: '.$e->getMessage(), \OCP\Util::ERROR);
 +			return $cards;
 +		}
 +
 +		if(!is_null($result)) {
 +			while($row = $result->fetchRow()) {
 +				$row['permissions'] = \OCP\PERMISSION_ALL;
 +				$cards[] = $row;
 +			}
 +		}
 +
 +		return $cards;
 +	}
 +
 +	/**
 +	 * Returns a specific contact.
 +	 *
 +	 * The $id for Database and Shared backends can be an array containing
 +	 * either 'id' or 'uri' to be able to play seamlessly with the
 +	 * CardDAV backend.
 +	 * FIXME: $addressbookid isn't used in the query, so there's no access control.
 +	 * 	OTOH the groups backend - OC_VCategories - doesn't no about parent collections
 +	 * 	only object IDs. Hmm.
 +	 * 	I could make a hack and add an optional, not documented 'nostrict' argument
 +	 * 	so it doesn't look for addressbookid.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param mixed $id Contact ID
 +	 * @param array $options - Optional (backend specific options)
 +	 * @return array|null
 +	 */
 +	public function getContact($addressbookid, $id, array $options = array()) {
 +		//\OCP\Util::writeLog('contacts', __METHOD__.' identifier: ' . $addressbookid . ' ' . $id['uri'], \OCP\Util::DEBUG);
 +
 +		$noCollection = isset($options['noCollection']) ? $options['noCollection'] : false;
 +
 +		$where_query = '`id` = ?';
 +		if(is_array($id)) {
 +			$where_query = '';
 +			if(isset($id['id'])) {
 +				$id = $id['id'];
 +			} elseif(isset($id['uri'])) {
 +				$where_query = '`uri` = ?';
 +				$id = $id['uri'];
 +			} else {
 +				throw new \Exception(
 +					__METHOD__ . ' If second argument is an array, either \'id\' or \'uri\' has to be set.'
 +				);
 +				return null;
 +			}
 +		}
 +		$ids = array($id);
 +
 +		if(!$noCollection) {
 +			$where_query .= ' AND `addressbookid` = ?';
 +			$ids[] = $addressbookid;
 +		}
 +
 +		try {
 +			$query =  'SELECT `id`, `uri`, `carddata`, `lastmodified`, `addressbookid` AS `parent`, `fullname` AS `displayname` FROM `'
 +				. $this->cardsTableName . '` WHERE ' . $where_query;
 +			$stmt = \OCP\DB::prepare($query);
 +			$result = $stmt->execute($ids);
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return null;
 +			}
- 			if((int)$result->numRows() === 0) {
- 				\OCP\Util::writeLog('contacts', __METHOD__.', Not found, id: '. $id, \OCP\Util::DEBUG);
- 				return null;
- 			}
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.', exception: '.$e->getMessage(), \OCP\Util::ERROR);
 +			\OCP\Util::writeLog('contacts', __METHOD__.', id: '. $id, \OCP\Util::DEBUG);
 +			return null;
 +		}
 +
 +		$row = $result->fetchRow();
++		if(!$row) {
++			\OCP\Util::writeLog('contacts', __METHOD__.', Not found, id: '. $id, \OCP\Util::DEBUG);
++			return null;
++		}
 +		$row['permissions'] = \OCP\PERMISSION_ALL;
 +		return $row;
 +	}
 +
 +	public function hasContact($addressbookid, $id) {
 +		return $this->getContact($addressbookid, $id) !== false;
 +	}
 +
 +	/**
 +	 * Creates a new contact
 +	 *
 +	 * In the Database and Shared backends contact be either a Contact object or a string
 +	 * with carddata to be able to play seamlessly with the CardDAV backend.
 +	 * If this method is called by the CardDAV backend, the carddata is already validated.
 +	 * NOTE: It's assumed that this method is called either from the CardDAV backend, the
 +	 * import script, or from the ownCloud web UI in which case either the uri parameter is
 +	 * set, or the contact has a UID. If neither is set, it will fail.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param VCard|string $contact
 +	 * @param array $options - Optional (backend specific options)
 +	 * @return string|bool The identifier for the new contact or false on error.
 +	 */
 +	public function createContact($addressbookid, $contact, array $options = array()) {
 +
 +		$qname = 'createcontact';
 +		$uri = isset($options['uri']) ? $options['uri'] : null;
 +
 +		if(!$contact instanceof VCard) {
 +			try {
 +				$contact = Reader::read($contact);
 +			} catch(\Exception $e) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.', exception: '.$e->getMessage(), \OCP\Util::ERROR);
 +				return false;
 +			}
 +		}
 +
 +		try {
 +			$contact->validate(VCard::REPAIR|VCard::UPGRADE);
 +		} catch (\Exception $e) {
 +			OCP\Util::writeLog('contacts', __METHOD__ . ' ' .
 +				'Error validating vcard: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			return false;
 +		}
 +
 +		$uri = is_null($uri) ? $this->uniqueURI($addressbookid, $contact->UID . '.vcf') : $uri;
 +		$now = new \DateTime;
 +		$contact->REV = $now->format(\DateTime::W3C);
 +
 +		$appinfo = \OCP\App::getAppInfo('contacts');
 +		$appversion = \OCP\App::getAppVersion('contacts');
 +		$prodid = '-//ownCloud//NONSGML '.$appinfo['name'].' '.$appversion.'//EN';
 +		$contact->PRODID = $prodid;
 +
 +		$data = $contact->serialize();
 +		if(!isset(self::$preparedQueries[$qname])) {
 +		self::$preparedQueries[$qname] = \OCP\DB::prepare('INSERT INTO `'
 +			. $this->cardsTableName
 +			. '` (`addressbookid`,`fullname`,`carddata`,`uri`,`lastmodified`) VALUES(?,?,?,?,?)' );
 +		}
 +		try {
 +			$result = self::$preparedQueries[$qname]
 +				->execute(
 +					array(
 +						$addressbookid,
 +						(string)$contact->FN,
 +						$contact->serialize(),
 +						$uri,
 +						time()
 +					)
 +				);
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return false;
 +			}
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.', exception: '.$e->getMessage(), \OCP\Util::ERROR);
 +			return false;
 +		}
 +		$newid = \OCP\DB::insertid($this->cardsTableName);
 +
 +		$this->setModifiedAddressBook($addressbookid);
 +		\OCP\Util::emitHook('OCA\Contacts', 'post_createContact',
 +			array('id' => $newid, 'parent' => $addressbookid, 'backend' => $this->name, 'contact' => $contact)
 +		);
 +		return (string)$newid;
 +	}
 +
 +	/**
 +	 * Updates a contact
 +	 *
 +	 * @param string $addressbookid
 +	 * @param mixed $id Contact ID
 +	 * @param VCard|string $contact
 +	 * @param array $options - Optional (backend specific options)
 +	 * @see getContact
 +	 * @return bool
 +	 */
 +	public function updateContact($addressbookid, $id, $contact, array $options = array()) {
 +		$noCollection = isset($options['noCollection']) ? $options['noCollection'] : false;
 +		$isBatch = isset($options['isBatch']) ? $options['isBatch'] : false;
 +		$qname = 'updatecontact';
 +
 +		$updateRevision = true;
 +		$isCardDAV = false;
 +		if(!$contact instanceof VCard) {
 +			try {
 +				$contact = Reader::read($contact);
 +			} catch(\Exception $e) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.', exception: '.$e->getMessage(), \OCP\Util::ERROR);
 +				return false;
 +			}
 +		}
 +
 +		if(is_array($id)) {
 +			$where_query = '';
 +			if(isset($id['id'])) {
 +				$id = $id['id'];
 +			} elseif(isset($id['uri'])) {
 +				$updateRevision = false;
 +				$isCardDAV = true;
 +				$id = $this->getIdFromUri($id['uri']);
 +				if(is_null($id)) {
 +					\OCP\Util::writeLog('contacts', __METHOD__ . ' Couldn\'t find contact', \OCP\Util::ERROR);
 +					return false;
 +				}
 +			} else {
 +				throw new \Exception(
 +					__METHOD__ . ' If second argument is an array, either \'id\' or \'uri\' has to be set.'
 +				);
 +			}
 +		}
 +
 +		if($updateRevision || !isset($contact->REV)) {
 +			$now = new \DateTime;
 +			$contact->REV = $now->format(\DateTime::W3C);
 +		}
 +
 +		$data = $contact->serialize();
 +
 +		if($noCollection) {
 +			$me = $this->getContact(null, $id, $options);
 +			$addressbookid = $me['parent'];
 +		}
 +
 +		$updates = array($contact->FN, $data, time(), $id, $addressbookid);
 +
 +		$query = 'UPDATE `' . $this->cardsTableName
 +				. '` SET `fullname` = ?,`carddata` = ?, `lastmodified` = ? WHERE `id` = ? AND `addressbookid` = ?';
 +		if(!isset(self::$preparedQueries[$qname])) {
 +			self::$preparedQueries[$qname] = \OCP\DB::prepare($query);
 +		}
 +		try {
 +			$result = self::$preparedQueries[$qname]->execute($updates);
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return false;
 +			}
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.', exception: '
 +				. $e->getMessage(), \OCP\Util::ERROR);
 +			\OCP\Util::writeLog('contacts', __METHOD__.', id' . $id, \OCP\Util::DEBUG);
 +			return false;
 +		}
 +
 +		$this->setModifiedAddressBook($addressbookid);
 +		if(!$isBatch) {
 +			\OCP\Util::emitHook('OCA\Contacts', 'post_updateContact',
 +				array(
 +					'backend' => $this->name,
 +					'addressBookId' => $addressbookid,
 +					'contactId' => $id,
 +					'contact' => $contact,
 +					'carddav' => $isCardDAV
 +				)
 +			);
 +		}
 +		return true;
 +	}
 +
 +	/**
 +	 * Deletes a contact
 +	 *
 +	 * @param string $addressbookid
 +	 * @param string $id
 +	 * @param array $options - Optional (backend specific options)
 +	 * @see getContact
 +	 * @return bool
 +	 */
 +	public function deleteContact($addressbookid, $id, array $options = array()) {
 +		// TODO: pass the uri in $options instead.
 +
 +		$qname = 'deletecontact';
 +		$noCollection = isset($options['noCollection']) ? $options['noCollection'] : false;
 +		$isBatch = isset($options['isBatch']) ? $options['isBatch'] : false;
 +
 +		if(is_array($id)) {
 +			if(isset($id['id'])) {
 +				$id = $id['id'];
 +			} elseif(isset($id['uri'])) {
 +				$id = $this->getIdFromUri($id['uri']);
 +				if(is_null($id)) {
 +					\OCP\Util::writeLog('contacts', __METHOD__ . ' Couldn\'t find contact', \OCP\Util::ERROR);
 +					return false;
 +				}
 +			} else {
 +				throw new Exception(
 +					__METHOD__ . ' If second argument is an array, either \'id\' or \'uri\' has to be set.'
 +				);
 +			}
 +		}
 +
 +		if(!$isBatch) {
 +			\OCP\Util::emitHook('OCA\Contacts', 'pre_deleteContact',
 +				array('id' => $id)
 +			);
 +		}
 +
 +		if($noCollection) {
 +			$me = $this->getContact(null, $id, $options);
 +			$addressbookid = $me['parent'];
 +		}
 +
 +		if(!isset(self::$preparedQueries[$qname])) {
 +			self::$preparedQueries[$qname] = \OCP\DB::prepare('DELETE FROM `'
 +				. $this->cardsTableName
 +				. '` WHERE `id` = ? AND `addressbookid` = ?');
 +		}
 +		\OCP\Util::writeLog('contacts', __METHOD__ . ' updates: ' . $id . '/' . $addressbookid, \OCP\Util::DEBUG);
 +		try {
 +			$result = self::$preparedQueries[$qname]->execute(array($id, $addressbookid));
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: '
 +					. \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return false;
 +			}
 +		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.
 +				', exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			\OCP\Util::writeLog('contacts', __METHOD__.', id: '
 +				. $id, \OCP\Util::DEBUG);
 +			return false;
 +		}
 +		$this->setModifiedAddressBook($addressbookid);
 +		return true;
 +	}
 +
 +	/**
 +	 * @brief Get the last modification time for a contact.
 +	 *
 +	 * Must return a UNIX time stamp or null if the backend
 +	 * doesn't support it.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param mixed $id
 +	 * @returns int | null
 +	 */
 +	public function lastModifiedContact($addressbookid, $id) {
 +		$contact = $this->getContact($addressbookid, $id);
 +		return ($contact ? $contact['lastmodified'] : null);
 +	}
 +
 +	/**
 +	 * @brief Get the contact id from the uri.
 +	 *
 +	 * @param mixed $id
 +	 * @returns int | null
 +	 */
 +	public function getIdFromUri($uri) {
 +		$query =  'SELECT `id` FROM `'. $this->cardsTableName . '` WHERE `uri` = ?';
 +		$stmt = \OCP\DB::prepare($query);
 +		$result = $stmt->execute(array($uri));
 +		if (\OCP\DB::isError($result)) {
 +			\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +			return null;
 +		}
- 		if((int)$result->numRows() === 0) {
++		$one = $result->fetchOne();
++		if(!$one) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.', Not found, uri: '. $uri, \OCP\Util::DEBUG);
 +			return null;
 +		}
- 		return $result->fetchOne();
++		return $one;
 +	}
 +
 +	private function createAddressBookURI($displayname, $userid = null) {
 +		$userid = $userid ? $userid : \OCP\User::getUser();
 +		$name = str_replace(' ', '_', strtolower($displayname));
 +		try {
 +			$stmt = \OCP\DB::prepare('SELECT `uri` FROM `' . $this->addressBooksTableName . '` WHERE `userid` = ? ');
 +			$result = $stmt->execute(array($userid));
 +			if (\OCP\DB::isError($result)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
 +				return $name;
 +			}
- 		} catch(Exception $e) {
++		} catch(\Exception $e) {
 +			\OCP\Util::writeLog('contacts', __METHOD__ . ' exception: ' . $e->getMessage(), \OCP\Util::ERROR);
 +			return $name;
 +		}
 +		$uris = array();
 +		while($row = $result->fetchRow()) {
 +			$uris[] = $row['uri'];
 +		}
 +
 +		$newname = $name;
 +		$i = 1;
 +		while(in_array($newname, $uris)) {
 +			$newname = $name.$i;
 +			$i = $i + 1;
 +		}
 +		return $newname;
 +	}
 +
 +	/**
 +	* @brief Checks if a contact with the same URI already exist in the address book.
 +	* @param string $addressBookId Address book ID.
 +	* @param string $uri
 +	* @returns string Unique URI
 +	*/
 +	protected function uniqueURI($addressBookId, $uri) {
 +		$stmt = \OCP\DB::prepare( 'SELECT * FROM `' . $this->cardsTableName . '` WHERE `addressbookid` = ? AND `uri` = ?' );
 +
 +		$result = $stmt->execute(array($addressBookId, $uri));
 +
 +		if($result->numRows() > 0) {
 +			while(true) {
 +				$uri = Properties::generateUID() . '.vcf';
 +				$result = $stmt->execute(array($addressBookId, $uri));
 +				if($result->numRows() > 0) {
 +					continue;
 +				} else {
 +					return $uri;
 +				}
 +			}
 +		} else {
 +			return $uri;
 +		}
 +	}
 +}
diff --cc apps/contacts/lib/backend/shared.php
index 09076bb,0000000..4896405
mode 100644,000000..100644
--- a/apps/contacts/lib/backend/shared.php
+++ b/apps/contacts/lib/backend/shared.php
@@@ -1,128 -1,0 +1,131 @@@
 +<?php
 +/**
 + * ownCloud - Backend for Shared contacts
 + *
 + * @author Thomas Tanghus
 + * @copyright 2013 Thomas Tanghus (thomas at tanghus.net)
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 + * License as published by the Free Software Foundation; either
 + * version 3 of the License, or any later version.
 + *
 + * This library is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 + *
 + * You should have received a copy of the GNU Affero General Public
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + *
 + */
 +
 +namespace OCA\Contacts\Backend;
 +
 +use OCA\Contacts;
 +
 +/**
 + * Subclass this class for Cantacts backends
 + */
 +
 +class Shared extends Database {
 +
 +	public $name = 'shared';
 +	public $addressbooks = array();
 +
 +	/**
 +	 * Returns the list of addressbooks for a specific user.
 +	 *
 +	 * @param string $principaluri
 +	 * @return array
 +	 */
 +	public function getAddressBooksForUser(array $options = array()) {
 +
 +		// workaround for https://github.com/owncloud/core/issues/2814
 +		$maybeSharedAddressBook = \OCP\Share::getItemsSharedWith(
 +			'addressbook',
 +			Contacts\Share\Addressbook::FORMAT_ADDRESSBOOKS
 +		);
 +		foreach($maybeSharedAddressBook as $sharedAddressbook) {
 +			if(isset($sharedAddressbook['id'])) {
 +				$this->addressbooks[] = $this->getAddressBook($sharedAddressbook['id']);
 +			}
 +		}
 +
 +		foreach($this->addressbooks as &$addressBook) {
 +			$addressBook['backend'] = $this->name;
 +		}
 +		return $this->addressbooks;
 +	}
 +
 +	/**
 +	 * Returns a specific address book.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param mixed $id Contact ID
 +	 * @return mixed
 +	 */
 +	public function getAddressBook($addressbookid, array $options = array()) {
 +		$addressBook = \OCP\Share::getItemSharedWithBySource(
 +			'addressbook',
 +			$addressbookid,
 +			Contacts\Share\Addressbook::FORMAT_ADDRESSBOOKS
 +		);
 +		// Not sure if I'm doing it wrongly, or if its supposed to return
 +		// the info in an array?
 +		$addressBook = (isset($addressBook['permissions']) ? $addressBook : $addressBook[0]);
 +		$addressBook['backend'] = $this->name;
 +		return $addressBook;
 +	}
 +
 +	/**
 +	 * Returns all contacts for a specific addressbook id.
 +	 *
 +	 * @param string $addressbookid
 +	 * @param bool $omitdata Don't fetch the entire carddata or vcard.
 +	 * @return array
 +	 */
 +	public function getContacts($addressbookid, array $options = array()) {
 +
 +		$addressBook = $this->getAddressBook($addressbookid);
 +		if(!$addressBook) {
 +			throw new \Exception('Shared Address Book not found: ' . $addressbookid, 404);
 +		}
 +		$permissions = $addressBook['permissions'];
 +
 +		$cards = parent::getContacts($addressbookid, $options);
 +
 +		foreach($cards as &$card) {
 +			$card['permissions'] = $permissions;
 +		}
 +
 +		return $cards;
 +	}
 +
 +	/**
 +	 * Returns a specific contact.
 +	 *
 +	 * The $id for Database and Shared backends can be an array containing
 +	 * either 'id' or 'uri' to be able to play seamlessly with the
 +	 * CardDAV backend.
 +	 * @see \Database\getContact
 +	 *
 +	 * @param string $addressbookid
 +	 * @param mixed $id Contact ID
 +	 * @return array|false
 +	 */
 +	public function getContact($addressbookid, $id, array $options = array()) {
 +		$addressBook = $this->getAddressBook($addressbookid);
 +		if(!$addressBook) {
 +			throw new \Exception('Shared Address Book not found: ' . $addressbookid, 404);
 +		}
 +		$permissions = $addressBook['permissions'];
 +
 +		$card = parent::getContact($addressbookid, $id, $options);
++		if(!$card) {
++			throw new \Exception('Shared Contact not found: ' . implode(',', $id), 404);
++		}
 +		$card['permissions'] = $permissions;
 +		return $card;
 +	}
 +}
diff --cc apps/contacts/lib/carddav/backend.php
index bb0f4df,0000000..7d26812
mode 100644,000000..100644
--- a/apps/contacts/lib/carddav/backend.php
+++ b/apps/contacts/lib/carddav/backend.php
@@@ -1,273 -1,0 +1,275 @@@
 +<?php
 +/**
 + * ownCloud - Addressbook
 + *
 + * @author Jakob Sack
 + * @copyright 2011 Jakob Sack mail at jakobsack.de
 + *
 + * 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\CardDAV;
 +
 +use OCA\Contacts;
 +
 +class Backend extends \Sabre_CardDAV_Backend_Abstract {
 +
 +	public function __construct($backends) {
 +		$this->backends = $backends;
 +	}
 +
 +	/**
 +	 * Returns the list of addressbooks for a specific user.
 +	 *
 +	 * @param string $principaluri
 +	 * @return array
 +	 */
 +	public function getAddressBooksForUser($principaluri) {
 +
 +		$app = new Contacts\App();
 +		$userAddressBooks = array();
 +		foreach($this->backends as $backendName) {
 +			$backend = $app->getBackend($backendName);
 +			$addressBooks = $backend->getAddressBooksForUser();
 +			
 +			if (is_array($addressBooks)) {
 +				foreach($addressBooks as $addressBook) {
 +					if($addressBook['owner'] != \OCP\USER::getUser()) {
 +						$addressBook['uri'] = $addressBook['uri'] . '_shared_by_' . $addressBook['owner'];
 +						$addressBook['displayname'] = $addressBook['displayname'];
 +					}
 +					$userAddressBooks[] = array(
 +						'id'  => $backend->name . '::' . $addressBook['id'],
 +						'uri' => $addressBook['uri'],
 +						'principaluri' => 'principals/'.$addressBook['owner'],
 +						'{DAV:}displayname' => $addressBook['displayname'],
 +						'{' . \Sabre_CardDAV_Plugin::NS_CARDDAV . '}addressbook-description'
 +								=> $addressBook['description'],
 +						'{http://calendarserver.org/ns/}getctag' => $addressBook['lastmodified'],
 +						'{' . \Sabre_CardDAV_Plugin::NS_CARDDAV . '}supported-address-data' =>
 +							new \Sabre_CardDAV_Property_SupportedAddressData(),
 +					);
 +				}
 +			}
 +		}
 +
 +		return $userAddressBooks;
 +	}
 +
 +
 +	/**
 +	 * Updates an addressbook's properties
 +	 *
 +	 * See Sabre_DAV_IProperties for a description of the mutations array, as
 +	 * well as the return value.
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @param array $mutations
 +	 * @see Sabre_DAV_IProperties::updateProperties
 +	 * @return bool|array
 +	 */
 +	public function updateAddressBook($addressbookid, array $mutations) {
- 		$name = null;
- 		$description = null;
 +		$changes = array();
 +
 +		foreach($mutations as $property=>$newvalue) {
 +			switch($property) {
 +				case '{DAV:}displayname' :
- 					$changes['name'] = $newvalue;
++					$changes['displayname'] = $newvalue;
 +					break;
 +				case '{' . \Sabre_CardDAV_Plugin::NS_CARDDAV
 +						. '}addressbook-description' :
 +					$changes['description'] = $newvalue;
 +					break;
 +				default :
 +					// If any unsupported values were being updated, we must
 +					// let the entire request fail.
 +					return false;
 +			}
 +		}
 +
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
 +		return $backend->updateAddressBook($id, $changes);
 +
 +	}
 +
 +	/**
 +	 * Creates a new address book
 +	 *
 +	 * @param string $principaluri
 +	 * @param string $uri Just the 'basename' of the url.
 +	 * @param array $properties
 +	 * @return void
 +	 */
 +	public function createAddressBook($principaluri, $uri, array $properties) {
 +
- 		$properties = array();
- 		$userid = $this->userIDByPrincipal($principaluri);
- 
- 		foreach($properties as $property=>$newvalue) {
- 
++		foreach($properties as $property => $newvalue) {
 +			switch($property) {
 +				case '{DAV:}displayname' :
 +					$properties['displayname'] = $newvalue;
 +					break;
 +				case '{' . \Sabre_CardDAV_Plugin::NS_CARDDAV
 +						. '}addressbook-description' :
 +					$properties['description'] = $newvalue;
 +					break;
 +				default :
 +					throw new \Sabre_DAV_Exception_BadRequest('Unknown property: '
 +						. $property);
 +			}
 +
 +		}
 +
 +		$properties['uri'] = $uri;
 +
 +		list(,$backend) = $this->getBackendForAddressBook($addressbookid);
 +		$backend->createAddressBook($properties, $userid);
 +	}
 +
 +	/**
 +	 * Deletes an entire addressbook and all its contents
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @return void
 +	 */
 +	public function deleteAddressBook($addressbookid) {
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
 +		$backend->deleteAddressBook($id);
 +	}
 +
 +	/**
 +	 * Returns the last modified date if the backend supports it.
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @return void
 +	 */
 +	public function lastModifiedAddressBook($addressbookid) {
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
 +		return $backend->lastModifiedAddressBook($id);
 +	}
 +
 +	/**
 +	 * Returns all cards for a specific addressbook id.
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @return array
 +	 */
 +	public function getCards($addressbookid) {
- 		$contacts = array();
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
 +		$contacts = $backend->getContacts($id);
 +
 +		$cards = array();
 +		foreach($contacts as $contact) {
 +			$cards[] = array(
 +				'id' => $contact['id'],
 +				//'carddata' => $i['carddata'],
 +				'size' => strlen($contact['carddata']),
 +				'etag' => '"' . md5($contact['carddata']) . '"',
 +				'uri' => urlencode($contact['uri']),
 +				'lastmodified' => $contact['lastmodified'] );
 +		}
 +
 +		return $cards;
 +	}
 +
 +	/**
 +	 * Returns a specfic card
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @param string $carduri
 +	 * @return array
 +	 */
 +	public function getCard($addressbookid, $carduri) {
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
- 		$contact = $backend->getContact($id, array('uri' => urldecode($carduri)));
- 		return ($contact ? $contact : false);
- 
++		try {
++			$contact = $backend->getContact($id, array('uri' => urldecode($carduri)));
++			if(is_array($contact) ) {
++				$contact['etag'] = '"' . md5($contact['carddata']) . '"';
++				return $contact;
++			}
++		} catch(\Exception $e) {
++			//throw new \Sabre_DAV_Exception_NotFound($e->getMessage());
++			\OCP\Util::writeLog('contacts', __METHOD__.', Exception: '. $e->getMessage(), \OCP\Util::DEBUG);
++			return false;
++		}
++		return false;
 +	}
 +
 +	/**
 +	 * Creates a new card
 +	 *
 +	 * We don't return an Etag as the carddata can have been modified
 +	 * by Plugin::validate()
 +	 *
 +	 * @see Plugin::validate()
 +	 * @param mixed $addressbookid
 +	 * @param string $carduri
 +	 * @param string $carddata
 +	 * @return string|null
 +	 */
 +	public function createCard($addressbookid, $carduri, $carddata) {
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
 +		$backend->createContact($id, $carddata, array('uri' => $carduri));
 +	}
 +
 +	/**
 +	 * Updates a card
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @param string $carduri
 +	 * @param string $carddata
 +	 * @return null
 +	 */
 +	public function updateCard($addressbookid, $carduri, $carddata) {
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
 +		$backend->updateContact($id, array('uri' => $carduri,), $carddata);
 +	}
 +
 +	/**
 +	 * Deletes a card
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @param string $carduri
 +	 * @return bool
 +	 */
 +	public function deleteCard($addressbookid, $carduri) {
 +		list($id, $backend) = $this->getBackendForAddressBook($addressbookid);
 +		return $backend->deleteContact($id, array('uri' => $carduri));
 +	}
 +
 +	/**
 +	 * @brief gets the userid from a principal path
 +	 * @param string $principaluri
 +	 * @return string
 +	 */
 +	public function userIDByPrincipal($principaluri) {
 +		list(, $userid) = \Sabre_DAV_URLUtil::splitPath($principaluri);
 +		return $userid;
 +	}
 +
 +	/**
 +	 * Get the backend for an address book
 +	 *
 +	 * @param mixed $addressbookid
 +	 * @return array(string, \OCA\Contacts\Backend\AbstractBackend)
 +	 */
 +	public function getBackendForAddressBook($addressbookid) {
 +		list($backendName, $id) = explode('::', $addressbookid);
 +		$app = new Contacts\App();
 +		$backend = $app->getBackend($backendName);
 +		if($backend->name === $backendName && $backend->hasAddressBook($id)) {
 +			return array($id, $backend);
 +		}
 +		throw new \Sabre_DAV_Exception_NotFound('Backend not found: ' . $addressbookid);
 +	}
 +}
diff --cc apps/contacts/lib/contact.php
index d659a05,0000000..5330bec
mode 100644,000000..100644
--- a/apps/contacts/lib/contact.php
+++ b/apps/contacts/lib/contact.php
@@@ -1,779 -1,0 +1,779 @@@
 +<?php
 +/**
 + * ownCloud - Contact object
 + *
 + * @author Thomas Tanghus
 + * @copyright 2012 Thomas Tanghus (thomas at tanghus.net)
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 + * License as published by the Free Software Foundation; either
 + * version 3 of the License, or any later version.
 + *
 + * This library is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 + *
 + * You should have received a copy of the GNU Affero General Public
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + *
 + */
 +
 +namespace OCA\Contacts;
 +
 +use Sabre\VObject\Property,
 +	OCA\Contacts\Utils\Properties;
 +
 +/**
 + * Subclass this class or implement IPIMObject interface for PIM objects
 + */
 +
 +class Contact extends VObject\VCard implements IPIMObject {
 +
 +	/**
 +	 * The name of the object type in this case VCARD.
 +	 *
 +	 * This is used when serializing the object.
 +	 *
 +	 * @var string
 +	 */
 +	public $name = 'VCARD';
 +
 +	/**
 +	 * @brief language object
 +	 *
 +	 * @var OC_L10N
 +	 */
 +	public static $l10n;
 +
 +	protected $props = array();
 +
 +	/**
 +	 * Create a new Contact object
 +	 *
 +	 * @param AddressBook $parent
 +	 * @param AbstractBackend $backend
 +	 * @param mixed $data
 +	 */
 +	public function __construct($parent, $backend, $data = null) {
 +		self::$l10n = $parent::$l10n;
 +		//\OCP\Util::writeLog('contacts', __METHOD__ . ' parent: ' . print_r($parent, true) . ', backend: ' . print_r($backend, true) . ', data: ' . print_r($data, true), \OCP\Util::DEBUG);
 +		//\OCP\Util::writeLog('contacts', __METHOD__, \OCP\Util::DEBUG);
 +		$this->props['parent'] = $parent;
 +		$this->props['backend'] = $backend;
 +		$this->props['retrieved'] = false;
 +		$this->props['saved'] = false;
 +
 +		if(!is_null($data)) {
 +			if($data instanceof VObject\VCard) {
 +				foreach($data->children as $child) {
 +					$this->add($child);
 +				}
 +				$this->setRetrieved(true);
 +			} elseif(is_array($data)) {
 +				foreach($data as $key => $value) {
 +					switch($key) {
 +						case 'id':
 +							$this->props['id'] = $value;
 +							break;
 +						case 'lastmodified':
 +							$this->props['lastmodified'] = $value;
 +							break;
 +						case 'uri':
 +							$this->props['uri'] = $value;
 +							break;
 +						case 'carddata':
 +							$this->props['carddata'] = $value;
 +							$this->retrieve();
 +							break;
 +						case 'vcard':
 +							$this->props['vcard'] = $value;
 +							$this->retrieve();
 +							break;
 +						case 'displayname':
 +						case 'fullname':
 +							if(is_string($value)) {
 +								$this->props['displayname'] = $value;
 +								$this->FN = $value;
 +								// Set it to saved again as we're not actually changing anything
 +								$this->setSaved();
 +							}
 +							break;
 +					}
 +				}
 +			}
 +		}
 +	}
 +
 +	/**
 +	 * @return array|null
 +	 */
 +	public function getMetaData() {
 +		if(!$this->hasPermission(\OCP\PERMISSION_READ)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to see this contact'), 403);
 +		}
 +		if(!isset($this->props['displayname'])) {
 +			if(!$this->retrieve()) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.' error reading: '.print_r($this->props, true), \OCP\Util::ERROR);
 +				return null;
 +			}
 +		}
 +		return array(
 +			'id' => $this->getId(),
 +			'displayname' => $this->getDisplayName(),
 +			'permissions' => $this->getPermissions(),
 +			'lastmodified' => $this->lastModified(),
 +			'owner' => $this->getOwner(),
 +			'parent' => $this->getParent()->getId(),
 +			'backend' => $this->getBackend()->name,
 +		);
 +	}
 +
 +	/**
 +	 * Get a unique key combined of backend name, address book id and contact id.
 +	 *
 +	 * @return string
 +	 */
 +	public function combinedKey() {
 +		return $this->getBackend()->name . '::' . $this->getParent()->getId() . '::' . $this->getId();
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	public function getOwner() {
 +		return $this->props['parent']->getOwner();
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	public function getId() {
 +		return isset($this->props['id']) ? $this->props['id'] : null;
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	function getDisplayName() {
 +		if(!$this->hasPermission(\OCP\PERMISSION_READ)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to see this contact'), 403);
 +		}
 +		return isset($this->props['displayname'])
 +			? $this->props['displayname']
 +			: (isset($this->FN) ? $this->FN : null);
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 */
 +	public function getURI() {
 +		return isset($this->props['uri']) ? $this->props['uri'] : null;
 +	}
 +
 +	/**
 +	 * @return string|null
 +	 * TODO: Cache result.
 +	 */
 +	public function getETag() {
 +		$this->retrieve();
 +		return md5($this->serialize());
 +	}
 +
 +	/**
 +	 * If this object is part of a collection return a reference
 +	 * to the parent object, otherwise return null.
 +	 * @return IPIMObject|null
 +	 */
 +	public function getParent() {
 +		return $this->props['parent'];
 +	}
 +
 +	public function getBackend() {
 +		return $this->props['backend'];
 +	}
 +
 +	/** CRUDS permissions (Create, Read, Update, Delete, Share)
 +	 *
 +	 * @return integer
 +	 */
 +	public function getPermissions() {
 +		return $this->props['parent']->getPermissions();
 +	}
 +
 +	/**
 +	 * @param integer $permission
 +	 * @return bool
 +	 */
 +	public function hasPermission($permission) {
 +		return $this->getPermissions() & $permission;
 +	}
 +
 +	/**
 +	 * Save the address book data to backend
 +	 * FIXME
 +	 *
 +	 * @param array $data
 +	 * @return bool
 +	 */
 +/*	public function update(array $data) {
 +
 +		foreach($data as $key => $value) {
 +			switch($key) {
 +				case 'displayname':
 +					$this->addressBookInfo['displayname'] = $value;
 +					break;
 +				case 'description':
 +					$this->addressBookInfo['description'] = $value;
 +					break;
 +			}
 +		}
 +		return $this->props['backend']->updateContact(
 +			$this->getParent()->getId(),
 +			$this->getId(),
 +			$this
 +		);
 +	}
 +*/
 +	/**
 +	 * Delete the data from backend
 +	 *
 +	 * FIXME: Should be removed as it could leave the parent with a dataless object.
 +	 *
 +	 * @return bool
 +	 */
 +	public function delete() {
 +		if(!$this->hasPermission(\OCP\PERMISSION_DELETE)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to delete this contact'), 403);
 +		}
 +		return $this->props['backend']->deleteContact(
 +			$this->getParent()->getId(),
 +			$this->getId()
 +		);
 +	}
 +
 +	/**
 +	 * Save the contact data to backend
 +	 *
 +	 * @return bool
 +	 */
 +	public function save($force = false) {
 +		if(!$this->hasPermission(\OCP\PERMISSION_UPDATE)) {
 +			throw new \Exception(self::$l10n->t('You do not have permissions to update this contact'), 403);
 +		}
 +		if($this->isSaved() && !$force) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.' Already saved: ' . print_r($this->props, true), \OCP\Util::DEBUG);
 +			return true;
 +		}
 +		if(isset($this->FN)) {
 +			$this->props['displayname'] = (string)$this->FN;
 +		}
 +		if($this->getId()) {
 +			if(!$this->getBackend()->hasContactMethodFor(\OCP\PERMISSION_UPDATE)) {
 +				throw new \Exception(self::$l10n->t('The backend for this contact does not support updating it'), 501);
 +			}
 +			if($this->getBackend()
 +				->updateContact(
 +					$this->getParent()->getId(),
 +					$this->getId(),
 +					$this
 +				)
 +			) {
 +				$this->props['lastmodified'] = time();
 +				$this->setSaved(true);
 +				return true;
 +			} else {
 +				return false;
 +			}
 +		} else {
 +			//print(__METHOD__.' ' . print_r($this->getParent(), true));
 +			if(!$this->getBackend()->hasContactMethodFor(\OCP\PERMISSION_CREATE)) {
 +				throw new \Exception(self::$l10n->t('This backend not support adding contacts'), 501);
 +			}
 +			$this->props['id'] = $this->getBackend()->createContact(
 +				$this->getParent()->getId(), $this
 +			);
 +			$this->setSaved(true);
 +			return $this->getId() !== false;
 +		}
 +	}
 +
 +	/**
 +	 * Get the data from the backend
 +	 * FIXME: Clean this up and make sure the logic is OK.
 +	 */
 +	public function retrieve() {
 +		if($this->isRetrieved() || count($this->children) > 1) {
 +			//\OCP\Util::writeLog('contacts', __METHOD__. ' children', \OCP\Util::DEBUG);
 +			return true;
 +		} else {
 +			$data = null;
 +			if(isset($this->props['vcard'])
 +				&& $this->props['vcard'] instanceof VObject\VCard) {
 +				foreach($this->props['vcard']->children() as $child) {
 +					$this->add($child);
 +					if($child->name === 'FN') {
 +						$this->props['displayname']
 +							= strtr($child->value, array('\,' => ',', '\;' => ';', '\\\\' => '\\'));
 +					}
 +				}
 +				$this->setRetrieved(true);
 +				$this->setSaved(true);
 +				//$this->children = $this->props['vcard']->children();
 +				unset($this->props['vcard']);
 +				return true;
 +			} elseif(!isset($this->props['carddata'])) {
 +				$result = $this->props['backend']->getContact(
 +					$this->getParent()->getId(),
 +					$this->getId()
 +				);
 +				if($result) {
 +					if(isset($result['vcard'])
 +						&& $result['vcard'] instanceof VObject\VCard) {
 +						foreach($result['vcard']->children() as $child) {
 +							$this->add($child);
 +						}
 +						$this->setRetrieved(true);
 +						return true;
 +					} elseif(isset($result['carddata'])) {
 +						// Save internal values
 +						$data = $result['carddata'];
 +						$this->props['carddata'] = $result['carddata'];
 +						$this->props['lastmodified'] = isset($result['lastmodified'])
 +							? $result['lastmodified']
 +							: null;
 +						$this->props['displayname'] = $result['displayname'];
 +						$this->props['permissions'] = $result['permissions'];
 +					} else {
 +						\OCP\Util::writeLog('contacts', __METHOD__
 +							. ' Could not get vcard or carddata: '
 +							. $this->getId()
 +							. print_r($result, true), \OCP\Util::DEBUG);
 +						return false;
 +					}
 +				} else {
 +					\OCP\Util::writeLog('contacts', __METHOD__.' Error getting contact: ' . $this->getId(), \OCP\Util::DEBUG);
 +				}
 +			} elseif(isset($this->props['carddata'])) {
 +				$data = $this->props['carddata'];
 +			}
 +			try {
 +				$obj = \Sabre\VObject\Reader::read(
 +					$data,
 +					\Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES
 +				);
 +				if($obj) {
 +					foreach($obj->children as $child) {
 +						$this->add($child);
 +					}
 +					$this->setRetrieved(true);
 +					$this->setSaved(true);
 +				} else {
 +					\OCP\Util::writeLog('contacts', __METHOD__.' Error reading: ' . print_r($data, true), \OCP\Util::DEBUG);
 +					return false;
 +				}
 +			} catch (\Exception $e) {
 +				\OCP\Util::writeLog('contacts', __METHOD__ .
 +					' Error parsing carddata  for: ' . $this->getId() . ' ' . $e->getMessage(),
 +						\OCP\Util::ERROR);
 +				return false;
 +			}
 +		}
 +		return true;
 +	}
 +
 +	/**
 +	* Get a property index in the contact by the checksum of its serialized value
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @return \Sabre\VObject\Property Property by reference
 +	* @throws An exception with error code 404 if the property is not found.
 +	*/
 +	public function getPropertyIndexByChecksum($checksum) {
 +		$this->retrieve();
 +		$idx = 0;
 +		foreach($this->children as $i => &$property) {
 +			if(substr(md5($property->serialize()), 0, 8) == $checksum ) {
 +				return $idx;
 +			}
 +			$idx += 1;
 +		}
 +		throw new \Exception(self::$l10n->t('Property not found'), 404);
 +	}
 +
 +	/**
 +	* Get a property by the checksum of its serialized value
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @return \Sabre\VObject\Property Property by reference
 +	* @throws An exception with error code 404 if the property is not found.
 +	*/
 +	public function getPropertyByChecksum($checksum) {
 +		$this->retrieve();
 +		foreach($this->children as $i => &$property) {
 +			if(substr(md5($property->serialize()), 0, 8) == $checksum ) {
 +				return $property;
 +			}
 +		}
 +		throw new \Exception(self::$l10n->t('Property not found'), 404);
 +	}
 +
 +	/**
 +	* Delete a property by the checksum of its serialized value
 +	* It is up to the caller to call ->save()
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @throws @see getPropertyByChecksum
 +	*/
 +	public function unsetPropertyByChecksum($checksum) {
 +		$idx = $this->getPropertyIndexByChecksum($checksum);
 +		unset($this->children[$idx]);
 +		$this->setSaved(false);
 +	}
 +
 +	/**
 +	* Set a property by the checksum of its serialized value
 +	* It is up to the caller to call ->save()
 +	*
 +	* @param string $checksum An 8 char m5d checksum.
 +	* @param string $name Property name
 +	* @param mixed $value
 +	* @param array $parameters
 +	* @throws @see getPropertyByChecksum
 +	* @return string new checksum
 +	*/
 +	public function setPropertyByChecksum($checksum, $name, $value, $parameters=array()) {
 +		if($checksum === 'new') {
 +			$property = Property::create($name);
 +			$this->add($property);
 +		} else {
 +			$property = $this->getPropertyByChecksum($checksum);
 +		}
 +		switch($name) {
 +			case 'EMAIL':
 +				$value = strtolower($value);
 +				$property->setValue($value);
 +				break;
 +			case 'ADR':
 +				if(is_array($value)) {
 +					$property->setParts($value);
 +				} else {
 +					$property->setValue($value);
 +				}
 +				break;
 +			case 'IMPP':
 +				if(is_null($parameters) || !isset($parameters['X-SERVICE-TYPE'])) {
 +					throw new \InvalidArgumentException(self::$l10n->t(' Missing IM parameter for: ') . $name. ' ' . $value, 412);
 +				}
 +				$serviceType = $parameters['X-SERVICE-TYPE'];
 +				if(is_array($serviceType)) {
 +					$serviceType = $serviceType[0];
 +				}
 +				$impp = Utils\Properties::getIMOptions($serviceType);
 +				if(is_null($impp)) {
 +					throw new \UnexpectedValueException(self::$l10n->t('Unknown IM: ') . $serviceType, 415);
 +				}
 +				$value = $impp['protocol'] . ':' . $value;
 +				$property->setValue($value);
 +				break;
 +			default:
 +				\OCP\Util::writeLog('contacts', __METHOD__.' adding: '.$name. ' ' . $value, \OCP\Util::DEBUG);
 +				$property->setValue($value);
 +				break;
 +		}
 +		$this->setParameters($property, $parameters, true);
 +		$this->setSaved(false);
 +		return substr(md5($property->serialize()), 0, 8);
 +	}
 +
 +	/**
 +	* Set a property by the property name.
 +	* It is up to the caller to call ->save()
 +	*
 +	* @param string $name Property name
 +	* @param mixed $value
 +	* @param array $parameters
 +	* @return bool
 +	*/
 +	public function setPropertyByName($name, $value, $parameters=array()) {
 +		// TODO: parameters are ignored for now.
 +		switch($name) {
 +			case 'BDAY':
 +				try {
 +					$date = New \DateTime($value);
 +				} catch(\Exception $e) {
 +					\OCP\Util::writeLog('contacts',
 +						__METHOD__.' DateTime exception: ' . $e->getMessage(),
 +						\OCP\Util::ERROR
 +					);
 +					return false;
 +				}
 +				$value = $date->format('Y-m-d');
 +				$this->BDAY = $value;
 +				$this->BDAY->add('VALUE', 'DATE');
 +				//\OCP\Util::writeLog('contacts', __METHOD__.' BDAY: '.$this->BDAY->serialize(), \OCP\Util::DEBUG);
 +				break;
 +			case 'CATEGORIES':
 +			case 'N':
 +			case 'ORG':
 +				$property = $this->select($name);
 +				if(count($property) === 0) {
 +					$property = \Sabre\VObject\Property::create($name);
 +					$this->add($property);
 +				} else {
 +					// Actually no idea why this works
 +					$property = array_shift($property);
 +				}
 +				if(is_array($value)) {
 +					$property->setParts($value);
 +				} else {
 +					$this->{$name} = $value;
 +				}
 +				break;
 +			default:
 +				\OCP\Util::writeLog('contacts', __METHOD__.' adding: '.$name. ' ' . $value, \OCP\Util::DEBUG);
 +				$this->{$name} = $value;
 +				break;
 +		}
 +		$this->setSaved(false);
 +		return true;
 +	}
 +
 +	protected function setParameters($property, $parameters, $reset = false) {
 +		if(!$parameters) {
 +			return;
 +		}
 +
 +		if($reset) {
 +			$property->parameters = array();
 +		}
 +		//debug('Setting parameters: ' . print_r($parameters, true));
 +		foreach($parameters as $key => $parameter) {
 +			//debug('Adding parameter: ' . $key);
 +			if(is_array($parameter)) {
 +				foreach($parameter as $val) {
 +					if(is_array($val)) {
 +						foreach($val as $val2) {
 +							if(trim($key) && trim($val2)) {
 +								//debug('Adding parameter: '.$key.'=>'.print_r($val2, true));
 +								$property->add($key, strip_tags($val2));
 +							}
 +						}
 +					} else {
 +						if(trim($key) && trim($val)) {
 +							//debug('Adding parameter: '.$key.'=>'.print_r($val, true));
 +							$property->add($key, strip_tags($val));
 +						}
 +					}
 +				}
 +			} else {
 +				if(trim($key) && trim($parameter)) {
 +					//debug('Adding parameter: '.$key.'=>'.print_r($parameter, true));
 +					$property->add($key, strip_tags($parameter));
 +				}
 +			}
 +		}
 +	}
 +
 +	public function lastModified() {
 +		if(!isset($this->props['lastmodified']) && !$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +		return isset($this->props['lastmodified'])
 +			? $this->props['lastmodified']
 +			: null;
 +	}
 +
 +	/**
 +	 * Merge in data from a multi-dimentional array
 +	 *
 +	 * NOTE: The data has actually already been merged client side!
 +	 * NOTE: The only properties coming from the web client are the ones
 +	 * defined in \OCA\Contacts\Utils\Properties::$index_properties and
 +	 * UID is skipped for obvious reasons, and PHOTO is currently not updated.
 +	 * The data array has this structure:
 +	 *
 +	 * array(
 +	 * 	'EMAIL' => array(array('value' => 'johndoe at example.com', 'parameters' = array('TYPE' => array('HOME','VOICE'))))
 +	 * );
 +	 * @param array $data
 +	 * @return bool
 +	 */
 +	public function mergeFromArray(array $data) {
 +		foreach($data as $name => $properties) {
 +			if(in_array($name, array('PHOTO', 'UID'))) {
 +				continue;
 +			}
 +			if(!is_array($properties)) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.' not an array?: ' .$name. ' '.print_r($properties, true), \OCP\Util::DEBUG);
 +			}
 +			if(in_array($name, Utils\Properties::$multi_properties)) {
 +				unset($this->{$name});
 +			}
 +			foreach($properties as $parray) {
 +				\OCP\Util::writeLog('contacts', __METHOD__.' adding: ' .$name. ' '.print_r($parray['value'], true) . ' ' . print_r($parray['parameters'], true), \OCP\Util::DEBUG);
 +				if(in_array($name, Utils\Properties::$multi_properties)) {
 +					// TODO: wrap in try/catch, check return value
 +					$this->setPropertyByChecksum('new', $name, $parray['value'], $parray['parameters']);
 +				} else {
 +					// TODO: Check return value
 +					if(!isset($this->{$name})) {
 +						$this->setPropertyByName($name, $parray['value'], $parray['parameters']);
 +					}
 +				}
 +			}
 +		}
 +		$this->setSaved(false);
 +		return true;
 +	}
 +
 +	/**
 +	 * Merge in data from another VCard
 +	 * Used on import if a matching UID is found. Returns true if any updates
 +	 * take place, otherwise false.
 +	 *
 +	 * @param VCard $vcard
 +	 * @return bool
 +	 */
 +	public function mergeFromVCard(VCard $vcard) {
 +		$updated = false;
 +		foreach($vcard->children as $property) {
 +			if(in_array($property->name, array('REV', 'UID'))) {
 +				continue;
 +			}
 +			\OCP\Util::writeLog('contacts', __METHOD__.' merging: ' .$property->name, \OCP\Util::DEBUG);
 +			if(in_array($property->name, Utils\Properties::$multi_properties)) {
 +				$ownproperties = $this->select($property->name);
 +				if(count($ownproperties) === 0) {
 +					// We don't have any instances of this property, so just add it.
 +					$this->add($property);
 +					$updated = true;
 +					continue;
 +				} else {
 +					foreach($ownproperties as $ownproperty) {
 +						if(strtolower($property->value) === strtolower($ownproperty->value)) {
 +							// We already have this property, so skip both loops
 +							continue 2;
 +						}
 +					}
 +					$this->add($property);
 +					$updated = true;
 +				}
 +			} else {
 +				if(!isset($this->{$name})) {
 +					$this->add($property);
 +					$updated = true;
 +				} else {
 +					$this->setPropertyByName($property->name, $property->value, $property->parameters);
 +				}
 +			}
 +		}
 +
 +		$this->setSaved(!$updated);
 +
 +		return $updated;
 +	}
 +
 +    public function __get($key) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +
 +		return parent::__get($key);
 +	}
 +
 +    public function __isset($key) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +
 +		return parent::__isset($key);
 +	}
 +
 +	public function __set($key, $value) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +		parent::__set($key, $value);
 +		if($key === 'FN') {
 +			$this->props['displayname'] = $value;
 +		}
 +		$this->setSaved(false);
 +	}
 +
 +	public function __unset($key) {
 +		if(!$this->isRetrieved()) {
 +			$this->retrieve();
 +		}
 +		parent::__unset($key);
 +		if($key === 'PHOTO') {
 +			Properties::cacheThumbnail(
 +				$this->getBackend()->name,
 +				$this->getParent()->getId(),
 +				$this->getId(),
 +				null,
 +				null,
 +				array('remove' => true)
 +			);
 +		}
 +		$this->setSaved(false);
 +	}
 +
 +	public function setRetrieved($state) {
 +		$this->props['retrieved'] = $state;
 +	}
 +
 +	public function isRetrieved() {
 +		return $this->props['retrieved'];
 +	}
 +
 +	public function setSaved($state = true) {
 +		$this->props['saved'] = $state;
 +	}
 +
 +	public function isSaved() {
 +		return $this->props['saved'];
 +	}
 +
 +	/**
 +	 * Generate an event to show in the calendar
 +	 *
 +	 * @return \Sabre\VObject\Component\VCalendar|null
 +	 */
 +	public function getBirthdayEvent() {
 +		if(!isset($this->BDAY)) {
 +			return;
 +		}
 +		$birthday = $this->BDAY;
 +		if ((string)$birthday) {
 +			$title = str_replace('{name}',
 +				strtr((string)$this->FN, array('\,' => ',', '\;' => ';')),
 +				App::$l10n->t('{name}\'s Birthday')
 +			);
 +			try {
 +				$date = new \DateTime($birthday);
 +			} catch(\Exception $e) {
 +				return;
 +			}
 +			$vevent = \Sabre\VObject\Component::create('VEVENT');
 +			$vevent->add('DTSTART');
 +			$vevent->DTSTART->setDateTime(
 +				$date,
 +				\Sabre\VObject\Property\DateTime::DATE
 +			);
 +			$vevent->add('DURATION', 'P1D');
 +			$vevent->{'UID'} = $this->UID;
 +			$vevent->{'RRULE'} = 'FREQ=YEARLY';
- 			$vevent->{'SUMMARY'} = $title;
++			$vevent->{'SUMMARY'} = $title . ' (' . $date->format('Y') . ')';
 +			$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/addressbookcontroller.php
index d07ddbe,0000000..1364cc7
mode 100644,000000..100644
--- a/apps/contacts/lib/controller/addressbookcontroller.php
+++ b/apps/contacts/lib/controller/addressbookcontroller.php
@@@ -1,297 -1,0 +1,298 @@@
 +<?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\Utils\JSONSerializer,
 +	OCA\Contacts\Controller,
 +	OCP\AppFramework\Http;
 +
 +/**
 + * Controller class For Address Books
 + */
 +class AddressBookController extends Controller {
 +
 +	/**
 +	 * @NoAdminRequired
++	 * @NoCSRFRequired
 +	 */
 +	public function userAddressBooks() {
 +		$addressBooks = $this->app->getAddressBooksForUser();
 +		$result = array();
 +		$lastModified = 0;
 +		foreach($addressBooks as $addressBook) {
 +			$data = $addressBook->getMetaData();
 +			$result[] = $data;
 +			if(!is_null($data['lastmodified'])) {
 +				$lastModified = max($lastModified, $data['lastmodified']);
 +			}
 +		}
 +
 +		// To avoid invalid cache deletion time is saved
 +		$lastModified = max(
 +			$lastModified,
 +			\OCP\Config::getUserValue($this->api->getUserId(), 'contacts', 'last_address_book_deleted', 0)
 +		);
 +
 +		$response = new JSONResponse(array(
 +			'addressbooks' => $result,
 +		));
 +
 +		/** FIXME: Caching is currently disabled
 +		if($lastModified > 0) {
 +			$response->setLastModified(\DateTime::createFromFormat('U', $lastModified) ?: null);
 +			$response->setETag(md5($lastModified));
 +		}
 +		*/
 +
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
++	 * @NoCSRFRequired
 +	 */
 +	public function getAddressBook() {
 +		$params = $this->request->urlParams;
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +		$lastModified = $addressBook->lastModified();
 +		$etag = null;
 +		$response = new JSONResponse();
 +
 +		if(!is_null($lastModified)) {
 +			//$response->addHeader('Cache-Control', 'private, must-revalidate');
 +			$response->setLastModified(\DateTime::createFromFormat('U', $lastModified) ?: null);
 +			$etag = md5($lastModified);
 +			$response->setETag($etag);
 +		}
 +
 +		//$response->debug('comparing: "' . $etag . '" to ' . $this->request->getHeader('If-None-Match'));
 +		if(!is_null($etag)
 +			&& $this->request->getHeader('If-None-Match') === '"'.$etag.'"')
 +		{
 +			return $response->setStatus(Http::STATUS_NOT_MODIFIED);
 +		} else {
 +			$contacts = array();
 +			foreach($addressBook->getChildren() as $i => $contact) {
 +				$result = JSONSerializer::serializeContact($contact);
 +				if($result !== null) {
 +					$contacts[] = $result;
 +				}
 +			}
 +			return $response->setData(array('contacts' => $contacts));
 +		}
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
- 	 * @NoCSRFRequired
 +	 */
 +	public function addAddressBook() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		$backend = $this->app->getBackend($params['backend']);
 +		if(!$backend->hasAddressBookMethodFor(\OCP\PERMISSION_CREATE)) {
- 			throw new \Exception('Not implemented');
++			throw new \Exception('This backend does not support adding address books', 501);
 +		}
 +		try {
 +			$id = $backend->createAddressBook($this->request->post);
 +		} catch(Exception $e) {
 +			return $response->bailOut($e->getMessage());
 +		}
 +		if($id === false) {
 +			return $response->bailOut(App::$l10n->t('Error creating address book'));
 +		}
 +
 +		return $response->setStatus('201')->setParams($backend->getAddressBook($id));
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function updateAddressBook() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +		try {
 +			if(!$addressBook->update($this->request['properties'])) {
 +				return $response->bailOut(App::$l10n->t('Error updating address book'));
 +			}
 +		} catch(Exception $e) {
 +			return $response->bailOut($e->getMessage());
 +		}
 +		return $response->setParams($addressBook->getMetaData());
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function deleteAddressBook() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		$backend = $this->app->getBackend($params['backend']);
 +
 +		if(!$backend->hasAddressBookMethodFor(\OCP\PERMISSION_DELETE)) {
 +			throw new \Exception(
 +				'The "%s" backend does not support deleting address books', array($backend->name)
 +			);
 +		}
 +
 +		$addressBookInfo = $backend->getAddressBook($params['addressBookId']);
 +
 +		if(!$addressBookInfo['permissions'] & \OCP\PERMISSION_DELETE) {
 +			return $response->bailOut(App::$l10n->t(
 +				'You do not have permissions to delete the "%s" address book'),
 +				array($addressBookInfo['displayname']
 +			));
 +		}
 +
 +		if(!$backend->deleteAddressBook($params['addressBookId'])) {
 +			return $response->bailOut(App::$l10n->t('Error deleting address book'));
 +		}
 +		\OCP\Config::setUserValue($this->api->getUserId(), 'contacts', 'last_address_book_deleted', time());
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function activateAddressBook() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +
 +		$addressBook->setActive($this->request->post['state']);
 +
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function addChild() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +
 +		try {
 +			$id = $addressBook->addChild();
 +		} catch(Exception $e) {
 +			return $response->bailOut($e->getMessage());
 +		}
 +
 +		if($id === false) {
 +			return $response->bailOut(App::$l10n->t('Error creating contact.'));
 +		}
 +
 +		$contact = $addressBook->getChild($id);
 +		$response->setStatus('201');
 +		$response->setETag($contact->getETag());
 +		$response->addHeader('Location',
 +			\OCP\Util::linkToRoute(
 +				'contacts_contact_get',
 +				array(
 +					'backend' => $params['backend'],
 +					'addressBookId' => $params['addressBookId'],
 +					'contactId' => $id
 +				)
 +			)
 +		);
 +		return $response->setParams(JSONSerializer::serializeContact($contact));
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function deleteChild() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +
 +		try {
 +			$result = $addressBook->deleteChild($params['contactId']);
 +		} catch(Exception $e) {
 +			return $response->bailOut($e->getMessage());
 +		}
 +
 +		if($result === false) {
 +			return $response->bailOut(App::$l10n->t('Error deleting contact.'));
 +		}
 +		return $response->setStatus('204');
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function deleteChildren() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +		$contacts = $this->request->post['contacts'];
 +
 +		try {
 +			$result = $addressBook->deleteChildren($contacts);
 +		} catch(Exception $e) {
 +			return $response->bailOut($e->getMessage());
 +		}
 +
 +		return $response->setParams(array('result' => $result));
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function moveChild() {
 +		$params = $this->request->urlParams;
 +		$targetInfo = $this->request->post['target'];
 +
 +		$response = new JSONResponse();
 +
 +		// TODO: Check if the backend supports move (is 'local' or 'shared') and use that operation instead.
 +		// If so, set status 204 and don't return the serialized contact.
 +		$fromAddressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +		$targetAddressBook = $this->app->getAddressBook($targetInfo['backend'], $targetInfo['id']);
 +		$contact = $fromAddressBook->getChild($params['contactId']);
 +		if(!$contact) {
 +			$response->bailOut(App::$l10n->t('Error retrieving contact.'));
 +			return $response;
 +		}
 +		try {
 +			$contactId = $targetAddressBook->addChild($contact);
 +		} catch(Exception $e) {
 +			return $response->bailOut($e->getMessage());
 +		}
 +		$contact = $targetAddressBook->getChild($contactId);
 +		if(!$contact) {
 +			return $response->bailOut(App::$l10n->t('Error saving contact.'));
 +		}
 +		if(!$fromAddressBook->deleteChild($params['contactId'])) {
 +			// Don't bail out because we have to return the contact
 +			return $response->debug(App::$l10n->t('Error removing contact from other address book.'));
 +		}
 +		return $response->setParams(JSONSerializer::serializeContact($contact));
 +	}
 +
 +}
 +
diff --cc apps/contacts/lib/controller/contactphotocontroller.php
index c28bd8e,0000000..8553ec4
mode 100644,000000..100644
--- a/apps/contacts/lib/controller/contactphotocontroller.php
+++ b/apps/contacts/lib/controller/contactphotocontroller.php
@@@ -1,355 -1,0 +1,359 @@@
 +<?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\ImageResponse,
 +	OCA\Contacts\Utils\Properties,
 +	OCA\Contacts\Controller;
 +
 +/**
 + * Controller class For Contacts
 + */
 +class ContactPhotoController extends Controller {
 +
 +	/**
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function getPhoto($maxSize = 170) {
 +		// TODO: Cache resized photo
 +		$params = $this->request->urlParams;
 +		$etag = null;
 +		//$maxSize = isset($this->request['maxSize']) ? $this->request['maxSize'] : 170;
 +
++		\OCP\Util::writeLog('contacts',
++			__METHOD__.' backend: '.$params['backend'].', ab; '.$params['addressBookId'].', contact: '.$params['contactId'],
++			\OCP\Util::DEBUG
++		);
 +		$addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);
 +		$contact = $addressBook->getChild($params['contactId']);
 +
 +		if(!$contact) {
 +			$response = new JSONResponse();
 +			$response->bailOut(App::$l10n->t('Couldn\'t find contact.'));
 +			return $response;
 +		}
 +
 +		$image = new \OCP\Image();
 +		if (isset($contact->PHOTO) && $image->loadFromBase64((string)$contact->PHOTO)) {
 +			// OK
 +			$etag = md5($contact->PHOTO);
 +		}
 +		else
 +		// Logo :-/
 +		if(isset($contact->LOGO) && $image->loadFromBase64((string)$contact->LOGO)) {
 +			// OK
 +			$etag = md5($contact->LOGO);
 +		}
 +		if($image->valid()) {
 +			$response = new ImageResponse($image);
 +			$lastModified = $contact->lastModified();
 +			// Force refresh if modified within the last minute.
 +			if(!is_null($lastModified)) {
 +				$response->setLastModified(\DateTime::createFromFormat('U', $lastModified) ?: null);
 +			}
 +			if(!is_null($etag)) {
 +				$response->setETag($etag);
 +			}
 +			if ($image->width() > $maxSize || $image->height() > $maxSize) {
 +				$image->resize($maxSize);
 +			}
 +			return $response;
 +		} else {
 +			$response = new JSONResponse();
 +			$response->bailOut(App::$l10n->t('Error getting user photo'));
 +			return $response;
 +		}
 +	}
 +
 +	/**
 +	 * Uploads a photo and saves in oC cache
 +	 * @return JSONResponse with data.tmp set to the key in the cache.
 +	 *
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function uploadPhoto() {
 +		$params = $this->request->urlParams;
 +
 +		$response = new JSONResponse();
 +
 +		if (!isset($this->request->files['imagefile'])) {
 +			$response->bailOut(App::$l10n->t('No file was uploaded. Unknown error'));
 +			return $response;
 +		}
 +
 +		$file = $this->request->files['imagefile'];
 +		$error = $file['error'];
 +		if($error !== UPLOAD_ERR_OK) {
 +			$errors = array(
 +				0=>App::$l10n->t("There is no error, the file uploaded with success"),
 +				1=>App::$l10n->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'),
 +				2=>App::$l10n->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"),
 +				3=>App::$l10n->t("The uploaded file was only partially uploaded"),
 +				4=>App::$l10n->t("No file was uploaded"),
 +				6=>App::$l10n->t("Missing a temporary folder")
 +			);
 +			$response->bailOut($errors[$error]);
 +			return $response;
 +		}
 +
 +		if(!file_exists($file['tmp_name'])) {
 +			$response->bailOut('Temporary file: \''.$file['tmp_name'].'\' has gone AWOL?');
 +			return $response;
 +		}
 +
 +		$tmpkey = 'contact-photo-'.md5(basename($file['tmp_name']));
 +		$image = new \OCP\Image();
 +
 +		if(!$image->loadFromFile($file['tmp_name'])) {
 +			$response->bailOut(App::$l10n->t('Couldn\'t load temporary image: ').$file['tmp_name']);
 +			return $response;
 +		}
 +
 +		if(!$image->fixOrientation()) { // No fatal error so we don't bail out.
 +			$response->debug('Couldn\'t save correct image orientation: '.$tmpkey);
 +		}
 +
 +		if(!$this->server->getCache()->set($tmpkey, $image->data(), 600)) {
 +			$response->bailOut(App::$l10n->t('Couldn\'t save temporary image: ').$tmpkey);
 +			return $response;
 +		}
 +
 +		$response->setData(array(
 +			'status' => 'success',
 +			'data' => array(
 +				'tmp'=>$tmpkey,
 +				'metadata' => array(
 +					'contactId'=> $params['contactId'],
 +					'addressBookId'=> $params['addressBookId'],
 +					'backend'=> $params['backend'],
 +				),
 +			)
 +		));
 +
 +		return $response;
 +	}
 +
 +	/**
 +	 * Saves the photo from the contact being edited to oC cache
 +	 * @return JSONResponse with data.tmp set to the key in the cache.
 +	 *
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function cacheCurrentPhoto() {
 +		$params = $this->request->urlParams;
 +		$response = new JSONResponse();
 +		$photoResponse = $this->getPhoto($maxSize = 400);
 +
 +		if(!$photoResponse instanceof ImageResponse) {
 +			return $photoResponse;
 +		}
 +
 +		$data = $photoResponse->render();
 +		$tmpkey = 'contact-photo-' . $params['contactId'];
 +		if(!$this->server->getCache()->set($tmpkey, $data, 600)) {
 +			$response->bailOut(App::$l10n->t('Couldn\'t save temporary image: ').$tmpkey);
 +			return $response;
 +		}
 +
 +		$response->setParams(array(
 +			'tmp'=>$tmpkey,
 +			'metadata' => array(
 +				'contactId'=> $params['contactId'],
 +				'addressBookId'=> $params['addressBookId'],
 +				'backend'=> $params['backend'],
 +			),
 +		));
 +
 +		return $response;
 +
 +	}
 +
 +	/**
 +	 * Saves the photo from ownCloud FS to oC cache
 +	 * @return JSONResponse with data.tmp set to the key in the cache.
 +	 *
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function cacheFileSystemPhoto() {
 +		$params = $this->request->urlParams;
 +		$response = new JSONResponse();
 +
 +		if(!isset($this->request->get['path'])) {
 +			$response->bailOut(App::$l10n->t('No photo path was submitted.'));
 +		}
 +
 +		$localpath = \OC\Files\Filesystem::getLocalFile($this->request->get['path']);
 +		$tmpkey = 'contact-photo-' . $params['contactId'];
 +
 +		if(!file_exists($localpath)) {
 +			return $response->bailOut(App::$l10n->t('File doesn\'t exist:').$localpath);
 +		}
 +
 +		$image = new \OCP\Image();
 +		if(!$image) {
 +			return $response->bailOut(App::$l10n->t('Error loading image.'));
 +		}
 +		if(!$image->loadFromFile($localpath)) {
 +			return $response->bailOut(App::$l10n->t('Error loading image.'));
 +		}
 +		if($image->width() > 400 || $image->height() > 400) {
 +			$image->resize(400); // Prettier resizing than with browser and saves bandwidth.
 +		}
 +		if(!$image->fixOrientation()) { // No fatal error so we don't bail out.
 +			$response->debug('Couldn\'t save correct image orientation: '.$localpath);
 +		}
 +		if(!$this->server->getCache()->set($tmpkey, $image->data(), 600)) {
 +			return $response->bailOut('Couldn\'t save temporary image: '.$tmpkey);
 +		}
 +
 +		return $response->setData(array(
 +			'tmp'=>$tmpkey,
 +			'metadata' => array(
 +				'contactId'=> $params['contactId'],
 +				'addressBookId'=> $params['addressBookId'],
 +				'backend'=> $params['backend'],
 +			),
 +		));
 +
 +	}
 +
 +	/**
 +	 * Get a photo from the oC cache for cropping.
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function getTempPhoto() {
 +		$params = $this->request->urlParams;
 +		$tmpkey = $params['key'];
 +		$maxSize = isset($this->request->get['maxSize']) ? $this->request->get['maxSize'] : 400;
 +
 +		$image = new \OCP\Image();
 +		$image->loadFromData($this->server->getCache()->get($tmpkey));
 +		if($image->valid()) {
 +			if($image->height() > $maxSize || $image->width() > $maxSize) {
 +				$image->resize($maxSize);
 +			}
 +			$response = new ImageResponse($image);
 +			return $response;
 +		} else {
 +			$response = new JSONResponse();
 +			return $response->bailOut('Error getting temporary photo');
 +		}
 +	}
 +
 +	/**
 +	 * Get a photo from the oC and crops it with the suplied geometry.
 +	 * @NoAdminRequired
 +	 * @NoCSRFRequired
 +	 */
 +	public function cropPhoto() {
 +		$params = $this->request->urlParams;
 +		$x = (isset($this->request->post['x']) && $this->request->post['x']) ? $this->request->post['x'] : 0;
 +		$y = (isset($this->request->post['y']) && $this->request->post['y']) ? $this->request->post['y'] : 0;
 +		$w = (isset($this->request->post['w']) && $this->request->post['w']) ? $this->request->post['w'] : -1;
 +		$h = (isset($this->request->post['h']) && $this->request->post['h']) ? $this->request->post['h'] : -1;
 +		$tmpkey = $params['key'];
 +		$maxSize = isset($this->request->post['maxSize']) ? $this->request->post['maxSize'] : 200;
 +
 +		$app = new App($this->api->getUserId());
 +		$addressBook = $app->getAddressBook($params['backend'], $params['addressBookId']);
 +		$contact = $addressBook->getChild($params['contactId']);
 +
 +		$response = new JSONResponse();
 +
 +		if(!$contact) {
 +			return $response->bailOut(App::$l10n->t('Couldn\'t find contact.'));
 +		}
 +
 +		$data = $this->server->getCache()->get($tmpkey);
 +		if(!$data) {
 +			return $response->bailOut(App::$l10n->t('Image has been removed from cache'));
 +		}
 +
 +		$image = new \OCP\Image();
 +
 +		if(!$image->loadFromData($data)) {
 +			return $response->bailOut(App::$l10n->t('Error creating temporary image'));
 +		}
 +
 +		$w = ($w !== -1 ? $w : $image->width());
 +		$h = ($h !== -1 ? $h : $image->height());
 +
 +		if(!$image->crop($x, $y, $w, $h)) {
 +			return $response->bailOut(App::$l10n->t('Error cropping image'));
 +		}
 +
 +		if($image->width() < $maxSize || $image->height() < $maxSize) {
 +			if(!$image->resize(200)) {
 +				return $response->bailOut(App::$l10n->t('Error resizing image'));
 +			}
 +		}
 +
 +		// For vCard 3.0 the type must be e.g. JPEG or PNG
 +		// For version 4.0 the full mimetype should be used.
 +		// https://tools.ietf.org/html/rfc2426#section-3.1.4
 +		if(strval($contact->VERSION) === '4.0') {
 +			$type = $image->mimeType();
 +		} else {
 +			$type = explode('/', $image->mimeType());
 +			$type = strtoupper(array_pop($type));
 +		}
 +		if(isset($contact->PHOTO)) {
 +			$property = $contact->PHOTO;
 +			if(!$property) {
 +				$this->server->getCache()->remove($tmpkey);
 +				return $response->bailOut(App::$l10n
 +					->t('Error getting PHOTO property.'));
 +			}
 +			$property->setValue(strval($image));
 +			$property->parameters = array();
 +			$property->parameters[]
 +				= new \Sabre\VObject\Parameter('ENCODING', 'b');
 +			$property->parameters[]
 +				= new \Sabre\VObject\Parameter('TYPE', $image->mimeType());
 +			$contact->PHOTO = $property;
 +		} else {
 +			$contact->add('PHOTO',
 +				strval($image), array('ENCODING' => 'b',
 +				'TYPE' => $type));
 +			// TODO: Fix this hack
 +			$contact->setSaved(false);
 +		}
 +		if(!$contact->save()) {
 +			return $response->bailOut(App::$l10n->t('Error saving contact.'));
 +		}
 +
 +		$thumbnail = Properties::cacheThumbnail(
 +			$params['backend'],
 +			$params['addressBookId'],
 +			$params['contactId'],
 +			$image
 +		);
 +
 +		$response->setData(array(
 +			'status' => 'success',
 +			'data' => array(
 +				'id' => $params['contactId'],
 +				'thumbnail' => $thumbnail,
 +			)
 +		));
 +
 +		$this->server->getCache()->remove($tmpkey);
 +
 +		return $response;
 +	}
 +
 +}
diff --cc apps/contacts/lib/controller/groupcontroller.php
index 0be935f,0000000..5c1974c
mode 100644,000000..100644
--- a/apps/contacts/lib/controller/groupcontroller.php
+++ b/apps/contacts/lib/controller/groupcontroller.php
@@@ -1,261 -1,0 +1,260 @@@
 +<?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;
 +
 +/**
 + * Controller class for groups/categories
 + */
 +class GroupController extends Controller {
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function getGroups() {
 +		$tagMgr = $this->server->getTagManager()->load('contact');
 +		$tags = $tagMgr->getTags();
 +		foreach($tags as &$tag) {
 +			try {
 +			$ids = $tagMgr->getIdsForTag($tag['name']);
 +			$tag['contacts'] = $ids;
 +			} catch(\Exception $e) {
 +				$this->api->log(__METHOD__ . ' ' . $e->getMessage());
 +			}
 +		}
 +
 +		$favorites = $tagMgr->getFavorites();
 +
 +		$groups = array(
 +			'categories' => $tags,
 +			'favorites' => $favorites,
 +			'shared' => \OCP\Share::getItemsSharedWith('addressbook', \OCA\Contacts\Share\Addressbook::FORMAT_ADDRESSBOOKS),
 +			'lastgroup' => \OCP\Config::getUserValue($this->api->getUserId(), 'contacts', 'lastgroup', 'all'),
 +			'sortorder' => \OCP\Config::getUserValue($this->api->getUserId(), 'contacts', 'groupsort', ''),
 +			);
 +
 +		return new JSONResponse($groups);
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function addGroup() {
 +		$name = $this->request->post['name'];
 +
 +		$response = new JSONResponse();
 +		if(is_null($name) || $name === "") {
 +			$response->bailOut(App::$l10n->t('No group name given.'));
 +		}
 +
 +		$tagMgr = $this->server->getTagManager()->load('contact');
 +		$id = $tagMgr->add($name);
 +
 +		if($id === false) {
 +			$response->bailOut(App::$l10n->t('Error adding group.'));
 +		} else {
 +			$response->setParams(array('id'=>$id, 'name' => $name));
 +		}
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function deleteGroup() {
 +		$name = $this->request->post['name'];
 +
 +		$response = new JSONResponse();
 +		if(is_null($name) || $name === '') {
 +			$response->bailOut(App::$l10n->t('No group name given.'));
 +			return $response;
 +		}
 +
 +		$tagMgr = $this->server->getTagManager()->load('contact');
 +		try {
 +			$ids = $tagMgr->getIdsForTag($name);
 +		} catch(\Exception $e) {
 +			$response->setErrorMessage($e->getMessage());
 +			return $response;
 +		}
 +		if($ids !== false) {
 +			$backend = $this->app->getBackend('local');
 +			foreach($ids as $id) {
 +				$contact = $backend->getContact(null, $id, array('noCollection' => true));
 +				$obj = \Sabre\VObject\Reader::read(
 +					$contact['carddata'],
 +					\Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES
 +				);
 +				if($obj) {
- 					if(!isset($obj->CATEGORIES)) {
++					if(!$obj->inGroup($name)) {
 +						continue;
 +					}
- 					if($obj->CATEGORIES->removeGroup($name)) {
++					if($obj->removeFromGroup($name)) {
 +						$backend->updateContact(null, $id, $obj, array('noCollection' => true, 'isBatch' => true));
 +					}
 +				} else {
 +					\OCP\Util::writeLog('contacts', __METHOD__.', could not parse card ' . $id, \OCP\Util::DEBUG);
 +				}
 +			}
 +		}
 +		try {
 +			$tagMgr->delete($name);
 +		} catch(\Exception $e) {
 +			$response->setErrorMessage($e->getMessage());
 +		}
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function renameGroup() {
 +		$from = $this->request->post['from'];
 +		$to = $this->request->post['to'];
 +
 +		$response = new JSONResponse();
 +		if(is_null($from) || $from === '') {
 +			$response->bailOut(App::$l10n->t('No group name to rename from given.'));
 +			return $response;
 +		}
 +		if(is_null($to) || $to === '') {
 +			$response->bailOut(App::$l10n->t('No group name to rename to given.'));
 +			return $response;
 +		}
 +
 +		$tagMgr = $this->server->getTagManager()->load('contact');
 +		if(!$tagMgr->rename($from, $to)) {
 +			$response->bailOut(App::$l10n->t('Error renaming group.'));
 +			return $response;
 +		}
 +		$ids = $tagMgr->getIdsForTag($to);
 +		if($ids !== false) {
 +			$backend = $this->app->getBackend('local');
 +			foreach($ids as $id) {
 +				$contact = $backend->getContact(null, $id, array('noCollection' => true));
 +				$obj = \Sabre\VObject\Reader::read(
 +					$contact['carddata'],
 +					\Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES
 +				);
 +				if($obj) {
 +					if(!isset($obj->CATEGORIES)) {
 +						continue;
 +					}
 +					$obj->CATEGORIES->renameGroup($from, $to);
 +					$backend->updateContact(null, $id, $obj, array('noCollection' => true));
 +				} else {
 +					\OCP\Util::writeLog('contacts', __METHOD__.', could not parse card ' . $id, \OCP\Util::DEBUG);
 +				}
 +			}
 +		}
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function addToGroup() {
 +		$response = new JSONResponse();
 +		$params = $this->request->urlParams;
 +		$categoryId = $params['categoryId'];
 +		$categoryname = $this->request->post['name'];
 +		$ids = $this->request->post['contactIds'];
 +		$response->debug('request: '.print_r($this->request->post, true));
 +
 +		if(is_null($categoryId) || $categoryId === '') {
 +			$response->bailOut(App::$l10n->t('Group ID missing from request.'));
 +			return $response;
 +		}
 +
 +		if(is_null($categoryId) || $categoryId === '') {
 +			$response->bailOut(App::$l10n->t('Group name missing from request.'));
 +			return $response;
 +		}
 +
 +		if(is_null($ids)) {
 +			$response->bailOut(App::$l10n->t('Contact ID missing from request.'));
 +			return $response;
 +		}
 +
 +		$backend = $this->app->getBackend('local');
 +		$tagMgr = $this->server->getTagManager()->load('contact');
 +		foreach($ids as $contactId) {
 +			$contact = $backend->getContact(null, $contactId, array('noCollection' => true));
 +			$obj = \Sabre\VObject\Reader::read(
 +				$contact['carddata'],
 +				\Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES
 +			);
 +			if($obj) {
- 				if(!isset($obj->CATEGORIES)) {
- 					$obj->add('CATEGORIES');
++				if($obj->addToGroup($categoryname)) {
++					$backend->updateContact(null, $contactId, $obj, array('noCollection' => true));
 +				}
- 				$obj->CATEGORIES->addGroup($categoryname);
- 				$backend->updateContact(null, $contactId, $obj, array('noCollection' => true));
 +			}
 +			$response->debug('contactId: ' . $contactId . ', categoryId: ' . $categoryId);
 +			$tagMgr->tagAs($contactId, $categoryId);
 +		}
 +
 +		return $response;
 +	}
 +
 +	/**
 +	 * @NoAdminRequired
 +	 */
 +	public function removeFromGroup() {
 +		$response = new JSONResponse();
 +		$params = $this->request->urlParams;
 +		$categoryId = $params['categoryId'];
 +		$categoryname = $this->request->post['name'];
 +		$ids = $this->request->post['contactIds'];
 +		//$response->debug('request: '.print_r($this->request->post, true));
 +
 +		if(is_null($categoryId) || $categoryId === '') {
 +			$response->bailOut(App::$l10n->t('Group ID missing from request.'));
 +			return $response;
 +		}
 +
 +		if(is_null($ids)) {
 +			$response->bailOut(App::$l10n->t('Contact ID missing from request.'));
 +			return $response;
 +		}
 +
 +		$backend = $this->app->getBackend('local');
 +		$tagMgr = $this->server->getTagManager()->load('contact');
 +		foreach($ids as $contactId) {
 +			$contact = $backend->getContact(null, $contactId, array('noCollection' => true));
 +			if(!$contact) {
 +				$response->debug('Couldn\'t get contact: ' . $contactId);
 +				continue;
 +			}
 +			$obj = \Sabre\VObject\Reader::read(
 +				$contact['carddata'],
 +				\Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES
 +			);
 +			if($obj) {
 +				if(!isset($obj->CATEGORIES)) {
- 					$obj->add('CATEGORIES');
++					return $response;
++				}
++				if($obj->removeFromGroup($categoryname)) {
++					$backend->updateContact(null, $contactId, $obj, array('noCollection' => true));
 +				}
- 				$obj->CATEGORIES->removeGroup($categoryname);
- 				$backend->updateContact(null, $contactId, $obj, array('noCollection' => true));
 +			} else {
 +				$response->debug('Error parsing contact: ' . $contactId);
 +			}
 +			$response->debug('contactId: ' . $contactId . ', categoryId: ' . $categoryId);
 +			$tagMgr->unTag($contactId, $categoryId);
 +		}
 +
 +		return $response;
 +	}
 +
 +}
 +
diff --cc apps/contacts/lib/controller/importcontroller.php
index a5be1dc,0000000..c162711
mode 100644,000000..100644
--- a/apps/contacts/lib/controller/importcontroller.php
+++ b/apps/contacts/lib/controller/importcontroller.php
@@@ -1,291 -1,0 +1,299 @@@
 +<?php
 +/**
 + * @author Thomas Tanghus
 + * Copyright (c) 2013 Thomas Tanghus (thomas at tanghus.net)
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + * See the COPYING-README file.
 + */
 +
 +namespace OCA\Contacts\Controller;
 +
 +use OCA\Contacts\App,
 +	OCA\Contacts\JSONResponse,
 +	OCA\Contacts\Controller,
++	OCA\Contacts\VObject\VCard as MyVCard,
 +	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.
 +				}
 +			}
++			try {
++				$vcard->validate(MyVCard::REPAIR|MyVCard::UPGRADE);
++			} catch (\Exception $e) {
++				\OCP\Util::writeLog('contacts', __METHOD__ . ' ' .
++					'Error validating vcard: ' . $e->getMessage(), \OCP\Util::ERROR);
++				$failed += 1;
++			}
 +			/**
 +			 * 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/contacts/lib/utils/jsonserializer.php
index 03c1305,0000000..e8cc40a
mode 100644,000000..100644
--- a/apps/contacts/lib/utils/jsonserializer.php
+++ b/apps/contacts/lib/utils/jsonserializer.php
@@@ -1,214 -1,0 +1,225 @@@
 +<?php
 +/**
 + * ownCloud - JSONSerializer
 + *
 + * @author Thomas Tanghus, Jakob Sack
 + * @copyright 2011 Jakob Sack mail at jakobsack.de
 + * @copyright 2013 Thomas Tanghus (thomas at tanghus.net)
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 + * License as published by the Free Software Foundation; either
 + * version 3 of the License, or any later version.
 + *
 + * This library is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 + *
 + * You should have received a copy of the GNU Affero General Public
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + *
 + */
 +
 +namespace OCA\Contacts\Utils;
 +
 +use OCA\Contacts\VObject;
 +use OCA\Contacts\Contact,
 +	OCA\Contacts\Utils\Properties;
 +
 +/**
 + * This class serializes properties, components an
 + * arrays of components into a format suitable for
 + * passing to a JSON response.
 + * TODO: Return jCard (almost) compliant data, but still omitting unneeded data.
 + * http://tools.ietf.org/html/draft-kewisch-vcard-in-json-01
 + */
 +
 +class JSONSerializer {
 +
 +	/**
 +	 * General method serialize method. Use this for arrays
 +	 * of contacts.
 +	 *
 +	 * @param Contact[] $input
 +	 * @return array
 +	 */
 +	 public static function serialize($input) {
 +		$response = array();
 +		if(is_array($input)) {
 +			foreach($input as $object) {
 +				if($object instanceof Contact) {
 +					\OCP\Util::writeLog('contacts', __METHOD__.' serializing: ' . print_r($object, true), \OCP\Util::DEBUG);
 +					$tmp = self::serializeContact($object);
 +					if($tmp !== null) {
 +						$response[] = $tmp;
 +					}
 +				} else {
 +					throw new \Exception(
 +						'Only arrays of OCA\\Contacts\\VObject\\VCard '
 +						. 'and Sabre\VObject\Property are accepted.'
 +					);
 +				}
 +			}
 +		} else {
 +			if($input instanceof VObject\VCard) {
 +				return self::serializeContact($input);
 +			} elseif($input instanceof Sabre\VObject\Property) {
 +				return self::serializeProperty($input);
 +			} else {
 +				throw new \Exception(
 +					'Only instances of OCA\\Contacts\\VObject\\VCard '
 +					. 'and Sabre\VObject\Property are accepted.'
 +				);
 +			}
 +		}
 +		return $response;
 +	 }
 +
 +	/**
 +	 * @brief Data structure of vCard
 +	 * @param VObject\VCard $contact
 +	 * @return associative array|null
 +	 */
 +	public static function serializeContact(Contact $contact) {
 +
 +		if(!$contact->retrieve()) {
 +			\OCP\Util::writeLog('contacts', __METHOD__.' error reading: ' . print_r($contact, true), \OCP\Util::DEBUG);
 +			return null;
 +		}
 +
 +		$details = array();
 +
 +		if(isset($contact->PHOTO) || isset($contact->LOGO)) {
++			$details['photo'] = true;
 +			$details['thumbnail'] = Properties::cacheThumbnail(
 +				$contact->getBackend()->name,
 +				$contact->getParent()->getId(),
 +				$contact->getId(),
 +				null,
 +				$contact
 +			);
 +		}
 +
 +		foreach($contact->children as $property) {
 +			$pname = $property->name;
 +			$temp = self::serializeProperty($property);
 +			if(!is_null($temp)) {
 +				// Get Apple X-ABLabels
 +				if(isset($contact->{$property->group . '.X-ABLABEL'})) {
 +					$temp['label'] = $contact->{$property->group . '.X-ABLABEL'}->value;
 +					if($temp['label'] == '_$!<Other>!$_') {
 +						$temp['label'] = Properties::$l10n->t('Other');
 +					}
 +					if($temp['label'] == '_$!<HomePage>!$_') {
 +						$temp['label'] = Properties::$l10n->t('HomePage');
 +					}
 +				}
 +				if(array_key_exists($pname, $details)) {
 +					$details[$pname][] = $temp;
 +				}
 +				else{
 +					$details[$pname] = array($temp);
 +				}
 +			}
 +		}
 +		return array('data' =>$details, 'metadata' => $contact->getMetaData());
 +	}
 +
 +	/**
 +	 * @brief Get data structure of property.
 +	 * @param \Sabre\VObject\Property $property
 +	 * @return associative array
 +	 *
 +	 * returns an associative array with
 +	 * ['name'] name of property
 +	 * ['value'] htmlspecialchars escaped value of property
 +	 * ['parameters'] associative array name=>value
 +	 * ['checksum'] checksum of whole property
 +	 * NOTE: $value is not escaped anymore. It shouldn't make any difference
 +	 * but we should look out for any problems.
 +	 */
 +	public static function serializeProperty(\Sabre\VObject\Property $property) {
 +		if(!in_array($property->name, Properties::$index_properties)) {
 +			return;
 +		}
 +		$value = $property->value;
 +		if($property->name == 'ADR' || $property->name == 'N' || $property->name == 'ORG' || $property->name == 'CATEGORIES') {
 +			$value = $property->getParts();
 +			$value = array_map('trim', $value);
 +		}
 +		elseif($property->name == 'BDAY') {
- 			if(strpos($value, '-') === false) {
- 				if(strlen($value) >= 8) {
- 					$value = substr($value, 0, 4).'-'.substr($value, 4, 2).'-'.substr($value, 6, 2);
- 				} else {
- 					return null; // Badly malformed :-(
++			// If the BDAY has a format of e.g. 19960401
++			if(strlen($value) >= 8
++				&& is_int(substr($value, 0, 4))
++				&& is_int(substr($value, 4, 2))
++				&& is_int(substr($value, 6, 2))) {
++				$value = substr($value, 0, 4).'-'.substr($value, 4, 2).'-'.substr($value, 6, 2);
++			} else if($value[5] !== '-' || $value[7] !== '-') {
++				try {
++					// Skype exports as e.g. Jan 14, 1996
++					$date = new \DateTime($value);
++					$value = $date->format('Y-m-d');
++				} catch(\Exception $e) {
++					\OCP\Util::writeLog('contacts', __METHOD__.' Error parsing date: ' . $value, \OCP\Util::DEBUG);
++					return;
 +				}
 +			}
++			// Otherwise we assume it's OK.
 +		} elseif($property->name == 'PHOTO') {
 +			$value = true;
 +		}
 +		elseif($property->name == 'IMPP') {
 +			if(strpos($value, ':') !== false) {
 +				$value = explode(':', $value);
 +				$protocol = array_shift($value);
 +				if(!isset($property['X-SERVICE-TYPE'])) {
 +					$property['X-SERVICE-TYPE'] = strtoupper($protocol);
 +				}
 +				$value = implode('', $value);
 +			}
 +		}
 +		if(is_string($value)) {
 +			$value = strtr($value, array('\,' => ',', '\;' => ';'));
 +		}
 +		$temp = array(
 +			//'name' => $property->name,
 +			'value' => $value,
 +			'parameters' => array()
 +		);
 +
 +		// This cuts around a 3rd off of the json response size.
 +		if(in_array($property->name, Properties::$multi_properties)) {
 +			$temp['checksum'] = substr(md5($property->serialize()), 0, 8);
 +		}
 +		foreach($property->parameters as $parameter) {
 +			// Faulty entries by kaddressbook
 +			// Actually TYPE=PREF is correct according to RFC 2426
 +			// but this way is more handy in the UI. Tanghus.
 +			if($parameter->name == 'TYPE' && strtoupper($parameter->value) == 'PREF') {
 +				$parameter->name = 'PREF';
 +				$parameter->value = '1';
 +			}
 +			// NOTE: Apparently Sabre_VObject_Reader can't always deal with value list parameters
 +			// like TYPE=HOME,CELL,VOICE. Tanghus.
 +			// TODO: Check if parameter is has commas and split + merge if so.
 +			if ($parameter->name == 'TYPE') {
 +				$pvalue = $parameter->value;
 +				if(is_string($pvalue) && strpos($pvalue, ',') !== false) {
 +					$pvalue = array_map('trim', explode(',', $pvalue));
 +				}
 +				$pvalue = is_array($pvalue) ? $pvalue : array($pvalue);
 +				if (isset($temp['parameters'][$parameter->name])) {
 +					$temp['parameters'][$parameter->name][] = \OCP\Util::sanitizeHTML($pvalue);
 +				}
 +				else {
 +					$temp['parameters'][$parameter->name] = \OCP\Util::sanitizeHTML($pvalue);
 +				}
 +			}
 +			else{
 +				$temp['parameters'][$parameter->name] = \OCP\Util::sanitizeHTML($parameter->value);
 +			}
 +		}
 +		return $temp;
 +	}
 +}
diff --cc apps/contacts/lib/vobject/groupproperty.php
index ff4c92b,0000000..503c01f
mode 100644,000000..100644
--- a/apps/contacts/lib/vobject/groupproperty.php
+++ b/apps/contacts/lib/vobject/groupproperty.php
@@@ -1,115 -1,0 +1,119 @@@
 +<?php
 +/**
 + * ownCloud - VObject Group Property
 + *
 + * @author Thomas Tanghus
 + *
 + * 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\VObject;
 +
 +use OC\VObject\CompoundProperty;
 +
 +/**
 + * This class adds convenience methods for the CATEGORIES property.
 + *
 + * NOTE: Group names are case-insensitive.
 + */
 +class GroupProperty extends CompoundProperty {
 +
 +	/**
 +	* Add a group.
 +	*
 +	* NOTE: We cannot just use add() as that method name is used in
 +	* \Sabre\VObject\Property
 +	*
 +	* @param string $name
++	* @return bool
 +	*/
 +	public function addGroup($name) {
 +		$name = trim($name);
 +		if($this->hasGroup($name)) {
- 			return;
++			return false;
 +		}
 +		$groups = $this->getParts();
++		// Remove empty elements
++		$groups = array_filter($groups, 'strlen');
 +		$groups[] = $name;
 +		$this->setParts($groups);
++		return true;
 +	}
 +
 +	/**
 +	* Remove an existing group.
 +	*
 +	* @param string $name
 +	* @return bool
 +	*/
 +	public function removeGroup($name) {
 +		$name = trim($name);
 +		if(!$this->hasGroup($name)) {
 +			return false;
 +		}
 +		$groups = $this->getParts();
 +		$groups = array_map('trim', $groups);
 +		array_splice($groups, $this->array_searchi($name, $groups), 1);
 +		$this->setParts($groups);
 +		return true;
 +	}
 +
 +	/**
 +	* Test it a group by that name exists.
 +	*
 +	* @param string $name
 +	* @return bool
 +	*/
 +	public function hasGroup($name) {
 +		$name = trim($name);
 +		$groups = $this->getParts();
 +		$groups = array_map('trim', $groups);
 +		return $this->in_arrayi($name, $groups);
 +	}
 +
 +	/**
 +	* Rename an existing group.
 +	*
 +	* @param string $from
 +	* @param string $to
 +	*/
 +	public function renameGroup($from, $to) {
 +		$from = trim($from);
 +		$to = trim($to);
 +		if(!$this->hasGroup($from)) {
 +			return;
 +		}
 +		$groups = $this->getParts();
 +		$groups = array_map('trim', $groups);
 +		$groups[$this->array_searchi($from, $groups)] = $to;
 +		$this->setParts($groups);
 +	}
 +
 +	// case-insensitive in_array
 +	protected function in_arrayi($needle, $haystack) {
 +		if(!is_array($haystack)) {
 +			return false;
 +		}
 +		return in_array(strtolower($needle), array_map('strtolower', $haystack));
 +	}
 +
 +	// case-insensitive array_search
 +	protected function array_searchi($needle, $haystack) {
 +		if(!is_array($haystack)) {
 +			return false;
 +		}
 +		return array_search(strtolower($needle), array_map('strtolower', $haystack));
 +	}
 +}
diff --cc apps/contacts/lib/vobject/vcard.php
index 3ac3ff4,0000000..9660286
mode 100644,000000..100644
--- a/apps/contacts/lib/vobject/vcard.php
+++ b/apps/contacts/lib/vobject/vcard.php
@@@ -1,308 -1,0 +1,398 @@@
 +<?php
 +/**
 + * ownCloud - VCard component
 + *
 + * This component represents the BEGIN:VCARD and END:VCARD found in every
 + * vcard.
 + *
 + * @author Thomas Tanghus
 + * @author Evert Pot (http://www.rooftopsolutions.nl/)
 + *
 + * 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\VObject;
 +
 +use OCA\Contacts\Utils;
 +use Sabre\VObject;
 +
 +/**
 + * This class overrides \Sabre\VObject\Component\VCard::validate() to be add
 + * to import partially invalid vCards by ignoring invalid lines and to
 + * validate and upgrade using ....
 +*/
 +class VCard extends VObject\Component\VCard {
 +
 +	/**
 +	* The following constants are used by the validate() method.
 +	*/
 +    const REPAIR = 1;
 +	const UPGRADE = 2;
 +
 +	/**
 +	 * The groups in the contained properties
 +	 *
 +	 * @var array
 +	 */
 +	protected $groups = array();
 +
 +	/**
 +	* VCards with version 2.1, 3.0 and 4.0 are found.
 +	*
 +	* If the VCARD doesn't know its version, 3.0 is assumed and if
 +	* option UPGRADE is given it will be upgraded to version 3.0.
 +	*/
 +	const DEFAULT_VERSION = '3.0';
 +
 +	/**
 +	* The vCard 2.1 specification allows parameter values without a name.
 +	* The parameter name is then determined from the unique parameter value.
 +	* In version 2.1 e.g. a phone can be formatted like: TEL;HOME;CELL:123456789
 +	* This has to be changed to either TEL;TYPE=HOME,CELL:123456789 or TEL;TYPE=HOME;TYPE=CELL:123456789 - both are valid.
 +	*
 +	* From: https://github.com/barnabywalters/vcard/blob/master/barnabywalters/VCard/VCard.php
 +	*
 +	* @param string value
 +	* @return string
 +	*/
 +	protected function paramName($value) {
 +		static $types = array (
 +				'DOM', 'INTL', 'POSTAL', 'PARCEL','HOME', 'WORK',
 +				'PREF', 'VOICE', 'FAX', 'MSG', 'CELL', 'PAGER',
 +				'BBS', 'MODEM', 'CAR', 'ISDN', 'VIDEO',
 +				'AOL', 'APPLELINK', 'ATTMAIL', 'CIS', 'EWORLD',
 +				'INTERNET', 'IBMMAIL', 'MCIMAIL',
 +				'POWERSHARE', 'PRODIGY', 'TLX', 'X400',
 +				'GIF', 'CGM', 'WMF', 'BMP', 'MET', 'PMB', 'DIB',
 +				'PICT', 'TIFF', 'PDF', 'PS', 'JPEG', 'QTIME',
 +				'MPEG', 'MPEG2', 'AVI',
 +				'WAVE', 'AIFF', 'PCM',
 +				'X509', 'PGP');
 +		static $values = array (
 +				'INLINE', 'URL', 'CID');
 +		static $encodings = array (
 +				'7BIT', 'QUOTED-PRINTABLE', 'BASE64');
 +		$name = 'UNKNOWN';
 +		if (in_array($value, $types)) {
 +			$name = 'TYPE';
 +		} elseif (in_array($value, $values)) {
 +			$name = 'VALUE';
 +		} elseif (in_array($value, $encodings)) {
 +			$name = 'ENCODING';
 +		}
 +		return $name;
 +	}
 +
 +	/**
 +	* Decode properties for upgrading from v. 2.1
 +	*
 +	* @param Sabre_VObject_Property $property Reference to a \Sabre\VObject\Property.
 +	* The only encoding allowed in version 3.0 is 'b' for binary. All encoded strings
 +	* must therefore be decoded and the parameters removed.
 +	*/
 +	protected function decodeProperty(&$property) {
 +		foreach($property->parameters as $key=>&$parameter) {
 +			// Check for values without names which Sabre interprets
 +			// as names without values.
 +			if(trim($parameter->value) === '') {
 +				$parameter->value = $parameter->name;
 +				$parameter->name = $this->paramName($parameter->name);
 +			}
 +			// Check out for encoded string and decode them :-[
 +			if(strtoupper($parameter->name) == 'ENCODING') {
 +				if(strtoupper($parameter->value) == 'QUOTED-PRINTABLE') {
 +					$property->value = str_replace(
 +						"\r\n", "\n",
 +						VObject\StringUtil::convertToUTF8(
 +							quoted_printable_decode($property->value)
 +						)
 +					);
 +					unset($property->parameters[$key]);
 +				} elseif(strtoupper($parameter->value) == 'BASE64') {
 +					$parameter->value = 'b';
 +				}
 +			} elseif(strtoupper($parameter->name) == 'CHARSET') {
 +				unset($property->parameters[$key]);
 +			}
 +		}
 +	}
 +
 +	/**
 +	* Work around issue in older VObject sersions
 +	* https://github.com/fruux/sabre-vobject/issues/24
 +	*
 +	* @param Sabre_VObject_Property $property Reference to a Sabre_VObject_Property.
 +	*/
 +	public function fixPropertyParameters(&$property) {
 +		// Work around issue in older VObject sersions
 +		// https://github.com/fruux/sabre-vobject/issues/24
 +		foreach($property->parameters as $key=>$parameter) {
 +			$delim = '';
 +			if(strpos($parameter->value, ',') === false) {
 +				continue;
 +			}
 +			$values = explode(',', $parameter->value);
 +			$values = array_map('trim', $values);
 +			$parameter->value = array_shift($values);
 +			foreach($values as $value) {
 +				$property->add($parameter->name, $value);
 +			}
 +		}
 +	}
 +
 +	/**
 +	* Validates the node for correctness.
 +	*
 +	* The following options are supported:
 +	*   - VCard::REPAIR - If something is broken, and automatic repair may
 +	*                    be attempted.
 +	*   - VCard::UPGRADE - If needed the vCard will be upgraded to version 3.0.
 +	*
 +	* An array is returned with warnings.
 +	*
 +	* Every item in the array has the following properties:
 +	*    * level - (number between 1 and 3 with severity information)
 +	*    * message - (human readable message)
 +	*    * node - (reference to the offending node)
 +	*
 +	* @param int $options
 +	* @return array
 +	*/
 +	public function validate($options = 0) {
 +
 +		$warnings = array();
 +
 +		if ($options & self::UPGRADE) {
 +			$this->VERSION = self::DEFAULT_VERSION;
 +			foreach($this->children as &$property) {
 +				$this->decodeProperty($property);
 +				$this->fixPropertyParameters($property);
 +				/* What exactly was I thinking here?
 +				switch((string)$property->name) {
 +					case 'LOGO':
 +					case 'SOUND':
 +					case 'PHOTO':
 +						if(isset($property['TYPE']) && strpos((string)$property['TYPE'], '/') === false) {
 +							$property['TYPE'] = 'image/' . strtolower($property['TYPE']);
 +						}
 +				}*/
 +			}
 +		}
 +
 +		$version = $this->select('VERSION');
 +		if (count($version) !== 1) {
 +			$warnings[] = array(
 +				'level' => 1,
 +				'message' => 'The VERSION property must appear in the VCARD component exactly 1 time',
 +				'node' => $this,
 +			);
 +			if ($options & self::REPAIR) {
 +				$this->VERSION = self::DEFAULT_VERSION;
 +				if (!$options & self::UPGRADE) {
 +					$options |= self::UPGRADE;
 +				}
 +			}
 +		} else {
 +			$version = (string)$this->VERSION;
 +			if ($version!=='2.1' && $version!=='3.0' && $version!=='4.0') {
 +				$warnings[] = array(
 +					'level' => 1,
 +					'message' => 'Only vcard version 4.0 (RFC6350), version 3.0 (RFC2426) or version 2.1 (icm-vcard-2.1) are supported.',
 +					'node' => $this,
 +				);
 +				if ($options & self::REPAIR) {
 +					$this->VERSION = self::DEFAULT_VERSION;
 +					if (!$options & self::UPGRADE) {
 +						$options |= self::UPGRADE;
 +					}
 +				}
 +			}
 +
 +		}
++
 +		$fn = $this->select('FN');
- 		if (count($fn) !== 1) {
++		if (count($fn) !== 1 || trim((string)$this->FN) === '') {
 +			$warnings[] = array(
 +				'level' => 1,
 +				'message' => 'The FN property must appear in the VCARD component exactly 1 time',
 +				'node' => $this,
 +			);
- 			if (($options & self::REPAIR) && count($fn) === 0) {
++			if ($options & self::REPAIR) {
 +				// We're going to try to see if we can use the contents of the
 +				// N property.
- 				if (isset($this->N)) {
++				if (isset($this->N)
++					&& substr((string)$this->N, 2) !== ';;'
++					&& (string)$this->N !== ''
++				) {
 +					$value = explode(';', (string)$this->N);
 +					if (isset($value[1]) && $value[1]) {
 +						$this->FN = $value[1] . ' ' . $value[0];
 +					} else {
 +						$this->FN = $value[0];
 +					}
 +				// Otherwise, the ORG property may work
 +				} elseif (isset($this->ORG)) {
 +					$this->FN = (string)$this->ORG;
 +				} elseif (isset($this->EMAIL)) {
 +					$this->FN = (string)$this->EMAIL;
 +				}
 +
 +			}
 +		}
 +
++		if(isset($this->BDAY)) {
++			if ($options & self::REPAIR) {
++				// If the BDAY has a format of e.g. 19960401
++				$bday = (string)$this->BDAY;
++				if(strlen($bday) >= 8
++					&& is_int(substr($bday, 0, 4))
++					&& is_int(substr($bday, 4, 2))
++					&& is_int(substr($bday, 6, 2))) {
++					$this->BDAY = substr($bday, 0, 4).'-'.substr($bday, 4, 2).'-'.substr($bday, 6, 2);
++					$this->BDAY->VALUE = 'DATE';
++				} else if($bday[5] !== '-' || $bday[7] !== '-') {
++					try {
++						// Skype exports as e.g. Jan 14, 1996
++						$date = new \DateTime($bday);
++						$this->BDAY = $date->format('Y-m-d');
++						$this->BDAY->VALUE = 'DATE';
++					} catch(\Exception $e) {
++						\OCP\Util::writeLog('contacts', __METHOD__.' Removing invalid BDAY: ' . $bday, \OCP\Util::DEBUG);
++						unset($this->BDAY);
++					}
++				}
++			}
++		}
++
 +		$n = $this->select('N');
 +		if (count($n) !== 1) {
 +			$warnings[] = array(
 +				'level' => 1,
 +				'message' => 'The N property must appear in the VCARD component exactly 1 time',
 +				'node' => $this,
 +			);
 +			// TODO: Make a better effort parsing FN.
 +			if (($options & self::REPAIR) && count($n) === 0) {
 +				// Take 2 first name parts of 'FN' and reverse.
 +				$slice = array_reverse(array_slice(explode(' ', (string)$this->FN), 0, 2));
 +				if(count($slice) < 2) { // If not enought, add one more...
 +					$slice[] = "";
 +				}
 +				$this->N = implode(';', $slice).';;;';
 +			}
 +		}
 +
- 		if (!isset($this->UID)) {
++		if (!isset($this->UID) || trim((string)$this->UID) === '') {
 +			$warnings[] = array(
 +				'level' => 1,
 +				'message' => 'Every vCard must have a UID',
 +				'node' => $this,
 +			);
 +			if ($options & self::REPAIR) {
 +				$this->UID = Utils\Properties::generateUID();
 +			}
 +		}
 +
 +		if (($options & self::REPAIR) || ($options & self::UPGRADE)) {
 +			$now = new \DateTime;
 +			$this->REV = $now->format(\DateTime::W3C);
 +		}
 +
 +		return array_merge(
 +			parent::validate($options),
 +			$warnings
 +		);
 +
 +	}
 +
 +	/**
 +	 * Get all group names in the vCards properties
++	 *
++	 * NOTE: Not to confuse with CATEGORIES groups
++	 *
 +	 * @return array
 +	 */
 +	public function propertyGroups() {
 +		foreach($this->children as $property) {
 +			if($property->group && !isset($this->groups[$property->group])) {
 +				$this->groups[] = $property->group;
 +			}
 +		}
 +		if(count($this->groups) > 1) {
 +			sort($this->groups);
 +		}
 +		return $this->groups;
 +	}
 +
++	/**
++	* Test if vcard has group (CATEGORIES) $name
++	*
++	* @param string $name
++	* @return bool
++	*/
++	public function inGroup($name) {
++		if(!isset($this->CATEGORIES)) {
++			false;
++		}
++
++		return $this->CATEGORIES->hasGroup($name);
++	}
++
++	/**
++	* Add group (CATEGORIES) $name to vcard
++	*
++	* Return true if contact wasn't already in group
++	*
++	* @param string $name
++	* @return bool
++	*/
++	public function addToGroup($name) {
++		if(!isset($this->CATEGORIES)) {
++			$this->add('CATEGORIES');
++		}
++
++		return $this->CATEGORIES->addGroup($name);
++	}
++
++	/**
++	* Remove group (CATEGORIES) $name from vcard
++	*
++	* Return true if vcard has been updated.
++	*
++	* @param string $name
++	* @return bool
++	*/
++	public function removeFromGroup($name) {
++
++		if(!isset($this->CATEGORIES)) {
++			return false;
++		}
++
++		$updated = $this->CATEGORIES->removeGroup($name);
++		// getParts() returns an array with an empty element if
++		// CATEGORIES is empty
++		$groups = $this->CATEGORIES->getParts();
++		// Remove empty elements
++		$groups = array_filter($groups, 'strlen');
++		if(count($groups) === 0) {
++			unset($this->{'CATEGORIES'});
++			$updated = true;
++		}
++
++		return $updated;
++	}
++
++
 +}
diff --cc apps/documents/ajax/documentController.php
index af64a37,0000000..f6cc2b6
mode 100644,000000..100644
--- a/apps/documents/ajax/documentController.php
+++ b/apps/documents/ajax/documentController.php
@@@ -1,111 -1,0 +1,111 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +class DocumentController extends Controller{
 +	const ODT_TEMPLATE = 'UEsDBBQAAAgAAC6aLENexjIMJwAAACcAAAAIAAAAbWltZXR5cGVhcHBsaWNhdGlvbi92bmQub2FzaXMub3BlbmRvY3VtZW50LnRleHRQSwMEFAAACAAALposQ9dwh9LYAgAA2AIAABgAAABUaHVtYm5haWxzL3RodW1ibmFpbC5wbmeJUE5HDQoaCgAAAA1JSERSAAAAxgAAAQAIAgAAAGc/nhcAAAKfSURBVHic7dKxCQAwDMCwDvn/5fQJQ6FIF3jw7O6BzrwO4DeWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJm [...]
 +	
 +	public static function create($args){
 +		$uid = self::preDispatch();
 +		
 +		$view = new \OC\Files\View('/' . $uid . '/files');
 +		
 +		$dir = \OCP\Config::getUserValue(\OCP\User::getUser(), 'documents', 'save_path', '/');
 +		$path = Helper::getNewFileName($view, $dir . '/New Document.odt');
 +		
 +		$content = base64_decode(self::ODT_TEMPLATE);
 +		if (class_exists('\OC\Files\Type\TemplateManager')){
 +			$manager = \OC_Helper::getFileTemplateManager();
 +			$templateContent = $manager->getTemplate(Storage::MIMETYPE_LIBREOFFICE_WORDPROCESSOR);
 +			if ($templateContent){
 +				$content = $templateContent;
 +			}
 +		}
 +		
 +		$view->file_put_contents($path, $content);
 +	}
 +
 +
- /**
++	/**
 +	 * Process partial/complete file download
 +	 * @param array $args - array containing session id as an element with a key es_id 
 +	 */
 +	public static function serve($args){
 +		$session = new Db_Session();
 +		$sessionData = $session->load(@$args['es_id'])->getData();
 +			
 +		$file = new File(@$sessionData['file_id']);
 +		if (!$file->isPublicShare()){
 +			self::preDispatch(false);
 +		} else {
 +			self::preDispatchGuest(false);
 +		}
 +		
 +		$filename = isset($sessionData['genesis_url']) ? $sessionData['genesis_url'] : '';
 +		$download = new Download($sessionData['owner'], $filename);
 +		$download->sendResponse();
 +	}
 +	
 +
 +	public static function rename($args){
 +		$fileId = intval(@$args['file_id']);
 +		$name = @$_POST['name'];
 +		$file = new File($fileId);
 +		$l = new \OC_L10n('documents');
 +
 +		if (isset($name) && $file->getPermissions() & \OCP\PERMISSION_UPDATE) {
 +			if ($file->renameTo($name)) {
 +				// TODO: propagate to other clients
 +				\OCP\JSON::success();
 +				return;
 +			}
 +		}
 +		\OCP\JSON::error(array(
 +			'message' => $l->t('You don\'t have permission to rename this document')
 +		));
 +	}
 +
 +	/**
 +	 * lists the documents the user has access to (including shared files, once the code in core has been fixed)
 +	 * also adds session and member info for these files
 +	 */
 +	public static function listAll(){
 +		self::preDispatch();
 +		
 +		$documents = Storage::getDocuments();
 +
 +		$fileIds = array();
 +		
 +		//$previewAvailable = \OCP\Preview::show($file);
 +		foreach ($documents as $key=>$document) {
 +			//\OCP\Preview::show($document['path']);
 +			$documents[$key]['icon'] = preg_replace('/\.png$/', '.svg', \OC_Helper::mimetypeIcon($document['mimetype']));
 +			$fileIds[] = $document['fileid'];
 +		}
 +
 +		usort($documents, function($a, $b){
 +			return @$b['mtime']-@$a['mtime'];
 +		});
 +		
 +		$session = new Db_Session();
 +		$sessions = $session->getCollectionBy('file_id', $fileIds);
 +
 +		$members = array();
 +		$member = new Db_Member();
 +		foreach ($sessions as $session) {			
 +			$members[$session['es_id']] = $member->getActiveCollection($session['es_id']);
 +		}
 +
 +		\OCP\JSON::success(array('documents' => $documents,'sessions' => $sessions,'members' => $members));
 +	}
 +}
diff --cc apps/documents/ajax/download.php
index de01323,0000000..a1612ec
mode 100644,000000..100644
--- a/apps/documents/ajax/download.php
+++ b/apps/documents/ajax/download.php
@@@ -1,18 -1,0 +1,18 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +\OCP\JSON::checkLoggedIn();
 +
 +$download = new Download(\OCP\User::getUser(), '/files' . @$_GET['path']);
- $download->sendResponse();
++$download->sendResponse();
diff --cc apps/documents/ajax/mimes.php
index de01323,0000000..2031a04
mode 100644,000000..100644
--- a/apps/documents/ajax/mimes.php
+++ b/apps/documents/ajax/mimes.php
@@@ -1,18 -1,0 +1,19 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
- \OCP\JSON::checkLoggedIn();
++\OCP\JSON::success(
++		array( 'mimes' => Filter::getAll())
++);
 +
- $download = new Download(\OCP\User::getUser(), '/files' . @$_GET['path']);
- $download->sendResponse();
++exit();
diff --cc apps/documents/ajax/otpoll.php
index e3d7c0a,0000000..6a83f82
mode 100644,000000..100644
--- a/apps/documents/ajax/otpoll.php
+++ b/apps/documents/ajax/otpoll.php
@@@ -1,116 -1,0 +1,116 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +class BadRequestException extends \Exception {
 +
 +	protected $body = "";
 +
 +	public function setBody($body){
 +		$this->body = $body;
 +	}
 +
 +	public function getBody(){
 +		return $this->body;
 +	}
 +}
 +
 +$response = array();
 +
 +try{
 +	$request = new Request();
 +	$esId = $request->getParam('args/es_id');
 +	
 +	$session = new Db_Session();
 +	$sessionData = $session->load($esId)->getData();
 +
 +	try {
 +		$file = new File(@$sessionData['file_id']);
 +	} catch (\Exception $e){
 +		Helper::warnLog('Error. Session no longer exists. ' . $e->getMessage());
 +		$ex = new BadRequestException();
- 		$ex->setBody("{err:'bad request: [" . $request->getRawRequest() . "]'}");
++		$ex->setBody($request->getRawRequest());
 +		throw $ex;
 +	}
 +	if (!$file->isPublicShare()){
 +		Controller::preDispatch(false);
 +	} else {
 +		Controller::preDispatchGuest(false);
 +	}
 +	
 +	$command = $request->getParam('command');
 +	switch ($command){
 +		case 'sync_ops':
 +			$seqHead = (string) $request->getParam('args/seq_head');
 +			if (!is_null($seqHead)){
 +				$memberId = $request->getParam('args/member_id');
 +				$ops = $request->getParam('args/client_ops');
 +				$hasOps = is_array($ops) && count($ops)>0;
 +
 +				$op = new Db_Op();
 +				$currentHead = $op->getHeadSeq($esId);
 +				
 +				$member = new Db_Member();
 +				try {
 +					$member->updateActivity($memberId);
 +				} catch (\Exception $e){
 +				}
 +
 +				// TODO handle the case ($currentHead == "") && ($seqHead != "")
 +				if ($seqHead == $currentHead) {
 +					// matching heads
 +					if ($hasOps) {
 +						// incoming ops without conflict
 +						// Add incoming ops, respond with a new head
 +						$newHead = Db_Op::addOpsArray($esId, $memberId, $ops);
 +						$response["result"] = 'added';
 +						$response["head_seq"] = $newHead ? $newHead : $currentHead;
 +					} else {
 +						// no incoming ops (just checking for new ops...)
 +						$response["result"] = 'new_ops';
 +						$response["ops"] = array();
 +						$response["head_seq"] = $currentHead;
 +					}
 +				} else { // HEADs do not match
 +					$response["ops"] = $op->getOpsAfterJson($esId, $seqHead);
 +					$response["head_seq"] = $currentHead;
 +					$response["result"] = $hasOps ? 'conflict' : 'new_ops';
 +				}
 +				
 +				$inactiveMembers = $member->updateByTimeout($esId);
 +				foreach ($inactiveMembers as $inactive){
 +					$op->removeCursor($esId, $inactive);
 +					$op->removeMember($esId, $inactive);
 +				}
 +			
 +			} else {
 +				// Error - no seq_head passed
 +				throw new BadRequestException();
 +			}
 +
 +			break;
 +		default:
 +			$ex = new BadRequestException();
- 			$ex->setBody("{err:'bad request: [" . $request->getRawRequest() . "]'}");
++			$ex->setBody($request->getRawRequest());
 +			throw $ex;
 +			break;
 +	}
 +
 +	\OCP\JSON::success($response);
 +} catch (BadRequestException $e){
 +	header('HTTP/1.1 400: BAD REQUEST');
- 	print("");
- 	print($e->getBody());
- 	print("");
++	\OCP\JSON::error( array(
++		'err' => 'bad request:[' . $e->getBody() . ']',
++	));
 +}
 +exit();
diff --cc apps/documents/ajax/sessionController.php
index 0f458c3,0000000..fee50ad
mode 100644,000000..100644
--- a/apps/documents/ajax/sessionController.php
+++ b/apps/documents/ajax/sessionController.php
@@@ -1,210 -1,0 +1,189 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +class SessionController extends Controller{
 +	
 +	public static function joinAsGuest($args){
 +		$uid = self::preDispatchGuest();
 +		$uid = substr(@$_POST['name'], 0, 16) .' '. $uid;
 +		$token = @$args['token'];
 +		try {
 +			$file = File::getByShareToken($token);
 +			self::join($uid, $file);
 +		} catch (\Exception $e){
 +			Helper::warnLog('Starting a session failed. Reason: ' . $e->getMessage());
 +			\OCP\JSON::error();
 +			exit();
 +		}
 +	}
 +
 +	public static function joinAsUser($args){
 +		$uid = self::preDispatch();
 +		$fileId = intval(@$args['file_id']);
 +		
 +		try {
 +			$file = new File($fileId);
 +		
 +			if ($file->getPermissions() & \OCP\PERMISSION_UPDATE) {
 +				self::join($uid, $file);	
 +			} else {
 +				\OCP\JSON::success(array(
 +					'permissions' => $file->getPermissions(),
 +					'id' => $fileId
 +				));
 +			}
 +			exit();
 +		} catch (\Exception $e){
 +			Helper::warnLog('Starting a session failed. Reason: ' . $e->getMessage());
 +			\OCP\JSON::error();
 +			exit();
 +		}
 +	}
 +	
 +	protected static function join($uid, $file){
 +			$session = Db_Session::start($uid, $file);
 +			\OCP\JSON::success($session);
 +			exit();
 +	}
 +
 +	/**
 +	 * Store the document content to its origin
 +	 */
 +	public static function save(){
 +		try {
 +			$esId = @$_SERVER['HTTP_WEBODF_SESSION_ID'];
 +			if (!$esId){
 +				throw new \Exception('Session id can not be empty');
 +			}
 +			
 +			$memberId = @$_SERVER['HTTP_WEBODF_MEMBER_ID'];
 +			$sessionRevision = @$_SERVER['HTTP_WEBODF_SESSION_REVISION'];
 +			
 +			$stream = fopen('php://input','r');
 +			if (!$stream){
 +				throw new \Exception('New content missing');
 +			}
 +			$content = stream_get_contents($stream);
 +
 +			$session = new Db_Session();
 +			$session->load($esId);
 +			
 +			if (!$session->hasData()){
 +				throw new \Exception('Session does not exist');
 +			}
 +			$sessionData = $session->getData();
 +			$file = new File($sessionData['file_id']);
 +			if (!$file->isPublicShare()){
 +				self::preDispatch();
 +			} else {
 +				self::preDispatchGuest();
 +			}
 +			
 +			list($view, $path) = $file->getOwnerViewAndPath();
 +
 +			$isWritable = ($view->file_exists($path) && $view->isUpdatable($path)) || $view->isCreatable($path);
 +			if (!$isWritable){
 +				throw new \Exception($path . ' does not exist or is not writable for user ' . $uid);
 +			}
 +			
 +			$member = new Db_Member();
 +			$members = $member->getActiveCollection($esId);
 +			$memberIds = array_map(
 +				function($x){
 +					return ($x['member_id']);
 +				},
 +				$members
 +			);
 +				
 +			//check if member belongs to the session
 +			if (!in_array($memberId, $memberIds)){
 +				throw new \Exception($memberId . ' does not belong to session ' . $esId);
 +			}
 +			
 +			// Active users except current user
 +			$memberCount = count($memberIds) - 1;
 +			
 +			if ($view->file_exists($path)){		
 +				
 +				$proxyStatus = \OC_FileProxy::$enabled;
 +				\OC_FileProxy::$enabled = false;	
 +				$currentHash = sha1($view->file_get_contents($path));
 +				\OC_FileProxy::$enabled = $proxyStatus;
 +				
 +				if (!Helper::isVersionsEnabled() && $currentHash !== $sessionData['genesis_hash']){
 +					// Original file was modified externally. Save to a new one
 +					$path = Helper::getNewFileName($view, $path, '-conflict');
 +				}
 +				
 +				$mimetype = $view->getMimeType($path);
 +			} else {
 +				$mimetype = Storage::MIMETYPE_LIBREOFFICE_WORDPROCESSOR;
 +			}
 +			
 +			$data = Filter::write($content, $mimetype);
 +			
 +			if ($view->file_put_contents($path, $data['content'])){
 +				// Not a last user
 +				if ($memberCount>0){
 +					// Update genesis hash to prevent conflicts
 +					Helper::debugLog('Update hash');
 +					
 +					$session->updateGenesisHash($esId, sha1($data['content']));
 +				} else {
 +					// Last user. Kill session data
 +					Db_Session::cleanUp($esId);
 +				}
 +				
 +				$view->touch($path);
 +			}
 +			\OCP\JSON::success();
 +			exit();
 +		} catch (\Exception $e){
 +			Helper::warnLog('Saving failed. Reason:' . $e->getMessage());
 +			\OCP\JSON::error(array('message'=>$e->getMessage()));
 +			exit();
 +		}
 +	}
 +	
 +	public static function info(){
 +		self::preDispatch();
 +		$items = @$_POST['items'];
 +		$info = array();
 +
 +		if (is_array($items)){
 +			$session = new Db_Session();
 +			$info = $session->getInfoByFileId($items);
 +		}
 +
 +		\OCP\JSON::success(array(
 +			"info" => $info
 +		));
 +	}
 +	
 +	public static function listAll(){
 +		self::preDispatch();
 +		$session = new Db_Session();
 +		$sessions = $session->getCollection();
 +
 +		$preparedSessions = array_map(
 +				function($x){
 +					return ($x['es_id']);
 +				}, $sessions
 +		);
 +		\OCP\JSON::success(array(
 +			"session_list" => $preparedSessions
 +		));
 +	}
 +
- 	public static function listAllHtml(){
- 		self::preDispatch();
- 		$session = new Db_Session();
- 		$sessions = $session->getCollection();
- 
- 		$preparedSessions = array_map(
- 				function($x){
- 					return ($x['es_id']);
- 				}, $sessions
- 		);
- 
- 		$invites = Invite::getAllInvites();
- 		if (!is_array($invites)){
- 			$invites = array();
- 		}
- 
- 		$tmpl = new \OCP\Template('documents', 'part.sessions', '');
- 		$tmpl->assign('invites', $invites);
- 		$tmpl->assign('sessions', $sessions);
- 		echo $tmpl->fetchPage();
- 	}
 +}
diff --cc apps/documents/ajax/userController.php
index 2164621,0000000..fa4f0bd
mode 100644,000000..100644
--- a/apps/documents/ajax/userController.php
+++ b/apps/documents/ajax/userController.php
@@@ -1,74 -1,0 +1,53 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +class UserController extends Controller{
 +	
 +	public static function disconnectUser($args){
 +		$uid = self::preDispatch();
 +		 self::disconnect($args, $uid);
 +	}
 +	
 +	public static function disconnectGuest($args){
 +		 self::preDispatchGuest();
 +		 self::disconnect($args, false);
 +	}
 +	
 +	protected static function disconnect($args, $uid){
 +		$esId = @$_POST['esId'];
 +		$member = new Db_Member();
 +		$member->loadBy('member_id', $args['member_id']);
 +		if ($esId && $member->hasData()){
 +			$memberData = $member->getData();
- 			if ($memberData['es_id']===$esId){
++			if ($memberData['es_id']===$esId && $memberData['status']==Db_Member::MEMBER_STATUS_ACTIVE){
 +				$member->deactivate(array($args['member_id']));
 +				$op = new Db_Op();
 +				$op->removeMember($esId, $args['member_id']);
 +			}
 +		}
 +		\OCP\JSON::success();
 +	}
 +	
- 	/**
- 	 * Invite users to the editing session
- 	 */
- 	public static function invite(){
- 		self::preDispatch();
- 		$invitees = @$_POST['users'];
- 		
- 		if (is_array($invitees)){
- 			$invitees = array_unique($invitees);
- 		
- 			$esId = @$_POST['esId'];
- 			foreach ($invitees as $userId){
- 				try {
- 					Invite::add($esId, $userId);
- 				} catch (\Exception $e) {
- 					
- 				}
- 			}
- 		}
- 		\OCP\JSON::success();
- 	}
 +	
 +	/**
 +	 * Stub - sends a generic avatar
 +	 */
 +	public static function sendAvatar(){
 +		$uid = self::preDispatch(false);
 +		$image = new \OC_Image('iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAYAAAAHkiXEAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAwAAAAMADO7oxXAAAUWUlEQVR42u1beXBUVfb+3tZLOp21u0nSHbIRQkJYk5QwIhGNLMKAiDiCqGXpaKFSY2mpVTqOC9aUOo4zMjWihcoUboUysqqMDG6MJMAYooQtJJB962ydTi/v9Vt+f1zv73U3aQibOjOcKji5r1/fd9/3nXvuOefeBi7LZbksl+Wy/K8K81MP4GxiNptMDJOQkJ7ucDBMYaHdnprKsnl5RqPRCMTHGwyCAJjNoihJgM83MDA4qGnt7V1dbreq1tW53b29mnbypKZpGqCqP/X7RMvPhoC0NIeDZceNmznziisE4c47y8omTzaZFi9OS0tLS0kZPTo52WYrLJSkl [...]
 +		\OC_Util::obEnd();
 +
 +		echo $image->show();
 +	}
 +}
diff --cc apps/documents/appinfo/routes.php
index 6c57cd7,0000000..3a41ffe
mode 100644,000000..100644
--- a/apps/documents/appinfo/routes.php
+++ b/apps/documents/appinfo/routes.php
@@@ -1,107 -1,0 +1,93 @@@
 +<?php
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +/**
 + * Document routes
 + */
 +
 +$this->create('documents_documents_create', 'ajax/documents/create')
 +	->post()
 +	->action('\OCA\Documents\DocumentController', 'create')
 +;
 +$this->create('documents_genesis', 'ajax/genesis/{es_id}')
 +	->post()
 +	->action('\OCA\Documents\DocumentController', 'serve')
 +;
 +$this->create('documents_rename', 'ajax/documents/rename/{file_id}')
 +	->post()
 +	->action('\OCA\Documents\DocumentController', 'rename')
 +;
 +$this->create('documents_genesis', 'ajax/genesis/{es_id}')
 +	->get()
 +	->action('\OCA\Documents\DocumentController', 'serve')
 +;
 +
 +$this->create('documents_documents_list', 'ajax/documents/list')
 +	->get()
 +	->action('\OCA\Documents\DocumentController', 'listAll')
 +;
 +
 +/**
 + * Session routes
 + */
 +$this->create('documents_session_list', 'ajax/session/list')
 +	->get()
 +	->action('\OCA\Documents\SessionController', 'listAll')
 +;
 +$this->create('documents_session_list', 'ajax/session/list')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'listAll')
 +;
 +
 +$this->create('documents_session_info', 'ajax/session/info')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'info')
 +;
 +
- $this->create('documents_session_listhtml', 'ajax/session/listHtml')
- 	->get()
- 	->action('\OCA\Documents\SessionController', 'listAllHtml')
- ;
- $this->create('documents_session_listhtml', 'ajax/session/listHtml')
- 	->post()
- 	->action('\OCA\Documents\SessionController', 'listAllHtml')
- ;
- 
 +$this->create('documents_session_joinasuser', 'ajax/session/joinasuser/{file_id}')
 +	->get()
 +	->action('\OCA\Documents\SessionController', 'joinAsUser')
 +;
 +$this->create('documents_session_joinasuser', 'ajax/session/joinasuser/{file_id}')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'joinAsUser')
 +;
 +$this->create('documents_session_joinasguest', 'ajax/session/joinasguest/{token}')
 +	->get()
 +	->action('\OCA\Documents\SessionController', 'joinAsGuest')
 +;
 +$this->create('documents_session_joinasguest', 'ajax/session/joinasguest/{token}')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'joinAsGuest')
 +;
 +
 +$this->create('documents_session_save', 'ajax/session/save')
 +	->post()
 +	->action('\OCA\Documents\SessionController', 'save')
 +;
 +
 +/**
 + * User routes
 + */
 +$this->create('documents_user_avatar', 'ajax/user/avatar')
 +	->get()
 +	->action('\OCA\Documents\UserController', 'sendAvatar')
 +;
 +
 +$this->create('documents_user_disconnect', 'ajax/user/disconnect/{member_id}')
 +	->post()
 +	->action('\OCA\Documents\UserController', 'disconnectUser')
 +;
 +
 +$this->create('documents_user_disconnectGuest', 'ajax/user/disconnectGuest/{member_id}')
 +	->post()
 +	->action('\OCA\Documents\UserController', 'disconnectGuest')
 +;
- 
- $this->create('documents_user_invite', 'ajax/user/invite')
- 	->post()
- 	->action('\OCA\Documents\UserController', 'invite')
- ;
diff --cc apps/documents/css/style.css
index 41a5760,0000000..13c3686
mode 100644,000000..100644
--- a/apps/documents/css/style.css
+++ b/apps/documents/css/style.css
@@@ -1,304 -1,0 +1,290 @@@
 +#editor ::-webkit-scrollbar-thumb {
 +	background-color: #fff;
 +}
 +
 +.documentslist { padding:5px; }
 +
 +.documentslist .document, 
 +.documentslist .progress,
 +.documentslist .add-document{
 +	display: inline-block;
 +	height: 200px;
 +	width: 200px;
 +	float: left;
 +	background-color: #e8e8e8;
 +	margin: 14px;
 +	vertical-align: top;
 +	border-radius: 5px;
 +}
 +
 +.add-document a {
 +	display: inline-block;
 +	position: relative;
 +	height: 100px;
 +	width: 200px;
 +	background-repeat: no-repeat;
 +	background-size: 32px;
 +	background-position: 50%;
 +}
- .add-document .add {
- 	background-image: url('%webroot%/core/img/actions/add.svg');
- }
- .add-document .upload {
- 	background-image: url('%webroot%/core/img/actions/upload.svg');
- }
++
 +
 +.add-document a.add {
 +	border-bottom: 1px solid #fff;
 +}
 +.add-document .add,
 +.add-document .upload {
 +	opacity: .7;
 +}
 +.add-document .add:hover,
 +.add-document .add:focus,
 +.add-document #upload:hover .upload,
 +.add-document .upload:focus {
 +	opacity: 1;
 +}
 +
 +.add-document label {
 +	position: absolute;
 +	bottom: 10px;
 +	width: 100%;
 +	font-weight: normal;
 +	text-align: center;
 +}
 +
 +.documentslist .progress{
 +	position:absolute;
 +	left:232px;
 +	z-index:5;
- 	background: #e8e8e8 url('%webroot%/core/img/loading.gif') 50% 50% no-repeat;
++	background-color: #e8e8e8;
 +}
 +
 +.documentslist .progress div{
 +	margin-top: 144px;
 +	text-align: center;
 +}
 +
 +.documentslist .document:hover,
 +.documentslist .document a:focus {
 +	background-color: #ddd;
 +}
 +
 +.documentslist .session-active {
 +	position: relative;
 +	margin-left: 128px;
 +	margin-top: 128px;
 +	width: 32px;
 +}
 +.document a {
 +	display: block;
 +	position: relative;
 +	height: 200px;
 +	width: 200px;
 +	background-repeat: no-repeat;
 +	background-size: 64px;
 +	background-position: 68px;
 +}
 +.document label {
 +	position: absolute;
 +	bottom: 5px;
 +	width: 100%;
 +	font-weight: normal;
 +	text-overflow: ellipsis;
 +	overflow: hidden;
 +	text-align: center;
 +	padding: 0 8px;
 +	-webkit-box-sizing: border-box;
 +	-moz-box-sizing: border-box;
 +	box-sizing: border-box;
 +	white-space: nowrap;
 +}
 +
 +#odf-toolbar{
 +	text-align: left;
 +	position: absolute;
 +	width: 100%;
 +	padding:0;
 +	z-index: 500;
 +}
 +
 +#odf-toolbar #dropdown{
 +	right:auto;
 +}
 +
 +#document-title{
 +/*	position: absolute;
 +	top: 9px;
 +	left:50%;
 +	margin:0; */
 +	padding: 4px 0 5px;
 +	border-bottom: 1px solid #E9E9E9;
 +
 +	text-align: center;
 +	font-weight: bold;
 +}
 +#document-title div{
 +	position: relative;
 +	/*margin-left:-50%;*/
 +}
 +#document-title>input {
 +	height:9px;
 +	margin: 0;
 +	padding-top:4px;
 +	width: 300px;
 +}
 +
 +#odf-close{
 +	float: right;
 +}
 +
 +#odf-invite{
 +	float: left;
 +}
 +
- #invite-block{
- 	position: absolute;
- 	top:3em;
- 	margin-top:-3px;
- 	left:0;
- 	padding: 10px;
- 	background-color: #bbb;
- }
- 
- #invitee-list li{
- 	padding: 5px 0 5px 20px;
- 	background: url('%webroot%/core/img/actions/delete.svg') 0 50% no-repeat;
- }
- 
 +#mainContainer{
 +	position:absolute;
 +	z-index:500;
 +}
 +
 +#documents-overlay,  #documents-overlay-below{
 +    position: fixed;
 +    top: 0;
 +    left: 0;
 +    width: 100%;
 +    height: 100%;
 +    filter:alpha(opacity=30);
 +    opacity: .3;
 +    z-index: 1000;
- 	background: #111 url('%webroot%/core/img/loading-dark.gif') 50% 50% no-repeat;
++	background-color: #111;
 +}
 +
 +#documents-overlay-below{
 +	left:0;
 +	top:0;
 +    filter:alpha(opacity=100);
 +    opacity: 1;
 +	background:#f0f0f0;
 +	z-index: 999;
 +}
 +
 +#file_upload_start{
 +	display: block;
 +	position:relative;
 +	left:0; top:0; width:200px; height:100px; 
 +	margin-bottom: -110px;padding:0;
 +	cursor:pointer; overflow:hidden;
 +	font-size:1em;
 +	-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0;
 +	z-index:20; 
 +}
 +
++#saving-document{
++	float:right;
++	display:none;
++}
++
 +#warning-connection-lost{
 +	padding: 6px 0;
 +	text-align: center;
 +	color: #ffffff;
 +	background-color: #CE7070;
 +	font-size: 16px;
 +	font-weight: bold;
 +}
 +
 +#warning-connection-lost img {
 +	margin-right: 4px;
 +	float: right;
 +	height: 20px;
 +}
 +
 +#connection-lost{
 +	right: 5px;
 +	background: #fff;
 +	width: 95%;
 +	position: absolute;
 +	top: 87px;
 +}
 +
 +
 +/* override WebODF styling here */
 +
 +#mainContainer #collaboration{
 +	float:right;position: relative;z-index: 1;
 +	width: 70px;padding:5px;
 +}
 +
 +#members{
 +	padding-top: 69px !important;
 +}
 +
 +.memberListButton span{
 +	display: block;
 +    box-shadow: 0px 0px 5px rgb(90, 90, 90) inset;
 +    background-color: rgb(200, 200, 200);
 +    border-radius: 5px;
 +    border: 2px solid;
 +    display: block;
 +    margin: auto;
 +}
 +
 +.memberListButton img{
 +    border: 0 none !important;
 +}
 +
 +#toolbar {
 +	border-bottom: none !important;
 +	padding: 5px 0 0 !important;
 +}
 +
 +#toolbar > .dijit{
 +	margin-left:3px;
 +}
 +#toolbar > span.dijit{
 +	margin-left: 0;
 +}
 +
 +#container {
 +	top: 38px !important;
 +}
 +
 +cursor > div {
 +	padding-bottom: 0 !important;
 +}
 +
 +editinfo > div.editInfoMarker {
 +	width: 4px;
 +	border-radius: 0;
 +	box-shadow: 0 0 0 #fff;
 +	background-clip:content-box;
 +	padding: 0 5px;
 +}
 +
 +editinfo > div.editInfoMarker:hover {
 +}
 +
 +.dijitToolbar .dijitDropDownButton {
 +	padding-top: 2px;
 +}
 +
 +.dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {
 +margin-top:-1px;
 +}
 +
 +.claro .dijitTextBox .dijitInputInner,
 +.claro .dijitSpinner .dijitSpinnerButtonInner {
 +	margin: 0;
 +}
 +
 +/* part of dojo.css */
 +.dojoTabular {border-collapse: collapse; border-spacing: 0; border: 1px solid #ccc; margin: 0 1.5em;}
 +.dojoTabular th {text-align: center; font-weight: bold;}
 +.dojoTabular thead,.dojoTabular tfoot {background-color: #efefef; border: 1px solid #ccc; border-width: 1px 0;}
 +.dojoTabular th,.dojoTabular td {padding: 0.25em 0.5em;}
 +
 +/* raise notification z-index above the documents app */
 +#odf-toolbar + #notification-container {
 +	z-index: 501;
 +}
 +
 +document p{
 +	cursor:auto;
 +}
diff --cc apps/documents/index.php
index 05f277a,0000000..235192b
mode 100644,000000..100644
--- a/apps/documents/index.php
+++ b/apps/documents/index.php
@@@ -1,54 -1,0 +1,55 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Frank Karlitschek
 + * @copyright 2011 Frank Karlitschek karlitschek at kde.org
 + * 
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 + * License as published by the Free Software Foundation; either 
 + * version 3 of the License, or any later version.
 + * 
 + * This library is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 + *  
 + * You should have received a copy of the GNU Lesser General Public 
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + * 
 + */
 +
 +
 +namespace OCA\Documents;
 +
 +\OCP\User::checkLoggedIn();
 +\OCP\JSON::checkAppEnabled('documents');
 +\OCP\App::setActiveNavigationEntry( 'documents_index' );
 +
 +\OCP\Util::addStyle( 'documents', 'style' );
 +\OCP\Util::addStyle( 'documents', '3rdparty/webodf/dojo-app');
 +\OCP\Util::addStyle( 'documents', '3rdparty/webodf/editor');
++
 +\OCP\Util::addScript('documents', 'documents');
 +
 +\OCP\Util::addScript('files', 'file-upload');
 +\OCP\Util::addScript('files', 'jquery.iframe-transport');
 +\OCP\Util::addScript('files', 'jquery.fileupload');
 +
 +
 +$tmpl = new \OCP\Template('documents', 'documents', 'user');
 +
 +$unstable = \OCP\Config::getAppValue('documents', 'unstable', 'false');
 +$maxUploadFilesize = \OCP\Util::maxUploadFilesize("/");
 +$savePath = \OCP\Config::getUserValue(\OCP\User::getUser(), 'documents', 'save_path', '/');
 +
 +
 +$tmpl->assign('useUnstable', $unstable);
 +$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
 +$tmpl->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize));
 +$tmpl->assign('savePath', $savePath);
 +$tmpl->assign("allowShareWithLink", \OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
 +
 +$tmpl->printPage();
diff --cc apps/documents/js/documents.js
index 75adaa0,0000000..8e32fc5
mode 100644,000000..100644
--- a/apps/documents/js/documents.js
+++ b/apps/documents/js/documents.js
@@@ -1,557 -1,0 +1,599 @@@
 +/*globals $,OC,fileDownloadPath,t,document,odf,webodfEditor,alert,require,dojo,runtime */
 +var documentsMain = {
 +	_documents: [],
 +	_sessions: [],
 +	_members: [],
 +	isEditormode : false,
 +	useUnstable : false,
 +	isGuest : false,
 +	memberId : false,
 +	esId : false,
 +	ready :false,
 +	fileName: null,
 +	
 +	UI : {
 +		/* Overlay HTML */
- 		overlay : '<div id="documents-overlay"></div> <div id="documents-overlay-below"></div>',
++		overlay : '<div id="documents-overlay" class="icon icon-loading-dark"></div> <div id="documents-overlay-below" class="icon icon-loading-dark"></div>',
 +				
 +		/* Toolbar HTML */
 +		toolbar : '<div id="odf-toolbar" class="dijitToolbar">' +
 +					'  <div id="document-title"><div>' +
 +					'%title%' +
 +			        '  </div></div>' +
 +					'  <button id="odf-close">' +
 +						t('documents', 'Close') +
 +					'  </button>' +
++					'  <img id="saving-document" alt=""' +
++					'   src="' + OC.imagePath('core', 'loading.gif') + '"' +
++					'  />' +
 +					'  <button id="odf-invite" class="drop">' +
 +						  t('documents', 'Share') +
 +					'  </button>' +
 +					'  <span id="toolbar" class="claro"></span>' +
 +					'</div>',
 +					
 +		/* Editor wrapper HTML */
 +		container : '<div id = "mainContainer" class="claro" style="">' +
 +					'  <div id = "editor">' +
 +					'    <div id = "container">' +
 +					'      <div id="canvas"></div>' +
 +					'    </div>' +
 +					'  </div>' +
 +					'  <div id = "collaboration">' +
 +					'    <div id = "collabContainer">' +
 +					'      <div id = "members">' +
 +					'        <div id = "inviteButton"></div>' +
 +					'        <div id = "memberList"></div>' +
 +					'      </div>' +
 +					'    </div>' +
 +					'  </div>' +
 +					'</div>',
 +					
 +		/* Previous window title */
 +		mainTitle : '',
 +				
 +		init : function(){
 +			$(documentsMain.UI.overlay).hide().appendTo(document.body);
 +			documentsMain.UI.mainTitle = $('title').text();
 +		},
 +		
 +		showOverlay : function(){
 +			$('#documents-overlay,#documents-overlay-below').fadeIn('fast');
 +		},
 +		
 +		hideOverlay : function(){
 +			$('#documents-overlay,#documents-overlay-below').fadeOut('fast');
 +		},
 +		
 +		showEditor : function(title, canShare){
 +			$(document.body).prepend(documentsMain.UI.toolbar.replace(/%title%/g, title));
 +			if (!canShare){
 +				$('#odf-invite').remove();
 +			} else {
 +				//TODO: fill in with users
 +			}
 +			$(document.body).addClass("claro");
 +			$(document.body).prepend(documentsMain.UI.container);
 +			// in case we are on the public sharing page we shall display the odf into the preview tag
 +			$('#preview').html(container);
- 			$('title').text(documentsMain.UI.mainTitle + '| ' + title);
++			$('title').text(title + ' - ' + documentsMain.UI.mainTitle);
 +		},
 +		
 +		hideEditor : function(){
 +				// Fade out toolbar
 +				$('#odf-toolbar').fadeOut('fast');
 +				// Fade out editor
 +				$('#mainContainer').fadeOut('fast', function() {
 +					$('#mainContainer').remove();
 +					$('#odf-toolbar').remove();
 +					$('#content').fadeIn('fast');
 +					$(document.body).removeClass('claro');
 +					$('title').text(documentsMain.UI.mainTitle);
 +				});
 +		},
++		
++		showSave : function (){
++			$('#odf-close').hide();
++			$('#saving-document').show();
++		},
++		
++		hideSave : function(){
++			$('#saving-document').hide();
++			$('#odf-close').show();
++		},
++		
 +		showProgress : function(message){
 +			if (!message){
 +				message = ' ';
 +			}
 +			$('.documentslist .progress div').text(message);
 +			$('.documentslist .progress').show();
 +		},
 +		
 +		hideProgress : function(){
 +			$('.documentslist .progress').hide();
 +		},
 +		
 +		showLostConnection : function(){
 +			$('#memberList .memberListButton').css({opacity : 0.3});
 +			$('#odf-toolbar').children(':not(#document-title)').hide();
 +			$('<div id="connection-lost"></div>').prependTo('#memberList');
 +			$('<div id="warning-connection-lost">' + t('documents', 'No connection to server. Trying to reconnect.') +'<img src="'+ OC.imagePath('core', 'loading-dark.gif') +'" alt="" /></div>').appendTo('#odf-toolbar');
 +		},
 +		
 +		hideLostConnection : function() {
 +			$('#connection-lost,#warning-connection-lost').remove();
- 			$('#odf-toolbar').children(':not(#document-title)').show();
++			$('#odf-toolbar').children(':not(#document-title,#saving-document)').show();
 +			$('#memberList .memberListButton').css({opacity : 1});
 +		}
 +	},
 +	
 +	onStartup: function() {
 +		var fileId;
 +		"use strict";
 +		documentsMain.useUnstable = $('#webodf-unstable').val()==='true';
 +		documentsMain.UI.init();
 +		
 +		if (!OC.currentUser){
 +			documentsMain.isGuest = true;
 +			
 +		} else {
 +			// Does anything indicate that we need to autostart a session?
 +			fileId = parent.location.hash.replace(/\W*/g, '');
 +		}
 +		
 +		documentsMain.show();
 +		if (fileId){
 +			documentsMain.UI.showOverlay();
 +		}
 +		
 +		var webodfSource = (oc_debug === true) ? 'webodf-debug' : 'webodf';
 +		OC.addScript('documents', '3rdparty/webodf/' + webodfSource).done(function() {
 +			// preload stuff in the background
 +			require({}, ["dojo/ready"], function(ready) {
 +				ready(function() {
 +					require({}, ["webodf/editor/Editor"], function(Editor) {
 +						runtime.setTranslator(function(s){return t('documents', s);});
 +						documentsMain.ready = true;
 +						if (fileId){
 +							documentsMain.prepareSession();
 +							documentsMain.joinSession(fileId);
 +						}
 +					});
 +				});
 +			});
 +		});
 +	},
 +	
 +	prepareSession : function(){
 +		documentsMain.isEditorMode = true;
 +		documentsMain.UI.showOverlay();
 +		$(window).on('beforeunload', function(){
 +			return t('documents', "Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead."); 
 +		});
 +	},
 +	
 +	prepareGrid : function(){
 +		documentsMain.isEditorMode = false;
 +		documentsMain.UI.hideOverlay();
 +	},
 +	
 +	initSession: function(response) {
 +		"use strict";
 +
 +		if(response && (response.id && !response.es_id)){
 +			return documentsMain.view(response.id);
 +		} 
 +
 +		if (!response || !response.status || response.status==='error'){
- 			OC.Notification.show(t('documents', 'Failed to load this document. Please check if it can be opened with an external odt editor. This might also mean it has been unshared or deleted recently.'));
- 			documentsMain.prepareGrid();
- 			documentsMain.show();
- 			$(window).off('beforeunload');
- 			setTimeout(OC.Notification.hide, 7000);
++			documentsMain.onEditorShutdown(t('documents', 'Failed to load this document. Please check if it can be opened with an external odt editor. This might also mean it has been unshared or deleted recently.'));
 +			return;
 +		}
 +		
 +		//Wait for 3 sec if editor is still loading 
 +		if (!documentsMain.ready){
 +			setTimeout(function(){ documentsMain.initSession(response); }, 3000);
 +			console.log('Waiting for the editor to start...');
 +			return;
 +		}
 +
 +		require({ }, ["webodf/editor/server/owncloud/ServerFactory", "webodf/editor/Editor"], function (ServerFactory, Editor) {
 +			// fade out file list and show WebODF canvas
 +			$('#content').fadeOut('fast').promise().done(function() {
 +				
 +				documentsMain.fileId = response.file_id;
 +				documentsMain.fileName = documentsMain.getNameByFileid(response.file_id);
 +				documentsMain.UI.showEditor(
- 						documentsMain.fileName,
++						documentsMain.fileName || response.title,
 +						response.permissions & OC.PERMISSION_SHARE && !documentsMain.isGuest
 +				);
 +				var serverFactory = new ServerFactory();
 +				documentsMain.esId = response.es_id;
 +				documentsMain.memberId = response.member_id;
 +
 +				// TODO: set webodf translation system, by passing a proper function translate(!string):!string in "runtime.setTranslator(translate);"
 +
 +				documentsMain.webodfServerInstance = serverFactory.createServer();
 +				documentsMain.webodfServerInstance.setToken(oc_requesttoken);
 +				documentsMain.webodfEditorInstance = new Editor({unstableFeaturesEnabled: documentsMain.useUnstable}, documentsMain.webodfServerInstance, serverFactory);
- 				
++				documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_BEFORESAVETOFILE, documentsMain.UI.showSave);
++				documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_SAVEDTOFILE, documentsMain.UI.hideSave);
++				documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_ERROR, documentsMain.onEditorShutdown);
++				documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_HASSESSIONHOSTCONNECTIONCHANGED, function(has) {
++					if (has){
++						documentsMain.UI.hideLostConnection();
++					} else {
++						documentsMain.UI.showLostConnection();
++					}
++				});
 +				// load the document and get called back when it's live
 +				documentsMain.webodfEditorInstance.openSession(documentsMain.esId, documentsMain.memberId, function() {
 +					documentsMain.webodfEditorInstance.startEditing();
 +					documentsMain.UI.hideOverlay();
 +					parent.location.hash = response.file_id;
 +				});
 +			});
 +		});
 +	},
 +	
 +
 +	joinSession: function(fileId) {
 +		console.log('joining session '+fileId);
 +		var url;
 +		if (documentsMain.isGuest){
 +			url = OC.Router.generate('documents_session_joinasguest') + '/' + fileId;
 +		} else {
 +			url = OC.Router.generate('documents_session_joinasuser') + '/' + fileId;
 +		}
 +		$.post(
 +			url,
 +			{ name : $("[name='memberName']").val() },
 +			documentsMain.initSession
 +		);
 +	},
 +	
 +	view : function(id){
 +		OC.addScript('documents', 'viewer/viewer', function() {
 +			documentsMain.prepareGrid();
 +			$(window).off('beforeunload');
 +			var path = $('li[data-id='+ id +']>a').attr('href');
 +			odfViewer.isDocuments = true;
 +			odfViewer.onView(path);
 +		});
 +	},
 +			
 +	onCreate: function(event){
 +		event.preventDefault();
 +		var docElem = $('.documentslist .template').clone();
 +		docElem.removeClass('template');
 +		docElem.addClass('document');
 +		docElem.insertAfter('.documentslist .template');
 +		docElem.show();
 +		$.post(
 +			OC.Router.generate('documents_documents_create'),
 +			{},
 +			documentsMain.show
 +		);
 +	},
 +
 +	onInvite: function(event) {
 +		event.preventDefault();
 +		if (OC.Share.droppedDown) {
 +			OC.Share.hideDropDown();
 +		} else {
 +			(function() {
 +				var target = OC.Share.showLink;
 +				OC.Share.showLink = function() {
 +					var r = target.apply( this, arguments );
 +					$('#linkText').val( $('#linkText').val().replace('service=files', 'service=documents') );
 +					return r;
 +				};
 +			})();
 +
 +			OC.Share.showDropDown(
 +				'file', 
 +				parent.location.hash.replace(/\W*/g, ''),
 +				$("#odf-toolbar"),
 +				true, 
 +				OC.PERMISSION_READ | OC.PERMISSION_SHARE | OC.PERMISSION_UPDATE
 +			);
 +		}
 +	},
- 	
- 	sendInvite: function() {
- 		var users = [];
- 		$('input[name=invitee\\[\\]]').each(function(i, e) {
- 			users.push($(e).val());
- 		});
- 		$.post(OC.Router.generate('documents_user_invite'), {users: users});
- 	},
 +
 +	renameDocument: function(name) {
 +		var url = OC.Router.generate('documents_rename') + '/' + documentsMain.fileId;
 +		$.post(
 +			url,
 +			{ name : name },
 +			function(result) {
 +				if (result && result.status === 'error') {
 +					if (result.message){
 +						OC.Notification.show(result.message);
 +						setTimeout(function() {
 +							OC.Notification.hide();
 +						}, 10000);
 +					}
 +					return;
 +				}
 +				documentsMain.fileName = name;
 +				$('title').text(documentsMain.UI.mainTitle + '| ' + name);
 +				$('#document-title>div').text(name);
 +			}
 +		);
 +	},
 +
- 	// FIXME: copy/pasted from Files.isFileNameValid, needs refactor into core
- 	isFileNameValid:function (name) {
- 		if (name === '.') {
- 			throw t('files', '\'.\' is an invalid file name.');
- 		} else if (name.length === 0) {
- 			throw t('files', 'File name cannot be empty.');
- 		}
- 
- 		// check for invalid characters
- 		var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*'];
- 		for (var i = 0; i < invalid_characters.length; i++) {
- 			if (name.indexOf(invalid_characters[i]) !== -1) {
- 				throw t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.");
- 			}
- 		}
- 		return true;
- 	},
 +
 +	onRenamePrompt: function() {
 +		var name = documentsMain.fileName;
 +		var lastPos = name.lastIndexOf('.');
 +		var extension = name.substr(lastPos + 1);
 +		name = name.substr(0, lastPos);
 +		var input = $('<input type="text" class="filename"/>').val(name);
 +		$('#document-title').append(input);
 +		$('#document-title>div').hide();
 +
 +		input.on('blur', function(){
 +			var newName = input.val();
 +			if (!newName || newName === name) {
 +				input.tipsy('hide');
 +				input.remove();
 +				$('#document-title>div').show();
 +				return;
 +			}
 +			else {
 +				newName = newName + '.' + extension;
 +				try {
 +					input.tipsy('hide');
 +					input.removeClass('error');
- 					if (documentsMain.isFileNameValid(newName)) {
++					if (Files.isFileNameValid(newName)) {
 +						input.tipsy('hide');
 +						input.remove();
 +						$('#document-title>div').show();
 +						documentsMain.renameDocument(newName);
 +					}
 +				}
 +				catch (error) {
 +					input.attr('title', error);
 +					input.tipsy({gravity: 'n', trigger: 'manual'});
 +					input.tipsy('show');
 +					input.addClass('error');
 +				}
 +			}
 +		});
 +		input.on('keyup', function(event){
 +			if (event.keyCode === 27) {
 +				// cancel by putting in an empty value
 +				$(this).val('');
 +				$(this).blur();
 +				event.preventDefault();
 +			}
 +			if (event.keyCode === 13) {
 +				$(this).blur();
 +				event.preventDefault();
 +			}
 +		});
 +		input.focus();
 +		input.selectRange(0, name.length);
 +	},
 +
++	onEditorShutdown : function (message){
++			OC.Notification.show(message);
++
++			$(window).off('beforeunload');
++			if (documentsMain.isEditorMode){
++				documentsMain.isEditorMode = false;
++				parent.location.hash = "";
++			} else {
++				setTimeout(OC.Notification.hide, 7000);
++			}
++			documentsMain.prepareGrid();
++			try {
++				documentsMain.webodfEditorInstance.endEditing();
++				documentsMain.webodfEditorInstance.closeSession(function() {
++					documentsMain.webodfEditorInstance.destroy(documentsMain.UI.hideEditor);
++				});
++			} catch (e){
++				documentsMain.UI.hideEditor();
++			}
++			
++			documentsMain.show();
++		},
++		
++
 +	onClose: function() {
 +		"use strict";
 +		
 +		if (!documentsMain.isEditorMode){
 +			return;
 +		}
 +		documentsMain.isEditorMode = false;
 +		$(window).off('beforeunload');
 +		parent.location.hash = "";
 +
 +		documentsMain.webodfEditorInstance.endEditing();
 +		documentsMain.webodfEditorInstance.closeSession(function() {
 +			// successfull shutdown - all is good.
 +			// TODO: proper session leaving call to server, either by webodfServerInstance or custom
 +// 			documentsMain.webodfServerInstance.leaveSession(sessionId, memberId, function() {
 +			if (documentsMain.isGuest){
 +				$(document.body).attr('id', 'body-login');
 +				$('header,footer').show();
 +			}
 +			documentsMain.webodfEditorInstance.destroy(documentsMain.UI.hideEditor);
 +			
 +			if (documentsMain.isGuest){
 +				var url = OC.Router.generate('documents_user_disconnectGuest');
 +			} else {
 +				var url = OC.Router.generate('documents_user_disconnect');
 +			}
 +			
 +			$.post(url + '/' + documentsMain.memberId, {esId: documentsMain.esId});
 +			
 +			documentsMain.show();
 +// 			});
 +		});
 +	},
 +	
 +	getNameByFileid : function(fileid){
 +		return $('.documentslist li[data-id='+ fileid + ']').find('label').text();
 +	},
 +	
 +	show: function(){
 +		if (documentsMain.isGuest){
 +			return;
 +		}
 +		documentsMain.UI.showProgress(t('documents', 'Loading documents...'));
 +		jQuery.when(documentsMain.loadDocuments())
 +			.then(function(){
 +				documentsMain.renderDocuments();
 +				documentsMain.UI.hideProgress();
 +			});
 +	},
 +	
 +	loadDocuments: function () {
 +		var self = this;
 +		var def = new $.Deferred();
 +		OC.Router.registerLoadedCallback(function () {
 +			jQuery.getJSON(OC.Router.generate('documents_documents_list'))
 +				.done(function (data) {
 +					self._documents = data.documents;
 +					self._sessions = data.sessions;
 +					self._members = data.members;
 +					def.resolve();
 +				})
 +				.fail(function(data){
 +					console.log(t('documents','Failed to load documents.'));
 +				});
 +		});
 +		return def;
 +	},
 +	
 +	renderDocuments: function () {
 +		var self = this,
 +		hasDocuments = false;
 +
 +		//remove all but template
 +		$('.documentslist .document:not(.template,.progress)').remove();
 +
 +		jQuery.each(this._documents, function(i,document){
 +			var docElem = $('.documentslist .template').clone();
 +			docElem.removeClass('template');
 +			docElem.addClass('document');
 +			docElem.attr('data-id', document.fileid);
 +
 +			var a = docElem.find('a');
 +			a.attr('href', OC.Router.generate('download',{file:document.path}));
 +			a.find('label').text(document.name);
 +			a.css('background-image', 'url("'+document.icon+'")');
 +
 +			$('.documentslist').append(docElem);
 +			docElem.show();
 +			hasDocuments = true;
 +		});
 +		jQuery.each(this._sessions, function(i,session){
 +			if (self._members[session.es_id].length > 0) {
 +				var docElem = $('.documentslist .document[data-id="'+session.file_id+'"]');
 +				if (docElem.length > 0) {
 +					docElem.attr('data-esid', session.es_id);
 +					docElem.find('label').after('<img class="svg session-active" src="'+OC.imagePath('core','places/contacts-dark')+'">');
 +					docElem.addClass('session');
 +				} else {
 +					console.log('Could not find file '+session.file_id+' for session '+session.es_id);
 +				}
 +			}
 +		});
 +		
 +		if (!hasDocuments){
 +			$('#documents-content').append('<div id="emptycontent">'
 +				+ t('documents', 'No documents are found. Please upload or create a document!')
 +				+ '</div>'
 +			);
 +		} else {
 +			$('#emptycontent').remove();
 +		}
 +	}
 +};
 +
 +
 +//web odf bootstrap code. Added here to reduce number of requests
 +/*globals navigator,dojoConfig */
 +var usedLocale = "C";
 +
 +if (navigator && navigator.language.match(/^(de)/)) {
 +	usedLocale = navigator.language.substr(0,2);
 +}
 +
 +dojoConfig = {
 +	locale: usedLocale,
 +	paths: {
 +		"webodf/editor": OC.appswebroots.documents + "/js/3rdparty/webodf/editor",
 +		"dijit": OC.appswebroots.documents + "/js/3rdparty/resources/dijit",
 +		"dojox": OC.appswebroots.documents + "/js/3rdparty/resources/dojox",
 +		"dojo": OC.appswebroots.documents + "/js/3rdparty/resources/dojo",
 +		"resources": OC.appswebroots.documents + "/js/3rdparty/resources"
 +	}
 +};
 +
++
 +//init
++var Files = Files || {
++	// FIXME: copy/pasted from Files.isFileNameValid, needs refactor into core
++	isFileNameValid:function (name) {
++		if (name === '.') {
++			throw t('files', '\'.\' is an invalid file name.');
++		} else if (name.length === 0) {
++			throw t('files', 'File name cannot be empty.');
++		}
++
++		// check for invalid characters
++		var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*'];
++		for (var i = 0; i < invalid_characters.length; i++) {
++			if (name.indexOf(invalid_characters[i]) !== -1) {
++				throw t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.");
++			}
++		}
++		return true;
++	},
++	
++	updateStorageStatistics: function(){}
++};
++
 +$(document).ready(function() {
 +	"use strict";
 +	
 +	$('.documentslist').on('click', 'li:not(.add-document)', function(event) {
 +		event.preventDefault();
 +
 +		if (documentsMain.isEditorMode){
 +			return;
 +		}
 +		
 +		documentsMain.prepareSession();
 +		if ($(this).attr('data-id')){
 +			documentsMain.joinSession($(this).attr('data-id'));
 +		}
 +	});
 +	
 +	$(document.body).on('click', '#document-title>div', documentsMain.onRenamePrompt);
 +	$(document.body).on('click', '#odf-close', documentsMain.onClose);
 +	$(document.body).on('click', '#odf-invite', documentsMain.onInvite);
 +	$(document.body).on('click', '#odf-join', function(event){
 +		event.preventDefault();
 +
 +		// !Login page mess wih WebODF toolbars
 +		$(document.body).attr('id', 'body-user');
 +		$('header,footer').hide();
 +		documentsMain.prepareSession();
 +		documentsMain.joinSession(
 +				$("[name='document']").val()
 +		);
 +	});
 +	$('.add-document').on('click', '.add', documentsMain.onCreate);
 +
++
 +	var file_upload_start = $('#file_upload_start');
 +	file_upload_start.on('fileuploaddone', documentsMain.show);
 +	//TODO when ending a session as the last user close session?
 +	
 +	OC.addScript('documents', '3rdparty/webodf/dojo-amalgamation', documentsMain.onStartup);
 +});
diff --cc apps/documents/js/viewer/viewer.js
index e202155,0000000..cf2313f
mode 100644,000000..100644
--- a/apps/documents/js/viewer/viewer.js
+++ b/apps/documents/js/viewer/viewer.js
@@@ -1,112 -1,0 +1,123 @@@
 +var odfViewer = {
 +	isDocuments : false,
 +	supportedMimesRead: [
 +		'application/vnd.oasis.opendocument.text',
 +		'application/vnd.oasis.opendocument.spreadsheet',
 +		'application/vnd.oasis.opendocument.graphics',
 +		'application/vnd.oasis.opendocument.presentation'
 +	],
 +			
 +	supportedMimesUpdate: [
 +		'application/vnd.oasis.opendocument.text'
 +	],
 +			
- 	register : function(){
++	register : function(response){
++		if (response && response.mimes){
++			jQuery.each(response.mimes, function(i, mime){
++				odfViewer.supportedMimesRead.push(mime);
++				odfViewer.supportedMimesUpdate.push(mime);
++			});
++		}
 +		for (var i = 0; i < odfViewer.supportedMimesRead.length; ++i) {
 +			var mime = odfViewer.supportedMimesRead[i];
 +			FileActions.register(mime, 'View', OC.PERMISSION_READ, '', odfViewer.onView);
 +			FileActions.setDefault(mime, 'View');
 +		}
 +		for (var i = 0; i < odfViewer.supportedMimesUpdate.length; ++i) {
 +			var mime = odfViewer.supportedMimesUpdate[i];
 +			FileActions.register(
 +					mime, 
 +					t('documents', 'Edit'), 
 +					OC.PERMISSION_UPDATE, 
 +					OC.imagePath('core', 'actions/rename'), 
 +					odfViewer.onEdit
 +			);
 +		}
 +	},
 +	
 +	dispatch : function(filename){
 +		if (odfViewer.supportedMimesUpdate.indexOf(FileActions.getCurrentMimeType()) !== -1
 +		 && FileActions.getCurrentPermissions() & OC.PERMISSION_UPDATE
 +		){
 +			odfViewer.onEdit(filename);
 +		} else {
 +			odfViewer.onView(filename);
 +		}
 +	},
 +	
 +	onEdit : function(){
 +		var fileId = FileActions.currentFile.parent().attr('data-id');
 +		window.open(OC.linkTo('documents', 'index.php') + '#' + fileId);
 +	},
 +			
 +	onView: function(filename) {
 +		var webodfSource = (oc_debug === true) ? 'webodf-debug' : 'webodf',
 +		attachTo = odfViewer.isDocuments ? '#documents-content' : 'table',
 +		attachToolbarTo = odfViewer.isDocuments ? '#content-wrapper' : '#controls';
 +
 +		if (odfViewer.isDocuments){
 +			//Documents view
 +			var location = filename;
 +		} else {
 +			//Public page, files app, etc
- 			var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + $('#dir').val() + encodeURIComponent(filename);
++			var dirName = $('#dir').val()!='/' ? $('#dir').val() + '/' : '/';
++			var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + dirName + encodeURIComponent(filename);
 +			OC.addStyle('documents', '3rdparty/webodf/editor');
 +		}
 +		
 +		OC.addStyle('documents', 'viewer/odfviewer');
 +		
 +		OC.addScript('documents', '3rdparty/webodf/' + webodfSource, function() {
 +			// fade out files menu and add odf menu
 +			$('#controls div').fadeOut('slow').promise().done(function() {
 +				// odf action toolbar
 +				var odfToolbarHtml =
 +						'<div id="odf-toolbar">' +
 +						'<button id="odf_close">' + t('documents', 'Close') +
 +						'</button></div>';
 +				if (odfViewer.isDocuments){
 +					$(attachToolbarTo).prepend(odfToolbarHtml);
 +					$('#odf-toolbar').css({position:'fixed'});
 +				} else {
 +					$(attachToolbarTo).append(odfToolbarHtml);
 +				}
 +			});
 +
 +			// fade out file list and show pdf canvas
 +			$('table, #documents-content').fadeOut('slow').promise().done(function() {
 +				var canvashtml = '<div id="odf-canvas"></div>';
 +				$(attachTo).after(canvashtml);
 +				// in case we are on the public sharing page we shall display the odf into the preview tag
 +				$('#preview').html(canvashtml);
 +
 +				var odfelement = document.getElementById("odf-canvas");
 +				var odfcanvas = new odf.OdfCanvas(odfelement);
 +				odfcanvas.load(location);
 +			});
 +		});
 +	},
 +	
 +	onClose: function() {
 +		// Fade out odf-toolbar
 +		$('#odf-toolbar').fadeOut('slow');
 +		// Fade out editor
 +		$('#odf-canvas').fadeOut('slow', function() {
 +			$('#odf-toolbar').remove();
 +			$('#odf-canvas').remove();
 +			$('#controls div').not('.hidden').fadeIn('slow');
 +			$('table, #documents-content').fadeIn('slow');
 +		});
 +	}
 +};
 +
 +$(document).ready(function() {
 +	if (typeof FileActions !== 'undefined') {
- 		odfViewer.register();
++		$.post(
++			OC.filePath('documents', 'ajax', 'mimes.php'),
++			{},
++			odfViewer.register
++		);
 +	}
 +
 +	$('#odf_close').live('click', odfViewer.onClose);
 +});
diff --cc apps/documents/lib/db/op.php
index 4974adc,0000000..9e8c94d
mode 100644,000000..100644
--- a/apps/documents/lib/db/op.php
+++ b/apps/documents/lib/db/op.php
@@@ -1,139 -1,0 +1,130 @@@
 +<?php
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +class Db_Op extends Db {
 +
 +	const DB_TABLE = '`*PREFIX*documents_op`';
 +	
 +	protected $tableName = '`*PREFIX*documents_op`';
 +	
 +	protected $insertStatement = 'INSERT INTO `*PREFIX*documents_op` (`es_id`, `member`, `opspec`) VALUES (?, ?, ?)';
 +
 +	public static function addOpsArray($esId, $memberId, $ops){
 +		$lastSeq = "";
 +		$opObj = new Db_Op();
 +		foreach ($ops as $op) {
 +			$opObj->setData(array(
 +				$esId, 
 +				$memberId, 
 +				json_encode($op)
 +			));
 +			$opObj->insert();
 +			$lastSeq = $opObj->getLastInsertId();
 +		}
 +		return $lastSeq;
 +	}
 +	
 +	/**
 +	 * @returns "" when there are no Ops, or the seq of the last Op
 +	 */
 +	public function getHeadSeq($esId){
 +		$query = \OCP\DB::prepare('
 +			SELECT `seq`
 +			FROM ' . $this->tableName . '
 +			WHERE `es_id`=?
 +			ORDER BY `seq` DESC
 +			', 1);
 +		$result = $query->execute(array(
 +				$esId
 +			))
 +			->fetchOne()	
 +		;
 +		return !$result ? "" : $result;
 +	}
 +	
 +	public function getOpsAfterJson($esId, $seq){
 +		$ops = $this->getOpsAfter($esId, $seq);
 +		if (!is_array($ops)){
 +			$ops = array();
 +		}
 +		$ops =  array_map(
 +				function($x){
 +					$decoded = json_decode($x['opspec'], true);
 +					$decoded['memberid'] = strval($decoded['memberid']);
 +					return $decoded;
 +				}, 
 +				$ops
 +		);
 +		return $ops;
 +	}
 +	
 +	public function getOpsAfter($esId, $seq){
 +		if ($seq == ""){
 +			$seq = -1;
 +		}
 +		$query = \OCP\DB::prepare('
 +			SELECT `opspec`
 +			FROM ' . self::DB_TABLE . '
 +			WHERE `es_id`=?
 +				AND `seq`>?
 +			ORDER BY `seq` ASC
 +			');
 +		$result = $query->execute(array($esId, $seq));
 +		return $result->fetchAll();
 +	}
- 
- 	public function removeCursor($esId, $memberId){
- 		if ($this->hasAddCursor($esId, $memberId)){
- 			$op = '{"optype":"RemoveCursor","memberid":"'. $memberId .'","reason":"server-idle","timestamp":'. time() .'}';
- 			$this->insertOp($esId, $op);
- 		}
- 	}
 +	
 +	public function addMember($esId, $memberId, $fullName, $color, $imageUrl){
 +		$op = '{"optype":"AddMember","memberid":"'. $memberId .'","timestamp":"'. time() .'", "setProperties":{"fullName":"'. $fullName .'","color":"'. $color .'","imageUrl":"'. $imageUrl .'"}}';
 +		$this->insertOp($esId, $op);
 +	}
 +	
++	public function removeCursor($esId, $memberId){
++		if ($this->hasOp($esId, $memberId, 'AddCursor')){
++			$op = '{"optype":"RemoveCursor","memberid":"'. $memberId .'","reason":"server-idle","timestamp":'. time() .'}';
++			$this->insertOp($esId, $op);
++		}
++	}
++	
 +	public function removeMember($esId, $memberId){
- 		if ($this->hasAddMember($esId, $memberId)){
++		if ($this->hasOp($esId, $memberId, 'AddMember')){
 +			$op ='{"optype":"RemoveMember","memberid":"'. $memberId .'","timestamp":'. time() .'}';
 +			$this->insertOp($esId, $op);
 +		}
 +	}
 +	
 +	public function updateMember($esId, $memberId, $fullName, $color, $imageUrl){
 +		//TODO: Follow the spec https://github.com/kogmbh/WebODF/blob/master/webodf/lib/ops/OpUpdateMember.js#L95
 +		$op = '{"optype":"UpdateMember","memberid":"'. $memberId .'","fullName":"'. $fullName .'","color":"'. $color .'","imageUrl":"'. $imageUrl .'","timestamp":'. time() .'}'
 +		;
 +		$this->insertOp($esId, $op);
 +	}
 +	
 +	protected function insertOp($esId, $op){
 +		$op = new Db_Op(array(
 +			$esId, 
 +			0,
 +			$op
 +		));
 +		$op->insert();
 +	}
 +	
- 	protected function hasAddMember($esId, $memberId){
- 		$ops = $this->execute(
- 			'SELECT * FROM ' . $this->tableName . ' WHERE `es_id`=? AND `opspec` LIKE \'%"AddMember","memberid":"' . $memberId .'"%\'',
- 			array($esId)
- 		);
- 		$result = $ops->fetchAll();
- 		return is_array($result) && count($result)>0;
- 	}
- 	
- 	protected function hasAddCursor($esId, $memberId){
++	protected function hasOp($esId, $memberId, $opType){
 +		$ops = $this->execute(
- 			'SELECT * FROM ' . $this->tableName . ' WHERE `es_id`=? AND `opspec` LIKE \'%"AddCursor","memberid":"' . $memberId .'"%\'',
++			'SELECT * FROM ' . $this->tableName . ' WHERE `es_id`=? AND `opspec` LIKE \'%"' . $opType . '","memberid":"' . $memberId .'"%\'',
 +			array($esId)
 +		);
 +		$result = $ops->fetchAll();
 +		return is_array($result) && count($result)>0;
 +	}
 +	
 +}
diff --cc apps/documents/lib/db/session.php
index 7133774,0000000..f892859
mode 100644,000000..100644
--- a/apps/documents/lib/db/session.php
+++ b/apps/documents/lib/db/session.php
@@@ -1,209 -1,0 +1,210 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
 +/**
 + *  Session management 
 + */
 +class Db_Session extends \OCA\Documents\Db {
 +
 +	/**
 +	 * DB table
 +	 */
 +	const DB_TABLE = '`*PREFIX*documents_session`';
 +	protected $tableName  = '`*PREFIX*documents_session`';
 +
 +	protected $insertStatement  = 'INSERT INTO `*PREFIX*documents_session` (`es_id`, `genesis_url`, `genesis_hash`, `owner`, `file_id`)
 +			VALUES (?, ?, ?, ?, ?)';
 +	
 +	protected $loadStatement = 'SELECT * FROM `*PREFIX*documents_session` WHERE `es_id`= ?';
 +
 +	/**
 +	 * Start a editing session or return an existing one
 +	 * @param string $uid of the user starting a session
 +	 * @param \OCA\Documents\File $file - file object
 +	 * @return array
 +	 * @throws \Exception
 +	 */
 +	public static function start($uid, File $file){
 +		list($ownerView, $path) = $file->getOwnerViewAndPath();
 +		
 +		// Create a directory to store genesis
 +		
 +		$genesis = new Genesis($ownerView, $path, $file->getOwner());
 +		
 +		$oldSession = new Db_Session();
 +		$oldSession->loadBy('file_id', $file->getFileId());
 +		
 +		//If there is no existing session we need to start a new one
 +		if (!$oldSession->hasData()){
 +			$newSession = new Db_Session(array(
 +				$genesis->getPath(),
 +				$genesis->getHash(),
 +				$file->getOwner(),
 +				$file->getFileId()
 +			));
 +			
 +			if (!$newSession->insert()){
 +				throw new \Exception('Failed to add session into database');
 +			}
 +		}
 +		
 +		$session = $oldSession
 +					->loadBy('file_id', $file->getFileId())
 +					->getData()
 +		;
++		$session['title'] = basename($path);
 +		
- 		$memberColor = Helper::getRandomColor();
++		$memberColor = Helper::getMemberColor($uid);
 +		
 +		$member = new Db_Member(array(
 +			$session['es_id'], 
 +			$uid,
 +			$memberColor,
 +			time()
 +		));
 +		
 +		if ($member->insert()){
 +			// Do we have OC_Avatar in out disposal?
 +			if (!class_exists('\OC_Avatar') || \OC_Config::getValue('enable_avatars', true) !== true){
 +				//$x['avatar_url'] = \OCP\Util::linkToRoute('documents_user_avatar');
 +				$imageUrl = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAAAAAAALAAAAAABAAEAAAICTAEAOw==';
 +			} else {
 +				// https://github.com/owncloud/documents/issues/51
 +				// Temporary stub
 +				$imageUrl = $uid;
 +							
 +			/*
 +				$avatar = new \OC_Avatar($uid);
 +				$image = $avatar->get(64);
 +					// User has an avatar 
 +				if ($image instanceof \OC_Image) {
 +					$imageUrl = \OC_Helper::linkToRoute(
 +							'core_avatar_get',
 +							array( 'user' => $uid, 'size' => 64)
 +					) . '?requesttoken=' . \OC::$session->get('requesttoken');
 +				} else {
 +					//shortcircuit if it's not an image
 +					$imageUrl = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAAAAAAALAAAAAABAAEAAAICTAEAOw==';
 +				}
 +							 
 +			 */
 +			}
 +			
 +			
 +			$session['member_id'] = (string) $member->getLastInsertId();
 +			$op = new Db_Op();
 +			$op->addMember(
 +					$session['es_id'],
 +					$session['member_id'],
 +					\OCP\User::getDisplayName($uid),
 +					$memberColor,
 +					$imageUrl
 +			);
 +		} else {
 +			throw new \Exception('Failed to add member into database');
 +		}
 +		
 +		$session['permissions'] = $ownerView->getFilePermissions($path);
 +		
 +		return $session;
 +	}
 +	
 +	public static function cleanUp($esId){
 +		$session = new Db_Session();
 +		$session->deleteBy('es_id', $esId);
 +		
 +		$member = new Db_Member();
 +		$member->deleteBy('es_id', $esId);
 +		
 +		$op= new Db_Op();
 +		$op->deleteBy('es_id', $esId);
 +	}
 +	
 +	public function insert(){
 +		$esId = $this->getUniqueSessionId();
 +		array_unshift($this->data, $esId);
 +		return parent::insert($this->data);
 +	}
 +	
 +	public function updateGenesisHash($esId, $genesisHash){
 +		return $this->execute(
 +			'UPDATE `*PREFIX*documents_session` SET `genesis_hash`=? WHERE `es_id`=?',
 +			array(
 +				$genesisHash, $esId
 +			)
 +		);
 +	}
 +
 +	public function getInfo($esId){
 +		$result = $this->execute('
 +			SELECT `s`.*, COUNT(`m`.`member_id`) AS `users`
 +			FROM ' . $this->tableName . ' AS `s`
 +			LEFT JOIN `*PREFIX*documents_member` AS `m` ON `s`.`es_id`=`m`.`es_id`
 +				AND `m`.`status`=' . Db_Member::MEMBER_STATUS_ACTIVE . '
 +				AND `m`.`uid` != ?
 +			WHERE `s`.`es_id` = ?
 +			GROUP BY `m`.`es_id`
 +			',
 +			array(
 +					\OCP\User::getUser(),
 +					$esId
 +			)
 +		);
 +
 +		$info = $result->fetchRow();
 +		if (!is_array($info)){
 +			$info = array();
 +		}
 +		return $info;
 +	}
 +
 +	public function getInfoByFileId($fileIds){
 +		if (!is_array($fileIds)){
 +			return array();
 +		}
 +
 +		$stmt = $this->buildInQuery('file_id', $fileIds);
 +
 +		$result = $this->execute('
 +			SELECT `s`.*, COUNT(`m`.`member_id`) AS `users`
 +			FROM ' . $this->tableName . ' AS `s`
 +			LEFT JOIN `*PREFIX*documents_member` AS `m` ON `s`.`es_id`=`m`.`es_id`
 +				AND `m`.`status`=' . Db_Member::MEMBER_STATUS_ACTIVE . '
 +			WHERE `s`.`file_id` ' . $stmt .'
 +			GROUP BY `m`.`es_id`',
 +			$fileIds
 +		);
 +
 +		$info = $result->fetchAll();
 +		if (!is_array($info)){
 +			$info = array();
 +		}
 +		return $info;
 +	}
 +
 +	protected function getUniqueSessionId(){
 +		$testSession = new Db_Session();
 +		do{
 +			// this prevents branching for stable5 for now:
 +			// OC_Util::generate_random_bytes was camelCased
 +			if (method_exists('\OC_Util', 'generate_random_bytes')){
 +				$id = \OC_Util::generate_random_bytes(30);
 +			} else {
 +				$id = \OC_Util::generateRandomBytes(30);
 +			}
 +		}while ($testSession->load($id)->hasData());
 +
 +		return $id;
 +	}
 +}
diff --cc apps/documents/lib/helper.php
index f04b786,0000000..2bd9cd6
mode 100644,000000..100644
--- a/apps/documents/lib/helper.php
+++ b/apps/documents/lib/helper.php
@@@ -1,53 -1,0 +1,144 @@@
 +<?php
++
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Documents;
 +
- class Helper{
- 	
++class Helper {
++
 +	const APP_ID = 'documents';
- 	
++
 +	public static function getNewFileName($view, $path, $prepend = ' '){
 +		$fileNum = 1;
- 		
++
 +		while ($view->file_exists($path)){
 +			$fileNum += 1;
- 			$path = preg_replace('/(\.odt|' . $prepend . '\(\d+\)\.odt)$/', $prepend . '(' .$fileNum . ').odt', $path);
++			$path = preg_replace('/(\.odt|' . $prepend . '\(\d+\)\.odt)$/', $prepend . '(' . $fileNum . ').odt', $path);
 +		};
- 		
++
 +		return $path;
 +	}
- 	
++
 +	public static function isVersionsEnabled(){
 +		return \OCP\App::isEnabled('files_versions');
 +	}
- 	
++
 +	public static function getRandomColor(){
 +		$str = dechex(floor(rand(0, 16777215)));
 +		return '#' . str_pad($str, 6, "0", STR_PAD_LEFT);
 +	}
- 	
- 	public static  function debugLog($message){
++
++	public static function getMemberColor($name){
++		$hash = md5($name);
++		$maxRange = hexdec('ffffffffffffffffffffffffffffffff');
++		$hue = hexdec($hash) / $maxRange * 256;
++		return '#' . self::convertHSLToRGB($hue, 90, 60);
++	}
++
++	public static function debugLog($message){
 +		self::log($message, \OCP\Util::DEBUG);
 +	}
 +
- 	public static  function warnLog($message){
++	public static function warnLog($message){
 +		self::log($message, \OCP\Util::WARN);
 +	}
 +
- 	public static  function errorLog($message){
++	public static function errorLog($message){
 +		self::log($message, \OCP\Util::ERROR);
 +	}
- 	
++
 +	public static function log($message, $level){
 +		\OCP\Util::writeLog(self::APP_ID, $message, $level);
 +	}
- }
++
++	protected static function convertHSLToRGB($iH, $iS, $iV){
++		if ($iH < 0){
++			$iH = 0;   // Hue:
++		}
++		if ($iH > 360){
++			$iH = 360; //   0-360
++		}
++		if ($iS < 0){
++			$iS = 0;   // Saturation:
++		}
++		if ($iS > 100){
++			$iS = 100; //   0-100
++		}
++		if ($iV < 0){
++			$iV = 0;   // Lightness:
++		}
++		if ($iV > 100){
++			$iV = 100; //   0-100
++		}
++
++		$dS = $iS / 100.0; // Saturation: 0.0-1.0
++		$dV = $iV / 100.0; // Lightness:  0.0-1.0
++		$dC = $dV * $dS;   // Chroma:     0.0-1.0
++		$dH = $iH / 60.0;  // H-Prime:    0.0-6.0
++		$dT = $dH;	   // Temp variable
++
++		while ($dT >= 2.0)
++			$dT -= 2.0; // php modulus does not work with float
++		$dX = $dC * (1 - abs($dT - 1));	 // as used in the Wikipedia link
++
++		switch ($dH){
++			case($dH >= 0.0 && $dH < 1.0):
++				$dR = $dC;
++				$dG = $dX;
++				$dB = 0.0;
++				break;
++			case($dH >= 1.0 && $dH < 2.0):
++				$dR = $dX;
++				$dG = $dC;
++				$dB = 0.0;
++				break;
++			case($dH >= 2.0 && $dH < 3.0):
++				$dR = 0.0;
++				$dG = $dC;
++				$dB = $dX;
++				break;
++			case($dH >= 3.0 && $dH < 4.0):
++				$dR = 0.0;
++				$dG = $dX;
++				$dB = $dC;
++				break;
++			case($dH >= 4.0 && $dH < 5.0):
++				$dR = $dX;
++				$dG = 0.0;
++				$dB = $dC;
++				break;
++			case($dH >= 5.0 && $dH < 6.0):
++				$dR = $dC;
++				$dG = 0.0;
++				$dB = $dX;
++				break;
++			default:
++				$dR = 0.0;
++				$dG = 0.0;
++				$dB = 0.0;
++				break;
++		}
++
++		$dM = $dV - $dC;
++		$dR += $dM;
++		$dG += $dM;
++		$dB += $dM;
++		$dR *= 255;
++		$dG *= 255;
++		$dB *= 255;
++
++		$dR = str_pad(dechex(round($dR)), 2, "0", STR_PAD_LEFT);
++		$dG = str_pad(dechex(round($dG)), 2, "0", STR_PAD_LEFT);
++		$dB = str_pad(dechex(round($dB)), 2, "0", STR_PAD_LEFT);
++		return $dR.$dG.$dB;
++	}
++
++}
diff --cc apps/documents/public.php
index 672d95e,0000000..a0c1631
mode 100644,000000..100644
--- a/apps/documents/public.php
+++ b/apps/documents/public.php
@@@ -1,48 -1,0 +1,47 @@@
 +<?php
 +
 +/**
 + * ownCloud - Documents App
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +
 +namespace OCA\Documents;
 +
 +\OCP\JSON::checkAppEnabled('documents');
 +
 +\OCP\Util::addStyle( 'documents', 'style' );
 +
 +if (\OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
 +	header('HTTP/1.0 404 Not Found');
 +	$tmpl = new OCP\Template('', '404', 'guest');
 +	$tmpl->printPage();
 +	exit();
 +}
 +
 +if (isset($_GET['t'])) {
 +	$token = $_GET['t'];
 +	$tmpl = new \OCP\Template('documents', 'public', 'guest');
 +	try {
 +		$file = File::getByShareToken($token);
 +		if ($file->isPasswordProtected() && !$file->checkPassword(@$_POST['password'])){
 +			if (isset($_POST['password'])){
 +				$tmpl->assign('wrongpw', true);
 +			}
 +			$tmpl->assign('hasPassword', true);
 +		} else {
 +			\OCP\Util::addStyle( 'documents', '3rdparty/webodf/dojo-app');
 +			\OCP\Util::addStyle( 'documents', '3rdparty/webodf/editor' );
 +			\OCP\Util::addScript('documents', 'documents');
 +			$tmpl->assign('document', $token);
 +		}
 +	} catch (\Exception $e){
 +		$tmpl->assign('notFound', true);
 +	}
 +	$tmpl->printPage();
 +}
- 
diff --cc apps/documents/templates/documents.php
index 21edb4e,0000000..5270700
mode 100644,000000..100644
--- a/apps/documents/templates/documents.php
+++ b/apps/documents/templates/documents.php
@@@ -1,38 -1,0 +1,38 @@@
 +<div id="documents-content">
 +	<ul class="documentslist">
 +		<li class="add-document">
- 			<a class="add svg" target="_blank" href="">
++			<a class="icon icon-add add svg" target="_blank" href="">
 +				<label><?php p($l->t('New document')) ?></label>
 +			</a> 
 +			<div id="upload" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
 +				<form data-upload-id="1"
 +					  id="data-upload-form"
 +					  class="file_upload_form"
 +					  action="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>"
 +					  method="post"
 +					  enctype="multipart/form-data"
 +					  target="file_upload_target_1">
 +					<?php if($_['uploadMaxFilesize'] >= 0):?>
 +					<input type="hidden" name="MAX_FILE_SIZE" id="max_upload"
 +						   value="<?php p($_['uploadMaxFilesize']) ?>" />
 +					<?php endif;?>
 +					<!-- Send the requesttoken, this is needed for older IE versions
 +						 because they don't send the CSRF token via HTTP header in this case -->
 +					<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken" />
 +					<input type="hidden" class="max_human_file_size"
 +						   value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)" />
 +					<input type="hidden" name="dir" value="<?php p($_['savePath']) ?>" id="dir" />
 +					<input type="file" id="file_upload_start" name='files[]' />
- 					<a href="#" class="upload svg">
++					<a href="#" class="icon icon-upload upload svg">
 +					<label><?php p($l->t('Upload')) ?></label></a>
 +				</form>
 +			</div>
 +		</li>
- 		<li class="progress"><div><?php p($l->t('Loading documents...')); ?></div></li>
++		<li class="progress icon icon-loading"><div><?php p($l->t('Loading documents...')); ?></div></li>
 +		<li class="document template" data-id="" style="display:none;">
 +			<a target="_blank" href=""><label></label></a>
 +		</li>
 +	</ul>
 +</div>
 +<input type="hidden" id="webodf-unstable" value="<?php p($_['useUnstable']) ?>" />
 +<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" />
diff --cc apps/files_encryption/lib/helper.php
index 67facb7,584935f..584935f
mode 100644,100755..100644
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
diff --cc apps/files_encryption/lib/keymanager.php
index b2c7568,7abc565..7abc565
mode 100644,100755..100644
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
diff --cc apps/files_encryption/tests/share.php
index e554276,489244a..489244a
mode 100644,100755..100644
--- a/apps/files_encryption/tests/share.php
+++ b/apps/files_encryption/tests/share.php
diff --cc apps/files_encryption/tests/util.php
index ae7b003,af422a3..af422a3
mode 100644,100755..100644
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
diff --cc apps/files_external/lib/config.php
index 373246a,9896429..9896429
mode 100644,100755..100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
diff --cc apps/files_pdfviewer/js/loader.js
index 0543961,0000000..5d00d2e
mode 100644,000000..100644
--- a/apps/files_pdfviewer/js/loader.js
+++ b/apps/files_pdfviewer/js/loader.js
@@@ -1,54 -1,0 +1,54 @@@
 +function hidePDFviewer() {
 +	$('#content table').show();
 +	$("#controls").show();
 +	$("#editor").show();
 +	$('#pdframe, #pdfbar').remove();
 +	if ($('#isPublic').val()){
 +		$('#preview').css({height: null});
 +	}
 +}
 +
 +function showPDFviewer(dir,filename){
 +	if(!showPDFviewer.shown){
 +		var $iframe;
 +		$("#editor").hide();
 +		$('#content table').hide();
 +		$("#controls").hide();
 +		var oldcontent = $("#content").html();
- 		var viewer = OC.linkTo('files_pdfviewer', 'viewer.php')+'?dir='+encodeURIComponent(dir).replace(/%2F/g, '/')+'&file='+encodeURIComponent(filename.replace('&', '%26'));
++		var viewer = OC.linkTo('files_pdfviewer', 'viewer.php')+'?dir='+encodeURIComponent(dir).replace(/%2F/g, '/')+'&file='+encodeURIComponent(filename);
 +		$iframe = $('<iframe id="pdframe" style="width:100%;height:100%;display:block;" src="'+viewer+'" /><div id="pdfbar"><a id="close" title="Close">X</a></div>');
 +		if ($('#isPublic').val()){
 +			// force the preview to adjust its height
 +			$('#preview').append($iframe).css({height: '100%'});
 +		}
 +		else{
 +			$('#content').append($iframe);
 +		}
 +		$("#pageWidthOption").attr("selected","selected");	
 +		$('#pdfbar').css({position:'absolute',top:'5px',right:'5px'});
 +		// if a filelist is present, the PDF viewer can be closed to go back there
 +		if ($('#fileList').length){
 +			$('#close').css({display:'block',padding:'0 5px',color:'#BBBBBB','font-weight':'900',height:'18px',background:'transparent'}).click(function(){
 +				hidePDFviewer();
 +			});
 +		}
 +		else{
 +			$('#close').css({display:'none'});
 +		}
 +	}
 +
 +}
 +showPDFviewer.oldCode='';
 +showPDFviewer.lastTitle='';
 +
 +$(document).ready(function(){
 +	// doesn't work in IE or public link mode
 +	if(!$.browser.msie && !$('#isPublic').val()){
 +		if ($('#filesApp').val() && typeof FileActions!=='undefined'){
 +			FileActions.register('application/pdf','Edit', OC.PERMISSION_READ, '',function(filename){
 +				showPDFviewer($('#dir').val(),filename);
 +			});
 +			FileActions.setDefault('application/pdf','Edit');
 +		}
 +	}
 +});
diff --cc apps/files_videoviewer/appinfo/version
index 6da28dd,0000000..d917d3e
mode 100644,000000..100644
--- a/apps/files_videoviewer/appinfo/version
+++ b/apps/files_videoviewer/appinfo/version
@@@ -1,1 -1,0 +1,1 @@@
- 0.1.1
++0.1.2
diff --cc apps/files_videoviewer/js/mediaelement-and-player.js
index d52868f,0000000..9b0d668
mode 100644,000000..100644
--- a/apps/files_videoviewer/js/mediaelement-and-player.js
+++ b/apps/files_videoviewer/js/mediaelement-and-player.js
@@@ -1,4982 -1,0 +1,5050 @@@
 +/*!
 +* MediaElement.js
 +* HTML5 <video> and <audio> shim and player
 +* http://mediaelementjs.com/
 +*
 +* Creates a JavaScript object that mimics HTML5 MediaElement API
 +* for browsers that don't understand HTML5 or can't play the provided codec
 +* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
 +*
 +* Copyright 2010-2013, John Dyer (http://j.hn)
 +* License: MIT
 +*
 +*/
 +// Namespace
 +var mejs = mejs || {};
 +
 +// version number
- mejs.version = '2.11.3';
++mejs.version = '2.13.2'; 
++
 +
 +// player number (for missing, same id attr)
 +mejs.meIndex = 0;
 +
 +// media types accepted by plugins
 +mejs.plugins = {
 +	silverlight: [
 +		{version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
 +	],
 +	flash: [
 +		{version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/rtmp','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg', 'video/youtube', 'video/x-youtube']}
 +		//,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
 +	],
 +	youtube: [
 +		{version: null, types: ['video/youtube', 'video/x-youtube', 'audio/youtube', 'audio/x-youtube']}
 +	],
 +	vimeo: [
 +		{version: null, types: ['video/vimeo', 'video/x-vimeo']}
 +	]
 +};
 +
 +/*
 +Utility methods
 +*/
 +mejs.Utility = {
 +	encodeUrl: function(url) {
 +		return encodeURIComponent(url); //.replace(/\?/gi,'%3F').replace(/=/gi,'%3D').replace(/&/gi,'%26');
 +	},
 +	escapeHTML: function(s) {
 +		return s.toString().split('&').join('&').split('<').join('<').split('"').join('"');
 +	},
 +	absolutizeUrl: function(url) {
 +		var el = document.createElement('div');
 +		el.innerHTML = '<a href="' + this.escapeHTML(url) + '">x</a>';
 +		return el.firstChild.href;
 +	},
 +	getScriptPath: function(scriptNames) {
 +		var
 +			i = 0,
 +			j,
 +			codePath = '',
 +			testname = '',
 +			slashPos,
 +			filenamePos,
 +			scriptUrl,
 +			scriptPath,			
 +			scriptFilename,
 +			scripts = document.getElementsByTagName('script'),
 +			il = scripts.length,
 +			jl = scriptNames.length;
 +			
 +		// go through all <script> tags
 +		for (; i < il; i++) {
 +			scriptUrl = scripts[i].src;
 +			slashPos = scriptUrl.lastIndexOf('/');
 +			if (slashPos > -1) {
 +				scriptFilename = scriptUrl.substring(slashPos + 1);
 +				scriptPath = scriptUrl.substring(0, slashPos + 1);
 +			} else {
 +				scriptFilename = scriptUrl;
 +				scriptPath = '';			
 +			}
 +			
 +			// see if any <script> tags have a file name that matches the 
 +			for (j = 0; j < jl; j++) {
 +				testname = scriptNames[j];
 +				filenamePos = scriptFilename.indexOf(testname);
 +				if (filenamePos > -1) {
 +					codePath = scriptPath;
 +					break;
 +				}
 +			}
 +			
 +			// if we found a path, then break and return it
 +			if (codePath !== '') {
 +				break;
 +			}
 +		}
 +		
 +		// send the best path back
 +		return codePath;
 +	},
 +	secondsToTimeCode: function(time, forceHours, showFrameCount, fps) {
 +		//add framecount
 +		if (typeof showFrameCount == 'undefined') {
 +		    showFrameCount=false;
 +		} else if(typeof fps == 'undefined') {
 +		    fps = 25;
 +		}
 +	
 +		var hours = Math.floor(time / 3600) % 24,
 +			minutes = Math.floor(time / 60) % 60,
 +			seconds = Math.floor(time % 60),
 +			frames = Math.floor(((time % 1)*fps).toFixed(3)),
 +			result = 
 +					( (forceHours || hours > 0) ? (hours < 10 ? '0' + hours : hours) + ':' : '')
 +						+ (minutes < 10 ? '0' + minutes : minutes) + ':'
 +						+ (seconds < 10 ? '0' + seconds : seconds)
 +						+ ((showFrameCount) ? ':' + (frames < 10 ? '0' + frames : frames) : '');
 +	
 +		return result;
 +	},
 +	
 +	timeCodeToSeconds: function(hh_mm_ss_ff, forceHours, showFrameCount, fps){
 +		if (typeof showFrameCount == 'undefined') {
 +		    showFrameCount=false;
 +		} else if(typeof fps == 'undefined') {
 +		    fps = 25;
 +		}
 +	
 +		var tc_array = hh_mm_ss_ff.split(":"),
 +			tc_hh = parseInt(tc_array[0], 10),
 +			tc_mm = parseInt(tc_array[1], 10),
 +			tc_ss = parseInt(tc_array[2], 10),
 +			tc_ff = 0,
 +			tc_in_seconds = 0;
 +		
 +		if (showFrameCount) {
 +		    tc_ff = parseInt(tc_array[3])/fps;
 +		}
 +		
 +		tc_in_seconds = ( tc_hh * 3600 ) + ( tc_mm * 60 ) + tc_ss + tc_ff;
 +		
 +		return tc_in_seconds;
 +	},
 +	
 +
 +	convertSMPTEtoSeconds: function (SMPTE) {
 +		if (typeof SMPTE != 'string') 
 +			return false;
 +
 +		SMPTE = SMPTE.replace(',', '.');
 +		
 +		var secs = 0,
 +			decimalLen = (SMPTE.indexOf('.') != -1) ? SMPTE.split('.')[1].length : 0,
 +			multiplier = 1;
 +		
 +		SMPTE = SMPTE.split(':').reverse();
 +		
 +		for (var i = 0; i < SMPTE.length; i++) {
 +			multiplier = 1;
 +			if (i > 0) {
 +				multiplier = Math.pow(60, i); 
 +			}
 +			secs += Number(SMPTE[i]) * multiplier;
 +		}
 +		return Number(secs.toFixed(decimalLen));
 +	},	
 +	
 +	/* borrowed from SWFObject: http://code.google.com/p/swfobject/source/browse/trunk/swfobject/src/swfobject.js#474 */
 +	removeSwf: function(id) {
 +		var obj = document.getElementById(id);
 +		if (obj && /object|embed/i.test(obj.nodeName)) {
 +			if (mejs.MediaFeatures.isIE) {
 +				obj.style.display = "none";
 +				(function(){
 +					if (obj.readyState == 4) {
 +						mejs.Utility.removeObjectInIE(id);
 +					} else {
 +						setTimeout(arguments.callee, 10);
 +					}
 +				})();
 +			} else {
 +				obj.parentNode.removeChild(obj);
 +			}
 +		}
 +	},
 +	removeObjectInIE: function(id) {
 +		var obj = document.getElementById(id);
 +		if (obj) {
 +			for (var i in obj) {
 +				if (typeof obj[i] == "function") {
 +					obj[i] = null;
 +				}
 +			}
 +			obj.parentNode.removeChild(obj);
 +		}		
 +	}
 +};
 +
 +
 +// Core detector, plugins are added below
 +mejs.PluginDetector = {
 +
 +	// main public function to test a plug version number PluginDetector.hasPluginVersion('flash',[9,0,125]);
 +	hasPluginVersion: function(plugin, v) {
 +		var pv = this.plugins[plugin];
 +		v[1] = v[1] || 0;
 +		v[2] = v[2] || 0;
 +		return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
 +	},
 +
 +	// cached values
 +	nav: window.navigator,
 +	ua: window.navigator.userAgent.toLowerCase(),
 +
 +	// stored version numbers
 +	plugins: [],
 +
 +	// runs detectPlugin() and stores the version number
 +	addPlugin: function(p, pluginName, mimeType, activeX, axDetect) {
 +		this.plugins[p] = this.detectPlugin(pluginName, mimeType, activeX, axDetect);
 +	},
 +
 +	// get the version number from the mimetype (all but IE) or ActiveX (IE)
 +	detectPlugin: function(pluginName, mimeType, activeX, axDetect) {
 +
 +		var version = [0,0,0],
 +			description,
 +			i,
 +			ax;
 +
 +		// Firefox, Webkit, Opera
 +		if (typeof(this.nav.plugins) != 'undefined' && typeof this.nav.plugins[pluginName] == 'object') {
 +			description = this.nav.plugins[pluginName].description;
 +			if (description && !(typeof this.nav.mimeTypes != 'undefined' && this.nav.mimeTypes[mimeType] && !this.nav.mimeTypes[mimeType].enabledPlugin)) {
 +				version = description.replace(pluginName, '').replace(/^\s+/,'').replace(/\sr/gi,'.').split('.');
 +				for (i=0; i<version.length; i++) {
 +					version[i] = parseInt(version[i].match(/\d+/), 10);
 +				}
 +			}
 +		// Internet Explorer / ActiveX
 +		} else if (typeof(window.ActiveXObject) != 'undefined') {
 +			try {
 +				ax = new ActiveXObject(activeX);
 +				if (ax) {
 +					version = axDetect(ax);
 +				}
 +			}
 +			catch (e) { }
 +		}
 +		return version;
 +	}
 +};
 +
 +// Add Flash detection
 +mejs.PluginDetector.addPlugin('flash','Shockwave Flash','application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash', function(ax) {
 +	// adapted from SWFObject
 +	var version = [],
 +		d = ax.GetVariable("$version");
 +	if (d) {
 +		d = d.split(" ")[1].split(",");
 +		version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
 +	}
 +	return version;
 +});
 +
 +// Add Silverlight detection
 +mejs.PluginDetector.addPlugin('silverlight','Silverlight Plug-In','application/x-silverlight-2','AgControl.AgControl', function (ax) {
 +	// Silverlight cannot report its version number to IE
 +	// but it does have a isVersionSupported function, so we have to loop through it to get a version number.
 +	// adapted from http://www.silverlightversion.com/
 +	var v = [0,0,0,0],
 +		loopMatch = function(ax, v, i, n) {
 +			while(ax.isVersionSupported(v[0]+ "."+ v[1] + "." + v[2] + "." + v[3])){
 +				v[i]+=n;
 +			}
 +			v[i] -= n;
 +		};
 +	loopMatch(ax, v, 0, 1);
 +	loopMatch(ax, v, 1, 1);
 +	loopMatch(ax, v, 2, 10000); // the third place in the version number is usually 5 digits (4.0.xxxxx)
 +	loopMatch(ax, v, 2, 1000);
 +	loopMatch(ax, v, 2, 100);
 +	loopMatch(ax, v, 2, 10);
 +	loopMatch(ax, v, 2, 1);
 +	loopMatch(ax, v, 3, 1);
 +
 +	return v;
 +});
 +// add adobe acrobat
 +/*
 +PluginDetector.addPlugin('acrobat','Adobe Acrobat','application/pdf','AcroPDF.PDF', function (ax) {
 +	var version = [],
 +		d = ax.GetVersions().split(',')[0].split('=')[1].split('.');
 +
 +	if (d) {
 +		version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
 +	}
 +	return version;
 +});
 +*/
 +// necessary detection (fixes for <IE9)
 +mejs.MediaFeatures = {
 +	init: function() {
 +		var
 +			t = this,
 +			d = document,
 +			nav = mejs.PluginDetector.nav,
 +			ua = mejs.PluginDetector.ua.toLowerCase(),
 +			i,
 +			v,
 +			html5Elements = ['source','track','audio','video'];
 +
 +		// detect browsers (only the ones that have some kind of quirk we need to work around)
 +		t.isiPad = (ua.match(/ipad/i) !== null);
 +		t.isiPhone = (ua.match(/iphone/i) !== null);
 +		t.isiOS = t.isiPhone || t.isiPad;
 +		t.isAndroid = (ua.match(/android/i) !== null);
 +		t.isBustedAndroid = (ua.match(/android 2\.[12]/) !== null);
- 		t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1);
++		t.isBustedNativeHTTPS = (location.protocol === 'https:' && (ua.match(/android [12]\./) !== null || ua.match(/macintosh.* version.* safari/) !== null));
++		t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1 || nav.appName.toLowerCase().match(/trident/gi) !== null);
 +		t.isChrome = (ua.match(/chrome/gi) !== null);
 +		t.isFirefox = (ua.match(/firefox/gi) !== null);
 +		t.isWebkit = (ua.match(/webkit/gi) !== null);
- 		t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit;
++		t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit && !t.isIE;
 +		t.isOpera = (ua.match(/opera/gi) !== null);
- 		t.hasTouch = ('ontouchstart' in window);
++		t.hasTouch = ('ontouchstart' in window); //  && window.ontouchstart != null); // this breaks iOS 7
 +		
 +		// borrowed from Modernizr
 +		t.svg = !! document.createElementNS &&
 +				!! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect;
 +
 +		// create HTML5 media elements for IE before 9, get a <video> element for fullscreen detection
 +		for (i=0; i<html5Elements.length; i++) {
 +			v = document.createElement(html5Elements[i]);
 +		}
 +		
 +		t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid);
 +
++		// Fix for IE9 on Windows 7N / Windows 7KN (Media Player not installer)
++		try{
++			v.canPlayType("video/mp4");
++		}catch(e){
++			t.supportsMediaTag = false;
++		}
++
 +		// detect native JavaScript fullscreen (Safari/Firefox only, Chrome still fails)
 +		
 +		// iOS
 +		t.hasSemiNativeFullScreen = (typeof v.webkitEnterFullscreen !== 'undefined');
 +		
- 		// Webkit/firefox
++		// W3C
++		t.hasNativeFullscreen = (typeof v.requestFullscreen !== 'undefined');
++		
++		// webkit/firefox/IE11+
 +		t.hasWebkitNativeFullScreen = (typeof v.webkitRequestFullScreen !== 'undefined');
 +		t.hasMozNativeFullScreen = (typeof v.mozRequestFullScreen !== 'undefined');
++		t.hasMsNativeFullScreen = (typeof v.msRequestFullscreen !== 'undefined');
 +		
- 		t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen);
++		t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen || t.hasMsNativeFullScreen);
 +		t.nativeFullScreenEnabled = t.hasTrueNativeFullScreen;
++		
++		// Enabled?
 +		if (t.hasMozNativeFullScreen) {
- 			t.nativeFullScreenEnabled = v.mozFullScreenEnabled;
++			t.nativeFullScreenEnabled = document.mozFullScreenEnabled;
++		} else if (t.hasMsNativeFullScreen) {
++			t.nativeFullScreenEnabled = document.msFullscreenEnabled;		
 +		}
 +		
- 		
- 		if (this.isChrome) {
++		if (t.isChrome) {
 +			t.hasSemiNativeFullScreen = false;
 +		}
 +		
 +		if (t.hasTrueNativeFullScreen) {
- 			t.fullScreenEventName = (t.hasWebkitNativeFullScreen) ? 'webkitfullscreenchange' : 'mozfullscreenchange';
 +			
++			t.fullScreenEventName = '';
++			if (t.hasWebkitNativeFullScreen) { 
++				t.fullScreenEventName = 'webkitfullscreenchange';
++				
++			} else if (t.hasMozNativeFullScreen) {
++				t.fullScreenEventName = 'mozfullscreenchange';
++				
++			} else if (t.hasMsNativeFullScreen) {
++				t.fullScreenEventName = 'MSFullscreenChange';
++			}
 +			
 +			t.isFullScreen = function() {
 +				if (v.mozRequestFullScreen) {
 +					return d.mozFullScreen;
++				
 +				} else if (v.webkitRequestFullScreen) {
 +					return d.webkitIsFullScreen;
++				
++				} else if (v.hasMsNativeFullScreen) {
++					return d.msFullscreenElement !== null;
 +				}
 +			}
 +					
 +			t.requestFullScreen = function(el) {
 +		
 +				if (t.hasWebkitNativeFullScreen) {
 +					el.webkitRequestFullScreen();
++					
 +				} else if (t.hasMozNativeFullScreen) {
 +					el.mozRequestFullScreen();
++
++				} else if (t.hasMsNativeFullScreen) {
++					el.msRequestFullscreen();
++
 +				}
 +			}
 +			
 +			t.cancelFullScreen = function() {				
 +				if (t.hasWebkitNativeFullScreen) {
 +					document.webkitCancelFullScreen();
++					
 +				} else if (t.hasMozNativeFullScreen) {
 +					document.mozCancelFullScreen();
++					
++				} else if (t.hasMsNativeFullScreen) {
++					document.msExitFullscreen();
++					
 +				}
 +			}	
 +			
 +		}
 +		
 +		
 +		// OS X 10.5 can't do this even if it says it can :(
 +		if (t.hasSemiNativeFullScreen && ua.match(/mac os x 10_5/i)) {
 +			t.hasNativeFullScreen = false;
 +			t.hasSemiNativeFullScreen = false;
 +		}
 +		
 +	}
 +};
 +mejs.MediaFeatures.init();
 +
 +/*
 +extension methods to <video> or <audio> object to bring it into parity with PluginMediaElement (see below)
 +*/
 +mejs.HtmlMediaElement = {
 +	pluginType: 'native',
 +	isFullScreen: false,
 +
 +	setCurrentTime: function (time) {
 +		this.currentTime = time;
 +	},
 +
 +	setMuted: function (muted) {
 +		this.muted = muted;
 +	},
 +
 +	setVolume: function (volume) {
 +		this.volume = volume;
 +	},
 +
 +	// for parity with the plugin versions
 +	stop: function () {
 +		this.pause();
 +	},
 +
 +	// This can be a url string
 +	// or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
 +	setSrc: function (url) {
 +		
 +		// Fix for IE9 which can't set .src when there are <source> elements. Awesome, right?
 +		var 
 +			existingSources = this.getElementsByTagName('source');
 +		while (existingSources.length > 0){
 +			this.removeChild(existingSources[0]);
 +		}
 +	
 +		if (typeof url == 'string') {
 +			this.src = url;
 +		} else {
 +			var i, media;
 +
 +			for (i=0; i<url.length; i++) {
 +				media = url[i];
 +				if (this.canPlayType(media.type)) {
 +					this.src = media.src;
 +					break;
 +				}
 +			}
 +		}
 +	},
 +
 +	setVideoSize: function (width, height) {
 +		this.width = width;
 +		this.height = height;
 +	}
 +};
 +
 +/*
 +Mimics the <video/audio> element by calling Flash's External Interface or Silverlights [ScriptableMember]
 +*/
 +mejs.PluginMediaElement = function (pluginid, pluginType, mediaUrl) {
 +	this.id = pluginid;
 +	this.pluginType = pluginType;
 +	this.src = mediaUrl;
 +	this.events = {};
 +	this.attributes = {};
 +};
 +
 +// JavaScript values and ExternalInterface methods that match HTML5 video properties methods
 +// http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html
 +// http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
 +mejs.PluginMediaElement.prototype = {
 +
 +	// special
 +	pluginElement: null,
 +	pluginType: '',
 +	isFullScreen: false,
 +
 +	// not implemented :(
 +	playbackRate: -1,
 +	defaultPlaybackRate: -1,
 +	seekable: [],
 +	played: [],
 +
 +	// HTML5 read-only properties
 +	paused: true,
 +	ended: false,
 +	seeking: false,
 +	duration: 0,
 +	error: null,
 +	tagName: '',
 +
 +	// HTML5 get/set properties, but only set (updated by event handlers)
 +	muted: false,
 +	volume: 1,
 +	currentTime: 0,
 +
 +	// HTML5 methods
 +	play: function () {
 +		if (this.pluginApi != null) {
 +			if (this.pluginType == 'youtube') {
 +				this.pluginApi.playVideo();
 +			} else {
 +				this.pluginApi.playMedia();
 +			}
 +			this.paused = false;
 +		}
 +	},
 +	load: function () {
 +		if (this.pluginApi != null) {
 +			if (this.pluginType == 'youtube') {
 +			} else {
 +				this.pluginApi.loadMedia();
 +			}
 +			
 +			this.paused = false;
 +		}
 +	},
 +	pause: function () {
 +		if (this.pluginApi != null) {
 +			if (this.pluginType == 'youtube') {
 +				this.pluginApi.pauseVideo();
 +			} else {
 +				this.pluginApi.pauseMedia();
 +			}			
 +			
 +			
 +			this.paused = true;
 +		}
 +	},
 +	stop: function () {
 +		if (this.pluginApi != null) {
 +			if (this.pluginType == 'youtube') {
 +				this.pluginApi.stopVideo();
 +			} else {
 +				this.pluginApi.stopMedia();
 +			}	
 +			this.paused = true;
 +		}
 +	},
 +	canPlayType: function(type) {
 +		var i,
 +			j,
 +			pluginInfo,
 +			pluginVersions = mejs.plugins[this.pluginType];
 +
 +		for (i=0; i<pluginVersions.length; i++) {
 +			pluginInfo = pluginVersions[i];
 +
 +			// test if user has the correct plugin version
 +			if (mejs.PluginDetector.hasPluginVersion(this.pluginType, pluginInfo.version)) {
 +
 +				// test for plugin playback types
 +				for (j=0; j<pluginInfo.types.length; j++) {
 +					// find plugin that can play the type
 +					if (type == pluginInfo.types[j]) {
 +						return 'probably';
 +					}
 +				}
 +			}
 +		}
 +
 +		return '';
 +	},
 +	
 +	positionFullscreenButton: function(x,y,visibleAndAbove) {
 +		if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) {
- 			this.pluginApi.positionFullscreenButton(x,y,visibleAndAbove);
++			this.pluginApi.positionFullscreenButton(Math.floor(x),Math.floor(y),visibleAndAbove);
 +		}
 +	},
 +	
 +	hideFullscreenButton: function() {
 +		if (this.pluginApi != null && this.pluginApi.hideFullscreenButton) {
 +			this.pluginApi.hideFullscreenButton();
 +		}		
 +	},	
 +	
 +
 +	// custom methods since not all JavaScript implementations support get/set
 +
 +	// This can be a url string
 +	// or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
 +	setSrc: function (url) {
 +		if (typeof url == 'string') {
 +			this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(url));
 +			this.src = mejs.Utility.absolutizeUrl(url);
 +		} else {
 +			var i, media;
 +
 +			for (i=0; i<url.length; i++) {
 +				media = url[i];
 +				if (this.canPlayType(media.type)) {
 +					this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(media.src));
 +					this.src = mejs.Utility.absolutizeUrl(url);
 +					break;
 +				}
 +			}
 +		}
 +
 +	},
 +	setCurrentTime: function (time) {
 +		if (this.pluginApi != null) {
 +			if (this.pluginType == 'youtube') {
 +				this.pluginApi.seekTo(time);
 +			} else {
 +				this.pluginApi.setCurrentTime(time);
 +			}				
 +			
 +			
 +			
 +			this.currentTime = time;
 +		}
 +	},
 +	setVolume: function (volume) {
 +		if (this.pluginApi != null) {
 +			// same on YouTube and MEjs
 +			if (this.pluginType == 'youtube') {
 +				this.pluginApi.setVolume(volume * 100);
 +			} else {
 +				this.pluginApi.setVolume(volume);
 +			}
 +			this.volume = volume;
 +		}
 +	},
 +	setMuted: function (muted) {
 +		if (this.pluginApi != null) {
 +			if (this.pluginType == 'youtube') {
 +				if (muted) {
 +					this.pluginApi.mute();
 +				} else {
 +					this.pluginApi.unMute();
 +				}
 +				this.muted = muted;
 +				this.dispatchEvent('volumechange');
 +			} else {
 +				this.pluginApi.setMuted(muted);
 +			}
 +			this.muted = muted;
 +		}
 +	},
 +
 +	// additional non-HTML5 methods
 +	setVideoSize: function (width, height) {
 +		
 +		//if (this.pluginType == 'flash' || this.pluginType == 'silverlight') {
 +			if ( this.pluginElement.style) {
 +				this.pluginElement.style.width = width + 'px';
 +				this.pluginElement.style.height = height + 'px';
 +			}
 +			if (this.pluginApi != null && this.pluginApi.setVideoSize) {
 +				this.pluginApi.setVideoSize(width, height);
 +			}
 +		//}
 +	},
 +
 +	setFullscreen: function (fullscreen) {
 +		if (this.pluginApi != null && this.pluginApi.setFullscreen) {
 +			this.pluginApi.setFullscreen(fullscreen);
 +		}
 +	},
 +	
 +	enterFullScreen: function() {
 +		if (this.pluginApi != null && this.pluginApi.setFullscreen) {
 +			this.setFullscreen(true);
 +		}		
 +		
 +	},
 +	
 +	exitFullScreen: function() {
 +		if (this.pluginApi != null && this.pluginApi.setFullscreen) {
 +			this.setFullscreen(false);
 +		}
 +	},	
 +
 +	// start: fake events
 +	addEventListener: function (eventName, callback, bubble) {
 +		this.events[eventName] = this.events[eventName] || [];
 +		this.events[eventName].push(callback);
 +	},
 +	removeEventListener: function (eventName, callback) {
 +		if (!eventName) { this.events = {}; return true; }
 +		var callbacks = this.events[eventName];
 +		if (!callbacks) return true;
 +		if (!callback) { this.events[eventName] = []; return true; }
 +		for (i = 0; i < callbacks.length; i++) {
 +			if (callbacks[i] === callback) {
 +				this.events[eventName].splice(i, 1);
 +				return true;
 +			}
 +		}
 +		return false;
 +	},	
 +	dispatchEvent: function (eventName) {
 +		var i,
 +			args,
 +			callbacks = this.events[eventName];
 +
 +		if (callbacks) {
 +			args = Array.prototype.slice.call(arguments, 1);
 +			for (i = 0; i < callbacks.length; i++) {
 +				callbacks[i].apply(null, args);
 +			}
 +		}
 +	},
 +	// end: fake events
 +	
 +	// fake DOM attribute methods
 +	hasAttribute: function(name){
 +		return (name in this.attributes);  
 +	},
 +	removeAttribute: function(name){
 +		delete this.attributes[name];
 +	},
 +	getAttribute: function(name){
 +		if (this.hasAttribute(name)) {
 +			return this.attributes[name];
 +		}
 +		return '';
 +	},
 +	setAttribute: function(name, value){
 +		this.attributes[name] = value;
 +	},
 +
 +	remove: function() {
 +		mejs.Utility.removeSwf(this.pluginElement.id);
 +		mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id);
 +	}
 +};
 +
 +// Handles calls from Flash/Silverlight and reports them as native <video/audio> events and properties
 +mejs.MediaPluginBridge = {
 +
 +	pluginMediaElements:{},
 +	htmlMediaElements:{},
 +
 +	registerPluginElement: function (id, pluginMediaElement, htmlMediaElement) {
 +		this.pluginMediaElements[id] = pluginMediaElement;
 +		this.htmlMediaElements[id] = htmlMediaElement;
 +	},
 +
 +	unregisterPluginElement: function (id) {
 +		delete this.pluginMediaElements[id];
 +		delete this.htmlMediaElements[id];
 +	},
 +
 +	// when Flash/Silverlight is ready, it calls out to this method
 +	initPlugin: function (id) {
 +
 +		var pluginMediaElement = this.pluginMediaElements[id],
 +			htmlMediaElement = this.htmlMediaElements[id];
 +
 +		if (pluginMediaElement) {
 +			// find the javascript bridge
 +			switch (pluginMediaElement.pluginType) {
 +				case "flash":
 +					pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(id);
 +					break;
 +				case "silverlight":
 +					pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
 +					pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
 +					break;
 +			}
 +	
 +			if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
 +				pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
 +			}
 +		}
 +	},
 +
 +	// receives events from Flash/Silverlight and sends them out as HTML5 media events
 +	// http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
 +	fireEvent: function (id, eventName, values) {
 +
 +		var
 +			e,
 +			i,
 +			bufferedTime,
 +			pluginMediaElement = this.pluginMediaElements[id];
 +
++		if(!pluginMediaElement){
++            return;
++        }
++        
 +		// fake event object to mimic real HTML media event.
 +		e = {
 +			type: eventName,
 +			target: pluginMediaElement
 +		};
 +
 +		// attach all values to element and event object
 +		for (i in values) {
 +			pluginMediaElement[i] = values[i];
 +			e[i] = values[i];
 +		}
 +
 +		// fake the newer W3C buffered TimeRange (loaded and total have been removed)
 +		bufferedTime = values.bufferedTime || 0;
 +
 +		e.target.buffered = e.buffered = {
 +			start: function(index) {
 +				return 0;
 +			},
 +			end: function (index) {
 +				return bufferedTime;
 +			},
 +			length: 1
 +		};
 +
 +		pluginMediaElement.dispatchEvent(e.type, e);
 +	}
 +};
 +
 +/*
 +Default options
 +*/
 +mejs.MediaElementDefaults = {
 +	// allows testing on HTML5, flash, silverlight
 +	// auto: attempts to detect what the browser can do
 +	// auto_plugin: prefer plugins and then attempt native HTML5
 +	// native: forces HTML5 playback
 +	// shim: disallows HTML5, will attempt either Flash or Silverlight
 +	// none: forces fallback view
 +	mode: 'auto',
 +	// remove or reorder to change plugin priority and availability
 +	plugins: ['flash','silverlight','youtube','vimeo'],
 +	// shows debug errors on screen
 +	enablePluginDebug: false,
++	// use plugin for browsers that have trouble with Basic Authentication on HTTPS sites
++	httpsBasicAuthSite: false,
 +	// overrides the type specified, useful for dynamic instantiation
 +	type: '',
 +	// path to Flash and Silverlight plugins
 +	pluginPath: mejs.Utility.getScriptPath(['mediaelement.js','mediaelement.min.js','mediaelement-and-player.js','mediaelement-and-player.min.js']),
 +	// name of flash file
 +	flashName: 'flashmediaelement.swf',
 +	// streamer for RTMP streaming
 +	flashStreamer: '',
 +	// turns on the smoothing filter in Flash
 +	enablePluginSmoothing: false,
 +	// enabled pseudo-streaming (seek) on .mp4 files
 +	enablePseudoStreaming: false,
 +	// start query parameter sent to server for pseudo-streaming
 +	pseudoStreamingStartQueryParam: 'start',
 +	// name of silverlight file
 +	silverlightName: 'silverlightmediaelement.xap',
 +	// default if the <video width> is not specified
 +	defaultVideoWidth: 480,
 +	// default if the <video height> is not specified
 +	defaultVideoHeight: 270,
 +	// overrides <video width>
 +	pluginWidth: -1,
 +	// overrides <video height>
 +	pluginHeight: -1,
 +	// additional plugin variables in 'key=value' form
 +	pluginVars: [],	
 +	// rate in milliseconds for Flash and Silverlight to fire the timeupdate event
 +	// larger number is less accurate, but less strain on plugin->JavaScript bridge
 +	timerRate: 250,
 +	// initial volume for player
 +	startVolume: 0.8,
 +	success: function () { },
 +	error: function () { }
 +};
 +
 +/*
 +Determines if a browser supports the <video> or <audio> element
 +and returns either the native element or a Flash/Silverlight version that
 +mimics HTML5 MediaElement
 +*/
 +mejs.MediaElement = function (el, o) {
 +	return mejs.HtmlMediaElementShim.create(el,o);
 +};
 +
 +mejs.HtmlMediaElementShim = {
 +
 +	create: function(el, o) {
 +		var
 +			options = mejs.MediaElementDefaults,
 +			htmlMediaElement = (typeof(el) == 'string') ? document.getElementById(el) : el,
 +			tagName = htmlMediaElement.tagName.toLowerCase(),
 +			isMediaTag = (tagName === 'audio' || tagName === 'video'),
 +			src = (isMediaTag) ? htmlMediaElement.getAttribute('src') : htmlMediaElement.getAttribute('href'),
 +			poster = htmlMediaElement.getAttribute('poster'),
 +			autoplay =  htmlMediaElement.getAttribute('autoplay'),
 +			preload =  htmlMediaElement.getAttribute('preload'),
 +			controls =  htmlMediaElement.getAttribute('controls'),
 +			playback,
 +			prop;
 +
 +		// extend options
 +		for (prop in o) {
 +			options[prop] = o[prop];
 +		}
 +
 +		// clean up attributes
 +		src = 		(typeof src == 'undefined' 	|| src === null || src == '') ? null : src;		
 +		poster =	(typeof poster == 'undefined' 	|| poster === null) ? '' : poster;
 +		preload = 	(typeof preload == 'undefined' 	|| preload === null || preload === 'false') ? 'none' : preload;
 +		autoplay = 	!(typeof autoplay == 'undefined' || autoplay === null || autoplay === 'false');
 +		controls = 	!(typeof controls == 'undefined' || controls === null || controls === 'false');
 +
 +		// test for HTML5 and plugin capabilities
 +		playback = this.determinePlayback(htmlMediaElement, options, mejs.MediaFeatures.supportsMediaTag, isMediaTag, src);
 +		playback.url = (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : '';
 +
 +		if (playback.method == 'native') {
 +			// second fix for android
 +			if (mejs.MediaFeatures.isBustedAndroid) {
 +				htmlMediaElement.src = playback.url;
 +				htmlMediaElement.addEventListener('click', function() {
 +					htmlMediaElement.play();
 +				}, false);
 +			}
 +		
 +			// add methods to native HTMLMediaElement
 +			return this.updateNative(playback, options, autoplay, preload);
 +		} else if (playback.method !== '') {
 +			// create plugin to mimic HTMLMediaElement
 +			
 +			return this.createPlugin( playback,  options, poster, autoplay, preload, controls);
 +		} else {
 +			// boo, no HTML5, no Flash, no Silverlight.
 +			this.createErrorMessage( playback, options, poster );
 +			
 +			return this;
 +		}
 +	},
 +	
 +	determinePlayback: function(htmlMediaElement, options, supportsMediaTag, isMediaTag, src) {
 +		var
 +			mediaFiles = [],
 +			i,
 +			j,
 +			k,
 +			l,
 +			n,
 +			type,
 +			result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() != 'audio')},
 +			pluginName,
 +			pluginVersions,
 +			pluginInfo,
 +			dummy,
 +			media;
 +			
 +		// STEP 1: Get URL and type from <video src> or <source src>
 +
 +		// supplied type overrides <video type> and <source type>
 +		if (typeof options.type != 'undefined' && options.type !== '') {
 +			
 +			// accept either string or array of types
 +			if (typeof options.type == 'string') {
 +				mediaFiles.push({type:options.type, url:src});
 +			} else {
 +				
 +				for (i=0; i<options.type.length; i++) {
 +					mediaFiles.push({type:options.type[i], url:src});
 +				}
 +			}
 +
 +		// test for src attribute first
 +		} else if (src !== null) {
 +			type = this.formatType(src, htmlMediaElement.getAttribute('type'));
 +			mediaFiles.push({type:type, url:src});
 +
 +		// then test for <source> elements
 +		} else {
 +			// test <source> types to see if they are usable
 +			for (i = 0; i < htmlMediaElement.childNodes.length; i++) {
 +				n = htmlMediaElement.childNodes[i];
 +				if (n.nodeType == 1 && n.tagName.toLowerCase() == 'source') {
 +					src = n.getAttribute('src');
 +					type = this.formatType(src, n.getAttribute('type'));
 +					media = n.getAttribute('media');
 +
 +					if (!media || !window.matchMedia || (window.matchMedia && window.matchMedia(media).matches)) {
 +						mediaFiles.push({type:type, url:src});
 +					}
 +				}
 +			}
 +		}
 +		
 +		// in the case of dynamicly created players
 +		// check for audio types
 +		if (!isMediaTag && mediaFiles.length > 0 && mediaFiles[0].url !== null && this.getTypeFromFile(mediaFiles[0].url).indexOf('audio') > -1) {
 +			result.isVideo = false;
 +		}
 +		
 +
 +		// STEP 2: Test for playback method
 +		
 +		// special case for Android which sadly doesn't implement the canPlayType function (always returns '')
 +		if (mejs.MediaFeatures.isBustedAndroid) {
 +			htmlMediaElement.canPlayType = function(type) {
 +				return (type.match(/video\/(mp4|m4v)/gi) !== null) ? 'maybe' : '';
 +			};
 +		}		
 +		
 +
 +		// test for native playback first
- 		if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native')) {
++		if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native')  && !(mejs.MediaFeatures.isBustedNativeHTTPS && options.httpsBasicAuthSite === true)) {
 +						
 +			if (!isMediaTag) {
 +
 +				// create a real HTML5 Media Element 
 +				dummy = document.createElement( result.isVideo ? 'video' : 'audio');			
 +				htmlMediaElement.parentNode.insertBefore(dummy, htmlMediaElement);
 +				htmlMediaElement.style.display = 'none';
 +				
 +				// use this one from now on
 +				result.htmlMediaElement = htmlMediaElement = dummy;
 +			}
 +				
 +			for (i=0; i<mediaFiles.length; i++) {
 +				// normal check
 +				if (htmlMediaElement.canPlayType(mediaFiles[i].type).replace(/no/, '') !== '' 
 +					// special case for Mac/Safari 5.0.3 which answers '' to canPlayType('audio/mp3') but 'maybe' to canPlayType('audio/mpeg')
 +					|| htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/mp3/,'mpeg')).replace(/no/, '') !== '') {
 +					result.method = 'native';
 +					result.url = mediaFiles[i].url;
 +					break;
 +				}
 +			}			
 +			
 +			if (result.method === 'native') {
 +				if (result.url !== null) {
 +					htmlMediaElement.src = result.url;
 +				}
 +			
 +				// if `auto_plugin` mode, then cache the native result but try plugins.
 +				if (options.mode !== 'auto_plugin') {
 +					return result;
 +				}
 +			}
 +		}
 +
 +		// if native playback didn't work, then test plugins
 +		if (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'shim') {
 +			for (i=0; i<mediaFiles.length; i++) {
 +				type = mediaFiles[i].type;
 +
 +				// test all plugins in order of preference [silverlight, flash]
 +				for (j=0; j<options.plugins.length; j++) {
 +
 +					pluginName = options.plugins[j];
 +			
 +					// test version of plugin (for future features)
 +					pluginVersions = mejs.plugins[pluginName];				
 +					
 +					for (k=0; k<pluginVersions.length; k++) {
 +						pluginInfo = pluginVersions[k];
 +					
 +						// test if user has the correct plugin version
 +						
 +						// for youtube/vimeo
 +						if (pluginInfo.version == null || 
 +							
 +							mejs.PluginDetector.hasPluginVersion(pluginName, pluginInfo.version)) {
 +
 +							// test for plugin playback types
 +							for (l=0; l<pluginInfo.types.length; l++) {
 +								// find plugin that can play the type
 +								if (type == pluginInfo.types[l]) {
 +									result.method = pluginName;
 +									result.url = mediaFiles[i].url;
 +									return result;
 +								}
 +							}
 +						}
 +					}
 +				}
 +			}
 +		}
 +		
 +		// at this point, being in 'auto_plugin' mode implies that we tried plugins but failed.
 +		// if we have native support then return that.
 +		if (options.mode === 'auto_plugin' && result.method === 'native') {
 +			return result;
 +		}
 +
 +		// what if there's nothing to play? just grab the first available
 +		if (result.method === '' && mediaFiles.length > 0) {
 +			result.url = mediaFiles[0].url;
 +		}
 +
 +		return result;
 +	},
 +
 +	formatType: function(url, type) {
 +		var ext;
 +
 +		// if no type is supplied, fake it with the extension
 +		if (url && !type) {		
 +			return this.getTypeFromFile(url);
 +		} else {
 +			// only return the mime part of the type in case the attribute contains the codec
 +			// see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element
 +			// `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4`
 +			
 +			if (type && ~type.indexOf(';')) {
 +				return type.substr(0, type.indexOf(';')); 
 +			} else {
 +				return type;
 +			}
 +		}
 +	},
 +	
 +	getTypeFromFile: function(url) {
 +		url = url.split('?')[0];
 +		var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
 +		return (/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(ext) ? 'video' : 'audio') + '/' + this.getTypeFromExtension(ext);
 +	},
 +	
 +	getTypeFromExtension: function(ext) {
 +		
 +		switch (ext) {
 +			case 'mp4':
 +			case 'm4v':
 +				return 'mp4';
 +			case 'webm':
 +			case 'webma':
 +			case 'webmv':	
 +				return 'webm';
 +			case 'ogg':
 +			case 'oga':
 +			case 'ogv':	
 +				return 'ogg';
 +			default:
 +				return ext;
 +		}
 +	},
 +
 +	createErrorMessage: function(playback, options, poster) {
 +		var 
 +			htmlMediaElement = playback.htmlMediaElement,
 +			errorContainer = document.createElement('div');
 +			
 +		errorContainer.className = 'me-cannotplay';
 +
 +		try {
 +			errorContainer.style.width = htmlMediaElement.width + 'px';
 +			errorContainer.style.height = htmlMediaElement.height + 'px';
 +		} catch (e) {}
 +
- 		errorContainer.innerHTML = (poster !== '') ?
- 			'<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
- 			'<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>';
++    if (options.customError) {
++      errorContainer.innerHTML = options.customError;
++    } else {
++      errorContainer.innerHTML = (poster !== '') ?
++        '<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
++        '<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>';
++    }
 +
 +		htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
 +		htmlMediaElement.style.display = 'none';
 +
 +		options.error(htmlMediaElement);
 +	},
 +
 +	createPlugin:function(playback, options, poster, autoplay, preload, controls) {
 +		var 
 +			htmlMediaElement = playback.htmlMediaElement,
 +			width = 1,
 +			height = 1,
 +			pluginid = 'me_' + playback.method + '_' + (mejs.meIndex++),
 +			pluginMediaElement = new mejs.PluginMediaElement(pluginid, playback.method, playback.url),
 +			container = document.createElement('div'),
 +			specialIEContainer,
 +			node,
 +			initVars;
 +
 +		// copy tagName from html media element
 +		pluginMediaElement.tagName = htmlMediaElement.tagName
 +
 +		// copy attributes from html media element to plugin media element
 +		for (var i = 0; i < htmlMediaElement.attributes.length; i++) {
 +			var attribute = htmlMediaElement.attributes[i];
 +			if (attribute.specified == true) {
 +				pluginMediaElement.setAttribute(attribute.name, attribute.value);
 +			}
 +		}
 +
 +		// check for placement inside a <p> tag (sometimes WYSIWYG editors do this)
 +		node = htmlMediaElement.parentNode;
 +		while (node !== null && node.tagName.toLowerCase() != 'body') {
 +			if (node.parentNode.tagName.toLowerCase() == 'p') {
 +				node.parentNode.parentNode.insertBefore(node, node.parentNode);
 +				break;
 +			}
 +			node = node.parentNode;
 +		}
 +
 +		if (playback.isVideo) {
- 			width = (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth;
- 			height = (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight;
++			width = (options.pluginWidth > 0) ? options.pluginWidth : (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth;
++			height = (options.pluginHeight > 0) ? options.pluginHeight : (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight;
 +		
 +			// in case of '%' make sure it's encoded
 +			width = mejs.Utility.encodeUrl(width);
 +			height = mejs.Utility.encodeUrl(height);
 +		
 +		} else {
 +			if (options.enablePluginDebug) {
 +				width = 320;
 +				height = 240;
 +			}
 +		}
 +
 +		// register plugin
 +		pluginMediaElement.success = options.success;
 +		mejs.MediaPluginBridge.registerPluginElement(pluginid, pluginMediaElement, htmlMediaElement);
 +
 +		// add container (must be added to DOM before inserting HTML for IE)
 +		container.className = 'me-plugin';
 +		container.id = pluginid + '_container';
 +		
 +		if (playback.isVideo) {
 +				htmlMediaElement.parentNode.insertBefore(container, htmlMediaElement);
 +		} else {
 +				document.body.insertBefore(container, document.body.childNodes[0]);
 +		}
 +
 +		// flash/silverlight vars
 +		initVars = [
 +			'id=' + pluginid,
 +			'isvideo=' + ((playback.isVideo) ? "true" : "false"),
 +			'autoplay=' + ((autoplay) ? "true" : "false"),
 +			'preload=' + preload,
 +			'width=' + width,
 +			'startvolume=' + options.startVolume,
 +			'timerrate=' + options.timerRate,
 +			'flashstreamer=' + options.flashStreamer,
 +			'height=' + height,
 +      'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
 +
 +		if (playback.url !== null) {
 +			if (playback.method == 'flash') {
 +				initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
 +			} else {
 +				initVars.push('file=' + playback.url);
 +			}
 +		}
 +		if (options.enablePluginDebug) {
 +			initVars.push('debug=true');
 +		}
 +		if (options.enablePluginSmoothing) {
 +			initVars.push('smoothing=true');
 +		}
 +    if (options.enablePseudoStreaming) {
 +      initVars.push('pseudostreaming=true');
 +    }
 +		if (controls) {
 +			initVars.push('controls=true'); // shows controls in the plugin if desired
 +		}
 +		if (options.pluginVars) {
 +			initVars = initVars.concat(options.pluginVars);
 +		}		
 +
 +		switch (playback.method) {
 +			case 'silverlight':
 +				container.innerHTML =
 +'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="' + pluginid + '" name="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
 +'<param name="initParams" value="' + initVars.join(',') + '" />' +
 +'<param name="windowless" value="true" />' +
 +'<param name="background" value="black" />' +
 +'<param name="minRuntimeVersion" value="3.0.0.0" />' +
 +'<param name="autoUpgrade" value="true" />' +
 +'<param name="source" value="' + options.pluginPath + options.silverlightName + '" />' +
 +'</object>';
 +					break;
 +
 +			case 'flash':
 +
 +				if (mejs.MediaFeatures.isIE) {
 +					specialIEContainer = document.createElement('div');
 +					container.appendChild(specialIEContainer);
 +					specialIEContainer.outerHTML =
 +'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
 +'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
 +'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date()) + '" />' +
 +'<param name="flashvars" value="' + initVars.join('&') + '" />' +
 +'<param name="quality" value="high" />' +
 +'<param name="bgcolor" value="#000000" />' +
 +'<param name="wmode" value="transparent" />' +
 +'<param name="allowScriptAccess" value="always" />' +
 +'<param name="allowFullScreen" value="true" />' +
++'<param name="scale" value="default" />' + 
 +'</object>';
 +
 +				} else {
 +
 +					container.innerHTML =
 +'<embed id="' + pluginid + '" name="' + pluginid + '" ' +
 +'play="true" ' +
 +'loop="false" ' +
 +'quality="high" ' +
 +'bgcolor="#000000" ' +
 +'wmode="transparent" ' +
 +'allowScriptAccess="always" ' +
 +'allowFullScreen="true" ' +
 +'type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" ' +
 +'src="' + options.pluginPath + options.flashName + '" ' +
 +'flashvars="' + initVars.join('&') + '" ' +
 +'width="' + width + '" ' +
 +'height="' + height + '" ' +
++'scale="default"' + 
 +'class="mejs-shim"></embed>';
 +				}
 +				break;
 +			
 +			case 'youtube':
 +			
 +				
 +				var
 +					videoId = playback.url.substr(playback.url.lastIndexOf('=')+1);
 +					youtubeSettings = {
 +						container: container,
 +						containerId: container.id,
 +						pluginMediaElement: pluginMediaElement,
 +						pluginId: pluginid,
 +						videoId: videoId,
 +						height: height,
 +						width: width	
 +					};				
 +				
 +				if (mejs.PluginDetector.hasPluginVersion('flash', [10,0,0]) ) {
 +					mejs.YouTubeApi.createFlash(youtubeSettings);
 +				} else {
 +					mejs.YouTubeApi.enqueueIframe(youtubeSettings);		
 +				}
 +				
 +				break;
 +			
 +			// DEMO Code. Does NOT work.
 +			case 'vimeo':
- 				//console.log('vimeoid');
++				//
 +				
 +				pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1);
 +				
 +				container.innerHTML ='<iframe src="http://player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?portrait=0&byline=0&title=0" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim"></iframe>';
 +				
 +				/*
 +				container.innerHTML =
 +					'<object width="' + width + '" height="' + height + '" class="mejs-shim">' +
 +						'<param name="allowfullscreen" value="true" />' +
 +						'<param name="allowscriptaccess" value="always" />' +
 +						'<param name="flashvars" value="api=1" />' + 
 +						'<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + pluginMediaElement.vimeoid  + '&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" />' +
 +						'<embed src="//vimeo.com/moogaloop.swf?api=1&clip_id=' + pluginMediaElement.vimeoid + '&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="' + width + '" height="' + height + '" class="mejs-shim"></embed>' +
 +					'</object>';
 +					*/
 +									
 +				break;			
 +		}
 +		// hide original element
 +		htmlMediaElement.style.display = 'none';
++		// prevent browser from autoplaying when using a plugin
++		htmlMediaElement.removeAttribute('autoplay');
 +
 +		// FYI: options.success will be fired by the MediaPluginBridge
 +		
 +		return pluginMediaElement;
 +	},
 +
 +	updateNative: function(playback, options, autoplay, preload) {
 +		
 +		var htmlMediaElement = playback.htmlMediaElement,
 +			m;
 +		
 +		
 +		// add methods to video object to bring it into parity with Flash Object
 +		for (m in mejs.HtmlMediaElement) {
 +			htmlMediaElement[m] = mejs.HtmlMediaElement[m];
 +		}
 +
 +		/*
 +		Chrome now supports preload="none"
 +		if (mejs.MediaFeatures.isChrome) {
 +		
 +			// special case to enforce preload attribute (Chrome doesn't respect this)
 +			if (preload === 'none' && !autoplay) {
 +			
 +				// forces the browser to stop loading (note: fails in IE9)
 +				htmlMediaElement.src = '';
 +				htmlMediaElement.load();
 +				htmlMediaElement.canceledPreload = true;
 +
 +				htmlMediaElement.addEventListener('play',function() {
 +					if (htmlMediaElement.canceledPreload) {
 +						htmlMediaElement.src = playback.url;
 +						htmlMediaElement.load();
 +						htmlMediaElement.play();
 +						htmlMediaElement.canceledPreload = false;
 +					}
 +				}, false);
 +			// for some reason Chrome forgets how to autoplay sometimes.
 +			} else if (autoplay) {
 +				htmlMediaElement.load();
 +				htmlMediaElement.play();
 +			}
 +		}
 +		*/
 +
 +		// fire success code
 +		options.success(htmlMediaElement, htmlMediaElement);
 +		
 +		return htmlMediaElement;
 +	}
 +};
 +
 +/*
 + - test on IE (object vs. embed)
 + - determine when to use iframe (Firefox, Safari, Mobile) vs. Flash (Chrome, IE)
 + - fullscreen?
 +*/
 +
 +// YouTube Flash and Iframe API
 +mejs.YouTubeApi = {
 +	isIframeStarted: false,
 +	isIframeLoaded: false,
 +	loadIframeApi: function() {
 +		if (!this.isIframeStarted) {
 +			var tag = document.createElement('script');
 +			tag.src = "//www.youtube.com/player_api";
 +			var firstScriptTag = document.getElementsByTagName('script')[0];
 +			firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
 +			this.isIframeStarted = true;
 +		}
 +	},
 +	iframeQueue: [],
 +	enqueueIframe: function(yt) {
 +		
 +		if (this.isLoaded) {
 +			this.createIframe(yt);
 +		} else {
 +			this.loadIframeApi();
 +			this.iframeQueue.push(yt);
 +		}
 +	},
 +	createIframe: function(settings) {
 +		
 +		var
 +		pluginMediaElement = settings.pluginMediaElement,	
 +		player = new YT.Player(settings.containerId, {
 +			height: settings.height,
 +			width: settings.width,
 +			videoId: settings.videoId,
 +			playerVars: {controls:0},
 +			events: {
 +				'onReady': function() {
 +					
 +					// hook up iframe object to MEjs
 +					settings.pluginMediaElement.pluginApi = player;
 +					
 +					// init mejs
 +					mejs.MediaPluginBridge.initPlugin(settings.pluginId);
 +					
 +					// create timer
 +					setInterval(function() {
 +						mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
 +					}, 250);					
 +				},
 +				'onStateChange': function(e) {
 +					
 +					mejs.YouTubeApi.handleStateChange(e.data, player, pluginMediaElement);
 +					
 +				}
 +			}
 +		});
 +	},
 +	
 +	createEvent: function (player, pluginMediaElement, eventName) {
 +		var obj = {
 +			type: eventName,
 +			target: pluginMediaElement
 +		};
 +
 +		if (player && player.getDuration) {
 +			
 +			// time 
 +			pluginMediaElement.currentTime = obj.currentTime = player.getCurrentTime();
 +			pluginMediaElement.duration = obj.duration = player.getDuration();
 +			
 +			// state
 +			obj.paused = pluginMediaElement.paused;
 +			obj.ended = pluginMediaElement.ended;			
 +			
 +			// sound
 +			obj.muted = player.isMuted();
 +			obj.volume = player.getVolume() / 100;
 +			
 +			// progress
 +			obj.bytesTotal = player.getVideoBytesTotal();
 +			obj.bufferedBytes = player.getVideoBytesLoaded();
 +			
 +			// fake the W3C buffered TimeRange
 +			var bufferedTime = obj.bufferedBytes / obj.bytesTotal * obj.duration;
 +			
 +			obj.target.buffered = obj.buffered = {
 +				start: function(index) {
 +					return 0;
 +				},
 +				end: function (index) {
 +					return bufferedTime;
 +				},
 +				length: 1
 +			};
 +			
 +		}
 +		
 +		// send event up the chain
 +		pluginMediaElement.dispatchEvent(obj.type, obj);
 +	},	
 +	
 +	iFrameReady: function() {
 +		
 +		this.isLoaded = true;
 +		this.isIframeLoaded = true;
 +		
 +		while (this.iframeQueue.length > 0) {
 +			var settings = this.iframeQueue.pop();
 +			this.createIframe(settings);
 +		}	
 +	},
 +	
 +	// FLASH!
 +	flashPlayers: {},
 +	createFlash: function(settings) {
 +		
 +		this.flashPlayers[settings.pluginId] = settings;
 +		
 +		/*
 +		settings.container.innerHTML =
 +			'<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid=' + settings.pluginId  + '&version=3&autoplay=0&controls=0&modestbranding=1&loop=0" ' +
 +				'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
 +				'<param name="allowScriptAccess" value="always">' +
 +				'<param name="wmode" value="transparent">' +
 +			'</object>';
 +		*/
 +
 +		var specialIEContainer,
 +			youtubeUrl = '//www.youtube.com/apiplayer?enablejsapi=1&playerapiid=' + settings.pluginId  + '&version=3&autoplay=0&controls=0&modestbranding=1&loop=0';
 +			
 +		if (mejs.MediaFeatures.isIE) {
 +			
 +			specialIEContainer = document.createElement('div');
 +			settings.container.appendChild(specialIEContainer);
 +			specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
 +'id="' + settings.pluginId + '" width="' + settings.width + '" height="' + settings.height + '" class="mejs-shim">' +
 +	'<param name="movie" value="' + youtubeUrl + '" />' +
 +	'<param name="wmode" value="transparent" />' +
 +	'<param name="allowScriptAccess" value="always" />' +
 +	'<param name="allowFullScreen" value="true" />' +
 +'</object>';
 +		} else {
 +		settings.container.innerHTML =
 +			'<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + youtubeUrl + '" ' +
 +				'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
 +				'<param name="allowScriptAccess" value="always">' +
 +				'<param name="wmode" value="transparent">' +
 +			'</object>';
 +		}		
 +		
 +	},
 +	
 +	flashReady: function(id) {
 +		var
 +			settings = this.flashPlayers[id],
 +			player = document.getElementById(id),
 +			pluginMediaElement = settings.pluginMediaElement;
 +		
 +		// hook up and return to MediaELementPlayer.success	
 +		pluginMediaElement.pluginApi = 
 +		pluginMediaElement.pluginElement = player;
 +		mejs.MediaPluginBridge.initPlugin(id);
 +		
 +		// load the youtube video
 +		player.cueVideoById(settings.videoId);
 +		
 +		var callbackName = settings.containerId + '_callback';
 +		
 +		window[callbackName] = function(e) {
 +			mejs.YouTubeApi.handleStateChange(e, player, pluginMediaElement);
 +		}
 +		
 +		player.addEventListener('onStateChange', callbackName);
 +		
 +		setInterval(function() {
 +			mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
 +		}, 250);
 +	},
 +	
 +	handleStateChange: function(youTubeState, player, pluginMediaElement) {
 +		switch (youTubeState) {
 +			case -1: // not started
 +				pluginMediaElement.paused = true;
 +				pluginMediaElement.ended = true;
 +				mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'loadedmetadata');
 +				//createYouTubeEvent(player, pluginMediaElement, 'loadeddata');
 +				break;
 +			case 0:
 +				pluginMediaElement.paused = false;
 +				pluginMediaElement.ended = true;
 +				mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'ended');
 +				break;
 +			case 1:
 +				pluginMediaElement.paused = false;
 +				pluginMediaElement.ended = false;				
 +				mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'play');
 +				mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'playing');
 +				break;
 +			case 2:
 +				pluginMediaElement.paused = true;
 +				pluginMediaElement.ended = false;				
 +				mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'pause');
 +				break;
 +			case 3: // buffering
 +				mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'progress');
 +				break;
 +			case 5:
 +				// cued?
 +				break;						
 +			
 +		}			
 +		
 +	}
 +}
 +// IFRAME
 +function onYouTubePlayerAPIReady() {
 +	mejs.YouTubeApi.iFrameReady();
 +}
 +// FLASH
 +function onYouTubePlayerReady(id) {
 +	mejs.YouTubeApi.flashReady(id);
 +}
 +
 +window.mejs = mejs;
 +window.MediaElement = mejs.MediaElement;
 +
 +/*!
-  * Adds Internationalization and localization to objects.
++ * Adds Internationalization and localization to mediaelement.
 + *
-  * What is the concept beyond i18n?
-  *   http://en.wikipedia.org/wiki/Internationalization_and_localization
++ * This file does not contain translations, you have to add the manually.
++ * The schema is always the same: me-i18n-locale-[ISO_639-1 Code].js
 + *
++ * Examples are provided both for german and chinese translation.
 + *
-  * This file both i18n methods and locale which is used to translate
-  * strings into other languages.
-  *
-  * Default translations are not available, you have to add them
-  * through locale objects which are named exactly as the langcode
-  * they stand for. The default language is always english (en).
 + *
++ * What is the concept beyond i18n?
++ *   http://en.wikipedia.org/wiki/Internationalization_and_localization
 + *
-  * Wrapper built to be able to attach the i18n object to
-  * other objects without changing more than one line.
++ * What langcode should i use?
++ *   http://en.wikipedia.org/wiki/ISO_639-1
 + *
 + *
-  * LICENSE:
++ * License?
 + *
 + *   The i18n file uses methods from the Drupal project (drupal.js):
 + *     - i18n.methods.t() (modified)
 + *     - i18n.methods.checkPlain() (full copy)
-  *     - i18n.methods.formatString() (full copy)
 + *
 + *   The Drupal project is (like mediaelementjs) licensed under GPLv2.
 + *    - http://drupal.org/licensing/faq/#q1
 + *    - https://github.com/johndyer/mediaelement
 + *    - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 + *
 + *
 + * @author
 + *   Tim Latz (latz.tim at gmail.com)
 + *
-  * @see
-  *   me-i18n-locale.js
 + *
 + * @params
 + *  - context - document, iframe ..
 + *  - exports - CommonJS, window ..
 + *
 + */
 +;(function(context, exports, undefined) {
 +    "use strict";
 +    var i18n = {
 +        "locale": {
++            "language" : '',
 +            "strings" : {}
 +        },
 +        "methods" : {}
 +    };
 +// start i18n
 +
 +
 +    /**
-      * Get the current browser's language
-      *
-      * @see: i18n.methods.t()
++     * Get language, fallback to browser's language if empty
 +     */
-     i18n.locale.getLanguage = function () {
-         return {
-             "language" : navigator.language
-         };
++    i18n.getLanguage = function () {
++        var language = i18n.locale.language || window.navigator.userLanguage || window.navigator.language;
++        // convert to iso 639-1 (2-letters, lower case)
++        return language.substr(0, 2).toLowerCase();
 +    };
 +
-     /**
-      * Store the language the locale object was initialized with
-      */
-     i18n.locale.INIT_LANGUAGE = i18n.locale.getLanguage();
++    // i18n fixes for compatibility with WordPress
++    if ( typeof mejsL10n != 'undefined' ) {
++        i18n.locale.language = mejsL10n.language;
++    }
++
 +
 +
 +    /**
 +     * Encode special characters in a plain-text string for display as HTML.
 +     */
 +    i18n.methods.checkPlain = function (str) {
 +        var character, regex,
 +        replace = {
 +            '&': '&',
 +            '"': '"',
 +            '<': '<',
 +            '>': '>'
 +        };
 +        str = String(str);
 +        for (character in replace) {
 +            if (replace.hasOwnProperty(character)) {
 +                regex = new RegExp(character, 'g');
 +                str = str.replace(regex, replace[character]);
 +            }
 +        }
 +        return str;
 +    };
 +
 +    /**
-      * Replace placeholders with sanitized values in a string.
-      *
-      * @param str
-      *   A string with placeholders.
-      * @param args
-      *   An object of replacements pairs to make. Incidences of any key in this
-      *   array are replaced with the corresponding value. Based on the first
-      *   character of the key, the value is escaped and/or themed:
-      *    - !variable: inserted as is
-      *    - @variable: escape plain text to HTML (i18n.methods.checkPlain)
-      *    - %variable: escape text and theme as a placeholder for user-submitted
-      *      content (checkPlain + <em class="placeholder" > )
-      *
-      * @see i18n.methods.t()
-      */
-     i18n.methods.formatString = function(str, args) {
-         // Transform arguments before inserting them.
-         for (var key in args) {
-             switch (key.charAt(0)) {
-                 // Escaped only.
-                 case '@':
-                     args[key] = i18n.methods.checkPlain(args[key]);
-                     break;
-                 // Pass-through.
-                 case '!':
-                     break;
-                 // Escaped and placeholder.
-                 case '%':
-                 default:
-                     args[key] = '<em class="placeholder">' + i18n.methods.checkPlain(args[key]) + '</em>';
-                     break;
-             }
-             str = str.replace(key, args[key]);
-         }
-         return str;
-     };
- 
-     /**
 +     * Translate strings to the page language or a given language.
 +     *
-      * See the documentation of the server-side t() function for further details.
 +     *
 +     * @param str
 +     *   A string containing the English string to translate.
-      * @param args
-      *   An object of replacements pairs to make after translation. Incidences
-      *   of any key in this array are replaced with the corresponding value.
-      *   See i18n.methods.formatString().
 +     *
 +     * @param options
 +     *   - 'context' (defaults to the default context): The context the source string
 +     *     belongs to.
 +     *
 +     * @return
-      *   The translated string.
++     *   The translated string, escaped via i18n.methods.checkPlain()
 +     */
-     i18n.methods.t = function (str, args, options) {
++    i18n.methods.t = function (str, options) {
 +
 +        // Fetch the localized version of the string.
 +        if (i18n.locale.strings && i18n.locale.strings[options.context] && i18n.locale.strings[options.context][str]) {
 +            str = i18n.locale.strings[options.context][str];
 +        }
 +
-         if (args) {
-             str = i18n.methods.formatString(str, args);
-         }
-         return str;
++        return i18n.methods.checkPlain(str);
 +    };
 +
 +
 +    /**
 +     * Wrapper for i18n.methods.t()
 +     *
 +     * @see i18n.methods.t()
 +     * @throws InvalidArgumentException
 +     */
-     i18n.t = function(str, args, options) {
++    i18n.t = function(str, options) {
 +
 +        if (typeof str === 'string' && str.length > 0) {
 +
-             // check every time due languge can change for
++            // check every time due language can change for
 +            // different reasons (translation, lang switcher ..)
-             var lang = i18n.locale.getLanguage();
++            var language = i18n.getLanguage();
 +
 +            options = options || {
-                 "context" : lang.language
++                "context" : language
 +            };
 +
-             return i18n.methods.t(str, args, options);
++            return i18n.methods.t(str, options);
 +        }
 +        else {
 +            throw {
 +                "name" : 'InvalidArgumentException',
 +                "message" : 'First argument is either not a string or empty.'
-             }
++            };
 +        }
 +    };
 +
 +// end i18n
 +    exports.i18n = i18n;
 +}(document, mejs));
 +
++// i18n fixes for compatibility with WordPress
++;(function(exports, undefined) {
++
++    "use strict";
++
++    if ( typeof mejsL10n != 'undefined' ) {
++        exports[mejsL10n.language] = mejsL10n.strings;
++    }
++
++}(mejs.i18n.locale.strings));
++
 +/*!
 + * This is a i18n.locale language object.
 + *
-  *<de> German translation by Tim Latz, latz.tim at gmail.com
++ * German translation by Tim Latz, latz.tim at gmail.com
 + *
 + * @author
 + *   Tim Latz (latz.tim at gmail.com)
 + *
 + * @see
 + *   me-i18n.js
 + *
 + * @params
 + *  - exports - CommonJS, window ..
 + */
 +;(function(exports, undefined) {
 +
 +    "use strict";
 +
-     exports.de = {
-         "Fullscreen" : "Vollbild",
-         "Go Fullscreen" : "Vollbild an",
-         "Turn off Fullscreen" : "Vollbild aus",
-         "Close" : "Schließen"
-     };
++    if (typeof exports.de === 'undefined') {
++        exports.de = {
++            "Fullscreen" : "Vollbild",
++            "Go Fullscreen" : "Vollbild an",
++            "Turn off Fullscreen" : "Vollbild aus",
++            "Close" : "Schließen"
++        };
++    }
 +
 +}(mejs.i18n.locale.strings));
 +/*!
 + * This is a i18n.locale language object.
 + *
-  *<de> Traditional chinese translation by Tim Latz, latz.tim at gmail.com
++ * Traditional chinese translation by Tim Latz, latz.tim at gmail.com
 + *
 + * @author
 + *   Tim Latz (latz.tim at gmail.com)
 + *
 + * @see
 + *   me-i18n.js
 + *
 + * @params
 + *  - exports - CommonJS, window ..
 + */
 +;(function(exports, undefined) {
 +
 +    "use strict";
 +
-     exports.zh = {
-         "Fullscreen" : "全螢幕",
-         "Go Fullscreen" : "全屏模式",
-         "Turn off Fullscreen" : "退出全屏模式",
-         "Close" : "關閉"
-     };
++    if (typeof exports.zh === 'undefined') {
++        exports.zh = {
++            "Fullscreen" : "全螢幕",
++            "Go Fullscreen" : "全屏模式",
++            "Turn off Fullscreen" : "退出全屏模式",
++            "Close" : "關閉"
++        };
++    }
 +
 +}(mejs.i18n.locale.strings));
 +
 +
 +/*!
 + * MediaElementPlayer
 + * http://mediaelementjs.com/
 + *
 + * Creates a controller bar for HTML5 <video> add <audio> tags
 + * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
 + *
-  * Copyright 2010-2012, John Dyer (http://j.hn/)
++ * Copyright 2010-2013, John Dyer (http://j.hn/)
 + * License: MIT
 + *
 + */
 +if (typeof jQuery != 'undefined') {
 +	mejs.$ = jQuery;
 +} else if (typeof ender != 'undefined') {
 +	mejs.$ = ender;
 +}
 +(function ($) {
 +
 +	// default player values
 +	mejs.MepDefaults = {
 +		// url to poster (to fix iOS 3.x)
 +		poster: '',
++		// When the video is ended, we can show the poster.
++		showPosterWhenEnded: false,
 +		// default if the <video width> is not specified
 +		defaultVideoWidth: 480,
 +		// default if the <video height> is not specified
 +		defaultVideoHeight: 270,
 +		// if set, overrides <video width>
 +		videoWidth: -1,
 +		// if set, overrides <video height>
 +		videoHeight: -1,
 +		// default if the user doesn't specify
 +		defaultAudioWidth: 400,
 +		// default if the user doesn't specify
 +		defaultAudioHeight: 30,
 +
- 		// default amount to move back when back key is pressed		
++		// default amount to move back when back key is pressed
 +		defaultSeekBackwardInterval: function(media) {
 +			return (media.duration * 0.05);
- 		},		
- 		// default amount to move forward when forward key is pressed				
++		},
++		// default amount to move forward when forward key is pressed
 +		defaultSeekForwardInterval: function(media) {
 +			return (media.duration * 0.05);
- 		},		
- 		
++		},
++
 +		// width of audio player
 +		audioWidth: -1,
 +		// height of audio player
- 		audioHeight: -1,		
++		audioHeight: -1,
 +		// initial volume when the player starts (overrided by user cookie)
 +		startVolume: 0.8,
 +		// useful for <audio> player loops
 +		loop: false,
 +		// rewind to beginning when media ends
 +                autoRewind: true,
 +		// resize to media dimensions
 +		enableAutosize: true,
 +		// forces the hour marker (##:00:00)
 +		alwaysShowHours: false,
 +
 +		// show framecount in timecode (##:00:00:00)
 +		showTimecodeFrameCount: false,
 +		// used when showTimecodeFrameCount is set to true
 +		framesPerSecond: 25,
- 		
++
 +		// automatically calculate the width of the progress bar based on the sizes of other elements
 +		autosizeProgress : true,
 +		// Hide controls when playing and mouse is not over the video
 +		alwaysShowControls: false,
 +		// Display the video control
 +		hideVideoControlsOnLoad: false,
 +        // Enable click video element to toggle play/pause
 +        clickToPlayPause: true,
 +		// force iPad's native controls
 +		iPadUseNativeControls: false,
 +		// force iPhone's native controls
- 		iPhoneUseNativeControls: false,	
++		iPhoneUseNativeControls: false,
 +		// force Android's native controls
- 		AndroidUseNativeControls: false,			
++		AndroidUseNativeControls: false,
 +		// features to show
 +		features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
 +		// only for dynamic
 +		isVideo: true,
- 		
++
 +		// turns keyboard support on and off for this instance
 +		enableKeyboard: true,
- 		
++
 +		// whenthis player starts, it will pause other players
 +		pauseOtherPlayers: true,
- 		
++
 +		// array of keyboard actions such as play pause
 +		keyActions: [
 +				{
 +						keys: [
 +								32, // SPACE
 +								179 // GOOGLE play/pause button
 +							  ],
 +						action: function(player, media) {
 +								if (media.paused || media.ended) {
- 										media.play();	
++										player.play();
 +								} else {
- 										media.pause();
- 								}										
++										player.pause();
++								}
 +						}
 +				},
 +				{
 +						keys: [38], // UP
 +						action: function(player, media) {
 +								var newVolume = Math.min(media.volume + 0.1, 1);
 +								media.setVolume(newVolume);
 +						}
 +				},
 +				{
 +						keys: [40], // DOWN
 +						action: function(player, media) {
 +								var newVolume = Math.max(media.volume - 0.1, 0);
 +								media.setVolume(newVolume);
 +						}
 +				},
 +				{
 +						keys: [
 +								37, // LEFT
 +								227 // Google TV rewind
 +						],
 +						action: function(player, media) {
 +								if (!isNaN(media.duration) && media.duration > 0) {
 +										if (player.isVideo) {
 +												player.showControls();
 +												player.startControlsTimer();
 +										}
- 										
++
 +										// 5%
 +										var newTime = Math.max(media.currentTime - player.options.defaultSeekBackwardInterval(media), 0);
 +										media.setCurrentTime(newTime);
 +								}
 +						}
 +				},
 +				{
 +						keys: [
 +								39, // RIGHT
 +								228 // Google TV forward
- 						], 
++						],
 +						action: function(player, media) {
 +								if (!isNaN(media.duration) && media.duration > 0) {
 +										if (player.isVideo) {
 +												player.showControls();
 +												player.startControlsTimer();
 +										}
- 										
++
 +										// 5%
- 										var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);										
++										var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);
 +										media.setCurrentTime(newTime);
 +								}
 +						}
 +				},
 +				{
 +						keys: [70], // f
 +						action: function(player, media) {
 +								if (typeof player.enterFullScreen != 'undefined') {
 +										if (player.isFullScreen) {
 +												player.exitFullScreen();
 +										} else {
 +												player.enterFullScreen();
 +										}
 +								}
 +						}
- 				}					
- 		]		
++				}
++		]
 +	};
 +
 +	mejs.mepIndex = 0;
- 	
++
 +	mejs.players = {};
 +
 +	// wraps a MediaElement object in player controls
 +	mejs.MediaElementPlayer = function(node, o) {
 +		// enforce object, even without "new" (via John Resig)
 +		if ( !(this instanceof mejs.MediaElementPlayer) ) {
 +			return new mejs.MediaElementPlayer(node, o);
- 		} 
++		}
 +
 +		var t = this;
- 		
++
 +		// these will be reset after the MediaElement.success fires
 +		t.$media = t.$node = $(node);
- 		t.node = t.media = t.$media[0];		
- 		
++		t.node = t.media = t.$media[0];
++
 +		// check for existing player
 +		if (typeof t.node.player != 'undefined') {
 +			return t.node.player;
 +		} else {
 +			// attach player to DOM node for reference
 +			t.node.player = t;
 +		}
- 				
- 				
++
++
 +		// try to get options from data-mejsoptions
 +		if (typeof o == 'undefined') {
- 			o = t.$node.data('mejsoptions');	
++			o = t.$node.data('mejsoptions');
 +		}
- 			
++
 +		// extend default options
 +		t.options = $.extend({},mejs.MepDefaults,o);
- 		
++
 +		// unique ID
 +		t.id = 'mep_' + mejs.mepIndex++;
 +
 +		// add to player array (for focus events)
 +		mejs.players[t.id] = t;
- 		
++
 +		// start up
 +		t.init();
 +
 +		return t;
 +	};
 +
 +	// actual player
 +	mejs.MediaElementPlayer.prototype = {
- 		
++
 +		hasFocus: false,
- 		
++
 +		controlsAreVisible: true,
- 		
++
 +		init: function() {
 +
 +			var
 +				t = this,
 +				mf = mejs.MediaFeatures,
 +				// options for MediaElement (shim)
 +				meOptions = $.extend(true, {}, t.options, {
 +					success: function(media, domNode) { t.meReady(media, domNode); },
 +					error: function(e) { t.handleError(e);}
 +				}),
 +				tagName = t.media.tagName.toLowerCase();
- 		
++
 +			t.isDynamic = (tagName !== 'audio' && tagName !== 'video');
- 			
- 			if (t.isDynamic) {	
- 				// get video from src or href?				
- 				t.isVideo = t.options.isVideo;						
++
++			if (t.isDynamic) {
++				// get video from src or href?
++				t.isVideo = t.options.isVideo;
 +			} else {
 +				t.isVideo = (tagName !== 'audio' && t.options.isVideo);
 +			}
- 		
- 			// use native controls in iPad, iPhone, and Android	
++
++			// use native controls in iPad, iPhone, and Android
 +			if ((mf.isiPad && t.options.iPadUseNativeControls) || (mf.isiPhone && t.options.iPhoneUseNativeControls)) {
- 				
++
 +				// add controls and stop
 +				t.$media.attr('controls', 'controls');
 +
 +				// attempt to fix iOS 3 bug
 +				//t.$media.removeAttr('poster');
 +                                // no Issue found on iOS3 -ttroxell
 +
 +				// override Apple's autoplay override for iPads
 +				if (mf.isiPad && t.media.getAttribute('autoplay') !== null) {
- 					t.media.load();
- 					t.media.play();
++					t.play();
 +				}
- 					
++
 +			} else if (mf.isAndroid && t.options.AndroidUseNativeControls) {
- 				
++
 +				// leave default player
 +
 +			} else {
 +
 +				// DESKTOP: use MediaElementPlayer controls
- 				
- 				// remove native controls 			
- 				t.$media.removeAttr('controls');					
- 				
++
++				// remove native controls
++				t.$media.removeAttr('controls');
++
 +				// build container
 +				t.container =
 +					$('<div id="' + t.id + '" class="mejs-container ' + (mejs.MediaFeatures.svg ? 'svg' : 'no-svg') + '">'+
 +						'<div class="mejs-inner">'+
 +							'<div class="mejs-mediaelement"></div>'+
 +							'<div class="mejs-layers"></div>'+
 +							'<div class="mejs-controls"></div>'+
 +							'<div class="mejs-clear"></div>'+
 +						'</div>' +
 +					'</div>')
 +					.addClass(t.$media[0].className)
- 					.insertBefore(t.$media);	
- 					
++					.insertBefore(t.$media);
++
 +				// add classes for user and content
 +				t.container.addClass(
 +					(mf.isAndroid ? 'mejs-android ' : '') +
 +					(mf.isiOS ? 'mejs-ios ' : '') +
 +					(mf.isiPad ? 'mejs-ipad ' : '') +
 +					(mf.isiPhone ? 'mejs-iphone ' : '') +
 +					(t.isVideo ? 'mejs-video ' : 'mejs-audio ')
- 				);	
- 					
++				);
++
 +
 +				// move the <video/video> tag into the right spot
 +				if (mf.isiOS) {
- 				
++
 +					// sadly, you can't move nodes in iOS, so we have to destroy and recreate it!
 +					var $newMedia = t.$media.clone();
- 					
++
 +					t.container.find('.mejs-mediaelement').append($newMedia);
- 					
++
 +					t.$media.remove();
 +					t.$node = t.$media = $newMedia;
 +					t.node = t.media = $newMedia[0]
- 					
++
 +				} else {
- 					
++
 +					// normal way of moving it into place (doesn't work on iOS)
 +					t.container.find('.mejs-mediaelement').append(t.$media);
 +				}
- 				
++
 +				// find parts
 +				t.controls = t.container.find('.mejs-controls');
 +				t.layers = t.container.find('.mejs-layers');
 +
 +				// determine the size
- 				
++
 +				/* size priority:
- 					(1) videoWidth (forced), 
++					(1) videoWidth (forced),
 +					(2) style="width;height;"
 +					(3) width attribute,
 +					(4) defaultVideoWidth (for unspecified cases)
 +				*/
- 				
++
 +				var tagType = (t.isVideo ? 'video' : 'audio'),
 +					capsTagName = tagType.substring(0,1).toUpperCase() + tagType.substring(1);
- 					
- 				
++
++
 +				if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
 +					t.width = t.options[tagType + 'Width'];
 +				} else if (t.media.style.width !== '' && t.media.style.width !== null) {
- 					t.width = t.media.style.width;						
++					t.width = t.media.style.width;
 +				} else if (t.media.getAttribute('width') !== null) {
 +					t.width = t.$media.attr('width');
 +				} else {
 +					t.width = t.options['default' + capsTagName + 'Width'];
 +				}
- 				
++
 +				if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
 +					t.height = t.options[tagType + 'Height'];
 +				} else if (t.media.style.height !== '' && t.media.style.height !== null) {
 +					t.height = t.media.style.height;
 +				} else if (t.$media[0].getAttribute('height') !== null) {
- 					t.height = t.$media.attr('height');	
++					t.height = t.$media.attr('height');
 +				} else {
 +					t.height = t.options['default' + capsTagName + 'Height'];
 +				}
 +
 +				// set the size, while we wait for the plugins to load below
 +				t.setPlayerSize(t.width, t.height);
- 				
++
 +				// create MediaElementShim
- 				meOptions.pluginWidth = t.height;
- 				meOptions.pluginHeight = t.width;				
++				meOptions.pluginWidth = t.width;
++				meOptions.pluginHeight = t.height;
 +			}
- 			
- 			
 +
 +			// create MediaElement shim
 +			mejs.MediaElement(t.$media[0], meOptions);
 +
- 			if (typeof(t.container) != 'undefined'){
++			if (typeof(t.container) != 'undefined' && t.controlsAreVisible){
 +			    // controls are shown when loaded
 +			    t.container.trigger('controlsshown');
 +			}
 +		},
- 		
++
 +		showControls: function(doAnimation) {
 +			var t = this;
- 			
++
 +			doAnimation = typeof doAnimation == 'undefined' || doAnimation;
- 			
++
 +			if (t.controlsAreVisible)
 +				return;
- 			
++
 +			if (doAnimation) {
 +				t.controls
 +					.css('visibility','visible')
 +					.stop(true, true).fadeIn(200, function() {
 +					      t.controlsAreVisible = true;
 +					      t.container.trigger('controlsshown');
 +					});
- 	
++
 +				// any additional controls people might add and want to hide
 +				t.container.find('.mejs-control')
 +					.css('visibility','visible')
- 					.stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;});	
- 					
++					.stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;});
++
 +			} else {
 +				t.controls
 +					.css('visibility','visible')
 +					.css('display','block');
- 	
++
 +				// any additional controls people might add and want to hide
 +				t.container.find('.mejs-control')
 +					.css('visibility','visible')
 +					.css('display','block');
- 					
++
 +				t.controlsAreVisible = true;
 +				t.container.trigger('controlsshown');
 +			}
- 			
++
 +			t.setControlsSize();
- 			
++
 +		},
 +
 +		hideControls: function(doAnimation) {
 +			var t = this;
- 			
++
 +			doAnimation = typeof doAnimation == 'undefined' || doAnimation;
- 			
- 			if (!t.controlsAreVisible)
++
++			if (!t.controlsAreVisible || t.options.alwaysShowControls)
 +				return;
- 			
++
 +			if (doAnimation) {
 +				// fade out main controls
 +				t.controls.stop(true, true).fadeOut(200, function() {
 +					$(this)
 +						.css('visibility','hidden')
 +						.css('display','block');
- 						
++
 +					t.controlsAreVisible = false;
 +					t.container.trigger('controlshidden');
- 				});	
- 	
++				});
++
 +				// any additional controls people might add and want to hide
 +				t.container.find('.mejs-control').stop(true, true).fadeOut(200, function() {
 +					$(this)
 +						.css('visibility','hidden')
 +						.css('display','block');
- 				});	
++				});
 +			} else {
- 				
++
 +				// hide main controls
 +				t.controls
 +					.css('visibility','hidden')
- 					.css('display','block');		
- 				
++					.css('display','block');
++
 +				// hide others
 +				t.container.find('.mejs-control')
 +					.css('visibility','hidden')
 +					.css('display','block');
- 					
++
 +				t.controlsAreVisible = false;
 +				t.container.trigger('controlshidden');
 +			}
- 		},		
++		},
 +
 +		controlsTimer: null,
 +
 +		startControlsTimer: function(timeout) {
 +
 +			var t = this;
- 			
++
 +			timeout = typeof timeout != 'undefined' ? timeout : 1500;
 +
 +			t.killControlsTimer('start');
 +
 +			t.controlsTimer = setTimeout(function() {
- 				//console.log('timer fired');
++				//
 +				t.hideControls();
 +				t.killControlsTimer('hide');
 +			}, timeout);
 +		},
 +
 +		killControlsTimer: function(src) {
 +
 +			var t = this;
 +
 +			if (t.controlsTimer !== null) {
 +				clearTimeout(t.controlsTimer);
 +				delete t.controlsTimer;
 +				t.controlsTimer = null;
 +			}
- 		},		
- 		
++		},
++
 +		controlsEnabled: true,
- 		
++
 +		disableControls: function() {
 +			var t= this;
- 			
++
 +			t.killControlsTimer();
 +			t.hideControls(false);
 +			this.controlsEnabled = false;
 +		},
- 		
++
 +		enableControls: function() {
 +			var t= this;
- 			
++
 +			t.showControls(false);
- 			
++
 +			t.controlsEnabled = true;
- 		},		
- 		
++		},
++
 +
 +		// Sets up all controls and events
- 		meReady: function(media, domNode) {			
- 		
- 		
++		meReady: function(media, domNode) {
++
++
 +			var t = this,
 +				mf = mejs.MediaFeatures,
 +				autoplayAttr = domNode.getAttribute('autoplay'),
 +				autoplay = !(typeof autoplayAttr == 'undefined' || autoplayAttr === null || autoplayAttr === 'false'),
 +				featureIndex,
 +				feature;
 +
 +			// make sure it can't create itself again if a plugin reloads
- 			if (t.created)
++			if (t.created) {
 +				return;
- 			else
- 				t.created = true;			
++			} else {
++				t.created = true;
++			}
 +
 +			t.media = media;
 +			t.domNode = domNode;
- 			
- 			if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) {				
- 				
++
++			if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) {
++
 +				// two built in features
 +				t.buildposter(t, t.controls, t.layers, t.media);
 +				t.buildkeyboard(t, t.controls, t.layers, t.media);
 +				t.buildoverlays(t, t.controls, t.layers, t.media);
 +
 +				// grab for use by features
 +				t.findTracks();
 +
 +				// add user-defined features/controls
 +				for (featureIndex in t.options.features) {
 +					feature = t.options.features[featureIndex];
 +					if (t['build' + feature]) {
 +						try {
 +							t['build' + feature](t, t.controls, t.layers, t.media);
 +						} catch (e) {
 +							// TODO: report control error
 +							//throw e;
- 							//console.log('error building ' + feature);
- 							//console.log(e);
++							//
++							//
 +						}
 +					}
 +				}
 +
 +				t.container.trigger('controlsready');
- 				
++
 +				// reset all layers and controls
 +				t.setPlayerSize(t.width, t.height);
 +				t.setControlsSize();
- 				
++
 +
 +				// controls fade
 +				if (t.isVideo) {
- 				
++
 +					if (mejs.MediaFeatures.hasTouch) {
- 						
++
 +						// for touch devices (iOS, Android)
 +						// show/hide without animation on touch
- 						
++
 +						t.$media.bind('touchstart', function() {
- 							
- 							
++
++
 +							// toggle controls
 +							if (t.controlsAreVisible) {
 +								t.hideControls(false);
 +							} else {
 +								if (t.controlsEnabled) {
 +									t.showControls(false);
 +								}
 +							}
- 						});					
- 					
++						});
++
 +					} else {
-             // click to play/pause
-             t.media.addEventListener('click', function() {
-               if (t.options.clickToPlayPause) {
-                   if (t.media.paused) {
-                     t.media.play();
-                   } else {
-                     t.media.pause();
-                   }
-               }
-             });
- 					
++
++						// create callback here since it needs access to current
++						// MediaElement object
++						mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback = function() {
++							//
++
++							if (t.options.clickToPlayPause) {
++								if (t.media.paused) {
++									t.play();
++								} else {
++									t.pause();
++								}
++							}
++						};
++
++			            // click to play/pause
++			            t.media.addEventListener('click', t.clickToPlayPauseCallback, false);
++
 +						// show/hide controls
 +						t.container
 +							.bind('mouseenter mouseover', function () {
 +								if (t.controlsEnabled) {
- 									if (!t.options.alwaysShowControls) {								
++									if (!t.options.alwaysShowControls) {
 +										t.killControlsTimer('enter');
 +										t.showControls();
- 										t.startControlsTimer(2500);		
++										t.startControlsTimer(2500);
 +									}
 +								}
 +							})
 +							.bind('mousemove', function() {
 +								if (t.controlsEnabled) {
 +									if (!t.controlsAreVisible) {
 +										t.showControls();
 +									}
 +									//t.killControlsTimer('move');
 +									if (!t.options.alwaysShowControls) {
 +										t.startControlsTimer(2500);
 +									}
 +								}
 +							})
 +							.bind('mouseleave', function () {
 +								if (t.controlsEnabled) {
 +									if (!t.media.paused && !t.options.alwaysShowControls) {
- 										t.startControlsTimer(1000);								
++										t.startControlsTimer(1000);
 +									}
 +								}
 +							});
 +					}
 +
 +					if(t.options.hideVideoControlsOnLoad) {
 +						t.hideControls(false);
 +					}
 +
 +					// check for autoplay
 +					if (autoplay && !t.options.alwaysShowControls) {
 +						t.hideControls();
 +					}
 +
 +					// resizer
 +					if (t.options.enableAutosize) {
 +						t.media.addEventListener('loadedmetadata', function(e) {
 +							// if the <video height> was not set and the options.videoHeight was not set
 +							// then resize to the real dimensions
 +							if (t.options.videoHeight <= 0 && t.domNode.getAttribute('height') === null && !isNaN(e.target.videoHeight)) {
 +								t.setPlayerSize(e.target.videoWidth, e.target.videoHeight);
 +								t.setControlsSize();
 +								t.media.setVideoSize(e.target.videoWidth, e.target.videoHeight);
 +							}
 +						}, false);
 +					}
 +				}
- 				
++
 +				// EVENTS
 +
 +				// FOCUS: when a video starts playing, it takes focus from other players (possibily pausing them)
 +				media.addEventListener('play', function() {
- 						var playerIndex;
- 						
- 						// go through all other players
- 						for (playerIndex in mejs.players) {
- 							var p = mejs.players[playerIndex];
- 							if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
- 								p.pause();
- 							}
- 							p.hasFocus = false;
++					var playerIndex;
++
++					// go through all other players
++					for (playerIndex in mejs.players) {
++						var p = mejs.players[playerIndex];
++						if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
++							p.pause();
 +						}
- 						
- 						t.hasFocus = true;
++						p.hasFocus = false;
++					}
++
++					t.hasFocus = true;
 +				},false);
- 								
++
 +
 +				// ended for all
 +				t.media.addEventListener('ended', function (e) {
 +					if(t.options.autoRewind) {
 +						try{
 +							t.media.setCurrentTime(0);
 +						} catch (exp) {
- 							
++
 +						}
 +					}
 +					t.media.pause();
- 					
- 					if (t.setProgressRail)
++
++					if (t.setProgressRail) {
 +						t.setProgressRail();
- 					if (t.setCurrentRail)
- 						t.setCurrentRail();						
++					}
++					if (t.setCurrentRail) {
++						t.setCurrentRail();
++					}
 +
 +					if (t.options.loop) {
- 						t.media.play();
++						t.play();
 +					} else if (!t.options.alwaysShowControls && t.controlsEnabled) {
 +						t.showControls();
 +					}
 +				}, false);
- 				
++
 +				// resize on the first play
 +				t.media.addEventListener('loadedmetadata', function(e) {
 +					if (t.updateDuration) {
 +						t.updateDuration();
 +					}
 +					if (t.updateCurrent) {
 +						t.updateCurrent();
 +					}
- 					
++
 +					if (!t.isFullScreen) {
 +						t.setPlayerSize(t.width, t.height);
 +						t.setControlsSize();
 +					}
 +				}, false);
 +
 +
 +				// webkit has trouble doing this without a delay
 +				setTimeout(function () {
 +					t.setPlayerSize(t.width, t.height);
 +					t.setControlsSize();
 +				}, 50);
- 				
++
 +				// adjust controls whenever window sizes (used to be in fullscreen only)
 +				t.globalBind('resize', function() {
- 					
- 					// don't resize for fullscreen mode				
++
++					// don't resize for fullscreen mode
 +					if ( !(t.isFullScreen || (mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen)) ) {
 +						t.setPlayerSize(t.width, t.height);
 +					}
- 					
++
 +					// always adjust controls
 +					t.setControlsSize();
- 				});				
++				});
 +
 +				// TEMP: needs to be moved somewhere else
 +				if (t.media.pluginType == 'youtube') {
- 					t.container.find('.mejs-overlay-play').hide();	
++					t.container.find('.mejs-overlay-play').hide();
 +				}
 +			}
- 			
++
 +			// force autoplay for HTML5
 +			if (autoplay && media.pluginType == 'native') {
- 				media.load();
- 				media.play();
++				t.play();
 +			}
 +
 +
 +			if (t.options.success) {
- 				
++
 +				if (typeof t.options.success == 'string') {
- 						window[t.options.success](t.media, t.domNode, t);
++					window[t.options.success](t.media, t.domNode, t);
 +				} else {
- 						t.options.success(t.media, t.domNode, t);
++					t.options.success(t.media, t.domNode, t);
 +				}
 +			}
 +		},
 +
 +		handleError: function(e) {
 +			var t = this;
- 			
++
 +			t.controls.hide();
- 		
++
 +			// Tell user that the file cannot be played
 +			if (t.options.error) {
 +				t.options.error(e);
 +			}
 +		},
 +
 +		setPlayerSize: function(width,height) {
 +			var t = this;
 +
- 			if (typeof width != 'undefined')
++			if (typeof width != 'undefined') {
 +				t.width = width;
- 				
- 			if (typeof height != 'undefined')
++			}
++
++			if (typeof height != 'undefined') {
 +				t.height = height;
++			}
++
++			// detect 100% mode - use currentStyle for IE since css() doesn't return percentages
++      		if (t.height.toString().indexOf('%') > 0 || t.$node.css('max-width') === '100%' || parseInt(t.$node.css('max-width').replace(/px/,''), 10) / t.$node.offsetParent().width() === 1 || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%')) {
 +
-       // detect 100% mode - use currentStyle for IE since css() doesn't return percentages
-       if (t.height.toString().indexOf('%') > 0 || t.$node.css('max-width') === '100%' || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%')) {
- 			
 +				// do we have the native dimensions yet?
- 				var 
++				var
 +					nativeWidth = t.isVideo ? ((t.media.videoWidth && t.media.videoWidth > 0) ? t.media.videoWidth : t.options.defaultVideoWidth) : t.options.defaultAudioWidth,
 +					nativeHeight = t.isVideo ? ((t.media.videoHeight && t.media.videoHeight > 0) ? t.media.videoHeight : t.options.defaultVideoHeight) : t.options.defaultAudioHeight,
 +					parentWidth = t.container.parent().closest(':visible').width(),
 +					newHeight = t.isVideo || !t.options.autosizeProgress ? parseInt(parentWidth * nativeHeight/nativeWidth, 10) : nativeHeight;
- 					
++
 +				if (t.container.parent()[0].tagName.toLowerCase() === 'body') { // && t.container.siblings().count == 0) {
 +					parentWidth = $(window).width();
 +					newHeight = $(window).height();
 +				}
- 				
++
 +				if ( newHeight != 0 && parentWidth != 0 ) {
 +					// set outer container size
 +					t.container
 +						.width(parentWidth)
 +						.height(newHeight);
 +
 +					// set native <video> or <audio> and shims
 +					t.$media.add(t.container.find('.mejs-shim'))
 +						.width('100%')
 +						.height('100%');
 +
- 					// if shim is ready, send the size to the embeded plugin	
++					// if shim is ready, send the size to the embeded plugin
 +					if (t.isVideo) {
 +						if (t.media.setVideoSize) {
 +							t.media.setVideoSize(parentWidth, newHeight);
 +						}
 +					}
- 					
++
 +					// set the layers
 +					t.layers.children('.mejs-layer')
 +						.width('100%')
 +						.height('100%');
 +				}
- 			
- 			
++
++
 +			} else {
 +
 +				t.container
 +					.width(t.width)
 +					.height(t.height);
- 	
++
 +				t.layers.children('.mejs-layer')
 +					.width(t.width)
 +					.height(t.height);
- 					
++
 +			}
++
++			// special case for big play button so it doesn't go over the controls area
++			var playLayer = t.layers.find('.mejs-overlay-play'),
++				playButton = playLayer.find('.mejs-overlay-button');
++
++			playLayer.height(t.container.height() - t.controls.height());
++			playButton.css('margin-top', '-' + (playButton.height()/2 - t.controls.height()/2).toString() + 'px'  );
++
 +		},
 +
 +		setControlsSize: function() {
 +			var t = this,
 +				usedWidth = 0,
 +				railWidth = 0,
 +				rail = t.controls.find('.mejs-time-rail'),
 +				total = t.controls.find('.mejs-time-total'),
 +				current = t.controls.find('.mejs-time-current'),
 +				loaded = t.controls.find('.mejs-time-loaded'),
 +				others = rail.siblings();
- 			
++
 +
 +			// allow the size to come from custom CSS
 +			if (t.options && !t.options.autosizeProgress) {
- 				// Also, frontends devs can be more flexible 
++				// Also, frontends devs can be more flexible
 +				// due the opportunity of absolute positioning.
 +				railWidth = parseInt(rail.css('width'));
 +			}
- 			
++
 +			// attempt to autosize
 +			if (railWidth === 0 || !railWidth) {
- 				
++
 +				// find the size of all the other controls besides the rail
 +				others.each(function() {
 +					var $this = $(this);
 +					if ($this.css('position') != 'absolute' && $this.is(':visible')) {
 +						usedWidth += $(this).outerWidth(true);
 +					}
 +				});
- 				
++
 +				// fit the rail into the remaining space
 +				railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width());
 +			}
 +
 +			// outer area
 +			rail.width(railWidth);
 +			// dark space
 +			total.width(railWidth - (total.outerWidth(true) - total.width()));
- 			
++
 +			if (t.setProgressRail)
 +				t.setProgressRail();
 +			if (t.setCurrentRail)
- 				t.setCurrentRail();				
++				t.setCurrentRail();
 +		},
 +
 +
 +		buildposter: function(player, controls, layers, media) {
 +			var t = this,
- 				poster = 
++				poster =
 +				$('<div class="mejs-poster mejs-layer">' +
 +				'</div>')
 +					.appendTo(layers),
 +				posterUrl = player.$media.attr('poster');
 +
 +			// prioriy goes to option (this is useful if you need to support iOS 3.x (iOS completely fails with poster)
 +			if (player.options.poster !== '') {
 +				posterUrl = player.options.poster;
- 			}	
- 				
++			}
++
 +			// second, try the real poster
 +			if (posterUrl !== '' && posterUrl != null) {
 +				t.setPoster(posterUrl);
 +			} else {
 +				poster.hide();
 +			}
 +
 +			media.addEventListener('play',function() {
 +				poster.hide();
 +			}, false);
++
++			if(player.options.showPosterWhenEnded && player.options.autoRewind){
++				media.addEventListener('ended',function() {
++					poster.show();
++				}, false);
++			}
 +		},
- 		
++
 +		setPoster: function(url) {
 +			var t = this,
 +				posterDiv = t.container.find('.mejs-poster'),
 +				posterImg = posterDiv.find('img');
- 				
++
 +			if (posterImg.length == 0) {
 +				posterImg = $('<img width="100%" height="100%" />').appendTo(posterDiv);
- 			}	
- 			
++			}
++
 +			posterImg.attr('src', url);
++			posterDiv.css({'background-image' : 'url(' + url + ')'});
 +		},
 +
 +		buildoverlays: function(player, controls, layers, media) {
 +            var t = this;
 +			if (!player.isVideo)
 +				return;
 +
- 			var 
- 			loading = 
++			var
++			loading =
 +				$('<div class="mejs-overlay mejs-layer">'+
 +					'<div class="mejs-overlay-loading"><span></span></div>'+
 +				'</div>')
 +				.hide() // start out hidden
 +				.appendTo(layers),
- 			error = 
++			error =
 +				$('<div class="mejs-overlay mejs-layer">'+
 +					'<div class="mejs-overlay-error"></div>'+
 +				'</div>')
 +				.hide() // start out hidden
 +				.appendTo(layers),
 +			// this needs to come last so it's on top
- 			bigPlay = 
++			bigPlay =
 +				$('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
 +					'<div class="mejs-overlay-button"></div>'+
 +				'</div>')
 +				.appendTo(layers)
- 				.click(function() {
-                     if (t.options.clickToPlayPause) {
-                         if (media.paused) {
-                             media.play();
-                         } else {
-                             media.pause();
-                         }
-                     }
++				.bind('click touchstart', function() {
++					if (t.options.clickToPlayPause) {
++						if (media.paused) {
++							t.play();
++						}
++					}
 +				});
- 			
++
 +			/*
 +			if (mejs.MediaFeatures.isiOS || mejs.MediaFeatures.isAndroid) {
 +				bigPlay.remove();
 +				loading.remove();
 +			}
 +			*/
- 	
++
 +
 +			// show/hide big play button
 +			media.addEventListener('play',function() {
 +				bigPlay.hide();
 +				loading.hide();
 +				controls.find('.mejs-time-buffering').hide();
 +				error.hide();
- 			}, false);	
- 			
++			}, false);
++
 +			media.addEventListener('playing', function() {
 +				bigPlay.hide();
 +				loading.hide();
 +				controls.find('.mejs-time-buffering').hide();
- 				error.hide();			
++				error.hide();
 +			}, false);
 +
 +			media.addEventListener('seeking', function() {
 +				loading.show();
 +				controls.find('.mejs-time-buffering').show();
 +			}, false);
 +
 +			media.addEventListener('seeked', function() {
 +				loading.hide();
 +				controls.find('.mejs-time-buffering').hide();
 +			}, false);
- 	
++
 +			media.addEventListener('pause',function() {
 +				if (!mejs.MediaFeatures.isiPhone) {
 +					bigPlay.show();
 +				}
 +			}, false);
- 			
++
 +			media.addEventListener('waiting', function() {
- 				loading.show();	
++				loading.show();
 +				controls.find('.mejs-time-buffering').show();
- 			}, false);			
- 			
- 			
- 			// show/hide loading			
++			}, false);
++
++
++			// show/hide loading
 +			media.addEventListener('loadeddata',function() {
 +				// for some reason Chrome is firing this event
 +				//if (mejs.MediaFeatures.isChrome && media.getAttribute && media.getAttribute('preload') === 'none')
 +				//	return;
- 					
++
 +				loading.show();
 +				controls.find('.mejs-time-buffering').show();
- 			}, false);	
++			}, false);
 +			media.addEventListener('canplay',function() {
 +				loading.hide();
 +				controls.find('.mejs-time-buffering').hide();
- 			}, false);	
++			}, false);
 +
 +			// error handling
 +			media.addEventListener('error',function() {
 +				loading.hide();
 +				controls.find('.mejs-time-buffering').hide();
 +				error.show();
 +				error.find('mejs-overlay-error').html("Error loading this resource");
- 			}, false);				
++			}, false);
 +		},
- 		
++
 +		buildkeyboard: function(player, controls, layers, media) {
 +
 +				var t = this;
- 				
++
 +				// listen for key presses
 +				t.globalBind('keydown', function(e) {
- 						
++
 +						if (player.hasFocus && player.options.enableKeyboard) {
- 										
++
 +								// find a matching key
 +								for (var i=0, il=player.options.keyActions.length; i<il; i++) {
 +										var keyAction = player.options.keyActions[i];
- 										
++
 +										for (var j=0, jl=keyAction.keys.length; j<jl; j++) {
 +												if (e.keyCode == keyAction.keys[j]) {
 +														e.preventDefault();
 +														keyAction.action(player, media, e.keyCode);
 +														return false;
- 												}												
++												}
 +										}
 +								}
 +						}
- 						
++
 +						return true;
 +				});
- 				
++
 +				// check if someone clicked outside a player region, then kill its focus
 +				t.globalBind('click', function(event) {
 +						if ($(event.target).closest('.mejs-container').length == 0) {
 +								player.hasFocus = false;
 +						}
 +				});
- 			
++
 +		},
 +
 +		findTracks: function() {
 +			var t = this,
 +				tracktags = t.$media.find('track');
 +
 +			// store for use by plugins
 +			t.tracks = [];
 +			tracktags.each(function(index, track) {
- 				
++
 +				track = $(track);
- 				
++
 +				t.tracks.push({
 +					srclang: (track.attr('srclang')) ? track.attr('srclang').toLowerCase() : '',
 +					src: track.attr('src'),
 +					kind: track.attr('kind'),
 +					label: track.attr('label') || '',
 +					entries: [],
 +					isLoaded: false
 +				});
 +			});
 +		},
 +		changeSkin: function(className) {
 +			this.container[0].className = 'mejs-container ' + className;
 +			this.setPlayerSize(this.width, this.height);
 +			this.setControlsSize();
 +		},
 +		play: function() {
++			this.load();
 +			this.media.play();
 +		},
 +		pause: function() {
- 			this.media.pause();
++			try {
++				this.media.pause();
++			} catch (e) {}
 +		},
 +		load: function() {
- 			this.media.load();
++			if (!this.isLoaded) {
++				this.media.load();
++			}
++
++			this.isLoaded = true;
 +		},
 +		setMuted: function(muted) {
 +			this.media.setMuted(muted);
 +		},
 +		setCurrentTime: function(time) {
 +			this.media.setCurrentTime(time);
 +		},
 +		getCurrentTime: function() {
 +			return this.media.currentTime;
 +		},
 +		setVolume: function(volume) {
 +			this.media.setVolume(volume);
 +		},
 +		getVolume: function() {
 +			return this.media.volume;
 +		},
 +		setSrc: function(src) {
 +			this.media.setSrc(src);
 +		},
 +		remove: function() {
 +			var t = this, featureIndex, feature;
- 			
++
 +			// invoke features cleanup
 +			for (featureIndex in t.options.features) {
 +				feature = t.options.features[featureIndex];
 +				if (t['clean' + feature]) {
 +					try {
 +						t['clean' + feature](t);
 +					} catch (e) {
 +						// TODO: report control error
 +						//throw e;
- 						//console.log('error building ' + feature);
- 						//console.log(e);
++						//
++						//
 +					}
 +				}
 +			}
 +
- 			if (t.media.pluginType === 'native') {
++			// grab video and put it back in place
++			if (!t.isDynamic) {
 +				t.$media.prop('controls', true);
++				// detach events from the video
++				// TODO: detach event listeners better than this;
++				//       also detach ONLY the events attached by this plugin!
++				t.$node.clone().show().insertBefore(t.container);
++				t.$node.remove();
 +			} else {
- 				t.media.remove();
++				t.$node.insertBefore(t.container);
 +			}
- 			
- 			// grab video and put it back in place
- 			if (!t.isDynamic) {
- 				if (t.media.pluginType === 'native') {
- 					// detach events from the video
- 					// TODO: detach event listeners better than this;
- 					//       also detach ONLY the events attached by this plugin!
- 					//t.$node.clone().insertBefore(t.container);
- 					//t.$node.remove();
- 				}
- 				/*else*/ t.$node.insertBefore(t.container)
++
++			if (t.media.pluginType !== 'native') {
++				t.media.remove();
 +			}
 +
 +			// Remove the player from the mejs.players object so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api.
 +			delete mejs.players[t.id];
- 			
++
 +			t.container.remove();
 +			t.globalUnbind();
 +			delete t.node.player;
 +		}
 +	};
 +
 +	(function(){
 +		var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
 +
 +		function splitEvents(events, id) {
 +			// add player ID as an event namespace so it's easier to unbind them all later
 +			var ret = {d: [], w: []};
 +			$.each((events || '').split(' '), function(k, v){
- 				ret[rwindow.test(v) ? 'w' : 'd'].push(v + '.' + id);
++				var eventname = v + '.' + id;
++				if (eventname.indexOf('.') === 0) {
++					ret.d.push(eventname);
++					ret.w.push(eventname);
++				}
++				else {
++					ret[rwindow.test(v) ? 'w' : 'd'].push(eventname);
++				}
 +			});
 +			ret.d = ret.d.join(' ');
 +			ret.w = ret.w.join(' ');
 +			return ret;
 +		}
 +
 +		mejs.MediaElementPlayer.prototype.globalBind = function(events, data, callback) {
 +			var t = this;
 +			events = splitEvents(events, t.id);
 +			if (events.d) $(document).bind(events.d, data, callback);
 +			if (events.w) $(window).bind(events.w, data, callback);
 +		};
 +
 +		mejs.MediaElementPlayer.prototype.globalUnbind = function(events, callback) {
 +			var t = this;
 +			events = splitEvents(events, t.id);
 +			if (events.d) $(document).unbind(events.d, callback);
 +			if (events.w) $(window).unbind(events.w, callback);
 +		};
 +	})();
 +
 +	// turn into jQuery plugin
 +	if (typeof jQuery != 'undefined') {
 +		jQuery.fn.mediaelementplayer = function (options) {
 +			if (options === false) {
 +				this.each(function () {
 +					var player = jQuery(this).data('mediaelementplayer');
 +					if (player) {
 +						player.remove();
 +					}
 +					jQuery(this).removeData('mediaelementplayer');
 +				});
 +			}
 +			else {
 +				this.each(function () {
 +					jQuery(this).data('mediaelementplayer', new mejs.MediaElementPlayer(this, options));
 +				});
 +			}
 +			return this;
 +		};
 +	}
- 	
++
 +	$(document).ready(function() {
 +		// auto enable using JSON attribute
 +		$('.mejs-player').mediaelementplayer();
 +	});
- 	
++
 +	// push out to window
 +	window.MediaElementPlayer = mejs.MediaElementPlayer;
 +
 +})(mejs.$);
 +
 +(function($) {
 +
 +	$.extend(mejs.MepDefaults, {
- 		playpauseText: 'Play/Pause'
++		playpauseText: mejs.i18n.t('Play/Pause')
 +	});
 +
 +	// PLAY/pause BUTTON
 +	$.extend(MediaElementPlayer.prototype, {
 +		buildplaypause: function(player, controls, layers, media) {
 +			var 
 +				t = this,
 +				play = 
 +				$('<div class="mejs-button mejs-playpause-button mejs-play" >' +
 +					'<button type="button" aria-controls="' + t.id + '" title="' + t.options.playpauseText + '" aria-label="' + t.options.playpauseText + '"></button>' +
 +				'</div>')
 +				.appendTo(controls)
 +				.click(function(e) {
 +					e.preventDefault();
 +				
 +					if (media.paused) {
 +						media.play();
 +					} else {
 +						media.pause();
 +					}
 +					
 +					return false;
 +				});
 +
 +			media.addEventListener('play',function() {
 +				play.removeClass('mejs-play').addClass('mejs-pause');
 +			}, false);
 +			media.addEventListener('playing',function() {
 +				play.removeClass('mejs-play').addClass('mejs-pause');
 +			}, false);
 +
 +
 +			media.addEventListener('pause',function() {
 +				play.removeClass('mejs-pause').addClass('mejs-play');
 +			}, false);
 +			media.addEventListener('paused',function() {
 +				play.removeClass('mejs-pause').addClass('mejs-play');
 +			}, false);
 +		}
 +	});
 +	
 +})(mejs.$);
 +
 +(function($) {
 +
 +	$.extend(mejs.MepDefaults, {
 +		stopText: 'Stop'
 +	});
 +
 +	// STOP BUTTON
 +	$.extend(MediaElementPlayer.prototype, {
 +		buildstop: function(player, controls, layers, media) {
 +			var t = this,
 +				stop = 
 +				$('<div class="mejs-button mejs-stop-button mejs-stop">' +
 +					'<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '" aria-label="' + t.options.stopText + '"></button>' +
 +				'</div>')
 +				.appendTo(controls)
 +				.click(function() {
 +					if (!media.paused) {
 +						media.pause();
 +					}
 +					if (media.currentTime > 0) {
 +						media.setCurrentTime(0);
 +                        media.pause();
 +						controls.find('.mejs-time-current').width('0px');
 +						controls.find('.mejs-time-handle').css('left', '0px');
 +						controls.find('.mejs-time-float-current').html( mejs.Utility.secondsToTimeCode(0) );
 +						controls.find('.mejs-currenttime').html( mejs.Utility.secondsToTimeCode(0) );					
 +						layers.find('.mejs-poster').show();
 +					}
 +				});
 +		}
 +	});
 +	
 +})(mejs.$);
 +
 +(function($) {
 +	// progress/loaded bar
 +	$.extend(MediaElementPlayer.prototype, {
 +		buildprogress: function(player, controls, layers, media) {
 +
 +			$('<div class="mejs-time-rail">'+
 +				'<span class="mejs-time-total">'+
 +					'<span class="mejs-time-buffering"></span>'+
 +					'<span class="mejs-time-loaded"></span>'+
 +					'<span class="mejs-time-current"></span>'+
 +					'<span class="mejs-time-handle"></span>'+
 +					'<span class="mejs-time-float">' + 
 +						'<span class="mejs-time-float-current">00:00</span>' + 
 +						'<span class="mejs-time-float-corner"></span>' + 
 +					'</span>'+
 +				'</span>'+
 +			'</div>')
 +				.appendTo(controls);
 +				controls.find('.mejs-time-buffering').hide();
 +
 +			var 
 +				t = this,
 +				total = controls.find('.mejs-time-total'),
 +				loaded  = controls.find('.mejs-time-loaded'),
 +				current  = controls.find('.mejs-time-current'),
 +				handle  = controls.find('.mejs-time-handle'),
 +				timefloat  = controls.find('.mejs-time-float'),
 +				timefloatcurrent  = controls.find('.mejs-time-float-current'),
 +				handleMouseMove = function (e) {
 +					// mouse position relative to the object
 +					var x = e.pageX,
 +						offset = total.offset(),
 +						width = total.outerWidth(true),
 +						percentage = 0,
 +						newTime = 0,
 +						pos = 0;
 +
 +
 +					if (media.duration) {
 +						if (x < offset.left) {
 +							x = offset.left;
 +						} else if (x > width + offset.left) {
 +							x = width + offset.left;
 +						}
 +						
 +						pos = x - offset.left;
 +						percentage = (pos / width);
 +						newTime = (percentage <= 0.02) ? 0 : percentage * media.duration;
 +
 +						// seek to where the mouse is
 +						if (mouseIsDown && newTime !== media.currentTime) {
 +							media.setCurrentTime(newTime);
 +						}
 +
 +						// position floating time box
 +						if (!mejs.MediaFeatures.hasTouch) {
 +								timefloat.css('left', pos);
 +								timefloatcurrent.html( mejs.Utility.secondsToTimeCode(newTime) );
 +								timefloat.show();
 +						}
 +					}
 +				},
 +				mouseIsDown = false,
 +				mouseIsOver = false;
 +
 +			// handle clicks
 +			//controls.find('.mejs-time-rail').delegate('span', 'click', handleMouseMove);
 +			total
 +				.bind('mousedown', function (e) {
 +					// only handle left clicks
 +					if (e.which === 1) {
 +						mouseIsDown = true;
 +						handleMouseMove(e);
 +						t.globalBind('mousemove.dur', function(e) {
 +							handleMouseMove(e);
 +						});
 +						t.globalBind('mouseup.dur', function (e) {
 +							mouseIsDown = false;
 +							timefloat.hide();
 +							t.globalUnbind('.dur');
 +						});
 +						return false;
 +					}
 +				})
 +				.bind('mouseenter', function(e) {
 +					mouseIsOver = true;
 +					t.globalBind('mousemove.dur', function(e) {
 +						handleMouseMove(e);
 +					});
 +					if (!mejs.MediaFeatures.hasTouch) {
 +						timefloat.show();
 +					}
 +				})
 +				.bind('mouseleave',function(e) {
 +					mouseIsOver = false;
 +					if (!mouseIsDown) {
 +						t.globalUnbind('.dur');
 +						timefloat.hide();
 +					}
 +				});
 +
 +			// loading
 +			media.addEventListener('progress', function (e) {
 +				player.setProgressRail(e);
 +				player.setCurrentRail(e);
 +			}, false);
 +
 +			// current time
 +			media.addEventListener('timeupdate', function(e) {
 +				player.setProgressRail(e);
 +				player.setCurrentRail(e);
 +			}, false);
 +			
 +			
 +			// store for later use
 +			t.loaded = loaded;
 +			t.total = total;
 +			t.current = current;
 +			t.handle = handle;
 +		},
 +		setProgressRail: function(e) {
 +
 +			var
 +				t = this,
 +				target = (e != undefined) ? e.target : t.media,
 +				percent = null;			
 +
 +			// newest HTML5 spec has buffered array (FF4, Webkit)
 +			if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && target.duration) {
 +				// TODO: account for a real array with multiple values (only Firefox 4 has this so far) 
 +				percent = target.buffered.end(0) / target.duration;
 +			} 
 +			// Some browsers (e.g., FF3.6 and Safari 5) cannot calculate target.bufferered.end()
 +			// to be anything other than 0. If the byte count is available we use this instead.
 +			// Browsers that support the else if do not seem to have the bufferedBytes value and
 +			// should skip to there. Tested in Safari 5, Webkit head, FF3.6, Chrome 6, IE 7/8.
 +			else if (target && target.bytesTotal != undefined && target.bytesTotal > 0 && target.bufferedBytes != undefined) {
 +				percent = target.bufferedBytes / target.bytesTotal;
 +			}
 +			// Firefox 3 with an Ogg file seems to go this way
 +			else if (e && e.lengthComputable && e.total != 0) {
 +				percent = e.loaded/e.total;
 +			}
 +
 +			// finally update the progress bar
 +			if (percent !== null) {
 +				percent = Math.min(1, Math.max(0, percent));
 +				// update loaded bar
 +				if (t.loaded && t.total) {
 +					t.loaded.width(t.total.width() * percent);
 +				}
 +			}
 +		},
 +		setCurrentRail: function() {
 +
 +			var t = this;
 +		
 +			if (t.media.currentTime != undefined && t.media.duration) {
 +
 +				// update bar and handle
 +				if (t.total && t.handle) {
 +					var 
 +						newWidth = Math.round(t.total.width() * t.media.currentTime / t.media.duration),
 +						handlePos = newWidth - Math.round(t.handle.outerWidth(true) / 2);
 +
 +					t.current.width(newWidth);
 +					t.handle.css('left', handlePos);
 +				}
 +			}
 +
 +		}	
 +	});
 +})(mejs.$);
 +
 +(function($) {
 +	
 +	// options
 +	$.extend(mejs.MepDefaults, {
 +		duration: -1,
- 		timeAndDurationSeparator: ' <span> | </span> '
++		timeAndDurationSeparator: '<span> | </span>'
 +	});
 +
 +
 +	// current and duration 00:00 / 00:00
 +	$.extend(MediaElementPlayer.prototype, {
 +		buildcurrent: function(player, controls, layers, media) {
 +			var t = this;
 +			
 +			$('<div class="mejs-time">'+
 +					'<span class="mejs-currenttime">' + (player.options.alwaysShowHours ? '00:' : '')
 +					+ (player.options.showTimecodeFrameCount? '00:00:00':'00:00')+ '</span>'+
 +					'</div>')
 +					.appendTo(controls);
 +			
 +			t.currenttime = t.controls.find('.mejs-currenttime');
 +
 +			media.addEventListener('timeupdate',function() {
 +				player.updateCurrent();
 +			}, false);
 +		},
 +
 +
 +		buildduration: function(player, controls, layers, media) {
 +			var t = this;
 +			
 +			if (controls.children().last().find('.mejs-currenttime').length > 0) {
 +				$(t.options.timeAndDurationSeparator +
 +					'<span class="mejs-duration">' + 
 +						(t.options.duration > 0 ? 
 +							mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount,  t.options.framesPerSecond || 25) :
 +				   			((player.options.alwaysShowHours ? '00:' : '') + (player.options.showTimecodeFrameCount? '00:00:00':'00:00')) 
 +				   		) + 
 +					'</span>')
 +					.appendTo(controls.find('.mejs-time'));
 +			} else {
 +
 +				// add class to current time
 +				controls.find('.mejs-currenttime').parent().addClass('mejs-currenttime-container');
 +				
 +				$('<div class="mejs-time mejs-duration-container">'+
 +					'<span class="mejs-duration">' + 
 +						(t.options.duration > 0 ? 
 +							mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount,  t.options.framesPerSecond || 25) :
 +				   			((player.options.alwaysShowHours ? '00:' : '') + (player.options.showTimecodeFrameCount? '00:00:00':'00:00')) 
 +				   		) + 
 +					'</span>' +
 +				'</div>')
 +				.appendTo(controls);
 +			}
 +			
 +			t.durationD = t.controls.find('.mejs-duration');
 +
 +			media.addEventListener('timeupdate',function() {
 +				player.updateDuration();
 +			}, false);
 +		},
 +		
 +		updateCurrent:  function() {
 +			var t = this;
 +
 +			if (t.currenttime) {
 +				t.currenttime.html(mejs.Utility.secondsToTimeCode(t.media.currentTime, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount,  t.options.framesPerSecond || 25));
 +			}
 +		},
 +		
 +		updateDuration: function() {
 +			var t = this;
 +
 +			//Toggle the long video class if the video is longer than an hour.
 +			t.container.toggleClass("mejs-long-video", t.media.duration > 3600);
 +			
 +			if (t.durationD && (t.options.duration > 0 || t.media.duration)) {
 +				t.durationD.html(mejs.Utility.secondsToTimeCode(t.options.duration > 0 ? t.options.duration : t.media.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25));
 +			}		
 +		}
 +	});
 +
 +})(mejs.$);
++
 +(function($) {
 +
 +	$.extend(mejs.MepDefaults, {
- 		muteText: 'Mute Toggle',
++		muteText: mejs.i18n.t('Mute Toggle'),
 +		hideVolumeOnTouchDevices: true,
 +		
 +		audioVolume: 'horizontal',
 +		videoVolume: 'vertical'
 +	});
 +
 +	$.extend(MediaElementPlayer.prototype, {
 +		buildvolume: function(player, controls, layers, media) {
 +				
 +			// Android and iOS don't support volume controls
 +			if (mejs.MediaFeatures.hasTouch && this.options.hideVolumeOnTouchDevices)
 +				return;
 +			
 +			var t = this,
 +				mode = (t.isVideo) ? t.options.videoVolume : t.options.audioVolume,
 +				mute = (mode == 'horizontal') ?
 +				
 +				// horizontal version
 +				$('<div class="mejs-button mejs-volume-button mejs-mute">'+
 +					'<button type="button" aria-controls="' + t.id + '" title="' + t.options.muteText + '" aria-label="' + t.options.muteText + '"></button>'+
 +				'</div>' +
 +				'<div class="mejs-horizontal-volume-slider">'+ // outer background
 +					'<div class="mejs-horizontal-volume-total"></div>'+ // line background
 +					'<div class="mejs-horizontal-volume-current"></div>'+ // current volume
 +					'<div class="mejs-horizontal-volume-handle"></div>'+ // handle
 +				'</div>'
 +				)
 +					.appendTo(controls) :
 +				
 +				// vertical version
 +				$('<div class="mejs-button mejs-volume-button mejs-mute">'+
 +					'<button type="button" aria-controls="' + t.id + '" title="' + t.options.muteText + '" aria-label="' + t.options.muteText + '"></button>'+
 +					'<div class="mejs-volume-slider">'+ // outer background
 +						'<div class="mejs-volume-total"></div>'+ // line background
 +						'<div class="mejs-volume-current"></div>'+ // current volume
 +						'<div class="mejs-volume-handle"></div>'+ // handle
 +					'</div>'+
 +				'</div>')
 +					.appendTo(controls),
 +			volumeSlider = t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'),
 +			volumeTotal = t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'),
 +			volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
 +			volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
 +
 +			positionVolumeHandle = function(volume, secondTry) {
 +
 +				if (!volumeSlider.is(':visible') && typeof secondTry == 'undefined') {
 +					volumeSlider.show();
 +					positionVolumeHandle(volume, true);
 +					volumeSlider.hide()
 +					return;
 +				}
 +			
 +				// correct to 0-1
 +				volume = Math.max(0,volume);
 +				volume = Math.min(volume,1);					
 +				
 +				// ajust mute button style
 +				if (volume == 0) {
 +					mute.removeClass('mejs-mute').addClass('mejs-unmute');
 +				} else {
 +					mute.removeClass('mejs-unmute').addClass('mejs-mute');
 +				}				
 +
 +				// position slider 
 +				if (mode == 'vertical') {
 +					var 
 +					
 +						// height of the full size volume slider background
 +						totalHeight = volumeTotal.height(),
 +						
 +						// top/left of full size volume slider background
 +						totalPosition = volumeTotal.position(),
 +						
 +						// the new top position based on the current volume
 +						// 70% volume on 100px height == top:30px
 +						newTop = totalHeight - (totalHeight * volume);
 +	
 +					// handle
 +					volumeHandle.css('top', Math.round(totalPosition.top + newTop - (volumeHandle.height() / 2)));
 +	
 +					// show the current visibility
 +					volumeCurrent.height(totalHeight - newTop );
 +					volumeCurrent.css('top', totalPosition.top + newTop);
 +				} else {
 +					var 
 +					
 +						// height of the full size volume slider background
 +						totalWidth = volumeTotal.width(),
 +						
 +						// top/left of full size volume slider background
 +						totalPosition = volumeTotal.position(),
 +						
 +						// the new left position based on the current volume
 +						newLeft = totalWidth * volume;
 +	
 +					// handle
 +					volumeHandle.css('left', Math.round(totalPosition.left + newLeft - (volumeHandle.width() / 2)));
 +	
 +					// rezize the current part of the volume bar
 +					volumeCurrent.width( Math.round(newLeft) );
 +				}
 +			},
 +			handleVolumeMove = function(e) {
 +				
 +				var volume = null,
 +					totalOffset = volumeTotal.offset();
 +				
 +				// calculate the new volume based on the moust position
 +				if (mode == 'vertical') {
 +				
 +					var
 +						railHeight = volumeTotal.height(),
 +						totalTop = parseInt(volumeTotal.css('top').replace(/px/,''),10),
 +						newY = e.pageY - totalOffset.top;
 +						
 +					volume = (railHeight - newY) / railHeight;
 +						
 +					// the controls just hide themselves (usually when mouse moves too far up)
 +					if (totalOffset.top == 0 || totalOffset.left == 0)
 +						return;
 +					
 +				} else {
 +					var
 +						railWidth = volumeTotal.width(),
 +						newX = e.pageX - totalOffset.left;
 +						
 +					volume = newX / railWidth;
 +				}
 +				
 +				// ensure the volume isn't outside 0-1
 +				volume = Math.max(0,volume);
 +				volume = Math.min(volume,1);
 +				
 +				// position the slider and handle			
 +				positionVolumeHandle(volume);
 +				
 +				// set the media object (this will trigger the volumechanged event)
 +				if (volume == 0) {
 +					media.setMuted(true);
 +				} else {
 +					media.setMuted(false);
 +				}
 +				media.setVolume(volume);			
 +			},
 +			mouseIsDown = false,
 +			mouseIsOver = false;
 +
 +			// SLIDER
 +			
 +			mute
 +				.hover(function() {
 +					volumeSlider.show();
 +					mouseIsOver = true;
 +				}, function() {
 +					mouseIsOver = false;	
 +						
 +					if (!mouseIsDown && mode == 'vertical')	{
 +						volumeSlider.hide();
 +					}
 +				});
 +			
 +			volumeSlider
 +				.bind('mouseover', function() {
 +					mouseIsOver = true;	
 +				})
 +				.bind('mousedown', function (e) {
 +					handleVolumeMove(e);
 +					t.globalBind('mousemove.vol', function(e) {
 +						handleVolumeMove(e);
 +					});
 +					t.globalBind('mouseup.vol', function () {
 +						mouseIsDown = false;
 +						t.globalUnbind('.vol');
 +
 +						if (!mouseIsOver && mode == 'vertical') {
 +							volumeSlider.hide();
 +						}
 +					});
 +					mouseIsDown = true;
 +						
 +					return false;
 +				});
 +
 +
 +			// MUTE button
 +			mute.find('button').click(function() {
 +				media.setMuted( !media.muted );
 +			});
 +
 +			// listen for volume change events from other sources
 +			media.addEventListener('volumechange', function(e) {
 +				if (!mouseIsDown) {
 +					if (media.muted) {
 +						positionVolumeHandle(0);
 +						mute.removeClass('mejs-mute').addClass('mejs-unmute');
 +					} else {
 +						positionVolumeHandle(media.volume);
 +						mute.removeClass('mejs-unmute').addClass('mejs-mute');
 +					}
 +				}
 +			}, false);
 +
 +			if (t.container.is(':visible')) {
 +				// set initial volume
 +				positionVolumeHandle(player.options.startVolume);
 +
 +				// mutes the media and sets the volume icon muted if the initial volume is set to 0
 +        if (player.options.startVolume === 0) {
 +          media.setMuted(true);
 +        }
 +
 +				// shim gets the startvolume as a parameter, but we have to set it on the native <video> and <audio> elements
 +				if (media.pluginType === 'native') {
 +					media.setVolume(player.options.startVolume);
 +				}
 +			}
 +		}
 +	});
 +	
 +})(mejs.$);
 +
 +(function($) {
 +
 +	$.extend(mejs.MepDefaults, {
 +		usePluginFullScreen: true,
 +		newWindowCallback: function() { return '';},
 +		fullscreenText: mejs.i18n.t('Fullscreen')
 +	});
 +
 +	$.extend(MediaElementPlayer.prototype, {
 +
 +		isFullScreen: false,
 +
 +		isNativeFullScreen: false,
 +
- 		docStyleOverflow: null,
- 
 +		isInIframe: false,
 +
 +		buildfullscreen: function(player, controls, layers, media) {
 +
 +			if (!player.isVideo)
 +				return;
 +
 +			player.isInIframe = (window.location != window.parent.location);
 +
 +			// native events
 +			if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
 +
 +				// chrome doesn't alays fire this in an iframe
 +				var func = function(e) {
- 
- 					if (mejs.MediaFeatures.isFullScreen()) {
- 						player.isNativeFullScreen = true;
- 						// reset the controls once we are fully in full screen
- 						player.setControlsSize();
- 					} else {
- 						player.isNativeFullScreen = false;
- 						// when a user presses ESC
- 						// make sure to put the player back into place
- 						player.exitFullScreen();
++					if (player.isFullScreen) {
++						if (mejs.MediaFeatures.isFullScreen()) {
++							player.isNativeFullScreen = true;
++							// reset the controls once we are fully in full screen
++							player.setControlsSize();
++						} else {
++							player.isNativeFullScreen = false;
++							// when a user presses ESC
++							// make sure to put the player back into place
++							player.exitFullScreen();
++						}
 +					}
 +				};
 +
 +				if (mejs.MediaFeatures.hasMozNativeFullScreen) {
 +					player.globalBind(mejs.MediaFeatures.fullScreenEventName, func);
 +				} else {
 +					player.container.bind(mejs.MediaFeatures.fullScreenEventName, func);
 +				}
 +			}
 +
 +			var t = this,
 +				normalHeight = 0,
 +				normalWidth = 0,
 +				container = player.container,
 +				fullscreenBtn =
 +					$('<div class="mejs-button mejs-fullscreen-button">' +
 +						'<button type="button" aria-controls="' + t.id + '" title="' + t.options.fullscreenText + '" aria-label="' + t.options.fullscreenText + '"></button>' +
 +					'</div>')
 +					.appendTo(controls);
 +
 +				if (t.media.pluginType === 'native' || (!t.options.usePluginFullScreen && !mejs.MediaFeatures.isFirefox)) {
 +
 +					fullscreenBtn.click(function() {
 +						var isFullScreen = (mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || player.isFullScreen;
 +
 +						if (isFullScreen) {
 +							player.exitFullScreen();
 +						} else {
 +							player.enterFullScreen();
 +						}
 +					});
 +
 +				} else {
 +
 +					var hideTimeout = null,
 +						supportsPointerEvents = (function() {
 +							// TAKEN FROM MODERNIZR
 +							var element = document.createElement('x'),
 +								documentElement = document.documentElement,
 +								getComputedStyle = window.getComputedStyle,
 +								supports;
 +							if(!('pointerEvents' in element.style)){
 +								return false;
 +							}
 +							element.style.pointerEvents = 'auto';
 +							element.style.pointerEvents = 'x';
 +							documentElement.appendChild(element);
 +							supports = getComputedStyle &&
 +								getComputedStyle(element, '').pointerEvents === 'auto';
 +							documentElement.removeChild(element);
 +							return !!supports;
 +						})();
 +
- 					//console.log('supportsPointerEvents', supportsPointerEvents);
++					//
 +
 +					if (supportsPointerEvents && !mejs.MediaFeatures.isOpera) { // opera doesn't allow this :(
 +
 +						// allows clicking through the fullscreen button and controls down directly to Flash
 +
 +						/*
 +						 When a user puts his mouse over the fullscreen button, the controls are disabled
 +						 So we put a div over the video and another one on iether side of the fullscreen button
 +						 that caputre mouse movement
 +						 and restore the controls once the mouse moves outside of the fullscreen button
 +						*/
 +
 +						var fullscreenIsDisabled = false,
 +							restoreControls = function() {
 +								if (fullscreenIsDisabled) {
 +									// hide the hovers
 +									for (var i in hoverDivs) {
 +										hoverDivs[i].hide();
 +									}
 +
 +									// restore the control bar
 +									fullscreenBtn.css('pointer-events', '');
 +									t.controls.css('pointer-events', '');
 +
++									// prevent clicks from pausing video
++									t.media.removeEventListener('click', t.clickToPlayPauseCallback);
++
 +									// store for later
 +									fullscreenIsDisabled = false;
 +								}
 +							},
 +							hoverDivs = {},
 +							hoverDivNames = ['top', 'left', 'right', 'bottom'],
 +							i, len,
 +							positionHoverDivs = function() {
 +								var fullScreenBtnOffsetLeft = fullscreenBtn.offset().left - t.container.offset().left,
 +									fullScreenBtnOffsetTop = fullscreenBtn.offset().top - t.container.offset().top,
 +									fullScreenBtnWidth = fullscreenBtn.outerWidth(true),
 +									fullScreenBtnHeight = fullscreenBtn.outerHeight(true),
 +									containerWidth = t.container.width(),
 +									containerHeight = t.container.height();
 +
- 							  for (i in hoverDivs) {
++								for (i in hoverDivs) {
 +									hoverDivs[i].css({position: 'absolute', top: 0, left: 0}); //, backgroundColor: '#f00'});
 +								}
 +
 +								// over video, but not controls
 +								hoverDivs['top']
 +									.width( containerWidth )
 +									.height( fullScreenBtnOffsetTop );
 +
 +								// over controls, but not the fullscreen button
 +								hoverDivs['left']
 +									.width( fullScreenBtnOffsetLeft )
 +									.height( fullScreenBtnHeight )
 +									.css({top: fullScreenBtnOffsetTop});
 +
 +								// after the fullscreen button
 +								hoverDivs['right']
 +									.width( containerWidth - fullScreenBtnOffsetLeft - fullScreenBtnWidth )
 +									.height( fullScreenBtnHeight )
 +									.css({top: fullScreenBtnOffsetTop,
 +										 left: fullScreenBtnOffsetLeft + fullScreenBtnWidth});
 +
 +								// under the fullscreen button
 +								hoverDivs['bottom']
 +									.width( containerWidth )
 +									.height( containerHeight - fullScreenBtnHeight - fullScreenBtnOffsetTop )
 +									.css({top: fullScreenBtnOffsetTop + fullScreenBtnHeight});
 +							};
 +
 +						t.globalBind('resize', function() {
 +							positionHoverDivs();
 +						});
 +
- 						for (i = 0, len = hoverDivNames.length; i < len; i += 1) {
++						for (i = 0, len = hoverDivNames.length; i < len; i++) {
 +							hoverDivs[hoverDivNames[i]] = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls).hide();
 +						}
 +
 +						// on hover, kill the fullscreen button's HTML handling, allowing clicks down to Flash
- 						fullscreenBtn
- 							.mouseover(function() {
++						fullscreenBtn.on('mouseover',function() {
 +
- 								if (!t.isFullScreen) {
++							if (!t.isFullScreen) {
 +
- 									var buttonPos = fullscreenBtn.offset(),
- 										containerPos = player.container.offset();
++								var buttonPos = fullscreenBtn.offset(),
++									containerPos = player.container.offset();
 +
- 									// move the button in Flash into place
- 									media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
++								// move the button in Flash into place
++								media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
 +
- 									// allows click through
- 									fullscreenBtn.css('pointer-events', 'none');
- 									t.controls.css('pointer-events', 'none');
++								// allows click through
++								fullscreenBtn.css('pointer-events', 'none');
++								t.controls.css('pointer-events', 'none');
 +
- 									// show the divs that will restore things
- 								  for (i in hoverDivs) {
- 										hoverDivs[i].show();
- 									}
- 									positionHoverDivs();
++								// restore click-to-play
++								t.media.addEventListener('click', t.clickToPlayPauseCallback);
 +
- 									fullscreenIsDisabled = true;
++								// show the divs that will restore things
++								for (i in hoverDivs) {
++									hoverDivs[i].show();
 +								}
 +
- 							});
++								positionHoverDivs();
++
++								fullscreenIsDisabled = true;
++							}
++
++						});
 +
 +						// restore controls anytime the user enters or leaves fullscreen
 +						media.addEventListener('fullscreenchange', function(e) {
++							t.isFullScreen = !t.isFullScreen;
++							// don't allow plugin click to pause video - messes with
++							// plugin's controls
++							if (t.isFullScreen) {
++								t.media.removeEventListener('click', t.clickToPlayPauseCallback);
++							} else {
++								t.media.addEventListener('click', t.clickToPlayPauseCallback);
++							}
 +							restoreControls();
 +						});
 +
 +
 +						// the mouseout event doesn't work on the fullscren button, because we already killed the pointer-events
 +						// so we use the document.mousemove event to restore controls when the mouse moves outside the fullscreen button
- 						/*
++
 +						t.globalBind('mousemove', function(e) {
 +
 +							// if the mouse is anywhere but the fullsceen button, then restore it all
 +							if (fullscreenIsDisabled) {
 +
 +								var fullscreenBtnPos = fullscreenBtn.offset();
 +
 +
 +								if (e.pageY < fullscreenBtnPos.top || e.pageY > fullscreenBtnPos.top + fullscreenBtn.outerHeight(true) ||
 +									e.pageX < fullscreenBtnPos.left || e.pageX > fullscreenBtnPos.left + fullscreenBtn.outerWidth(true)
 +									) {
 +
 +									fullscreenBtn.css('pointer-events', '');
 +									t.controls.css('pointer-events', '');
 +
 +									fullscreenIsDisabled = false;
 +								}
 +							}
 +						});
- 						*/
++
 +
 +
 +					} else {
 +
 +						// the hover state will show the fullscreen button in Flash to hover up and click
 +
 +						fullscreenBtn
- 							.mouseover(function() {
++							.on('mouseover', function() {
 +
 +								if (hideTimeout !== null) {
 +									clearTimeout(hideTimeout);
 +									delete hideTimeout;
 +								}
 +
 +								var buttonPos = fullscreenBtn.offset(),
 +									containerPos = player.container.offset();
 +
 +								media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, true);
 +
 +							})
- 							.mouseout(function() {
++							.on('mouseout', function() {
 +
 +								if (hideTimeout !== null) {
 +									clearTimeout(hideTimeout);
 +									delete hideTimeout;
 +								}
 +
 +								hideTimeout = setTimeout(function() {
 +									media.hideFullscreenButton();
 +								}, 1500);
 +
 +
 +							});
 +					}
 +				}
 +
 +			player.fullscreenBtn = fullscreenBtn;
 +
 +			t.globalBind('keydown',function (e) {
 +				if (((mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || t.isFullScreen) && e.keyCode == 27) {
 +					player.exitFullScreen();
 +				}
 +			});
 +
 +		},
 +
 +		cleanfullscreen: function(player) {
 +			player.exitFullScreen();
 +		},
 +
 +        containerSizeTimeout: null,
 +
 +		enterFullScreen: function() {
 +
 +			var t = this;
 +
 +			// firefox+flash can't adjust plugin sizes without resetting :(
 +			if (t.media.pluginType !== 'native' && (mejs.MediaFeatures.isFirefox || t.options.usePluginFullScreen)) {
 +				//t.media.setFullscreen(true);
 +				//player.isFullScreen = true;
 +				return;
 +			}
 +
- 			// store overflow
- 			docStyleOverflow = document.documentElement.style.overflow;
 +			// set it to not show scroll bars so 100% will work
- 			document.documentElement.style.overflow = 'hidden';
++            $(document.documentElement).addClass('mejs-fullscreen');
 +
 +			// store sizing
 +			normalHeight = t.container.height();
 +			normalWidth = t.container.width();
 +
 +			// attempt to do true fullscreen (Safari 5.1 and Firefox Nightly only for now)
 +			if (t.media.pluginType === 'native') {
 +				if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
 +
 +					mejs.MediaFeatures.requestFullScreen(t.container[0]);
 +					//return;
 +
 +					if (t.isInIframe) {
 +						// sometimes exiting from fullscreen doesn't work
 +						// notably in Chrome <iframe>. Fixed in version 17
 +						setTimeout(function checkFullscreen() {
 +
 +							if (t.isNativeFullScreen) {
 +
 +								// check if the video is suddenly not really fullscreen
 +								if ($(window).width() !== screen.width) {
 +									// manually exit
 +									t.exitFullScreen();
 +								} else {
 +									// test again
 +									setTimeout(checkFullscreen, 500);
 +								}
 +							}
 +
 +
 +						}, 500);
 +					}
 +
 +				} else if (mejs.MediaFeatures.hasSemiNativeFullScreen) {
 +					t.media.webkitEnterFullscreen();
 +					return;
 +				}
 +			}
 +
 +			// check for iframe launch
 +			if (t.isInIframe) {
 +				var url = t.options.newWindowCallback(this);
 +
 +
 +				if (url !== '') {
 +
 +					// launch immediately
 +					if (!mejs.MediaFeatures.hasTrueNativeFullScreen) {
 +						t.pause();
 +						window.open(url, t.id, 'top=0,left=0,width=' + screen.availWidth + ',height=' + screen.availHeight + ',resizable=yes,scrollbars=no,status=no,toolbar=no');
 +						return;
 +					} else {
 +						setTimeout(function() {
 +							if (!t.isNativeFullScreen) {
 +								t.pause();
 +								window.open(url, t.id, 'top=0,left=0,width=' + screen.availWidth + ',height=' + screen.availHeight + ',resizable=yes,scrollbars=no,status=no,toolbar=no');
 +							}
 +						}, 250);
 +					}
 +				}
 +
 +			}
 +
 +			// full window code
 +
 +
 +
 +			// make full size
 +			t.container
 +				.addClass('mejs-container-fullscreen')
 +				.width('100%')
 +				.height('100%');
 +				//.css({position: 'fixed', left: 0, top: 0, right: 0, bottom: 0, overflow: 'hidden', width: '100%', height: '100%', 'z-index': 1000});
 +
 +			// Only needed for safari 5.1 native full screen, can cause display issues elsewhere
 +			// Actually, it seems to be needed for IE8, too
 +			//if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
 +				t.containerSizeTimeout = setTimeout(function() {
 +					t.container.css({width: '100%', height: '100%'});
 +					t.setControlsSize();
 +				}, 500);
 +			//}
 +
- 			if (t.pluginType === 'native') {
++			if (t.media.pluginType === 'native') {
 +				t.$media
 +					.width('100%')
 +					.height('100%');
 +			} else {
 +				t.container.find('.mejs-shim')
 +					.width('100%')
 +					.height('100%');
 +
 +				//if (!mejs.MediaFeatures.hasTrueNativeFullScreen) {
 +					t.media.setVideoSize($(window).width(),$(window).height());
 +				//}
 +			}
 +
 +			t.layers.children('div')
 +				.width('100%')
 +				.height('100%');
 +
 +			if (t.fullscreenBtn) {
 +				t.fullscreenBtn
 +					.removeClass('mejs-fullscreen')
 +					.addClass('mejs-unfullscreen');
 +			}
 +
 +			t.setControlsSize();
 +			t.isFullScreen = true;
 +		},
 +
 +		exitFullScreen: function() {
 +
 +			var t = this;
 +
 +            // Prevent container from attempting to stretch a second time
 +            clearTimeout(t.containerSizeTimeout);
 +
 +			// firefox can't adjust plugins
 +			if (t.media.pluginType !== 'native' && mejs.MediaFeatures.isFirefox) {
 +				t.media.setFullscreen(false);
 +				//player.isFullScreen = false;
 +				return;
 +			}
 +
 +			// come outo of native fullscreen
 +			if (mejs.MediaFeatures.hasTrueNativeFullScreen && (mejs.MediaFeatures.isFullScreen() || t.isFullScreen)) {
 +				mejs.MediaFeatures.cancelFullScreen();
 +			}
 +
 +			// restore scroll bars to document
- 			document.documentElement.style.overflow = docStyleOverflow;
++            $(document.documentElement).removeClass('mejs-fullscreen');
 +
 +			t.container
 +				.removeClass('mejs-container-fullscreen')
 +				.width(normalWidth)
 +				.height(normalHeight);
 +				//.css({position: '', left: '', top: '', right: '', bottom: '', overflow: 'inherit', width: normalWidth + 'px', height: normalHeight + 'px', 'z-index': 1});
 +
- 			if (t.pluginType === 'native') {
++			if (t.media.pluginType === 'native') {
 +				t.$media
 +					.width(normalWidth)
 +					.height(normalHeight);
 +			} else {
- 				t.container.find('object embed')
++				t.container.find('.mejs-shim')
 +					.width(normalWidth)
 +					.height(normalHeight);
 +
 +				t.media.setVideoSize(normalWidth, normalHeight);
 +			}
 +
 +			t.layers.children('div')
 +				.width(normalWidth)
 +				.height(normalHeight);
 +
 +			t.fullscreenBtn
 +				.removeClass('mejs-unfullscreen')
 +				.addClass('mejs-fullscreen');
 +
 +			t.setControlsSize();
 +			t.isFullScreen = false;
 +		}
 +	});
 +
 +})(mejs.$);
 +
 +(function($) {
 +
 +	// add extra default options 
 +	$.extend(mejs.MepDefaults, {
 +		// this will automatically turn on a <track>
 +		startLanguage: '',
 +
- 		tracksText: 'Captions/Subtitles',
++		tracksText: mejs.i18n.t('Captions/Subtitles'),
 +		
 +		// option to remove the [cc] button when no <track kind="subtitles"> are present
 +		hideCaptionsButtonWhenEmpty: true,
 +
 +		// If true and we only have one track, change captions to popup
 +		toggleCaptionsButtonWhenOnlyOne: false,
 +
 +		// #id or .class		
 +		slidesSelector: ''
 +	});
 +
 +	$.extend(MediaElementPlayer.prototype, {
 +	
 +		hasChapters: false,
 +
 +		buildtracks: function(player, controls, layers, media) {
 +			if (player.tracks.length == 0)
 +				return;
 +
 +			var t = this, 
 +				i, 
 +				options = '';
 +
++			if (t.domNode.textTracks) { // if browser will do native captions, prefer mejs captions, loop through tracks and hide
++				for (var i = t.domNode.textTracks.length - 1; i >= 0; i--) {
++					t.domNode.textTracks[i].mode = "hidden";
++				}
++			}
 +			player.chapters = 
 +					$('<div class="mejs-chapters mejs-layer"></div>')
 +						.prependTo(layers).hide();
 +			player.captions = 
 +					$('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>')
 +						.prependTo(layers).hide();
 +			player.captionsText = player.captions.find('.mejs-captions-text');
 +			player.captionsButton = 
 +					$('<div class="mejs-button mejs-captions-button">'+
 +						'<button type="button" aria-controls="' + t.id + '" title="' + t.options.tracksText + '" aria-label="' + t.options.tracksText + '"></button>'+
 +						'<div class="mejs-captions-selector">'+
 +							'<ul>'+
 +								'<li>'+
 +									'<input type="radio" name="' + player.id + '_captions" id="' + player.id + '_captions_none" value="none" checked="checked" />' +
- 									'<label for="' + player.id + '_captions_none">None</label>'+
++									'<label for="' + player.id + '_captions_none">' + mejs.i18n.t('None') +'</label>'+
 +								'</li>'	+
 +							'</ul>'+
 +						'</div>'+
 +					'</div>')
 +						.appendTo(controls);
 +			
 +						
 +			var subtitleCount = 0;
 +			for (i=0; i<player.tracks.length; i++) {
 +				if (player.tracks[i].kind == 'subtitles') {
 +					subtitleCount++;
 +				}
 +			}
 +
 +			// if only one language then just make the button a toggle
 +			if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount == 1){
 +				// click
 +				player.captionsButton.on('click',function() {
 +					if (player.selectedTrack == null) {
 +						var lang = player.tracks[0].srclang;
 +					} else {
 +						var lang = 'none';
 +					}
 +					player.setTrack(lang);
 +				});
 +			} else {
 +				// hover
 +				player.captionsButton.hover(function() {
 +					$(this).find('.mejs-captions-selector').css('visibility','visible');
 +				}, function() {
 +					$(this).find('.mejs-captions-selector').css('visibility','hidden');
 +				})
 +
 +				// handle clicks to the language radio buttons
 +				.on('click','input[type=radio]',function() {
 +					lang = this.value;
 +					player.setTrack(lang);
 +				});
 +
 +			}
 +
 +			if (!player.options.alwaysShowControls) {
 +				// move with controls
 +				player.container
 +					.bind('controlsshown', function () {
 +						// push captions above controls
 +						player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
 +
 +					})
 +					.bind('controlshidden', function () {
 +						if (!media.paused) {
 +							// move back to normal place
 +							player.container.find('.mejs-captions-position').removeClass('mejs-captions-position-hover');
 +						}
 +					});
 +			} else {
 +				player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
 +			}
 +
 +			player.trackToLoad = -1;
 +			player.selectedTrack = null;
 +			player.isLoadingTrack = false;
 +
 +			
 +
 +			// add to list
 +			for (i=0; i<player.tracks.length; i++) {
 +				if (player.tracks[i].kind == 'subtitles') {
 +					player.addTrackButton(player.tracks[i].srclang, player.tracks[i].label);
 +				}
 +			}
 +
 +			// start loading tracks
 +			player.loadNextTrack();
 +
 +
 +			media.addEventListener('timeupdate',function(e) {
 +				player.displayCaptions();
 +			}, false);
 +			
 +			if (player.options.slidesSelector != '') {
 +				player.slidesContainer = $(player.options.slidesSelector);
 +
 +				media.addEventListener('timeupdate',function(e) {
 +					player.displaySlides();	
 +				}, false);
 +			
 +			}
 +
 +			media.addEventListener('loadedmetadata', function(e) {
 +				player.displayChapters();
 +			}, false);
 +
 +			player.container.hover(
 +				function () {
 +					// chapters
 +					if (player.hasChapters) {
 +						player.chapters.css('visibility','visible');
 +						player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight());
 +					}
 +				},
 +				function () {
 +					if (player.hasChapters && !media.paused) {
 +						player.chapters.fadeOut(200, function() {
 +							$(this).css('visibility','hidden');
 +							$(this).css('display','block');
 +						});
 +					}
 +				});
 +				
 +			// check for autoplay
 +			if (player.node.getAttribute('autoplay') !== null) {
 +				player.chapters.css('visibility','hidden');
 +			}
 +		},
 +		
 +		setTrack: function(lang){
 +		
 +			var t = this,
 +				i;
 +		
 +			if (lang == 'none') {
 +				t.selectedTrack = null;
 +				t.captionsButton.removeClass('mejs-captions-enabled');
 +			} else {
 +				for (i=0; i<t.tracks.length; i++) {
 +					if (t.tracks[i].srclang == lang) {
 +						if (t.selectedTrack == null)
 +						    t.captionsButton.addClass('mejs-captions-enabled');
 +						t.selectedTrack = t.tracks[i];
 +						t.captions.attr('lang', t.selectedTrack.srclang);
 +						t.displayCaptions();
 +						break;
 +					}
 +				}
 +			}
 +		},
 +
 +		loadNextTrack: function() {
 +			var t = this;
 +
 +			t.trackToLoad++;
 +			if (t.trackToLoad < t.tracks.length) {
 +				t.isLoadingTrack = true;
 +				t.loadTrack(t.trackToLoad);
 +			} else {
 +				// add done?
 +				t.isLoadingTrack = false;
 +				
 +				t.checkForTracks();	
 +			}
 +		},
 +
 +		loadTrack: function(index){
 +			var
 +				t = this,
 +				track = t.tracks[index],
 +				after = function() {
 +
 +					track.isLoaded = true;
 +
 +					// create button
 +					//t.addTrackButton(track.srclang);
 +					t.enableTrackButton(track.srclang, track.label);
 +
 +					t.loadNextTrack();
 +
 +				};
 +
 +
 +			$.ajax({
 +				url: track.src,
 +				dataType: "text",
 +				success: function(d) {
 +
 +					// parse the loaded file
 +					if (typeof d == "string" && (/<tt\s+xml/ig).exec(d)) {
 +						track.entries = mejs.TrackFormatParser.dfxp.parse(d);					
 +					} else {	
 +						track.entries = mejs.TrackFormatParser.webvvt.parse(d);
 +					}
 +					
 +					after();
 +
 +					if (track.kind == 'chapters') {
 +						t.media.addEventListener('play', function(e) {
 +							if (t.media.duration > 0) {
 +								t.displayChapters(track);
 +							}
 +						}, false);
 +					}
 +					
 +					if (track.kind == 'slides') {
 +						t.setupSlides(track);
 +					}					
 +				},
 +				error: function() {
 +					t.loadNextTrack();
 +				}
 +			});
 +		},
 +
 +		enableTrackButton: function(lang, label) {
 +			var t = this;
 +			
 +			if (label === '') {
 +				label = mejs.language.codes[lang] || lang;
 +			}			
 +
 +			t.captionsButton
 +				.find('input[value=' + lang + ']')
 +					.prop('disabled',false)
 +				.siblings('label')
 +					.html( label );
 +
 +			// auto select
 +			if (t.options.startLanguage == lang) {
 +				$('#' + t.id + '_captions_' + lang).click();
 +			}
 +
 +			t.adjustLanguageBox();
 +		},
 +
 +		addTrackButton: function(lang, label) {
 +			var t = this;
 +			if (label === '') {
 +				label = mejs.language.codes[lang] || lang;
 +			}
 +
 +			t.captionsButton.find('ul').append(
 +				$('<li>'+
 +					'<input type="radio" name="' + t.id + '_captions" id="' + t.id + '_captions_' + lang + '" value="' + lang + '" disabled="disabled" />' +
 +					'<label for="' + t.id + '_captions_' + lang + '">' + label + ' (loading)' + '</label>'+
 +				'</li>')
 +			);
 +
 +			t.adjustLanguageBox();
 +
 +			// remove this from the dropdownlist (if it exists)
 +			t.container.find('.mejs-captions-translations option[value=' + lang + ']').remove();
 +		},
 +
 +		adjustLanguageBox:function() {
 +			var t = this;
 +			// adjust the size of the outer box
 +			t.captionsButton.find('.mejs-captions-selector').height(
 +				t.captionsButton.find('.mejs-captions-selector ul').outerHeight(true) +
 +				t.captionsButton.find('.mejs-captions-translations').outerHeight(true)
 +			);
 +		},
 +		
 +		checkForTracks: function() {
 +			var
 +				t = this,
 +				hasSubtitles = false;
 +			
 +			// check if any subtitles
 +			if (t.options.hideCaptionsButtonWhenEmpty) {
 +				for (i=0; i<t.tracks.length; i++) {
 +					if (t.tracks[i].kind == 'subtitles') {
 +						hasSubtitles = true;
 +						break;
 +					}
 +				}	
 +					
 +				if (!hasSubtitles) {
 +					t.captionsButton.hide();
 +					t.setControlsSize();
 +				}													
 +			}		
 +		},
 +
 +		displayCaptions: function() {
 +
 +			if (typeof this.tracks == 'undefined')
 +				return;
 +
 +			var
 +				t = this,
 +				i,
 +				track = t.selectedTrack;
 +
 +			if (track != null && track.isLoaded) {
 +				for (i=0; i<track.entries.times.length; i++) {
 +					if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop){
 +						t.captionsText.html(track.entries.text[i]);
 +						t.captions.show().height(0);
 +						return; // exit out if one is visible;
 +					}
 +				}
 +				t.captions.hide();
 +			} else {
 +				t.captions.hide();
 +			}
 +		},
 +		
 +		setupSlides: function(track) {
 +			var t = this;
 +				
 +			t.slides = track;
 +			t.slides.entries.imgs = [t.slides.entries.text.length];
 +			t.showSlide(0);
 +			
 +		},
 +		
 +		showSlide: function(index) {
 +			if (typeof this.tracks == 'undefined' || typeof this.slidesContainer == 'undefined') {
 +				return;			
 +			}
 +								
 +			var t = this,
 +				url = t.slides.entries.text[index],
 +				img = t.slides.entries.imgs[index];
 +				
 +			if (typeof img == 'undefined' || typeof img.fadeIn == 'undefined') {
 +
 +				t.slides.entries.imgs[index] = img = $('<img src="' + url + '">')
 +						.on('load', function() {
 +							img.appendTo(t.slidesContainer)
 +								.hide()
 +								.fadeIn()
 +								.siblings(':visible')
 +									.fadeOut();							
 +						
 +						});
 +			
 +			} else {
 +			
 +				if (!img.is(':visible') && !img.is(':animated')) {
 +				
- 					console.log('showing existing slide');			
++					//			
 +					
 +					img.fadeIn()
 +						.siblings(':visible')
 +							.fadeOut();			
 +				}
 +			}
 +				
 +		},
 +		
 +		displaySlides: function() {
 +		
 +			if (typeof this.slides == 'undefined')
 +				return;	
 +				
 +			var 
 +				t = this,
 +				slides = t.slides,
 +				i;				
 +		
 +			for (i=0; i<slides.entries.times.length; i++) {
 +				if (t.media.currentTime >= slides.entries.times[i].start && t.media.currentTime <= slides.entries.times[i].stop){
 +				
 +					t.showSlide(i);
 +					
 +					return; // exit out if one is visible;
 +				}
 +			}
 +		},
 +
 +		displayChapters: function() {
 +			var 
 +				t = this,
 +				i;
 +
 +			for (i=0; i<t.tracks.length; i++) {
 +				if (t.tracks[i].kind == 'chapters' && t.tracks[i].isLoaded) {
 +					t.drawChapters(t.tracks[i]);
 +					t.hasChapters = true;
 +					break;
 +				}
 +			}
 +		},
 +
 +		drawChapters: function(chapters) {
 +			var 
 +				t = this,
 +				i,
 +				dur,
 +				//width,
 +				//left,
 +				percent = 0,
 +				usedPercent = 0;
 +
 +			t.chapters.empty();
 +
 +			for (i=0; i<chapters.entries.times.length; i++) {
 +				dur = chapters.entries.times[i].stop - chapters.entries.times[i].start;
 +				percent = Math.floor(dur / t.media.duration * 100);
 +				if (percent + usedPercent > 100 || // too large
 +					i == chapters.entries.times.length-1 && percent + usedPercent < 100) // not going to fill it in
 +					{
 +					percent = 100 - usedPercent;
 +				}
 +				//width = Math.floor(t.width * dur / t.media.duration);
 +				//left = Math.floor(t.width * chapters.entries.times[i].start / t.media.duration);
 +				//if (left + width > t.width) {
 +				//	width = t.width - left;
 +				//}
 +
 +				t.chapters.append( $(
 +					'<div class="mejs-chapter" rel="' + chapters.entries.times[i].start + '" style="left: ' + usedPercent.toString() + '%;width: ' + percent.toString() + '%;">' + 
 +						'<div class="mejs-chapter-block' + ((i==chapters.entries.times.length-1) ? ' mejs-chapter-block-last' : '') + '">' + 
 +							'<span class="ch-title">' + chapters.entries.text[i] + '</span>' + 
 +							'<span class="ch-time">' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].start) + '–' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].stop) + '</span>' + 
 +						'</div>' +
 +					'</div>'));
 +				usedPercent += percent;
 +			}
 +
 +			t.chapters.find('div.mejs-chapter').click(function() {
 +				t.media.setCurrentTime( parseFloat( $(this).attr('rel') ) );
 +				if (t.media.paused) {
 +					t.media.play(); 
 +				}
 +			});
 +
 +			t.chapters.show();
 +		}
 +	});
 +
 +
 +
 +	mejs.language = {
 +		codes:  {
 +			af:'Afrikaans',
 +			sq:'Albanian',
 +			ar:'Arabic',
 +			be:'Belarusian',
 +			bg:'Bulgarian',
 +			ca:'Catalan',
 +			zh:'Chinese',
 +			'zh-cn':'Chinese Simplified',
 +			'zh-tw':'Chinese Traditional',
 +			hr:'Croatian',
 +			cs:'Czech',
 +			da:'Danish',
 +			nl:'Dutch',
 +			en:'English',
 +			et:'Estonian',
 +			tl:'Filipino',
 +			fi:'Finnish',
 +			fr:'French',
 +			gl:'Galician',
 +			de:'German',
 +			el:'Greek',
 +			ht:'Haitian Creole',
 +			iw:'Hebrew',
 +			hi:'Hindi',
 +			hu:'Hungarian',
 +			is:'Icelandic',
 +			id:'Indonesian',
 +			ga:'Irish',
 +			it:'Italian',
 +			ja:'Japanese',
 +			ko:'Korean',
 +			lv:'Latvian',
 +			lt:'Lithuanian',
 +			mk:'Macedonian',
 +			ms:'Malay',
 +			mt:'Maltese',
 +			no:'Norwegian',
 +			fa:'Persian',
 +			pl:'Polish',
 +			pt:'Portuguese',
 +			//'pt-pt':'Portuguese (Portugal)',
 +			ro:'Romanian',
 +			ru:'Russian',
 +			sr:'Serbian',
 +			sk:'Slovak',
 +			sl:'Slovenian',
 +			es:'Spanish',
 +			sw:'Swahili',
 +			sv:'Swedish',
 +			tl:'Tagalog',
 +			th:'Thai',
 +			tr:'Turkish',
 +			uk:'Ukrainian',
 +			vi:'Vietnamese',
 +			cy:'Welsh',
 +			yi:'Yiddish'
 +		}
 +	};
 +
 +	/*
 +	Parses WebVVT format which should be formatted as
 +	================================
 +	WEBVTT
 +	
 +	1
 +	00:00:01,1 --> 00:00:05,000
 +	A line of text
 +
 +	2
 +	00:01:15,1 --> 00:02:05,000
 +	A second line of text
 +	
 +	===============================
 +
 +	Adapted from: http://www.delphiki.com/html5/playr
 +	*/
 +	mejs.TrackFormatParser = {
 +		webvvt: {
 +			// match start "chapter-" (or anythingelse)
 +			pattern_identifier: /^([a-zA-z]+-)?[0-9]+$/,
 +			pattern_timecode: /^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
 +
 +			parse: function(trackText) {
 +				var 
 +					i = 0,
 +					lines = mejs.TrackFormatParser.split2(trackText, /\r?\n/),
 +					entries = {text:[], times:[]},
 +					timecode,
 +					text;
 +				for(; i<lines.length; i++) {
 +					// check for the line number
 +					if (this.pattern_identifier.exec(lines[i])){
 +						// skip to the next line where the start --> end time code should be
 +						i++;
 +						timecode = this.pattern_timecode.exec(lines[i]);				
 +
 +						if (timecode && i<lines.length){
 +							i++;
 +							// grab all the (possibly multi-line) text that follows
 +							text = lines[i];
 +							i++;
 +							while(lines[i] !== '' && i<lines.length){
 +								text = text + '\n' + lines[i];
 +								i++;
 +							}
 +							text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
 +							// Text is in a different array so I can use .join
 +							entries.text.push(text);
 +							entries.times.push(
 +							{
 +								start: (mejs.Utility.convertSMPTEtoSeconds(timecode[1]) == 0) ? 0.200 : mejs.Utility.convertSMPTEtoSeconds(timecode[1]),
 +								stop: mejs.Utility.convertSMPTEtoSeconds(timecode[3]),
 +								settings: timecode[5]
 +							});
 +						}
 +					}
 +				}
 +				return entries;
 +			}
 +		},
 +		// Thanks to Justin Capella: https://github.com/johndyer/mediaelement/pull/420
 +		dfxp: {
 +			parse: function(trackText) {
 +				trackText = $(trackText).filter("tt");
 +				var 
 +					i = 0,
 +					container = trackText.children("div").eq(0),
 +					lines = container.find("p"),
 +					styleNode = trackText.find("#" + container.attr("style")),
 +					styles,
 +					begin,
 +					end,
 +					text,
 +					entries = {text:[], times:[]};
 +
 +
 +				if (styleNode.length) {
 +					var attributes = styleNode.removeAttr("id").get(0).attributes;
 +					if (attributes.length) {
 +						styles = {};
 +						for (i = 0; i < attributes.length; i++) {
 +							styles[attributes[i].name.split(":")[1]] = attributes[i].value;
 +						}
 +					}
 +				}
 +
 +				for(i = 0; i<lines.length; i++) {
 +					var style;
 +					var _temp_times = {
 +						start: null,
 +						stop: null,
 +						style: null
 +					};
 +					if (lines.eq(i).attr("begin")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("begin"));
 +					if (!_temp_times.start && lines.eq(i-1).attr("end")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i-1).attr("end"));
 +					if (lines.eq(i).attr("end")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("end"));
 +					if (!_temp_times.stop && lines.eq(i+1).attr("begin")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i+1).attr("begin"));
 +					if (styles) {
 +						style = "";
 +						for (var _style in styles) {
 +							style += _style + ":" + styles[_style] + ";";					
 +						}
 +					}
 +					if (style) _temp_times.style = style;
 +					if (_temp_times.start == 0) _temp_times.start = 0.200;
 +					entries.times.push(_temp_times);
 +					text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
 +					entries.text.push(text);
 +					if (entries.times.start == 0) entries.times.start = 2;
 +				}
 +				return entries;
 +			}
 +		},
 +		split2: function (text, regex) {
 +			// normal version for compliant browsers
 +			// see below for IE fix
 +			return text.split(regex);
 +		}
 +	};
 +	
 +	// test for browsers with bad String.split method.
 +	if ('x\n\ny'.split(/\n/gi).length != 3) {
 +		// add super slow IE8 and below version
 +		mejs.TrackFormatParser.split2 = function(text, regex) {
 +			var 
 +				parts = [], 
 +				chunk = '',
 +				i;
 +
 +			for (i=0; i<text.length; i++) {
 +				chunk += text.substring(i,i+1);
 +				if (regex.test(chunk)) {
 +					parts.push(chunk.replace(regex, ''));
 +					chunk = '';
 +				}
 +			}
 +			parts.push(chunk);
 +			return parts;
 +		}
 +	}	
 +
 +})(mejs.$);
 +
 +/*
 +* ContextMenu Plugin
 +* 
 +*
 +*/
 +
 +(function($) {
 +
 +$.extend(mejs.MepDefaults,
 +	{ 'contextMenuItems': [
 +		// demo of a fullscreen option
 +		{ 
 +			render: function(player) {
 +				
 +				// check for fullscreen plugin
 +				if (typeof player.enterFullScreen == 'undefined')
 +					return null;
 +			
 +				if (player.isFullScreen) {
- 					return "Turn off Fullscreen";
++					return mejs.i18n.t('Turn off Fullscreen');
 +				} else {
- 					return "Go Fullscreen";
++					return mejs.i18n.t('Go Fullscreen');
 +				}
 +			},
 +			click: function(player) {
 +				if (player.isFullScreen) {
 +					player.exitFullScreen();
 +				} else {
 +					player.enterFullScreen();
 +				}
 +			}
 +		}
 +		,
 +		// demo of a mute/unmute button
 +		{ 
 +			render: function(player) {
 +				if (player.media.muted) {
- 					return "Unmute";
++					return mejs.i18n.t('Unmute');
 +				} else {
- 					return "Mute";
++					return mejs.i18n.t('Mute');
 +				}
 +			},
 +			click: function(player) {
 +				if (player.media.muted) {
 +					player.setMuted(false);
 +				} else {
 +					player.setMuted(true);
 +				}
 +			}
 +		},
 +		// separator
 +		{
 +			isSeparator: true
 +		}
 +		,
 +		// demo of simple download video
 +		{ 
 +			render: function(player) {
- 				return "Download Video";
++				return mejs.i18n.t('Download Video');
 +			},
 +			click: function(player) {
 +				window.location.href = player.media.currentSrc;
 +			}
 +		}	
 +	]}
 +);
 +
 +
 +	$.extend(MediaElementPlayer.prototype, {
 +		buildcontextmenu: function(player, controls, layers, media) {
 +			
 +			// create context menu
 +			player.contextMenu = $('<div class="mejs-contextmenu"></div>')
 +								.appendTo($('body'))
 +								.hide();
 +			
 +			// create events for showing context menu
 +			player.container.bind('contextmenu', function(e) {
 +				if (player.isContextMenuEnabled) {
 +					e.preventDefault();
 +					player.renderContextMenu(e.clientX-1, e.clientY-1);
 +					return false;
 +				}
 +			});
 +			player.container.bind('click', function() {
 +				player.contextMenu.hide();
 +			});	
 +			player.contextMenu.bind('mouseleave', function() {
 +
- 				//console.log('context hover out');
++				//
 +				player.startContextMenuTimer();
 +				
 +			});		
 +		},
 +
 +		cleancontextmenu: function(player) {
 +			player.contextMenu.remove();
 +		},
 +		
 +		isContextMenuEnabled: true,
 +		enableContextMenu: function() {
 +			this.isContextMenuEnabled = true;
 +		},
 +		disableContextMenu: function() {
 +			this.isContextMenuEnabled = false;
 +		},
 +		
 +		contextMenuTimeout: null,
 +		startContextMenuTimer: function() {
- 			//console.log('startContextMenuTimer');
++			//
 +			
 +			var t = this;
 +			
 +			t.killContextMenuTimer();
 +			
 +			t.contextMenuTimer = setTimeout(function() {
 +				t.hideContextMenu();
 +				t.killContextMenuTimer();
 +			}, 750);
 +		},
 +		killContextMenuTimer: function() {
 +			var timer = this.contextMenuTimer;
 +			
- 			//console.log('killContextMenuTimer', timer);
++			//
 +			
 +			if (timer != null) {				
 +				clearTimeout(timer);
 +				delete timer;
 +				timer = null;
 +			}
 +		},		
 +		
 +		hideContextMenu: function() {
 +			this.contextMenu.hide();
 +		},
 +		
 +		renderContextMenu: function(x,y) {
 +			
 +			// alway re-render the items so that things like "turn fullscreen on" and "turn fullscreen off" are always written correctly
 +			var t = this,
 +				html = '',
 +				items = t.options.contextMenuItems;
 +			
 +			for (var i=0, il=items.length; i<il; i++) {
 +				
 +				if (items[i].isSeparator) {
 +					html += '<div class="mejs-contextmenu-separator"></div>';
 +				} else {
 +				
 +					var rendered = items[i].render(t);
 +				
 +					// render can return null if the item doesn't need to be used at the moment
 +					if (rendered != null) {
 +						html += '<div class="mejs-contextmenu-item" data-itemindex="' + i + '" id="element-' + (Math.random()*1000000) + '">' + rendered + '</div>';
 +					}
 +				}
 +			}
 +			
 +			// position and show the context menu
 +			t.contextMenu
 +				.empty()
 +				.append($(html))
 +				.css({top:y, left:x})
 +				.show();
 +				
 +			// bind events
 +			t.contextMenu.find('.mejs-contextmenu-item').each(function() {
 +							
 +				// which one is this?
 +				var $dom = $(this),
 +					itemIndex = parseInt( $dom.data('itemindex'), 10 ),
 +					item = t.options.contextMenuItems[itemIndex];
 +				
 +				// bind extra functionality?
 +				if (typeof item.show != 'undefined')
 +					item.show( $dom , t);
 +				
 +				// bind click action
 +				$dom.click(function() {			
 +					// perform click action
 +					if (typeof item.click != 'undefined')
 +						item.click(t);
 +					
 +					// close
 +					t.contextMenu.hide();				
 +				});				
 +			});	
 +			
 +			// stop the controls from hiding
 +			setTimeout(function() {
 +				t.killControlsTimer('rev3');	
 +			}, 100);
 +						
 +		}
 +	});
 +	
 +})(mejs.$);
 +/**
 + * Postroll plugin
 + */
 +(function($) {
 +
 +	$.extend(mejs.MepDefaults, {
 +		postrollCloseText: mejs.i18n.t('Close')
 +	});
 +
 +	// Postroll
 +	$.extend(MediaElementPlayer.prototype, {
 +		buildpostroll: function(player, controls, layers, media) {
 +			var
 +				t = this,
 +				postrollLink = t.container.find('link[rel="postroll"]').attr('href');
 +
 +			if (typeof postrollLink !== 'undefined') {
 +				player.postroll =
 +					$('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">' + t.options.postrollCloseText + '</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(layers).hide();
 +
 +				t.media.addEventListener('ended', function (e) {
 +					$.ajax({
 +						dataType: 'html',
 +						url: postrollLink,
 +						success: function (data, textStatus) {
 +							layers.find('.mejs-postroll-layer-content').html(data);
 +						}
 +					});
 +					player.postroll.show();
 +				}, false);
 +			}
 +		}
 +	});
 +
 +})(mejs.$);
 +
diff --cc apps/files_videoviewer/js/mediaelement-and-player.min.js
index 7266fae,0000000..7547c3c
mode 100644,000000..100644
--- a/apps/files_videoviewer/js/mediaelement-and-player.min.js
+++ b/apps/files_videoviewer/js/mediaelement-and-player.min.js
@@@ -1,167 -1,0 +1,173 @@@
 +/*!
 +* MediaElement.js
 +* HTML5 <video> and <audio> shim and player
 +* http://mediaelementjs.com/
 +*
 +* Creates a JavaScript object that mimics HTML5 MediaElement API
 +* for browsers that don't understand HTML5 or can't play the provided codec
 +* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
 +*
 +* Copyright 2010-2013, John Dyer (http://j.hn)
 +* License: MIT
 +*
- */var mejs=mejs||{};mejs.version="2.11.3";mejs.meIndex=0;
++*/var mejs=mejs||{};mejs.version="2.13.2";mejs.meIndex=0;
 +mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null, [...]
 +"video/x-vimeo"]}]};
- mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",f,g,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){f=h[b].src;c=f.lastIndexOf("/");if(c>- [...]
- 1);f=f.substring(0,c+1)}else{g=f;f=""}for(c=0;c<j;c++){e=a[c];e=g.indexOf(e);if(e>-1){d=f;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(f<10?"0"+f:f)+":"+(g<10?"0"+g:g)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=f [...]
- "undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),f=parseInt(a[2],10),g=0,h=0;if(c)g=parseInt(a[3])/d;return h=b*3600+e*60+f+g},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&& [...]
++mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){g=h[b].src;c=g.lastIndexOf("/");if(c>- [...]
++1);g=g.substring(0,c+1)}else{f=g;g=""}for(c=0;c<j;c++){e=a[c];e=f.indexOf(e);if(e>-1){d=g;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,g=Math.floor(a/60)%60,f=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(g<10?"0"+g:g)+":"+(f<10?"0"+f:f)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=f [...]
++"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),g=parseInt(a[2],10),f=0,h=0;if(c)f=parseInt(a[3])/d;return h=b*3600+e*60+g+f},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&& [...]
 +"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
- mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],f;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].d [...]
- !(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(f=new ActiveXObject(c))e=d(f)}catch(g){}return e}};
++mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],g;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].d [...]
++!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(g=new ActiveXObject(c))e=d(g)}catch(f){}return e}};
 +mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
- mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,f,g){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[f]+=g;e[f]-=g};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
- mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,f=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=-1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isW [...]
- null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<f.length;c++)e=document.createElement(f[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScr [...]
- a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=e.mozFullScreenEnabled;if(this.isChrome)a.hasSemiNativeFullScreen=false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName=a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozReq [...]
- else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(g){if(a.hasWebkitNativeFullScreen)g.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&g.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};me [...]
++mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,g,f){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[g]+=f;e[g]-=f};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
++mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,g=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isBustedNativeHTTPS=location.protocol==="https:"&&(d.match(/android [12]\./)!==null||d.match(/macintosh.* version.* safari/)!==null);a.is [...]
++-1||c.appName.toLowerCase().match(/trident/gi)!==null;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit&&!a.isIE;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<g.length;c++)e=document.createElement(g[c]);a.supportsMediaTag=typeof e [...]
++"undefined"||a.isBustedAndroid;try{e.canPlayType("video/mp4")}catch(f){a.supportsMediaTag=false}a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasNativeFullscreen=typeof e.requestFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasMsNativeFullScreen=typeof e.msRequestFullscreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScr [...]
++a.hasMsNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=document.mozFullScreenEnabled;else if(a.hasMsNativeFullScreen)a.nativeFullScreenEnabled=document.msFullscreenEnabled;if(a.isChrome)a.hasSemiNativeFullScreen=false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName="";if(a.hasWebkitNativeFullScreen)a.fullScreenEventName="webkitfullscreenchange";else if(a.hasMozNativeFullScreen)a.fullScreenEventName="mozfullsc [...]
++else if(a.hasMsNativeFullScreen)a.fullScreenEventName="MSFullscreenChange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen;else if(e.hasMsNativeFullScreen)return b.msFullscreenElement!==null};a.requestFullScreen=function(h){if(a.hasWebkitNativeFullScreen)h.webkitRequestFullScreen();else if(a.hasMozNativeFullScreen)h.mozRequestFullScreen();else a.hasMsNativeFullScreen&&h.msRequestFullscreen()};a.canc [...]
++function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();else if(a.hasMozNativeFullScreen)document.mozCancelFullScreen();else a.hasMsNativeFullScreen&&document.msExitFullscreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
 +mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.src=c.src;break}}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
 +mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={};this.attributes={}};
 +mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia() [...]
 +false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a= [...]
- positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(a,b,c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){th [...]
++positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this [...]
 +this.src=mejs.Utility.absolutizeUrl(a);break}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.mute [...]
 +this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!= [...]
 +this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}} [...]
 +this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}};
 +mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement= [...]
- b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a];b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}};
- mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoH [...]
- pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
- mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===nul [...]
- "none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c, [...]
- determinePlayback:function(a,b,c,d,e){var f=[],g,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")f.push({type:b.type,url:e});else for(g=0;g<b.type.length;g++)f.push({type:b.type[g],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));f.push({type:l,url:e})}else for(g=0;g<a.childNodes.length;g++){h=a.childNodes[g];if(h.nodeType==1&&h.tagName.toLowerCase()=="source [...]
- l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)f.push({type:l,url:e})}}if(!d&&f.length>0&&f[0].url!==null&&this.getTypeFromFile(f[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")){if(!d){g=document.createElement [...]
- "video":"audio");a.parentNode.insertBefore(g,a);a.style.display="none";j.htmlMediaElement=a=g}for(g=0;g<f.length;g++)if(a.canPlayType(f[g].type).replace(/no/,"")!==""||a.canPlayType(f[g].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=f[g].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(g=0;g<f.length;g++){l=f[g].type;for(a=0;a<b.plugins.length;a++ [...]
- h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=f[g].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&f.length>0)j.url=f[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.last [...]
- 1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=d.width+"px";e.style.height= [...]
- c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,f){c=a.htmlMediaElement;var g=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specifie [...]
- n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){g=b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.videoHeight>0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;g=mejs.Utility.encodeUrl(g);h=mejs.Utility.encodeUrl(h)}else if(b.enable [...]
- 320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+g,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url [...]
- "flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");f&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+g+'" height="'+h+'" class="mejs-s [...]
- d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/ [...]
- l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML='<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high [...]
- b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+g+'" height="'+h+'" class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,pluginId:l,videoId:b,height:h,width:g};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/" [...]
- '<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+g+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";return j},updateNative:function(a,b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
++b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}};
++mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVid [...]
++defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
++mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),g=e==="audio"||e==="video",f=g?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];f=typeof f=="undefined"||f===null||f==""?null:f;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===nul [...]
++"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,g,f);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c, [...]
++determinePlayback:function(a,b,c,d,e){var g=[],f,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")g.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)g.push({type:b.type[f],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));g.push({type:l,url:e})}else for(f=0;f<a.childNodes.length;f++){h=a.childNodes[f];if(h.nodeType==1&&h.tagName.toLowerCase()=="source [...]
++l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)g.push({type:l,url:e})}}if(!d&&g.length>0&&g[0].url!==null&&this.getTypeFromFile(g[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")&&!(mejs.MediaFeatures.isBustedNa [...]
++b.httpsBasicAuthSite===true)){if(!d){f=document.createElement(j.isVideo?"video":"audio");a.parentNode.insertBefore(f,a);a.style.display="none";j.htmlMediaElement=a=f}for(f=0;f<g.length;f++)if(a.canPlayType(g[f].type).replace(/no/,"")!==""||a.canPlayType(g[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=g[f].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode===" [...]
++0;f<g.length;f++){l=g[f].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=g[f].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&g.length>0)j.url=g[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexO [...]
++getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("d [...]
++"me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(g){}e.innerHTML=b.customError?b.customError:c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,g){c=a.htmlMediaElement;var f=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a. [...]
++m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){f=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.pluginHeight>0?b.pluginHeigh [...]
++0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;f=mejs.Utility.encodeUrl(f);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){f=320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"prel [...]
++f,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");g&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){ [...]
++'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+f+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFea [...]
++document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+l+'" width="'+f+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transp [...]
++'<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+f+'" height="'+h+'" scale="default"class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.i [...]
++pluginId:l,videoId:b,height:h,width:f};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+f+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";c.removeAttribute("autoplay");return j},u [...]
++b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
 +mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Pla [...]
 +{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.pau [...]
 +c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashP [...]
 +a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" [...]
 +c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPla [...]
 +document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0: [...]
 +c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs. [...]
- (function(a,b){var c={locale:{strings:{}},methods:{}};c.locale.getLanguage=function(){return{language:navigator.language}};c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(d){var e,f,g={"&":"&",'"':""","<":"<",">":">"};d=String(d);for(e in g)if(g.hasOwnProperty(e)){f=RegExp(e,"g");d=d.replace(f,g[e])}return d};c.methods.formatString=function(d,e){for(var f in e){switch(f.charAt(0)){case "@":e[f]=c.methods.checkPlain(e[f]);break;case "!":break;de [...]
- '<em class="placeholder">'+c.methods.checkPlain(e[f])+"</em>"}d=d.replace(f,e[f])}return d};c.methods.t=function(d,e,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][d])d=c.locale.strings[f.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,f){if(typeof d==="string"&&d.length>0){var g=c.locale.getLanguage();f=f||{context:g.language};return c.methods.t(d,e,f)}else throw{name:"InvalidArgumentException",message:"First argument is eithe [...]
- };b.i18n=c})(document,mejs);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);(function(a){a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
++(function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.getLanguage=function(){return(c.locale.language||window.navigator.userLanguage||window.navigator.language).substr(0,2).toLowerCase()};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.methods.checkPlain=function(d){var e,g,f={"&":"&",'"':""","<":"<",">":">"};d=String(d);for(e in f)if(f.hasOwnProperty(e)){g=RegExp(e,"g");d=d.replace(g,f[e])}return d};c.methods.t=function(d,e){if(c.local [...]
++c.locale.strings[e.context]&&c.locale.strings[e.context][d])d=c.locale.strings[e.context][d];return c.methods.checkPlain(d)};c.t=function(d,e){if(typeof d==="string"&&d.length>0){var g=c.getLanguage();e=e||{context:g};return c.methods.t(d,e)}else throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings);
++(function(a){if(typeof a.de==="undefined")a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);(function(a){if(typeof a.zh==="undefined")a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
 +
 +/*!
 + * MediaElementPlayer
 + * http://mediaelementjs.com/
 + *
 + * Creates a controller bar for HTML5 <video> add <audio> tags
 + * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
 + *
-  * Copyright 2010-2012, John Dyer (http://j.hn/)
++ * Copyright 2010-2013, John Dyer (http://j.hn/)
 + * License: MIT
 + *
 + */if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
- (function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:fa [...]
- clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-0.1,0))}},{keys:[ [...]
- b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!="undefined" [...]
- a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;mej [...]
- this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(e,g){a.meReady(e,g)},error:function(e){a.handleError(e)}}),d=a.media.tagName.toLowerCase();a.isDynamic=d!=="audio"&&d!=="video";a.isVideo=a.isDynamic?a.options.isVideo:d!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){ [...]
- "controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className) [...]
- a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio" [...]
- 1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+d+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].g [...]
- null?a.$media.attr("height"):a.options["default"+d+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.height;c.pluginHeight=a.width}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});b.contain [...]
- "visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(b.controlsAreVisible)if(a){b.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden") [...]
- "block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:function(a){var b=this;a=ty [...]
- a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnabled=true},meReady:function(a, [...]
- d=mejs.MediaFeatures,e=b.getAttribute("autoplay");e=!(typeof e=="undefined"||e===null||e==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(d.isAndroid&&c.options.AndroidUseNativeControls)&&!(d.isiPad&&c.options.iPadUseNativeControls)&&!(d.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);c.findTracks();for(g in c.options.features) [...]
- if(c["build"+d])try{c["build"+d](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{c.media.addEventListener("click",function(){if(c.options.clickToPlayPause)c.media.paused?c.media.play():c.media.pause()});c.container.bind("mou [...]
- function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);e&&!c.options.alway [...]
- c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var l=mejs.players[j];l.id!=c.id&&c.options.pauseOtherPlayers&&!l.paused&&!l.end [...]
- l.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullS [...]
- c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(e&&a.pluginType=="native"){a.load();a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.opt [...]
- c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:th [...]
- this.options.defaultAudioWidth,d=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,e=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(e*d/c,10):d;if(this.container.parent()[0].tagName.toLowerCase()==="body"){e=f(window).width();c=f(window).height()}if(c!=0&&e!=0){this.container.width(e).height(c);this.$media.add(this.container.find [...]
- this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(e,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),d=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var e=c.siblings();if( [...]
- !this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){e.each(function(){var g=f(this);if(g.css("position")!="absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);d.width(b-(d.outerWidth(true)-d.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,d){var e=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media. [...]
- if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):e.hide();d.addEventListener("play",function(){e.hide()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a)},buildoverlays:function(a,b,c,d){var e=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c) [...]
- j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){if(e.options.clickToPlayPause)d.paused?d.play():d.pause()});d.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);d.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);d.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buf [...]
- false);d.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);d.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("canplay",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener [...]
- b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,d){this.globalBind("keydown",function(e){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],l=0,q=j.keys.length;l<q;l++)if(e.keyCode==j.keys[l]){e.preventDefault();j.action(a,d,e.keyCode);return false}return true});this.globalBind("click",function(e){if(f(e.target).c [...]
- 0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,d){d=f(d);a.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,this.height);this.setControlsSize()},play:function(){this.media.play()},pause:function(){this.media [...]
- load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}this.media.pluginType [...]
- this.$media.prop("controls",true):this.media.remove();this.isDynamic||this.$node.insertBefore(this.container);delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,d){var e={d:[],w:[]};f.each((c||"").split(" "),function(g,k){e[b.test(k)?"w":"d"].push(k+"."+d)});e.d=e.d.join(" ");e.w=e.w.join(" ");return e}var b=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storag [...]
- function(c,d,e){c=a(c,this.id);c.d&&f(document).bind(c.d,d,e);c.w&&f(window).bind(c.w,d,e)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){c=a(c,this.id);c.d&&f(document).unbind(c.d,d);c.w&&f(window).unbind(c.w,d)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaele [...]
- new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
- (function(f){f.extend(mejs.MepDefaults,{playpauseText:"Play/Pause"});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,d){var e=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();d.paused?d.play():d.pause();return false});d.addEventListener("play",function(){e.r [...]
- false);d.addEventListener("playing",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);d.addEventListener("pause",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
- (function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,d){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);d.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").c [...]
++(function(f){mejs.MepDefaults={poster:"",showPosterWhenEnded:false,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress: [...]
++hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?a.play():a.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math. [...]
++0.1,0))}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function( [...]
++"undefined")a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id [...]
++mejs.players[this.id]=this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPh [...]
++"controls");b.isiPad&&a.media.getAttribute("autoplay")!==null&&a.play()}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);a [...]
++"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0,1).toUpperCase()+ [...]
++a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+e+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==null?a.$ [...]
++a.options["default"+e+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.width;c.pluginHeight=a.height}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.controlsAreVisible&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});b.container.find [...]
++"visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!(!b.controlsAreVisible||b.options.alwaysShowControls))if(a){b.controls.stop(true,true).fadeOut(200,function(){ [...]
++"hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:fun [...]
++this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnab [...]
++meReady:function(a,b){var c=this,e=mejs.MediaFeatures,d=b.getAttribute("autoplay");d=!(typeof d=="undefined"||d===null||d==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(e.isAndroid&&c.options.AndroidUseNativeControls)&&!(e.isiPad&&c.options.iPadUseNativeControls)&&!(e.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);c.findTrac [...]
++c.options.features[g];if(c["build"+e])try{c["build"+e](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){if(c.options.clickToPlayPause)c.media.paused?c.play [...]
++c.media.addEventListener("click",c.clickToPlayPauseCallback,false);c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControl [...]
++c.hideControls(false);d&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var m=mejs.players[j];m. [...]
++c.options.pauseOtherPlayers&&!m.paused&&!m.ended&&m.pause();m.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&c.updateDurat [...]
++c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}d&&a.pluginType=="native"&&c.play();if(c.options.succe [...]
++"string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===1||this.$node[0].currentSty [...]
++"100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,e=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,d=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(d*e/c,10):e;if(this.container.parent()[0].tagName.toLowerCase()==="body" [...]
++c=f(window).height()}if(c!=0&&d!=0){this.container.width(d).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(d,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}d=this.layers.find(".mejs-overlay-play");c=d.find(".mejs-overlay-button");d [...]
++this.controls.height());c.css("margin-top","-"+(c.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),e=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var d=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){d.each(function(){var g=f(this);if(g.css("position")!="absolute"&&g.is(":visi [...]
++b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);e.width(b-(e.outerWidth(true)-e.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,e){var d=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):d.hide();e.addEventListener("play",function(){d.hide()},false);a.options.showPosterWhenEnded [...]
++e.addEventListener("ended",function(){d.show()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a);b.css({"background-image":"url("+a+")"})},buildoverlays:function(a,b,c,e){var d=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),k=f('<div class="mejs-overlay mejs-layer"><d [...]
++j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).bind("click touchstart",function(){d.options.clickToPlayPause&&e.paused&&d.play()});e.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("seeking",function(){g.show();b.find(".mejs-t [...]
++false);e.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);e.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("canplay",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener [...]
++b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,e){this.globalBind("keydown",function(d){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],m=0,q=j.keys.length;m<q;m++)if(d.keyCode==j.keys[m]){d.preventDefault();j.action(a,e,d.keyCode);return false}return true});this.globalBind("click",function(d){if(f(d.target).c [...]
++0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,e){e=f(e);a.tracks.push({srclang:e.attr("srclang")?e.attr("srclang").toLowerCase():"",src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,this.height);this.setControlsSize()},play:function(){this.load();this.media.play()},pause:function( [...]
++load:function(){this.isLoaded||this.media.load();this.isLoaded=true},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=this.options.features[a];if(this["clean"+b])try{this["clean"+b](this [...]
++else{this.$media.prop("controls",true);this.$node.clone().show().insertBefore(this.container);this.$node.remove()}this.media.pluginType!=="native"&&this.media.remove();delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,e){var d={d:[],w:[]};f.each((c||"").split(" "),function(g,k){var j=k+"."+e;if(j.indexOf(".")===0){d.d.push(j);d.w.push(j)}else d[b.test(k)?"w":"d"].push(j)});d.d=d.d.join(" ");d.w=d.w.join(" ");retur [...]
++/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,e,d){c=a(c,this.id);c.d&&f(document).bind(c.d,e,d);c.w&&f(window).bind(c.w,e,d)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,e){c=a(c,this.id);c.d&&f(document).unbind(c.d,e);c.w&&f(window).unbind(c.w,e)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function [...]
++b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
++(function(f){f.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,e){var d=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",f [...]
++false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
++(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").c [...]
 +"0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
- (function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,d){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering"). [...]
- this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),l=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var m=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(d.duration){if(h<m.left)h=m.left;else if(h>r+m.left)h=r+m.left;o=h-m.left;n=o/r;n=n<=0.02?0:n*d.duration;t&&n!==d.currentTime&&d.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){l.css("left",o);q.html(mejs.Utility.secon [...]
- l.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);e.globalBind("mousemove.dur",function(m){p(m)});e.globalBind("mouseup.dur",function(){t=false;l.hide();e.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){e.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||l.show()}).bind("mouseleave",function(){if(!t){e.globalUnbind(".dur");l.hide()}});d.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail( [...]
- d.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);e.loaded=c;e.total=g;e.current=k;e.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null [...]
++(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering"). [...]
++this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(h<l.left)h=l.left;else if(h>r+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secon [...]
++m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail( [...]
++e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null [...]
 +Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
- (function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" <span> | </span> "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,d){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");d.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:f [...]
- b,c,d){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs [...]
- f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");d.addEventListener("timeupdate",fun [...]
++(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:fun [...]
++c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-c [...]
++f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",fun [...]
 +false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration [...]
 +this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
- (function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,d){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var e=this,g=e.isVideo?e.options.videoVolume:e.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+e.id+'" title="'+e.optio [...]
- '" aria-label="'+e.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+e.id+'" title="'+e.options.muteText+'" aria-label="'+e.options.muteText+'"></button><div class="mejs-volume-slider"><div class="me [...]
- j=e.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),l=e.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=e.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=e.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass [...]
- if(g=="vertical"){var s=l.height(),u=l.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=l.width();u=l.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=l.offset();if(g=="vertical"){o=l.height();parseInt(l.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=l.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o); [...]
- d.setMuted(false);d.setVolume(o)},m=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!m&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);e.globalBind("mousemove.vol",function(o){h(o)});e.globalBind("mouseup.vol",function(){m=false;e.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});m=true;return false});k.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!m)if(d.m [...]
- k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(d.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(e.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&d.setMuted(true);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$);
- (function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,b,c,d){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=tr [...]
- false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var e=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+e.id+'" title="'+e.options.fullscreenText+'" aria-label="'+e.options.fullscreenText+'"></button></div>').appendTo(b);if(e.media.pluginType==="native"||!e.options.usePluginFullScreen&&!mejs.MediaFeatures.is [...]
- mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),m=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";m.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";m.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,l=function(){if(j){for(var h in q)q[h].hide();g.css("point [...]
- "");e.controls.css("pointer-events","");j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-e.container.offset().left,m=g.offset().top-e.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=e.container.width(),s=e.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(m);q.left.width(h).height(n).css({top:m});q.right.width(o-h-r).height(n).css({top:m,left:h+r});q.bottom.width(o).height(s-n-m). [...]
- n})};e.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p+=1)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(l).hide();g.mouseover(function(){if(!e.isFullScreen){var h=g.offset(),m=a.container.offset();d.positionFullscreenButton(h.left-m.left,h.top-m.top,false);g.css("pointer-events","none");e.controls.css("pointer-events","none");for(p in q)q[p].show();t();j=true}});d.addEventListener("fullscreenchange",function(){l()})}else g.mouseover(fun [...]
- null){clearTimeout(k);delete k}var h=g.offset(),m=a.container.offset();d.positionFullscreenButton(h.left-m.left,h.top-m.top,true)}).mouseout(function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){d.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;e.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||e.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},conta [...]
- enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNat [...]
++(function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" tit [...]
++'" aria-label="'+d.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+'" aria-label="'+d.options.muteText+'"></button><div class="mejs-volume-slider"><div class="me [...]
++j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass [...]
++if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o); [...]
++e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.m [...]
++k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$);
++(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a [...]
++false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+d.id+'" title="'+d.options.fullscreenText+'" aria-label="'+d.options.fullscreenText+'"></button></div>').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.is [...]
++mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("point [...]
++"");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r). [...]
++left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p++)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCal [...]
++t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageY<l.top||h.pageY>l.top+g.outerHeight(true)||h.pageX<l.left||h.pageX>l.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("m [...]
++function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a. [...]
++containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window). [...]
 +screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.op [...]
- "top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).wid [...]
- a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();document.documentElement.style.overflow=docSty [...]
- this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find("object embed").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");this.setControlsSize();this.isFull [...]
- (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles",hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,d){if(a.tracks.length!=0){a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hove [...]
- a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">None</label></li></ul></div></div>').appendTo(b); [...]
- a.tracks.length;b++)a.tracks[b].kind=="subtitles"&&c++;this.options.toggleCaptionsButtonWhenOnlyOne&&c==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowCon [...]
- a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(b=0;b<a.tracks.length;b++)a.tracks[b].kind=="subtitles"&&a.addTrackButton(a.tracks[b].srclang,a.tracks[b].label);a.loadNextTrack();d.addEventListener("timeupdate" [...]
- false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);d.addEventListener("timeupdate",function(){a.displaySlides()},false)}d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility","visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!d.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility" [...]
- f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptio [...]
- loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(d){c.entries=typeof d=="string"&&/<tt\s+xml/ig.exec(d)?mejs.TrackFormatParser.dfxp.parse(d):mejs.TrackFormatParser.webvvt.parse(d);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNext [...]
- "chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.langu [...]
- a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHe [...]
- this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!="undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.ti [...]
- this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer=="undefined")){var b=this,c=b.slides.entries.text[a],d=b.slides.entries.imgs[a];if(typeof d=="undefined"||typeof d.fadeIn=="undefined") [...]
- d=f('<img src="'+c+'">').on("load",function(){d.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else if(!d.is(":visible")&&!d.is(":animated")){console.log("showing existing slide");d.fadeIn().siblings(":visible").fadeOut()}}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b [...]
- displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,d,e=d=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){d=a.entries.times[c].stop-a.entries.times[c].start;d=Math.floor(d/b.media.duration*100);if(d+e>100||c==a.entries.times.length-1&&d+e<100)d=100-e;b.chapters.append(f('<div class="mejs-chapter" rel=" [...]
- '" style="left: '+e.toString()+"%;width: "+d.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));e+=d}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel"))) [...]
- b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japane [...]
- lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0- [...]
- parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},d,e;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((d=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;e=a[b];for(b++;a[b]!==""&&b<a.length;){e=e+"\n"+a[b];b++}e=f.trim(e).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(e);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(d[1])==0?0 [...]
- stop:mejs.Utility.convertSMPTEtoSeconds(d[3]),settings:d[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var d,e;a={text:[],times:[]};if(b.length){e=b.removeAttr("id").get(0).attributes;if(e.length){d={};for(b=0;b<e.length;b++)d[e[b].name.split(":")[1]]=e[b].value}}for(b=0;b<c.length;b++){var g;e={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))e.start=mejs.Utility.convertSMPTEtoSeco [...]
- if(!e.start&&c.eq(b-1).attr("end"))e.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))e.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!e.stop&&c.eq(b+1).attr("begin"))e.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(d){g="";for(var k in d)g+=k+":"+d[k]+";"}if(g)e.style=g;if(e.start==0)e.start=0.2;a.times.push(e);e=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/ [...]
- "<a href='$1' target='_blank'>$1</a>");a.text.push(e);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],d="",e;for(e=0;e<a.length;e++){d+=a.substring(e,e+1);if(b.test(d)){c.push(d.replace(b,""));d=""}}c.push(d);return c}})(mejs.$);
- (function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?"Turn off Fullscreen":"Go Fullscreen"},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?"Unmute":"Mute"},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return"Download Video"},click:function(a){window.location.hr [...]
- f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isCont [...]
- enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,b [...]
- this,d="",e=c.options.contextMenuItems,g=0,k=e.length;g<k;g++)if(e[g].isSeparator)d+='<div class="mejs-contextmenu-separator"></div>';else{var j=e[g].render(c);if(j!=null)d+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(d)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var l=f(this),q=parseInt(l.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof [...]
- p.show(l,c);l.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
- (function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var d=this.container.find('link[rel="postroll"]').attr("href");if(typeof d!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide(); [...]
- function(){f.ajax({dataType:"html",url:d,success:function(e){c.find(".mejs-postroll-layer-content").html(e)}});a.postroll.show()},false)}}})})(mejs.$);
++"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(windo [...]
++f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.Media [...]
++f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen") [...]
++this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
++(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prepe [...]
++f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><inp [...]
++a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(b);for(d=b=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&b++;this.options.toggleCaptionsButtonWhenOnlyOne&&b==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility [...]
++function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||a.container.find(".mejs-captions-position").re [...]
++a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(d=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&a.addTrackButton(a.tracks[d].srclang,a.tracks[d].label);a.loadNextTrack();e.addEventListener("timeupdate",function(){a.displayCaptions()},false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);e.addEventListener("timeupdate",function(){a.displaySlides()},false)}e.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a [...]
++"visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!e.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].s [...]
++null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptions();break}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(e){c.entries=type [...]
++/<tt\s+xml/ig.exec(e)?mejs.TrackFormatParser.dfxp.parse(e):mejs.TrackFormatParser.webvvt.parse(e);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind=="chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled", [...]
++this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]"). [...]
++adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){i [...]
++"undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof thi [...]
++"undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('<img src="'+c+'">').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if [...]
++a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,e,d=e=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){e=a.entries.times[c].stop-a.entries.times[c].start;e=Math.floor(e/b.media.duration*100);if(e+d> [...]
++1&&e+d<100)e=100-d;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+'" style="left: '+d.toString()+"%;width: "+e.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));d+=e}b.chapters [...]
++b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Ita [...]
++ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}: [...]
++parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0 [...]
++stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeco [...]
++if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/ [...]
++"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$);
++(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return m [...]
++click:function(a){window.location.href=a.media.currentSrc}}]});f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer() [...]
++isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},rend [...]
++b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g<k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var j=d[g].render(c);if(j!=null)e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuIt [...]
++"undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
++(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide(); [...]
++function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$);
 +
diff --cc apps/gallery/ajax/image.php
index 67e9391,0000000..4334ae1
mode 100644,000000..100644
--- a/apps/gallery/ajax/image.php
+++ b/apps/gallery/ajax/image.php
@@@ -1,65 -1,0 +1,77 @@@
 +<?php
 +/**
 + * Copyright (c) 2012 Robin Appelman <icewind at owncloud.com>
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + * See the COPYING-README file.
 + */
 +
 +OCP\JSON::checkAppEnabled('gallery');
 +
 +list($token, $img) = explode('/', $_GET['file'], 2);
 +$linkItem = \OCP\Share::getShareByToken($token);
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// seems to be a valid share
 +	$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 +	$owner = $rootLinkItem['uid_owner'];
 +	OCP\JSON::checkUserExists($owner);
 +	OC_Util::tearDownFS();
 +	OC_Util::setupFS($owner);
 +	\OC_User::setIncognitoMode(true);
 +} else {
 +	OCP\JSON::checkLoggedIn();
 +
 +	list($owner, $img) = explode('/', $_GET['file'], 2);
 +	if ($owner !== OCP\User::getUser()) {
 +		OCP\JSON::checkUserExists($owner);
++		OC_Util::tearDownFS();
 +		OC_Util::setupFS($owner);
 +		$view = new \OC\Files\View('/' . $owner . '/files');
 +		// second part is the (duplicated) share name
 +		list($folderId, , $img) = explode('/', $img, 3);
- 		$sharedFolder = $view->getPath($folderId);
- 		$img = $sharedFolder . '/' . $img;
++		$shareInfo = \OCP\Share::getItemSharedWithBySource('file', $folderId);
++		if ($shareInfo) {
++			$sharedFolder = $view->getPath($folderId);
++			if ($sharedFolder) {
++				$img = $sharedFolder . '/' . $img;
++			} else {
++				\OC_Response::setStatus(404);
++				exit;
++			}
++		} else {
++			\OC_Response::setStatus(403);
++			exit;
++		}
 +	}
 +}
 +
 +session_write_close();
 +
 +$ownerView = new \OC\Files\View('/' . $owner . '/files');
 +
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// prepend path to share
 +	$path = $ownerView->getPath($linkItem['file_source']);
 +	$img = $path.'/'.$img;
 +}
 +
 +$mime = $ownerView->getMimeType($img);
 +list($mimePart,) = explode('/', $mime);
 +if ($mimePart === 'image') {
 +	$local = $ownerView->getLocalFile($img);
 +	$rotate = false;
 +	if (is_callable('exif_read_data')) { //don't use OCP\Image here, using OCP\Image will always cause parsing the image file
 +		$exif = @exif_read_data($local, 'IFD0');
 +		if (isset($exif['Orientation'])) {
 +			$rotate = ($exif['Orientation'] > 1);
 +		}
 +	}
 +	if ($rotate) {
 +		$image = new OCP\Image($local);
 +		$image->fixOrientation();
 +		$image->show();
 +	} else { //use the original file if we dont need to rotate, saves having to re-encode the image
 +		header('Content-Type: ' . $mime);
 +		$ownerView->readfile($img);
 +	}
 +}
diff --cc apps/gallery/ajax/thumbnail.php
index 2420dde,0000000..176c358
mode 100644,000000..100644
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@@ -1,47 -1,0 +1,60 @@@
 +<?php
 +/**
 + * Copyright (c) 2012 Robin Appelman <icewind at owncloud.com>
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + * See the COPYING-README file.
 + */
 +
 +OCP\JSON::checkAppEnabled('gallery');
 +
 +list($token, $img) = explode('/', $_GET['file'], 2);
 +$linkItem = \OCP\Share::getShareByToken($token);
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// seems to be a valid share
 +	$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 +	$owner = $rootLinkItem['uid_owner'];
 +	OCP\JSON::checkUserExists($owner);
 +	OC_Util::tearDownFS();
 +	OC_Util::setupFS($owner);
++	\OC_User::setIncognitoMode(true);
 +} else {
 +	OCP\JSON::checkLoggedIn();
 +
 +	list($owner, $img) = explode('/', $_GET['file'], 2);
 +	if ($owner !== OCP\User::getUser()) {
 +		OCP\JSON::checkUserExists($owner);
++		OC_Util::tearDownFS();
 +		OC_Util::setupFS($owner);
 +		$view = new \OC\Files\View('/' . $owner . '/files');
 +		// second part is the (duplicated) share name
- 		list($folderId,, $img) = explode('/', $img, 3);
- 		$sharedFolder = $view->getPath($folderId);
- 		$img = $sharedFolder . '/' . $img;
++		list($folderId, , $img) = explode('/', $img, 3);
++		$shareInfo = \OCP\Share::getItemSharedWithBySource('file', $folderId);
++		if ($shareInfo) {
++			$sharedFolder = $view->getPath($folderId);
++			if ($sharedFolder) {
++				$img = $sharedFolder . '/' . $img;
++			} else {
++				\OC_Response::setStatus(404);
++				exit;
++			}
++		} else {
++			\OC_Response::setStatus(403);
++			exit;
++		}
 +	}
 +}
 +
 +session_write_close();
 +
 +if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +	// prepend path to share
 +	$ownerView = new \OC\Files\View('/' . $owner . '/files');
 +	$path = $ownerView->getPath($linkItem['file_source']);
 +	$img = $path . '/' . $img;
 +}
 +
 +$square = isset($_GET['square']) ? (bool)$_GET['square'] : false;
 +
 +$image = new \OCA\Gallery\Thumbnail('/' . $img, $owner, $square);
 +$image->show();
diff --cc apps/gallery/css/mobile.css
index 0000000,0000000..2a146be
new file mode 100644
--- /dev/null
+++ b/apps/gallery/css/mobile.css
@@@ -1,0 -1,0 +1,19 @@@
++ at media only screen and (max-width: 600px) {
++
++/* make header and controls bar scroll up for more view of content on small screens */
++#header,
++#controls {
++	position: absolute !important;
++}
++
++/* smaller images for smaller screens, fit 2 to width */
++#gallery > a > img,
++#gallery > a,
++#gallery > a.album,
++#gallery > a.image > img {
++	max-height: 130px;
++	max-width: 130px;
++}
++
++
++}
diff --cc apps/gallery/css/public.css
index 7fb03fd,0000000..1e94ba1
mode 100644,000000..100644
--- a/apps/gallery/css/public.css
+++ b/apps/gallery/css/public.css
@@@ -1,84 -1,0 +1,93 @@@
 +/*body {*/
 +	/*background:#ddd;*/
 +/*}*/
 +
 +#header {
 +	background: #1d2d44 url('%webroot%/core/img/noise.png') repeat;
 +	height:32px;
 +	left:0;
 +	line-height:32px;
 +	position:fixed;
 +	right:0;
 +	top:0;
 +	z-index:100;
 +	padding:7px;
 +}
 +
 +#gallery {
 +	margin-top: 45px;
 +}
 +
++.header-right {
++	padding: 0;
++	height: 32px;
++}
++
 +#details {
 +	color:#fff;
- 	float: left;
++	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
++	filter: alpha(opacity=50);
++	opacity: .5;
++	padding-right: 5px;
 +}
 +
 +#public_upload,
 +#download {
 +	font-weight:700;
 +	margin: 0 0.4em 0 0;
 +	padding: 0 5px;
 +	height: 32px;
 +	float: left;
 +
 +}
 +
- .header-right #details {
- 	margin-right: 28px;
- }
- 
- .header-right {
- 	padding: 0;
- 	height: 32px;
- }
- 
 +body {
 +	position: absolute;
 +	height: 100%;
 +	width: 100%;
 +	text-align: center;
 +	background: #404040 url('%webroot%/core/img/noise.png') repeat;
 +}
 +
++/* toggle for opening shared picture view as file list */
 +#openAsFileListButton {
++	position: absolute;
++	right: 0;
++	top: 0;
 +	font-weight: normal;
- 	float: right;
 +}
++#openAsFileListButton img {
++	vertical-align: text-top;
++	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
++	filter: alpha(opacity=50);
++	opacity: .5;
++}
++
 +
 +/* transfer to core after body has the id #body-public / #body-public-dark */
 +
 +footer {
 +	text-align: center;
 +	color: #ccc;
 +	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
 +	filter: alpha(opacity=60);
 +	opacity: .6;
 +}
 +footer p.info a {
 +	font-weight: bold;
 +	color: #ccc;
 +	padding: 13px;
 +	margin: -13px;
 +}
 +
 +/* Sticky footer */
 +body .wrapper {
 +	min-height: 86%;
 +	margin: 0 auto -50px;
 +}
 +body footer, body .push {
 +	height: 70px;
 +}
 +footer p.info {
 +	padding-top: 30px;
 +}
diff --cc apps/gallery/js/public.js
index f6c7e78,0000000..2149b19
mode 100644,000000..100644
--- a/apps/gallery/js/public.js
+++ b/apps/gallery/js/public.js
@@@ -1,17 -1,0 +1,25 @@@
 +$(document).ready(function () {
 +	if ($('#body-login').length > 0) {
 +		return true; //deactivate on login page
 +	}
 +	if ($('#filesApp').val() && $('#isPublic').val()) {
 +		images = $("#fileList").find("tr[data-mime^='image']").length;
 +		if (images > 0) {
- 			button = $('<div class="button" style="float:right; font-weight:normal;"></div>');
- 			button.append(t('gallery', 'Picture view' ));
++			// toggle for opening shared file list as picture view
++			// TODO find a way to not need to use inline CSS
++			button = $('<div class="button"'
++				+'style="position: absolute; right: 0; top: 0; font-weight: normal;">'
++					+'<img class="svg" src="' + OC.filePath('core', 'img/actions', 'toggle-pictures.svg') + '"'
++					+'alt="' + t('gallery', 'Picture view') + '"'
++					+'style="vertical-align: text-top; '
++					+'-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); '
++					+'filter: alpha(opacity=50); opacity: .5;" />'
++				+'</div>');
 +			$('#controls').append(button);
 +
 +			button.click( function (event) {
 +				window.location.href = window.location.href.replace('service=files', 'service=gallery');
 +			});
 +		}
 +	}
 +});
diff --cc apps/gallery/lib/thumbnail.php
index ff3cad3,0000000..3aac64f
mode 100644,000000..100644
--- a/apps/gallery/lib/thumbnail.php
+++ b/apps/gallery/lib/thumbnail.php
@@@ -1,198 -1,0 +1,198 @@@
 +<?php
 +/**
 + * Copyright (c) 2012 Robin Appelman <icewind at owncloud.com>
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + * See the COPYING-README file.
 + */
 +
 +namespace OCA\Gallery;
 +
 +use OC\Files\Filesystem;
 +use OC\Files\View;
 +
 +class Thumbnail {
 +	static private $writeHookCount;
 +
 +	protected $image;
 +	protected $path;
 +	protected $user;
 +	protected $useOriginal = false;
 +
 +	/**
 +	 * @var \OC\Files\View $view
 +	 */
 +	protected $view;
 +
 +	public function __construct($imagePath, $user = null, $square = false) {
 +		if (!Filesystem::isValidPath($imagePath)) {
 +			return;
 +		}
 +		if (is_null($user)) {
 +			$this->view = Filesystem::getView();
 +			$this->user = \OCP\User::getUser();
 +		} else {
 +			$this->view = new View('/' . $user . '/files');
 +			$this->user = $user;
 +		}
 +		$this->useOriginal = (substr($imagePath, -4) === '.svg' or substr($imagePath, -5) === '.svgz');
 +		if ($this->useOriginal) {
 +			$this->path = $imagePath;
 +		} else {
 +			$galleryDir = \OC_User::getHome($this->user) . '/gallery/' . $this->user . '/';
 +			if (strrpos($imagePath, '.')) {
 +				$extension = substr($imagePath, strrpos($imagePath, '.') + 1);
 +				$image = substr($imagePath, 0, strrpos($imagePath, '.'));
 +			} else {
 +				$extension = '';
 +				$image = $imagePath;
 +			}
 +			if ($square) {
 +				$extension = 'square.' . $extension;
 +			}
 +			$this->path = $galleryDir . $image . '.' . $extension;
 +			if (!file_exists($this->path)) {
 +				$this->create($imagePath, $square);
 +			}
 +		}
 +	}
 +
 +	private function create($imagePath, $square) {
 +		$galleryDir = \OC_User::getHome($this->user) . '/gallery/' . $this->user . '/';
 +		$dir = dirname($imagePath);
- 		if (!is_dir($galleryDir . $dir)) {
- 			mkdir($galleryDir . $dir, 0755, true);
- 		}
 +		if (!$this->view->file_exists($imagePath)) {
 +			return;
 +		}
++		if (!is_dir($galleryDir . $dir)) {
++			mkdir($galleryDir . $dir, 0755, true);
++		}
 +		$absolutePath = $this->view->getAbsolutePath($imagePath);
- 		$this->image = new \OCP\Image('oc://' . $absolutePath);
++		$this->image = new \OCP\Image(fopen('oc://' . $absolutePath, 'r'));
 +		if ($this->image->valid()) {
 +			$this->image->fixOrientation();
 +			if ($square) {
 +				$this->image->centerCrop(200);
 +			} else {
 +				$this->image->fitIn(400, 200);
 +			}
 +			$this->image->save($this->path);
 +		}
 +	}
 +
 +	public function get() {
 +		if (is_null($this->image)) {
 +			$this->image = new \OCP\Image($this->path);
 +		}
 +		return $this->image;
 +	}
 +
 +	public function show() {
 +		if ($this->useOriginal) {
 +			$fp = @$this->view->fopen($this->path, 'rb');
 +			$mtime = $this->view->filemtime($this->path);
 +			$size = $this->view->filesize($this->path);
 +			$mime = $this->view->getMimetype($this->path);
 +		} else {
 +			$fp = @fopen($this->path, 'rb');
 +			$mtime = filemtime($this->path);
 +			$size = filesize($this->path);
 +			$mime = \OC_Helper::getMimetype($this->path);
 +		}
 +		if ($fp) {
 +			\OCP\Response::enableCaching();
 +			\OCP\Response::setLastModifiedHeader($mtime);
 +			header('Content-Length: ' . $size);
 +			header('Content-Type: ' . $mime);
 +
 +			fpassthru($fp);
 +		} else {
 +			\OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
 +		}
 +	}
 +
 +	static public function removeHook($params) {
 +		$path = $params['path'];
 +		$user = \OCP\USER::getUser();
 +		$galleryDir = \OC_User::getHome($user) . '/gallery/';
 +		$thumbPath = $galleryDir . $path;
 +		if (is_dir($thumbPath)) {
 +			if (file_exists($thumbPath . '.png')) {
 +				unlink($thumbPath . '.png');
 +			}
 +		} else {
 +			if (file_exists($thumbPath)) {
 +				unlink($thumbPath);
 +			}
 +
 +			if (strrpos($path, '.')) {
 +				$extension = substr($path, strrpos($path, '.') + 1);
 +				$image = substr($path, 0, strrpos($path, '.'));
 +			} else {
 +				$extension = '';
 +				$image = $path;
 +			}
 +			$squareThumbPath = $galleryDir . $image . '.square.' . $extension;
 +			if (file_exists($squareThumbPath)) {
 +				unlink($squareThumbPath);
 +			}
 +		}
 +
 +		$parent = dirname($path);
 +		if ($parent !== DIRECTORY_SEPARATOR and $parent !== '' and $parent !== $path) {
 +			self::removeHook(array('path' => $parent));
 +		}
 +	}
 +
 +	static public function writeHook($params) {
 +		self::removeHook($params);
 +		//only create 5 thumbnails max in one request to prevent locking up the request
 +		if (self::$writeHookCount < 5) {
 +			$path = $params['path'];
 +			$mime = \OC\Files\Filesystem::getMimetype($path);
 +			if (substr($mime, 0, 6) === 'image/') {
 +				self::$writeHookCount++;
 +				new Thumbnail($path);
 +			}
 +		}
 +	}
 +}
 +
 +class AlbumThumbnail extends Thumbnail {
 +
 +	public function __construct($imagePath, $user = null, $square = false) {
 +		if (!\OC\Files\Filesystem::isValidPath($imagePath)) {
 +			return;
 +		}
 +		if (is_null($user)) {
 +			$this->view = \OC\Files\Filesystem::getView();
 +			$this->user = \OCP\USER::getUser();
 +		} else {
 +			$this->view = new \OC\Files\View('/' . $user . '/files');
 +			$this->user = $user;
 +		}
 +		$galleryDir = \OC_User::getHome($this->user) . '/gallery/' . $this->user . '/';
 +		$this->path = $galleryDir . $imagePath . '.png';
 +		if (!file_exists($this->path)) {
 +			self::create($imagePath, $square);
 +		}
 +	}
 +
 +	public function create($albumPath, $square = false) {
 +		$albumView = new \OC\Files\View($this->view->getRoot() . $albumPath);
 +		$images = $albumView->searchByMime('image', 10);
 +
 +		$count = min(count($images), 10);
 +		$thumbnail = imagecreatetruecolor($count * 200, 200);
 +		for ($i = 0; $i < $count; $i++) {
 +			$thumb = new Thumbnail($albumPath . $images[$i]['path'], $this->user, true);
 +			$image = $thumb->get();
 +			if ($image && $image->valid()) {
 +				imagecopy($thumbnail, $image->resource(), $i * 200, 0, 0, 0, 200, 200);
 +				$image->destroy();
 +			}
 +		}
 +
 +		imagepng($thumbnail, $this->path);
 +		imagedestroy($thumbnail);
 +	}
 +}
diff --cc apps/gallery/public.php
index 29445b9,0000000..73d6ff7
mode 100644,000000..100644
--- a/apps/gallery/public.php
+++ b/apps/gallery/public.php
@@@ -1,110 -1,0 +1,111 @@@
 +<?php
 + /**
 + * ownCloud
 + *
 + * @author Thomas Müller
 + * @copyright 2013 Thomas Müller deepdiver at owncloud.com
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 + * License as published by the Free Software Foundation; either
 + * version 3 of the License, or any later version.
 + *
 + * This library is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 + *
 + * You should have received a copy of the GNU Affero General Public
 + * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 + *
 + */
 +
 +\OCP\JSON::checkAppEnabled('gallery');
 +
 +OCP\Util::addStyle('gallery', 'styles');
++OCP\Util::addStyle('gallery', 'mobile');
 +
 +if (isset($_GET['t'])) {
 +	$token = $_GET['t'];
 +	$linkItem = \OCP\Share::getShareByToken($token, false);
 +	if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
 +		// seems to be a valid share
 +		$type = $linkItem['item_type'];
 +		$fileSource = $linkItem['file_source'];
 +		$shareOwner = $linkItem['uid_owner'];
 +		$path = null;
 +		$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 +		$fileOwner = $rootLinkItem['uid_owner'];
 +		$albumName = trim($linkItem['file_target'], '//');
 +		$ownerDisplayName = \OC_User::getDisplayName($fileOwner);
 +
 +		// stupid copy and paste job
 +		if (isset($linkItem['share_with'])) {
 +			// Authenticate share_with
 +			$url = OCP\Util::linkToPublic('gallery') . '&t=' . $token;
 +			if (isset($_GET['file'])) {
 +				$url .= '&file=' . urlencode($_GET['file']);
 +			} else {
 +				if (isset($_GET['dir'])) {
 +					$url .= '&dir=' . urlencode($_GET['dir']);
 +				}
 +			}
 +			if (isset($_POST['password'])) {
 +				$password = $_POST['password'];
 +				if ($linkItem['share_type'] == OCP\Share::SHARE_TYPE_LINK) {
 +					// Check Password
 +					$forcePortable = (CRYPT_BLOWFISH != 1);
 +					$hasher = new PasswordHash(8, $forcePortable);
 +					if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''),
 +						$linkItem['share_with']))) {
 +						OCP\Util::addStyle('files_sharing', 'authenticate');
 +						$tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest');
 +						$tmpl->assign('URL', $url);
 +						$tmpl->assign('wrongpw', true);
 +						$tmpl->printPage();
 +						exit();
 +					} else {
 +						// Save item id in session for future requests
 +						\OC::$session->set('public_link_authenticated', $linkItem['id']);
 +					}
 +				} else {
 +					OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type']
 +						.' for share id '.$linkItem['id'], \OCP\Util::ERROR);
 +					header('HTTP/1.0 404 Not Found');
 +					$tmpl = new OCP\Template('', '404', 'guest');
 +					$tmpl->printPage();
 +					exit();
 +				}
 +
 +			} else {
 +				// Check if item id is set in session
 +				if ( ! \OC::$session->exists('public_link_authenticated')
 +					|| \OC::$session->get('public_link_authenticated') !== $linkItem['id']
 +				) {
 +					// Prompt for password
 +					OCP\Util::addStyle('files_sharing', 'authenticate');
 +					$tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest');
 +					$tmpl->assign('URL', $url);
 +					$tmpl->printPage();
 +					exit();
 +				}
 +			}
 +		}
 +
 +
 +		// render template
 +		$tmpl = new \OCP\Template('gallery', 'public', 'base');
 +		OCP\Util::addScript('gallery', 'gallery');
 +		OCP\Util::addScript('gallery', 'thumbnail');
 +		OCP\Util::addStyle('gallery', 'public');
 +		$tmpl->assign('token', $token);
 +		$tmpl->assign('displayName', $ownerDisplayName);
 +		$tmpl->assign('albumName', $albumName);
 +
 +		$tmpl->printPage();
 +		exit;
 +	}
 +}
 +
 +$tmpl = new OCP\Template('', '404', 'guest');
 +$tmpl->printPage();
diff --cc apps/gallery/templates/public.php
index 50130f3,0000000..0684b20
mode 100644,000000..100644
--- a/apps/gallery/templates/public.php
+++ b/apps/gallery/templates/public.php
@@@ -1,29 -1,0 +1,34 @@@
 +<div class="wrapper"><!-- for sticky footer -->
 +
 +<header>
 +	<div id="header">
 +		<a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud">
 +			<img class="svg" src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
 +		<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
 +		<div class="header-right">
- 			<span id="details"><?php print_unescaped($l->t('%s shared <strong>%s</strong> with you', array($_['displayName'], $_['albumName']))) ?></span>
++			<span id="details"><?php print_unescaped($l->t('shared by %s', $_['displayName'])) ?></span>
 +		</div>
 +	</div>
 +</header>
 +<div id="content" data-albumname="<?php p($_['albumName'])?>">
 +	<div id="controls">
- 		<div id='breadcrumbs'></div>
- 		<div id='openAsFileListButton' class="button"><?php p($l->t('File list')) ?></div>
++		<div id="breadcrumbs"></div>
++		<!-- toggle for opening shared picture view as file list -->
++		<div id="openAsFileListButton" class="button">
++			<img class="svg"
++				src="<?php print_unescaped(image_path('core', 'actions/toggle-filelist.svg')); ?>"
++				alt="<?php p($l->t('File list')); ?>" />
++		</div>
 +	</div>
 +
 +	<div id='gallery' class="hascontrols" data-token="<?php isset($_['token']) ? p($_['token']) : p(false) ?>"></div>
 +</div>
 +
 +	<div class="push"></div><!-- for sticky footer -->
 +</div>
 +
 +<footer>
 +	<p class="info">
 +		<?php print_unescaped($theme->getLongFooter()); ?>
 +	</p>
 +</footer>
diff --cc apps/updater/lib/downloader.php
index c6eb3f9,0000000..aab9baf
mode 100644,000000..100644
--- a/apps/updater/lib/downloader.php
+++ b/apps/updater/lib/downloader.php
@@@ -1,104 -1,0 +1,114 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2012-2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Updater;
 +
 +class Downloader {
 +
 +	const PACKAGE_ROOT = 'owncloud';
 +
 +	protected static $package = false;
 +
 +	public static function getPackage($url, $version) {
 +		self::$package = \OCP\Files::tmpFile();
 +		if (!self::$package){
 +			throw new \Exception('Unable to create a temporary file');
 +		}
 +		try {
- 			if (file_put_contents(self::$package, self::fetch($url))===false) {
++			
++			if (self::fetch($url)===false) {
 +				throw new \Exception("Error storing package content");
 +			}
 +			if (preg_match('/\.zip$/i', $url)) {
 +				rename(self::$package, self::$package . '.zip');
 +				self::$package .= '.zip';
 +			} elseif (preg_match('/(\.tgz|\.tar\.gz)$/i', $url)) {
 +				rename(self::$package, self::$package . '.tgz');
 +				self::$package .= '.tgz';
 +			} elseif (preg_match('/\.tar\.bz2$/i', $url)) {
 +				rename(self::$package, self::$package . '.tar.bz2');
 +				self::$package .= '.tar.bz2';
 +			} else {
 +				throw new \Exception('Unable to extract package');
 +			}
 +
 +			$extractDir = self::getPackageDir($version);
 +			Helper::mkdir($extractDir, true);
 +
 +			$archive = \OC_Archive::open(self::$package);
 +			if (!$archive || !$archive->extract($extractDir)) {
 +				throw new \Exception(self::$package . " extraction error");
 +			}
 +			
 +		} catch (\Exception $e){
 +			App::log('Retrieving ' . $url);
 +			self::cleanUp($version);
 +			throw $e;
 +		}
 +		Helper::removeIfExists(self::$package);
 +		
 +		//  Prepare extracted data
 +		//  to have '3rdparty', 'apps' and 'core' subdirectories
 +		$sources = Helper::getSources($version);
 +		$baseDir = $extractDir. '/' . self::PACKAGE_ROOT;
 +		rename($baseDir . '/' . Helper::THIRDPARTY_DIRNAME, $sources[Helper::THIRDPARTY_DIRNAME]);
 +		rename($baseDir . '/' . Helper::APP_DIRNAME, $sources[Helper::APP_DIRNAME]);
 +		rename($baseDir, $sources[Helper::CORE_DIRNAME]);
 +	}
 +	
 +	/* To be replaced with OC_Util::getUrlContent for 5.x */
 +	public static function fetch($url){
- 		if  (function_exists('curl_init')) {
++		
++		$urlFopen = ini_get('allow_url_fopen');
++		$allowed = array('on', 'yes', 'true', 1);
++		
++		if (\in_array($urlFopen, $allowed)){
++			$result = @file_put_contents(self::$package, fopen($url, 'r'));
++		} elseif  (function_exists('curl_init')) {
 +			$curl = curl_init();
 +			curl_setopt($curl, CURLOPT_HEADER, 0);
 +			curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 +			curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
 +			curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
 +			curl_setopt($curl, CURLOPT_URL, $url);
 +			curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler");
- 			$data = curl_exec($curl);
++			
++			$result = @file_put_contents(self::$package, curl_exec($curl));
++			
 +			curl_close($curl);
 +		} else {
 +			$ctx = stream_context_create(
 +				array(
 +					'http' => array('timeout' => 32000)
 +				     )
 +				);
- 			$data = @file_get_contents($url, 0, $ctx);
++			
++			$result = @file_put_contents(self::$package, @file_get_contents($url, 0, $ctx));
 +		}
- 		return $data;
++		return $result;
 +	}
 +
 +	public static function cleanUp($version){
 +		if (self::$package) {
 +			Helper::removeIfExists(self::$package);
 +		}
 +		Helper::removeIfExists(self::getPackageDir($version));
 +	}
 +	
 +	public static function isClean($version){
 +		return !@file_exists(self::getPackageDir($version));
 +	}
 +	
 +	public static function getPackageDir($version) {
 +		return App::getBackupBase() . $version;
 +	}
 +}
diff --cc apps/updater/lib/helper.php
index 235b5b4,0000000..ae7a68d
mode 100644,000000..100644
--- a/apps/updater/lib/helper.php
+++ b/apps/updater/lib/helper.php
@@@ -1,222 -1,0 +1,228 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2012-2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +namespace OCA\Updater;
 +
 +class Helper {
 +	const APP_DIRNAME = 'apps';
 +	const THIRDPARTY_DIRNAME = '3rdparty';
 +	const CORE_DIRNAME = 'core';
 +	
 +	/**
 +	 * Moves file/directory
 +	 * @param string $src  - source path
 +	 * @param string $dest - destination path
 +	 * @throws \Exception on error
 +	 */
 +	public static function move($src, $dest) {
 +		if (!rename($src, $dest)) {
 +			throw new \Exception("Unable to move $src to $dest");
 +		}
 +	}
 +	
 +	/**
 +	 * Copy recoursive 
 +	 * @param string $src  - source path
 +	 * @param string $dest - destination path
 +	 * @throws \Exception on error
 +	 */
 +	public static function copyr($src, $dest, $stopOnError = true) {
 +		if(is_dir($src)) {
 +			if(!is_dir($dest)) {
 +				try {
 +					self::mkdir($dest);
 +				} catch (\Exception $e){
 +					if ($stopOnError){
 +						throw $e;
 +					}
 +				}
 +			}
 +			$files = scandir($src);
 +			foreach ($files as $file) {
 +				if ($file != "." && $file != "..") {
 +					self::copyr("$src/$file", "$dest/$file", $stopOnError);
 +				}
 +			}
 +		}elseif(file_exists($src)) {
 +			if (!copy($src, $dest) && $stopOnError) {
 +				throw new \Exception("Unable copy $src to $dest");
 +			}
 +		}
 +	}
 +
 +	/**
 +	 * Wrapper for mkdir
 +	 * @param string $path
 +	 * @param bool $isRecoursive
 +	 * @throws \Exception on error
 +	 */
 +	public static function mkdir($path, $isRecoursive = false) {
 +		if (!mkdir($path, 0755, $isRecoursive)) {
 +			throw new \Exception("Unable to create $path");
 +		}
 +	}
 +	
 +	/**
 +	 * Get directory content as array
 +	 * @param string $path
 +	 * @return array 
 +	 * @throws \Exception on error
 +	 */
 +	public static function scandir($path) {
 +		$content = scandir($path);
 +		if (!is_array($content)) {
 +			throw new \Exception("Unable to list $path content");
 +		}
 +		return $content;
 +	}
 +
 +	/**
 +	 * Silently remove the filesystem item
 +	 * Used for cleanup
 +	 * @param string $path
 +	 */
 +	public static function removeIfExists($path) {
 +		if (!file_exists($path)) {
 +			return;
 +		}
 +
 +		if (is_dir($path)) {
 +			self::rmdirr($path);
 +		} else {
 +			@unlink($path);
 +		}
 +	}
 +	
 +	protected static function rmdirr($dir) {
 +		if(is_dir($dir)) {
 +			$files = scandir($dir);
 +			foreach($files as $file) {
 +				if ($file != "." && $file != "..") {
 +					self::rmdirr("$dir/$file");
 +				}
 +			}
 +			@rmdir($dir);
 +		}elseif(file_exists($dir)) {
 +			@unlink($dir);
 +		}
 +		if(file_exists($dir)) {
 +			return false;
 +		}else{
 +			return true;
 +		}
 +	}
 +
 +	/**
 +	 * Get the final list of files/directories to be replaced
 +	 * e.g. ['core']['lib'] = '/path/to/lib'
 +	 * @return array
 +	 */
 +	public static function getPreparedLocations() {
 +		$preparedLocations  = array();
 +		foreach (self::getDirectories() as $type => $path) {
 +			$preparedLocations[$type] = self::getFilteredContent($path);
 +		}
 +		return $preparedLocations;
 +	}
 +	
 +	/**
 +	 * Lists directory content as an array
 +	 * ['basename']=>'full path' 
 +	 * e.g.['lib'] = '/path/to/lib'
 +	 * @param string $path
 +	 * @return array
 +	 */
 +	public static function getFilteredContent($path){
 +		$result = array();
 +		$filtered =  self::filterLocations(self::scandir($path), $path);
 +		foreach ($filtered as $dirName){
 +			$result [$dirName] = $path . '/' . $dirName;
 +		}
 +		return $result;
 +	}
 +
 +	public static function filterLocations($locations, $basePath) {
 +		$fullPath = array_values(self::getDirectories());
 +		$fullPath[] = rtrim(App::getBackupBase(), '/');
 +		$fullPath[] = \OCP\Config::getSystemValue( "datadirectory", \OC::$SERVERROOT."/data" );
 +		$fullPath[] = \OC::$SERVERROOT."/themes";
 +		
++		foreach($fullPath as $key=>$path){
++			$fullPath[] = realpath($path);
++		}
++		
 +		$exclusions = array(
 +			'full' => $fullPath,
 +			'relative' => array('.', '..')
 +		);
 +		
 +		foreach ($locations as $key => $location) {
 +			$fullPath = $basePath . '/' .$location;
- 			if (!is_dir($fullPath)) {
++			$realPath = realpath($fullPath);
++			if (is_file($fullPath)) {
 +				continue;
 +			}
 +			if (in_array($fullPath, $exclusions['full'])
++				|| in_array($realPath, $exclusions['full'])
 +				|| in_array($location, $exclusions['relative'])
 +			) {
 +				unset($locations[$key]);
 +			}
 +		}
 +		return $locations;
 +	}
 +	
 +	/**
 +	 * Get the list of directories to be replaced on update
 +	 * @return array
 +	 */
 +	public static function getDirectories() {
 +		$dirs = array();
 +		$dirs[self::THIRDPARTY_DIRNAME] = \OC::$THIRDPARTYROOT . '/' . self::THIRDPARTY_DIRNAME;
 +		
 +		//Long, long ago we had single app location
 +		if (isset(\OC::$APPSROOTS)) {
 +			foreach (\OC::$APPSROOTS as $i => $approot){
 +				$index = $i ? $i : '';
 +				$dirs[self::APP_DIRNAME . $index] = $approot['path'];
 +			}
 +		} else {
 +			$dirs[self::APP_DIRNAME] = \OC::$APPSROOT . '/' . self::APP_DIRNAME;
 +		}
 +		
 +	    $dirs[self::CORE_DIRNAME] = \OC::$SERVERROOT;
 +		return $dirs;
 +	}
 +	
 +	public static function getSources($version) {
 +		$base = Downloader::getPackageDir($version);
 +		return array (
 +			self::APP_DIRNAME => $base . '/' . self::APP_DIRNAME,
 +			self::THIRDPARTY_DIRNAME => $base . '/' . self::THIRDPARTY_DIRNAME,
 +			self::CORE_DIRNAME => $base . '/' . self::CORE_DIRNAME,	
 +		);
 +	}
 +	
 +	public static function addDirectoryToZip($zip, $dir, $base) {
 +		$newFolder = str_replace($base, '', $dir);
 +		$zip->addEmptyDir($newFolder);
 +		foreach(glob($dir . '/*') as $file) {
 +			if(is_dir($file)) {
 +				$zip = self::addDirectoryToZip($zip, $file, $base);
 +			} else {
 +				$newFile = str_replace($base, '', $file);
 +				$zip->addFile($file, $newFile);
 +			}
 +		}
 +		return $zip;
 +	}
 +}
diff --cc apps/updater/templates/admin.php
index 4be4499,0000000..2febec6
mode 100644,000000..100644
--- a/apps/updater/templates/admin.php
+++ b/apps/updater/templates/admin.php
@@@ -1,18 -1,0 +1,18 @@@
 +<?php
 +
 +/**
 + * ownCloud - Updater plugin
 + *
 + * @author Victor Dubiniuk
 + * @copyright 2012-2013 Victor Dubiniuk victor.dubiniuk at gmail.com
 + *
 + * This file is licensed under the Affero General Public License version 3 or
 + * later.
 + */
 +
 +?>
 +
 +<fieldset class="personalblock">
 +	<h2>Updater</h2>
- 	<a href="<?php p(\OCP\Util::linkTo('updater', 'update.php')) ?>"><?php p($l->t('Update Center')) ?></a>
++	<a target="_blank" href="<?php p(\OCP\Util::linkTo('updater', 'update.php')) ?>"><?php p($l->t('Update Center')) ?></a>
 +</fieldset>
diff --cc config/config.sample.php
index 1070ef7,72b21ff..72b21ff
mode 100644,100755..100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
diff --cc core/doc/admin/LDAP/CONFIGURATION.html
index 0000000,0000000..7f782b2
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/LDAP/CONFIGURATION.html
@@@ -1,0 -1,0 +1,484 @@@
++
++<!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" />
++<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>
++<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="configuration">
++<h1>CONFIGURATION<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="enable-ldap-app">
++<h2>Enable LDAP app<a class="headerlink" href="#enable-ldap-app" title="Permalink to this headline">¶</a></h2>
++<p>From the
++APPs
++page, select “
++LDAP user and group backend”
++and select
++enable</p>
++<p><img alt="1000020100000359000000A8B848DE68_png" src="../_images/1000020100000359000000A8B848DE68.png" /></p>
++</div>
++<div class="section" id="configuring-ldap">
++<h2>Configuring LDAP<a class="headerlink" href="#configuring-ldap" title="Permalink to this headline">¶</a></h2>
++<p>The configuration of the LDAP feature is performed on the Admin page of the ownCloud web browser.
++The configuration follows a wizard-like approach split into four tabs.
++The first tab must be completed correctly to allow access to subsequent tabs.
++Although the configuration in the remaining tabs is detected automatically, it should be reviewed by the admin to verify correctness.
++An indicator exists on the all pages
++to show whether the configuration is valid, incomplete, or incorrect.</p>
++<p>Configuration settings are saved automatically when the cursor is no longer focused on the input element.</p>
++<div class="section" id="server-tab">
++<h3>Server Tab<a class="headerlink" href="#server-tab" title="Permalink to this headline">¶</a></h3>
++<p>The server tab contains basic information on the LDAP server.
++It makes certain that ownCloud can connect to the desired LDAP and read data from it.
++At a minimum, the admin must provide a hostname for the LDAP server.
++If anonymous access to the LDAP server is not allowed, the admin will be required to enter an account Distinguished Name (DN) and password.
++ownCloud will auto-detect the port and base DN.</p>
++<div class="section" id="server">
++<h4>Server<a class="headerlink" href="#server" title="Permalink to this headline">¶</a></h4>
++<p>ownCloud can be configured to connect to multiple LDAP servers.
++Using this control you can pick a configuration you want to edit or to add a new one.
++The button
++Delete Configuration deletes the current configuration.</p>
++</div>
++<div class="section" id="host">
++<h4>Host<a class="headerlink" href="#host" title="Permalink to this headline">¶</a></h4>
++<p>The hostname of the LDAP server.
++It can also be a ldaps:// URI.
++It is possible to pass a port number which will speed up port detection.
++This is especially useful if a custom port is used.
++ownCloud will subsequently move the port value to the port field.</p>
++<p>Examples:</p>
++<ul class="simple">
++<li>Directory.my-company.com</li>
++<li>Ldaps://directory.my-company.com</li>
++<li>Directory.my-company.com:9876</li>
++</ul>
++</div>
++<div class="section" id="port">
++<h4>Port<a class="headerlink" href="#port" title="Permalink to this headline">¶</a></h4>
++<p>This is the port which ownCloud should utilize to connect to the LDAP server.
++Upon initial configuration, this field is disabled.
++ownCloud will auto-detect the port if it is running on a standard port (389).
++After ownCloud detects the port, the field will be enabled for admin input.
++A successfully discovered port will be inserted by ownCloud.</p>
++</div>
++<div class="section" id="user-dn">
++<h4>User DN<a class="headerlink" href="#user-dn" title="Permalink to this headline">¶</a></h4>
++<p>The name as DN of a user who is able to do searches in the LDAP directory.
++For anonymous access, leave this field blank.
++It is recommended to have a special system user for ownCloud.
++This information is provided by the LDAP admin.</p>
++</div>
++<div class="section" id="password">
++<h4>Password<a class="headerlink" href="#password" title="Permalink to this headline">¶</a></h4>
++<p>The password for the user given above.
++For anonymous access, leave this blank.
++This information is provided by the LDAP admin.</p>
++</div>
++<div class="section" id="base-dn">
++<h4>Base DN<a class="headerlink" href="#base-dn" title="Permalink to this headline">¶</a></h4>
++<p>The base DM of the LDAP from where all users and groups can be reached.
++It is possible to provide separated base DN’s for users and groups in the advanced tab.
++This is a mandatory field.
++ownCloud will attempt to determine the proper value of this field based on the provided User DN or Host values.</p>
++<p><img alt="100000000000043200000169BCD20493_png" src="../_images/100000000000043200000169BCD20493.png" style="width: 6.5in; height: 2.1846in;" /></p>
++</div>
++</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 will be able to log into ownCloud.
++This may be configured using the wizard or entered via a raw LDAP filter.</p>
++<div class="section" id="only-those-object-classes">
++<h4>Only those object classes<a class="headerlink" href="#only-those-object-classes" title="Permalink to this headline">¶</a></h4>
++<p>ownCloud will determine the available object classes.
++ownCloud will automatically select the object that contains the highest number of users.
++It is possible to select multiple object classes.</p>
++</div>
++<div class="section" id="only-from-those-groups">
++<h4>Only from those groups<a class="headerlink" href="#only-from-those-groups" title="Permalink to this headline">¶</a></h4>
++<p>This is used if the LDAP server supports the member-of-overlay in LDAP filters.
++It allows the admin to define the users from one or more certain groups that are allowed to appear and log into ownCloud.
++No value is selected by default.
++It is possible to select multiple groups.</p>
++<p>If the LDAP server does not support member-of-overlay in LDAP filters, the field is disabled.</p>
++</div>
++<div class="section" id="edit-raw-filter-instead">
++<h4>Edit raw filter instead<a class="headerlink" href="#edit-raw-filter-instead" title="Permalink to this headline">¶</a></h4>
++<p>Selecting this text will toggle the filter mode.
++Instead of the wizard’s assistance, the admin may enter the raw LDAP filter in this field.</p>
++<p>Example:</p>
++<ul class="simple">
++<li>objectClass=inetOrgPerson</li>
++</ul>
++</div>
++<div class="section" id="x-users-found">
++<h4>x users found<a class="headerlink" href="#x-users-found" title="Permalink to this headline">¶</a></h4>
++<p>Indicates the approximate number of users allowed to access ownCloud.
++This number will update after any changes made to the LDAP configuration.</p>
++<p><img alt="100000000000042500000163D2B339D5_png" src="../_images/100000000000042500000163D2B339D5.png" style="width: 6.5in; height: 2.1752in;" /></p>
++</div>
++</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 information will be compared to login credentials entered by the user.
++It is possible to allow multiple user details.
++It is also possible to enter a raw LDAP filter.</p>
++<div class="section" id="ldap-username">
++<h4>LDAP Username<a class="headerlink" href="#ldap-username" title="Permalink to this headline">¶</a></h4>
++<p>If checked, the login credentials will be compared to the username in the LDAP directory.
++The corresponding attribute, usually “uid” or “samaccountname” will be automatically detected by ownCloud.</p>
++</div>
++<div class="section" id="ldap-email-address">
++<h4>LDAP Email Address<a class="headerlink" href="#ldap-email-address" title="Permalink to this headline">¶</a></h4>
++<p>If checked, the login credentials will be compared to an email address in the LDAP directory.
++ownCloud will exmaine the “mailPrimaryAddress” and “mail” attributes in the LDAP for the email address.</p>
++</div>
++<div class="section" id="other-attributes">
++<h4>Other attributes<a class="headerlink" href="#other-attributes" title="Permalink to this headline">¶</a></h4>
++<p>This field allows the admin to select additional attributes for comparison.
++The list is generated automatically based on the attributes contained in the user object of the LDAP server.</p>
++</div>
++<div class="section" id="enter-raw-filter-instead">
++<h4>Enter raw filter instead<a class="headerlink" href="#enter-raw-filter-instead" title="Permalink to this headline">¶</a></h4>
++<p>Selecting this text will toggle the filter mode.
++Instead of the wizard’s assistance, the admin may enter the raw LDAP filter in this field.</p>
++<p>The “%uid” placeholder will be replaced with the login name entered by the user upon login.</p>
++<p>Examples:</p>
++<ul class="simple">
++<li>Username only:
++uid=%iud</li>
++<li>Username or email address: (<a href="#id1"><span class="problematic" id="id2">|</span></a>(uid=%uid)(mail=%uid))</li>
++</ul>
++<p><img alt="10000000000004170000016ACB5E15AE_png" src="../_images/10000000000004170000016ACB5E15AE.png" style="width: 6.5in; height: 2.2465in;" /></p>
++</div>
++</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 this tab determine which groups will be available in ownCloud.
++This tab does not restrict logins in any manner as that was handled in the prior tabs.
++It is possible to enter a raw LDAP filter as well.</p>
++<p>By default, there are no groups available in ownCloud.
++The admin must enable this manually.</p>
++<div class="section" id="id3">
++<h4>Only those object classes<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h4>
++<p>ownCloud will automatically determine which object classes are available in the LDAP.
++ownCloud will only list object classes that return at least one group object.
++It is possible to enter multiple object classes.</p>
++</div>
++<div class="section" id="id4">
++<h4>Only from those groups<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h4>
++<p>This setting allows the admin to select which groups are available within ownCloud.
++ownCloud will generate a list of available groups found in the LDAP server for the admin to select.
++It is possible to enter multiple groups.</p>
++</div>
++<div class="section" id="id5">
++<h4>Edit raw filter instead<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h4>
++<p>Selecting this text will toggle the filter mode.
++Instead of the wizard’s assistance, the admin may enter the raw LDAP filter in this field</p>
++</div>
++<div class="section" id="y-groups-found">
++<h4>Y groups found<a class="headerlink" href="#y-groups-found" title="Permalink to this headline">¶</a></h4>
++<p>Indicates the approximate number of groups available in ownCloud.
++This number will update after any changes made to the LDAP configuration.</p>
++<p><img alt="100000000000043000000164DA0CE8C9_png" src="../_images/100000000000043000000164DA0CE8C9.png" style="width: 6.5in; height: 2.1583in;" /></p>
++</div>
++</div>
++<div class="section" id="advanced-tab">
++<h3>Advanced Tab<a class="headerlink" href="#advanced-tab" title="Permalink to this headline">¶</a></h3>
++<p>The LDAP Advanced settings section allows the admin to define less common options.
++These options are not required for a working connection however, they can have a positive effect on the performance.</p>
++<p>The Advanced Settings tab has three sections</p>
++<ul class="simple">
++<li>Connection settings</li>
++<li>Directory settings</li>
++<li>Special attributes</li>
++</ul>
++<div class="section" id="connection-settings">
++<h4>Connection Settings<a class="headerlink" href="#connection-settings" title="Permalink to this headline">¶</a></h4>
++<div class="section" id="configuration-active">
++<h5>Configuration Active<a class="headerlink" href="#configuration-active" title="Permalink to this headline">¶</a></h5>
++<p>Allows the admin to enable or disable the current configuration.
++A disabled configuration will not connect to the LDAP server.</p>
++<p>By default, this is disabled.
++It is enabled automatically, when using the wizard and configuration is valid and tests successfully.</p>
++</div>
++<div class="section" id="backup-replica-host">
++<h5>Backup (Replica) Host<a class="headerlink" href="#backup-replica-host" title="Permalink to this headline">¶</a></h5>
++<p>This is used to define a backup LDAP server.
++ownCloud automatically attempts to connect to the backup server when the primary server cannot be accessed.
++It is important that the backup server is an exact replica of the primary server as all the object UUIDs must match.</p>
++</div>
++<div class="section" id="backup-replica-port">
++<h5>Backup (Replica) Port<a class="headerlink" href="#backup-replica-port" title="Permalink to this headline">¶</a></h5>
++<p>This identifies the port on which ownCloud will connect to the backup LDAP server.
++If no port is provided, ownCloud will utilize the same port as the primary LDAP server.</p>
++</div>
++<div class="section" id="disable-main-server">
++<h5>Disable Main Server<a class="headerlink" href="#disable-main-server" title="Permalink to this headline">¶</a></h5>
++<p>This is used to disable the primary LDAP server so ownCloud will connect only to the backup server.
++This can be useful for planned maintenance on the primary server.</p>
++</div>
++<div class="section" id="case-insensitive-ldap-server-windows">
++<h5>Case insensitive LDAP server (Windows)<a class="headerlink" href="#case-insensitive-ldap-server-windows" title="Permalink to this headline">¶</a></h5>
++<p>Check this if the LDAP server is running on a windows host.
++Not usually necessary.</p>
++</div>
++<div class="section" id="turn-off-ssl-certificate-validation">
++<h5>Turn off SSL certificate validation<a class="headerlink" href="#turn-off-ssl-certificate-validation" title="Permalink to this headline">¶</a></h5>
++<p>Disables the check for a valid SSL certificate.
++It is recommended to use for testing only if needed, but not use in production.</p>
++</div>
++<div class="section" id="cache-time-to-live">
++<h5>Cache Time-To-Live<a class="headerlink" href="#cache-time-to-live" title="Permalink to this headline">¶</a></h5>
++<p>ownCloud caches the information it receives from the LDAP server.
++This is necessary as the ownCloud server attempts to validate the user with every page request or WebDAV interaction.
++This time is in seconds.</p>
++<p>Note if it is required to have the most up-to-date information from the LDAP, it is recommended not to turn off the cache totally, however, to define a lifetime of a small duration (15 seconds)</p>
++<p><img alt="100000000000042E000001D3EEB9978B_png" src="../_images/100000000000042E000001D3EEB9978B.png" style="width: 6.5in; height: 2.8366in;" /></p>
++</div>
++</div>
++<div class="section" id="directory-settings">
++<h4>Directory Settings<a class="headerlink" href="#directory-settings" title="Permalink to this headline">¶</a></h4>
++<div class="section" id="user-display-name-field">
++<h5>User Display Name Field<a class="headerlink" href="#user-display-name-field" title="Permalink to this headline">¶</a></h5>
++<p>The attribute that should be used as display name in ownCloud.</p>
++</div>
++<div class="section" id="base-user-tree">
++<h5>Base User Tree<a class="headerlink" href="#base-user-tree" title="Permalink to this headline">¶</a></h5>
++<p>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>
++</div>
++<div class="section" id="user-search-attributes">
++<h5>User Search Attributes<a class="headerlink" href="#user-search-attributes" title="Permalink to this headline">¶</a></h5>
++<p>These attributes are used when a search for users with a search string is done.
++This happens in the share dialogue.
++By default the user display name attribute as specified above is used.
++Multiple attributes can be given, one in each line.</p>
++<p>Note: if an attribute is not available for a given user object, the user will neither be listed nor able to login.</p>
++</div>
++<div class="section" id="group-display-name-field">
++<h5>Group Display Name Field<a class="headerlink" href="#group-display-name-field" title="Permalink to this headline">¶</a></h5>
++<p>The attribute that should be used as an 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 bane is assigned, it will not be changed.</p>
++</div>
++<div class="section" id="base-group-tree">
++<h5>Base Group Tree<a class="headerlink" href="#base-group-tree" title="Permalink to this headline">¶</a></h5>
++<p>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>
++</div>
++<div class="section" id="group-search-attributes">
++<h5>Group Search Attributes<a class="headerlink" href="#group-search-attributes" title="Permalink to this headline">¶</a></h5>
++<p>These attributes are used when a search for groups with a search string is done.
++This happens in the share dialogue for instance.
++By default the group display name attribute as specified above is being used.
++Multiple attributes can be given, one in each line.</p>
++</div>
++<div class="section" id="group-member-association">
++<h5>Group Member association<a class="headerlink" href="#group-member-association" title="Permalink to this headline">¶</a></h5>
++<p>The attribute that is used to indicate group memberships.</p>
++<p><img alt="10000201000005F90000029D8BA200FB_png" src="../_images/10000201000005F90000029D8BA200FB.png" /></p>
++</div>
++</div>
++<div class="section" id="special-attributes">
++<h4>Special Attributes<a class="headerlink" href="#special-attributes" title="Permalink to this headline">¶</a></h4>
++<div class="section" id="quota-field">
++<h5>Quota Field<a class="headerlink" href="#quota-field" title="Permalink to this headline">¶</a></h5>
++<p>This field is used to set a LDAP attribute to define the user quota.
++The attribute should retain a readable value, for example “2 GB”.</p>
++</div>
++<div class="section" id="quota-default">
++<h5>Quota Default<a class="headerlink" href="#quota-default" title="Permalink to this headline">¶</a></h5>
++<p>This is used to override the ownCloud default quota for LDAP users who do not have an attribute set in the above parameter.</p>
++<p>Example</p>
++<p>15GB</p>
++</div>
++<div class="section" id="email-field">
++<h5>Email Field<a class="headerlink" href="#email-field" title="Permalink to this headline">¶</a></h5>
++<p>ownCloud will read the attribute configured here and configure the user’s email.</p>
++</div>
++<div class="section" id="user-home-folder-naming-rule">
++<h5>User Home Folder Naming Rule<a class="headerlink" href="#user-home-folder-naming-rule" title="Permalink to this headline">¶</a></h5>
++<p>By default, ownCloud creates a user directory which contains all files and meta data based on the ownCloud user name.
++To override this setting and name it after a different attribute, configure that attribute here.
++The attribute can also return an absolute path (such as “/mnt/storage43/alice”).</p>
++<p><img alt="100000000000041D0000017D8D1BC4D9_png" src="../_images/100000000000041D0000017D8D1BC4D9.png" style="width: 6.5in; height: 2.352in;" /></p>
++</div>
++</div>
++</div>
++</div>
++<div class="section" id="expert-tab">
++<h2>Expert Tab<a class="headerlink" href="#expert-tab" title="Permalink to this headline">¶</a></h2>
++<div class="section" id="internal-username">
++<h3>Internal Username<a class="headerlink" href="#internal-username" title="Permalink to this headline">¶</a></h3>
++<p>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 href="#id6"><span class="problematic" id="id7">a-zA-Z0-0_</span></a>.@-].
++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 back ends (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 behavior can be overridden.</p>
++<p>Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users.</p>
++</div>
++<div class="section" id="override-uuid-detection">
++<h3>Override UUID detection<a class="headerlink" href="#override-uuid-detection" title="Permalink to this headline">¶</a></h3>
++<p>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 from 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 behavior. 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>
++</div>
++<div class="section" id="username-ldap-user-mapping">
++<h3>Username-LDAP User Mapping<a class="headerlink" href="#username-ldap-user-mapping" title="Permalink to this headline">¶</a></h3>
++<p>ownCloud uses the usernames as key to store and assign data.
++In order to precisely identify and recognize users, each LDAP user will have an 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 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.
++Never clear the mappings in a production environment.
++Only clear mappings in a test or experimental stage.</p>
++<p><img alt="10000000000003FB000002359BAFB40E_png" src="../_images/10000000000003FB000002359BAFB40E.png" style="width: 6.5in; height: 3.6043in;" /></p>
++</div>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/LDAP/Introduction.html
index 0c88c56,0000000..3ba01d2
mode 100644,000000..100644
--- a/core/doc/admin/LDAP/Introduction.html
+++ b/core/doc/admin/LDAP/Introduction.html
@@@ -1,172 -1,0 +1,151 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud ships an LDAP backend, which allows full use of ownCloud for user logging 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 features.</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/LDAP/Table_of_Contents.html
index 0c88c56,0000000..e0e0117
mode 100644,000000..100644
--- a/core/doc/admin/LDAP/Table_of_Contents.html
+++ b/core/doc/admin/LDAP/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc374437072>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/LDAP/index.html
index 0c88c56,0000000..9929c97
mode 100644,000000..100644
--- a/core/doc/admin/LDAP/index.html
+++ b/core/doc/admin/LDAP/index.html
@@@ -1,172 -1,0 +1,154 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>LDAP Active Directory Integration</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="CONFIGURATION.html">CONFIGURATION</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="CONFIGURATION.html#enable-ldap-app">Enable LDAP app</a></li>
++<li class="toctree-l2"><a class="reference internal" href="CONFIGURATION.html#configuring-ldap">Configuring LDAP</a></li>
++<li class="toctree-l2"><a class="reference internal" href="CONFIGURATION.html#expert-tab">Expert Tab</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/_images/100000000000001D0000001E5C455170.png
index 0000000,0000000..28dee23
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000003800000018D49F1CE7.png
index 0000000,0000000..82737b9
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000050000000DB83B8FA5B.png
index 0000000,0000000..43a9dac
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000950000004412998BE7.png
index 0000000,0000000..58a908d
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000A800000073F49785A6.png
index 0000000,0000000..f0b82f4
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000B600000120706C3C75.png
index 0000000,0000000..a970f26
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000CD000000ECA8DE7780.png
index 0000000,0000000..a64c869
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000D2000000F553818155.png
index 0000000,0000000..6101e58
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F1000000F56125BDBA.png
index 0000000,0000000..83d536b
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F1000000F6704F46D3.png
index 0000000,0000000..30067ba
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F20000003BAA849B42.png
index 0000000,0000000..1aa0caf
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F300000068AF0ECD53.png
index 0000000,0000000..88d0205
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F40000019A110DD159.png
index 0000000,0000000..7d52f84
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F5000000675DC5F68C.png
index 0000000,0000000..4ae6e77
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F500000067A8845EF8.png
index 0000000,0000000..ea664bc
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F60000006754ED2A1E.png
index 0000000,0000000..1dc5b1f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000000F6000000685DFB3767.png
index 0000000,0000000..f698637
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000012C0000009C444B4720.png
index 0000000,0000000..d0de134
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000013C0000017D4FC6CEF5.png
index 0000000,0000000..32498ea
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001400000008A557EF7E3.png
index 0000000,0000000..1b27bcf
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001440000005A2989832F.png
index 0000000,0000000..826ec04
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000160000000DBB2FB0223.png
index 0000000,0000000..632a036
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000163000000E9CDA84C92.png
index 0000000,0000000..7a16c70
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000165000000D3FF2168AB.png
index 0000000,0000000..fa64856
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000167000000B43E4BF478.png
index 0000000,0000000..ba50dea
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000175000000FAB2A2B294.png
index 0000000,0000000..6b3f1d7
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001800000009A9494E037.png
index 0000000,0000000..6bb0e82
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001880000007EA4444400.png
index 0000000,0000000..c74688a
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000018B000000A090F31164.png
index 0000000,0000000..9432626
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000018E000000C4BA62B2A3.png
index 0000000,0000000..e51e1f7
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000193000001AE9AB8B0A2.png
index 0000000,0000000..f7fd883
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000194000000498325A766.png
index 0000000,0000000..f6e8cc9
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000194000000FAD39BC0D8.png
index 0000000,0000000..d243bfc
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000195000000EF7E44082C.png
index 0000000,0000000..a6506c7
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001980000009271BE0D26.png
index 0000000,0000000..b672f36
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000019E0000004CD2A0F407.png
index 0000000,0000000..c8521d6
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001A3000000AAFE82893A.png
index 0000000,0000000..f84089d
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001A40000006C954442CE.png
index 0000000,0000000..7a570bf
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001AC000000477C76808F.png
index 0000000,0000000..446d183
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001BF00000012349EAE2F.png
index 0000000,0000000..2d6781a
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001C1000000FE663748B2.png
index 0000000,0000000..c12273e
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001C9000000AF9C1CE57F.png
index 0000000,0000000..0f72c39
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001CE000000F2E2084BA1.png
index 0000000,0000000..2956d8e
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001CF00000176B0BE1EBC.png
index 0000000,0000000..4f9ddf4
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001D30000014DC251C948.png
index 0000000,0000000..585a251
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001E50000006E3ECDC427.png
index 0000000,0000000..263c75a
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001E50000018C3AD09A21.png
index 0000000,0000000..d3a9b52
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001EE00000164642CCA08.png
index 0000000,0000000..68bd7bf
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001F40000016609A0CFCC.png
index 0000000,0000000..1e70bd2
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000001FD000000DF8D2D7546.png
index 0000000,0000000..7ecf2be
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000200000000BCCCC35DEB.png
index 0000000,0000000..4bc407b
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002170000004A27056037.png
index 0000000,0000000..53f4420
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000021C0000004CACBF786C.png
index 0000000,0000000..81c979b
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002210000002DE3BE7515.png
index 0000000,0000000..8a9ed0b
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000227000000935D9B1EF6.png
index 0000000,0000000..178dd23
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000023B000000125381F51B.png
index 0000000,0000000..65c5a3b
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000024400000027BEE1E4A9.png
index 0000000,0000000..c1e1718
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000247000000A77440E4D3.png
index 0000000,0000000..05bcbad
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002650000018CA6A1BE66.png
index 0000000,0000000..8190b20
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002650000018E4285E964.png
index 0000000,0000000..73724d7
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002690000018D3A8C9F17.png
index 0000000,0000000..35258db
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000026A000001DCAF8778F2.png
index 0000000,0000000..8d9a0c9
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000026E0000003672ADCB6E.png
index 0000000,0000000..a9a5c93
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002720000013FB6EDA793.png
index 0000000,0000000..0414a5f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000027B0000011D10F70F88.png
index 0000000,0000000..3f58dcd
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002840000016729388B7F.png
index 0000000,0000000..6752251
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000288000001A1D5BE4881.png
index 0000000,0000000..014423a
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000289000001A9D7F3941F.png
index 0000000,0000000..b48b95c
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002910000018B31D51F03.png
index 0000000,0000000..4d66aca
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000291000001951B69B9A6.png
index 0000000,0000000..2c76081
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002950000019EF5732E36.png
index 0000000,0000000..7a6bc42
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002950000021E245F6883.png
index 0000000,0000000..b092d97
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000298000001870B0581FA.png
index 0000000,0000000..75e0d29
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000298000001874D3CA506.png
index 0000000,0000000..cd1e472
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000029B0000018885B5282E.png
index 0000000,0000000..0c923b8
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000029F000000B8A83D0275.png
index 0000000,0000000..e4c0cf6
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002A6000000BFBE298238.png
index 0000000,0000000..2fc44b4
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002B1000002258C08D304.png
index 0000000,0000000..ad008d9
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002B3000000365E1CD00D.png
index 0000000,0000000..98c0286
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002B30000003A5B960711.png
index 0000000,0000000..5658740
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002BB000000266DB6AD1A.png
index 0000000,0000000..1d8de58
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002BB000001EABD7E6DF0.png
index 0000000,0000000..e93f5b3
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002BF000001E5B544E7E7.png
index 0000000,0000000..fb89619
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002C1000001ED5CECCC6D.png
index 0000000,0000000..7dc17cd
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002C3000001EBBD39E47A.png
index 0000000,0000000..1a51519
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002C700000048F3729BAA.png
index 0000000,0000000..ed277d4
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000002F3000000926CA65D02.png
index 0000000,0000000..4cf45e8
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000304000001B964698779.png
index 0000000,0000000..fd27a3f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000336000000F38C3FAF84.png
index 0000000,0000000..cbf95dd
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000372000002AF943ADDA0.png
index 0000000,0000000..12482e0
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003730000002B6865E951.png
index 0000000,0000000..8ee251f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003A60000011E274A1A28.png
index 0000000,0000000..7ae61ea
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003A6000002A9C7A660BE.png
index 0000000,0000000..3603132
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003A800000039364066E4.png
index 0000000,0000000..3387a7a
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003B30000021B5EE5D338.png
index 0000000,0000000..eb5ddf1
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003DF00000071A41D8A1F.png
index 0000000,0000000..31c9e4c
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003DF000000D953A456B6.png
index 0000000,0000000..6308b07
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003E8000001524A147A04.png
index 0000000,0000000..e266d01
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003EC000000AB60616FA7.png
index 0000000,0000000..f82936d
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000003FB000002359BAFB40E.png
index 0000000,0000000..479ac9d
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004010000017E4A6552BC.png
index 0000000,0000000..30d049f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000403000001632F0B76F6.png
index 0000000,0000000..d1000e4
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000404000000FCFC13E732.png
index 0000000,0000000..149255c
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004100000005657010336.png
index 0000000,0000000..4568fc8
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004170000016ACB5E15AE.png
index 0000000,0000000..7423413
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000041D0000003D52225C0D.png
index 0000000,0000000..4987d97
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000041D0000017D8D1BC4D9.png
index 0000000,0000000..253b153
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000042500000163D2B339D5.png
index 0000000,0000000..1493d10
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000427000000324F58266D.png
index 0000000,0000000..b6fcceb
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000042E000001D3EEB9978B.png
index 0000000,0000000..400b3bc
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000042F000000CC3EDDE79E.png
index 0000000,0000000..0d5fd91
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000430000000AF9D6E724E.png
index 0000000,0000000..759d745
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000043000000164DA0CE8C9.png
index 0000000,0000000..d550db3
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000043200000169BCD20493.png
index 0000000,0000000..a51caba
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000453000001BFFCF48776.png
index 0000000,0000000..8c4a6e2
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000045800000197FE462F2B.png
index 0000000,0000000..0d0232e
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000462000000D44541CF9A.png
index 0000000,0000000..48bf9d5
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000467000002B63162E59B.png
index 0000000,0000000..53daa91
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004690000026615360BEB.png
index 0000000,0000000..a5ff48f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000046C000000C2D3E5CF30.png
index 0000000,0000000..329f7bd
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000046D0000015F4B5494A9.png
index 0000000,0000000..8805ff7
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000046F000000DEA2BFCD9B.png
index 0000000,0000000..958302f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000470000001B68AE60DD3.png
index 0000000,0000000..e2d76a1
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004710000014BBC34499D.png
index 0000000,0000000..3664b3e
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000047200000129CB014025.png
index 0000000,0000000..9abac5a
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004770000008AAF3CFFDB.png
index 0000000,0000000..44933cd
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000047700000219A3013A92.png
index 0000000,0000000..191a485
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000479000002887E7F48EA.png
index 0000000,0000000..d0d1d1d
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000047A000000B727198874.png
index 0000000,0000000..ec02e05
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000047A000000FB86FF2A9A.png
index 0000000,0000000..ac169a2
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000047A0000011C6682A254.png
index 0000000,0000000..54484f0
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000048100000245268CDB7A.png
index 0000000,0000000..be9abd3
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004920000028D9C8DC2CB.png
index 0000000,0000000..6d519f8
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004C0000000795BB2C146.png
index 0000000,0000000..d2a8821
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000004ED000000BE3B9E25D5.png
index 0000000,0000000..7bb8d52
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000523000000C6F786381C.png
index 0000000,0000000..bd3a8a0
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000052500000088DBB95005.png
index 0000000,0000000..832f6de
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000525000000BE30CF0423.png
index 0000000,0000000..baa07fc
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000527000000A7AB409FE0.png
index 0000000,0000000..fc9c5a7
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000052F000000C2867B7294.png
index 0000000,0000000..cc24775
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000530000001410CF0028A.png
index 0000000,0000000..c111c96
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000053100000142D9A4C916.png
index 0000000,0000000..8dfd835
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000532000000285DDBBF37.png
index 0000000,0000000..58ddbf0
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000053A00000067708C8F53.png
index 0000000,0000000..eb26327
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000552000000BF22E90239.png
index 0000000,0000000..b5bbf3f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000557000002E148BAB6D4.png
index 0000000,0000000..f531e95
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005970000006AE23997C9.png
index 0000000,0000000..0651ba5
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005AF00000074604B1A67.png
index 0000000,0000000..768c3c3
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005B90000007866D92D14.png
index 0000000,0000000..f6b8069
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005BB0000007C1DF71FA7.png
index 0000000,0000000..3cf429e
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005C30000006CAFFAAD61.png
index 0000000,0000000..daea8cf
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005D00000003B29340A7A.png
index 0000000,0000000..a661d37
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005D50000009458C5EE48.png
index 0000000,0000000..6903d37
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005E20000009B1BA5A8CF.png
index 0000000,0000000..488b296
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005E6000000676902E040.png
index 0000000,0000000..e8120de
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005EB000000A68BA73E2D.png
index 0000000,0000000..50cef0a
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005EC00000073E678DFEC.png
index 0000000,0000000..7b1b9f6
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005F30000030F1372448D.png
index 0000000,0000000..4fe848f
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005F70000005F0912E904.png
index 0000000,0000000..b3778e3
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005F70000007E43DB8026.png
index 0000000,0000000..927b835
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005FA0000005CE8491B77.png
index 0000000,0000000..390110c
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000005FF0000005F35710398.png
index 0000000,0000000..898a44c
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000006000000005EDA7B96BE.png
index 0000000,0000000..753a161
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000060300000065DF96536B.png
index 0000000,0000000..3146126
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000000000006060000006A0106CA0C.png
index 0000000,0000000..7992522
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000061A0000006FC014C3A4.png
index 0000000,0000000..2145a2e
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000061D0000007047877972.png
index 0000000,0000000..a3e8209
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000061E0000006BCF9ECC0B.png
index 0000000,0000000..21f8cf7
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000062A0000005F61A18950.png
index 0000000,0000000..d358b02
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000631000000E19D116AA0.png
index 0000000,0000000..79ad11d
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000063F00000090AAE1FA4A.png
index 0000000,0000000..e73be97
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000000000000668000002D29EAD9899.png
index 0000000,0000000..f3bfb60
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/100000000000066D000001AAD8CE8256.png
index 0000000,0000000..1f7b0fc
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000201000002FC000001DC2DDAD2F1.png
index 0000000,0000000..8a07559
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/1000020100000359000000A8B848DE68.png
index 0000000,0000000..4c02163
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_images/10000201000005F90000029D8BA200FB.png
index 0000000,0000000..8c34497
new file mode 100644
Binary files differ
diff --cc core/doc/admin/_sources/LDAP/CONFIGURATION.txt
index 0000000,0000000..5076ffe
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/LDAP/CONFIGURATION.txt
@@@ -1,0 -1,0 +1,485 @@@
++CONFIGURATION
++=============
++
++Enable LDAP app
++---------------
++
++From the
++APPs
++page, select “
++LDAP user and group backend”
++and select
++enable
++
++|1000020100000359000000A8B848DE68_png|
++
++Configuring LDAP
++----------------
++
++The configuration of the LDAP feature is performed on the Admin page of the ownCloud web browser.
++The configuration follows a wizard-like approach split into four tabs.
++The first tab must be completed correctly to allow access to subsequent tabs.
++Although the configuration in the remaining tabs is detected automatically, it should be reviewed by the admin to verify correctness.
++An indicator exists on the all pages
++to show whether the configuration is valid, incomplete, or incorrect.
++
++Configuration settings are saved automatically when the cursor is no longer focused on the input element.
++
++Server Tab
++~~~~~~~~~~
++
++The server tab contains basic information on the LDAP server.
++It makes certain that ownCloud can connect to the desired LDAP and read data from it.
++At a minimum, the admin must provide a hostname for the LDAP server.
++If anonymous access to the LDAP server is not allowed, the admin will be required to enter an account Distinguished Name (DN) and password.
++ownCloud will auto-detect the port and base DN.
++
++Server
++^^^^^^
++
++ownCloud can be configured to connect to multiple LDAP servers.
++Using this control you can pick a configuration you want to edit or to add a new one.
++The button
++Delete Configuration deletes the current configuration.
++
++Host
++^^^^^
++
++The hostname of the LDAP server.
++It can also be a ldaps:// URI.
++It is possible to pass a port number which will speed up port detection.
++This is especially useful if a custom port is used.
++ownCloud will subsequently move the port value to the port field.
++
++Examples:
++
++*   Directory.my-company.com
++
++
++
++*   Ldaps://directory.my-company.com
++
++
++
++*   Directory.my-company.com:9876
++
++
++
++Port
++^^^^
++
++This is the port which ownCloud should utilize to connect to the LDAP server.
++Upon initial configuration, this field is disabled.
++ownCloud will auto-detect the port if it is running on a standard port (389).
++After ownCloud detects the port, the field will be enabled for admin input.
++A successfully discovered port will be inserted by ownCloud.
++
++
++User DN
++^^^^^^^
++
++The name as DN of a user who is able to do searches in the LDAP directory.
++For anonymous access, leave this field blank.
++It is recommended to have a special system user for ownCloud.
++This information is provided by the LDAP admin.
++
++Password
++^^^^^^^^
++
++The password for the user given above.
++For anonymous access, leave this blank.
++This information is provided by the LDAP admin.
++
++Base DN
++^^^^^^^
++
++The base DM of the LDAP from where all users and groups can be reached.
++It is possible to provide separated base DN’s for users and groups in the advanced tab.
++This is a mandatory field.
++ownCloud will attempt to determine the proper value of this field based on the provided User DN or Host values.
++
++|100000000000043200000169BCD20493_png|
++
++User Filter
++~~~~~~~~~~~
++
++The settings in the User Filter tab determine which LDAP users will appear and will be able to log into ownCloud.
++This may be configured using the wizard or entered via a raw LDAP filter.
++
++Only those object classes
++^^^^^^^^^^^^^^^^^^^^^^^^^
++
++ownCloud will determine the available object classes.
++ownCloud will automatically select the object that contains the highest number of users.
++It is possible to select multiple object classes.
++
++Only from those groups
++^^^^^^^^^^^^^^^^^^^^^^
++
++This is used if the LDAP server supports the member-of-overlay in LDAP filters.
++It allows the admin to define the users from one or more certain groups that are allowed to appear and log into ownCloud.
++No value is selected by default.
++It is possible to select multiple groups.
++
++If the LDAP server does not support member-of-overlay in LDAP filters, the field is disabled.
++
++Edit raw filter instead
++^^^^^^^^^^^^^^^^^^^^^^^
++
++Selecting this text will toggle the filter mode.
++Instead of the wizard’s assistance, the admin may enter the raw LDAP filter in this field.
++
++Example:
++
++*   objectClass=inetOrgPerson
++
++
++
++x users found
++^^^^^^^^^^^^^
++
++Indicates the approximate number of users allowed to access ownCloud.
++This number will update after any changes made to the LDAP configuration.
++
++|100000000000042500000163D2B339D5_png|
++
++
++Login Filter
++~~~~~~~~~~~~
++
++The settings in the login filter tab determine which user information will be compared to login credentials entered by the user.
++It is possible to allow multiple user details.
++It is also possible to enter a raw LDAP filter.
++
++LDAP Username
++^^^^^^^^^^^^^
++
++If checked, the login credentials will be compared to the username in the LDAP directory.
++The corresponding attribute, usually “uid” or “samaccountname” will be automatically detected by ownCloud.
++
++LDAP Email Address
++^^^^^^^^^^^^^^^^^^
++
++If checked, the login credentials will be compared to an email address in the LDAP directory.
++ownCloud will exmaine the “mailPrimaryAddress” and “mail” attributes in the LDAP for the email address.
++
++Other attributes
++^^^^^^^^^^^^^^^^
++
++This field allows the admin to select additional attributes for comparison.
++The list is generated automatically based on the attributes contained in the user object of the LDAP server.
++
++Enter raw filter instead
++^^^^^^^^^^^^^^^^^^^^^^^^
++
++Selecting this text will toggle the filter mode.
++Instead of the wizard’s assistance, the admin may enter the raw LDAP filter in this field.
++
++The “%uid” placeholder will be replaced with the login name entered by the user upon login.
++
++Examples:
++
++*   Username only:
++    uid=%iud
++
++
++
++*   Username or email address: (|(uid=%uid)(mail=%uid))
++
++
++
++|10000000000004170000016ACB5E15AE_png|
++
++Group Filter
++~~~~~~~~~~~~
++
++The settings in this tab determine which groups will be available in ownCloud.
++This tab does not restrict logins in any manner as that was handled in the prior tabs.
++It is possible to enter a raw LDAP filter as well.
++
++By default, there are no groups available in ownCloud.
++The admin must enable this manually.
++
++Only those object classes
++^^^^^^^^^^^^^^^^^^^^^^^^^
++
++ownCloud will automatically determine which object classes are available in the LDAP.
++ownCloud will only list object classes that return at least one group object.
++It is possible to enter multiple object classes.
++
++Only from those groups
++^^^^^^^^^^^^^^^^^^^^^^
++
++This setting allows the admin to select which groups are available within ownCloud.
++ownCloud will generate a list of available groups found in the LDAP server for the admin to select.
++It is possible to enter multiple groups.
++
++Edit raw filter instead
++^^^^^^^^^^^^^^^^^^^^^^^
++
++Selecting this text will toggle the filter mode.
++Instead of the wizard’s assistance, the admin may enter the raw LDAP filter in this field
++
++Y groups found
++^^^^^^^^^^^^^^
++
++Indicates the approximate number of groups available in ownCloud.
++This number will update after any changes made to the LDAP configuration.
++
++|100000000000043000000164DA0CE8C9_png|
++
++
++Advanced Tab
++~~~~~~~~~~~~
++
++The LDAP Advanced settings section allows the admin to define less common options.
++These options are not required for a working connection however, they can have a positive effect on the performance.
++
++The Advanced Settings tab has three sections
++
++*   Connection settings
++
++
++
++*   Directory settings
++
++
++
++*   Special attributes
++
++
++
++
++Connection Settings
++^^^^^^^^^^^^^^^^^^^
++
++Configuration Active
++""""""""""""""""""""
++
++Allows the admin to enable or disable the current configuration.
++A disabled configuration will not connect to the LDAP server.
++
++By default, this is disabled.
++It is enabled automatically, when using the wizard and configuration is valid and tests successfully.
++
++Backup (Replica) Host
++"""""""""""""""""""""
++
++This is used to define a backup LDAP server.
++ownCloud automatically attempts to connect to the backup server when the primary server cannot be accessed.
++It is important that the backup server is an exact replica of the primary server as all the object UUIDs must match.
++
++Backup (Replica) Port
++"""""""""""""""""""""
++
++This identifies the port on which ownCloud will connect to the backup LDAP server.
++If no port is provided, ownCloud will utilize the same port as the primary LDAP server.
++
++Disable Main Server
++"""""""""""""""""""
++
++This is used to disable the primary LDAP server so ownCloud will connect only to the backup server.
++This can be useful for planned maintenance on the primary server.
++
++Case insensitive LDAP server (Windows)
++""""""""""""""""""""""""""""""""""""""
++
++Check this if the LDAP server is running on a windows host.
++Not usually necessary.
++
++Turn off SSL certificate validation
++"""""""""""""""""""""""""""""""""""
++
++Disables the check for a valid SSL certificate.
++It is recommended to use for testing only if needed, but not use in production.
++
++Cache Time-To-Live
++""""""""""""""""""
++
++ownCloud caches the information it receives from the LDAP server.
++This is necessary as the ownCloud server attempts to validate the user with every page request or WebDAV interaction.
++This time is in seconds.
++
++Note if it is required to have the most up-to-date information from the LDAP, it is recommended not to turn off the cache totally, however, to define a lifetime of a small duration (15 seconds)
++
++|100000000000042E000001D3EEB9978B_png|
++
++Directory Settings
++^^^^^^^^^^^^^^^^^^
++
++User Display Name Field
++"""""""""""""""""""""""
++
++The attribute that should be used as display name in ownCloud.
++
++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.
++
++User Search Attributes
++""""""""""""""""""""""
++
++These attributes are used when a search for users with a search string is done.
++This happens in the share dialogue.
++By default the user display name attribute as specified above is used.
++Multiple attributes can be given, one in each line.
++
++Note: if an attribute is not available for a given user object, the user will neither be listed nor able to login.
++
++Group Display Name Field
++""""""""""""""""""""""""
++
++The attribute that should be used as an 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 bane is assigned, it will not be changed.
++
++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.
++
++Group Search Attributes
++"""""""""""""""""""""""
++
++These attributes are used when a search for groups with a search string is done.
++This happens in the share dialogue for instance.
++By default the group display name attribute as specified above is being used.
++Multiple attributes can be given, one in each line.
++
++Group Member association
++""""""""""""""""""""""""
++
++The attribute that is used to indicate group memberships.
++
++|10000201000005F90000029D8BA200FB_png|
++
++
++Special Attributes
++^^^^^^^^^^^^^^^^^^
++
++Quota Field
++"""""""""""
++
++This field is used to set a LDAP attribute to define the user quota.
++The attribute should retain a readable value, for example “2 GB”.
++
++Quota Default
++"""""""""""""
++
++This is used to override the ownCloud default quota for LDAP users who do not have an attribute set in the above parameter.
++
++Example
++
++15GB
++
++Email Field
++"""""""""""
++
++ownCloud will read the attribute configured here and configure the user’s email.
++
++User Home Folder Naming Rule
++""""""""""""""""""""""""""""
++
++By default, ownCloud creates a user directory which contains all files and meta data based on the ownCloud user name.
++To override this setting and name it after a different attribute, configure that attribute here.
++The attribute can also return an absolute path (such as “/mnt/storage43/alice”).
++
++|100000000000041D0000017D8D1BC4D9_png|
++
++Expert Tab
++----------
++
++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-0_. 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 back ends (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 behavior can be overridden.
++
++Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users.
++
++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 from 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 behavior. 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).
++
++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 an 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 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.
++Never clear the mappings in a production environment.
++Only clear mappings in a test or experimental stage.
++
++|10000000000003FB000002359BAFB40E_png|
++
++
++
++
++
++.. |100000000000042500000163D2B339D5_png| image:: images/100000000000042500000163D2B339D5.png
++    :width: 6.5in
++    :height: 2.1752in
++
++
++.. |100000000000043200000169BCD20493_png| image:: images/100000000000043200000169BCD20493.png
++    :width: 6.5in
++    :height: 2.1846in
++
++
++.. |10000000000004170000016ACB5E15AE_png| image:: images/10000000000004170000016ACB5E15AE.png
++    :width: 6.5in
++    :height: 2.2465in
++
++
++.. |100000000000043000000164DA0CE8C9_png| image:: images/100000000000043000000164DA0CE8C9.png
++    :width: 6.5in
++    :height: 2.1583in
++
++
++.. |1000020100000359000000A8B848DE68_png| image:: images/1000020100000359000000A8B848DE68.png
++
++
++.. |10000000000003FB000002359BAFB40E_png| image:: images/10000000000003FB000002359BAFB40E.png
++    :width: 6.5in
++    :height: 3.6043in
++
++
++.. |100000000000042E000001D3EEB9978B_png| image:: images/100000000000042E000001D3EEB9978B.png
++    :width: 6.5in
++    :height: 2.8366in
++
++
++.. |10000201000005F90000029D8BA200FB_png| image:: images/10000201000005F90000029D8BA200FB.png
++
++
++.. |100000000000041D0000017D8D1BC4D9_png| image:: images/100000000000041D0000017D8D1BC4D9.png
++    :width: 6.5in
++    :height: 2.352in
++
diff --cc core/doc/admin/_sources/LDAP/Introduction.txt
index 0000000,0000000..7bbdc5e
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/LDAP/Introduction.txt
@@@ -1,0 -1,0 +1,21 @@@
++Introduction
++============
++
++ownCloud ships an LDAP backend, which allows full use of ownCloud for user logging 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 features.
++
++
++
diff --cc core/doc/admin/_sources/LDAP/Table_of_Contents.txt
index 0000000,0000000..1739b9e
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/LDAP/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc374437072>`_
diff --cc core/doc/admin/_sources/LDAP/index.txt
index 0000000,0000000..48bbbf3
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/LDAP/index.txt
@@@ -1,0 -1,0 +1,8 @@@
++**LDAP Active Directory Integration**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    CONFIGURATION
diff --cc core/doc/admin/_sources/activity/Configuration.txt
index 0000000,0000000..8030fff
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/activity/Configuration.txt
@@@ -1,0 -1,0 +1,15 @@@
++Configuration
++=============
++
++The Activity App is enabled by default.
++To verify or to disable, navigate to the
++APPS
++page and search for
++Activity.
++
++|10000000000002F3000000926CA65D02_png|
++
++.. |10000000000002F3000000926CA65D02_png| image:: images/10000000000002F3000000926CA65D02.png
++    :width: 6.5in
++    :height: 1.2571in
++
diff --cc core/doc/admin/_sources/activity/Introduction.txt
index 0000000,0000000..990cf14
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/activity/Introduction.txt
@@@ -1,0 -1,0 +1,22 @@@
++Introduction
++============
++
++The ownCloud Activity app shows an activity feed where users can see what they did in the past and what happened to their files and what others did with their shared files.
++
++The Activity Stream introduces a central interface where all events that happen in a user’s ownCloud instance are shown.
++
++The following can be seen in the new interface:
++
++*   Creation, edit or deletion of files along with a thumbnail and date and path
++
++
++
++*   If someone shared a file with you
++
++
++
++*   If someone created, edited or deleted something in a folder you shared to them.
++
++
++
++All the events are presented with endless scrolling and also in an RSS feed which a user can subscribe to.
diff --cc core/doc/admin/_sources/activity/RSS_Feed.txt
index 0000000,0000000..f519a8f
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/activity/RSS_Feed.txt
@@@ -1,0 -1,0 +1,33 @@@
++RSS Feed
++========
++
++To subscribe to the RSS Feed, navigate to the
++Activity
++page and select
++RSS feed
++in the upper right of the browser.
++
++|10000000000001440000005A2989832F_png|
++
++The resulting page will look something like this:
++
++|10000000000002B1000002258C08D304_png|
++
++To subscribe, select the
++Subscribe Now
++button.
++
++The RSS Feed may be viewed via the browser’s capabilities.
++
++
++
++
++.. |10000000000002B1000002258C08D304_png| image:: images/10000000000002B1000002258C08D304.png
++    :width: 6.5in
++    :height: 5.1791in
++
++
++.. |10000000000001440000005A2989832F_png| image:: images/10000000000001440000005A2989832F.png
++    :width: 3.3752in
++    :height: 0.9374in
++
diff --cc core/doc/admin/_sources/activity/Table_of_Contents.txt
index 0000000,0000000..7499137
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/activity/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc373137976>`_
diff --cc core/doc/admin/_sources/activity/Utilization.txt
index 0000000,0000000..129a72e
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/activity/Utilization.txt
@@@ -1,0 -1,0 +1,136 @@@
++Utilization
++===========
++
++The Activities can be viewed by selecting
++Activity
++in the App bar on the left side of the ownCloud browser interface
++
++|1000000000000050000000DB83B8FA5B_png|
++
++This will bring up the Activity interface showing all the activities which occurred for this user’s instance.
++
++Sample Activities
++-----------------
++
++This section will show how the different activities may appear within this interface
++
++Create file
++~~~~~~~~~~~
++
++The following shows a file entitled
++DeleteMe.txt
++being created 3 days ago.
++
++|10000000000000F300000068AF0ECD53_png|
++
++
++
++
++Delete File
++~~~~~~~~~~~
++
++The following shows a file entitled
++DeleteMe.txt
++being deleted 3 days ago.
++
++|10000000000000F5000000675DC5F68C_png|
++
++Edit a file
++~~~~~~~~~~~
++
++The following shows a file
++Shared/test.txt
++being edited mere seconds ago.
++
++|10000000000000F1000000F6704F46D3_png|
++
++Share a file with a user
++~~~~~~~~~~~~~~~~~~~~~~~~
++
++The following shows the file
++shareMe
++being shared with another user.
++
++|10000000000000F1000000F56125BDBA_png|
++
++
++
++
++File shared to user
++~~~~~~~~~~~~~~~~~~~
++
++The following shows the file
++Shared/test.txt
++being shared with this user almost an hour ago.
++
++|10000000000000F60000006754ED2A1E_png|
++
++File created by another user in Shared folder
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++
++The following is shown when another user creates a file in your shared folder.
++
++|10000000000000F500000067A8845EF8_png|
++
++Shared file modified
++~~~~~~~~~~~~~~~~~~~~
++
++The following shows a file
++BoB/test.txt
++modified by a user who this file was shared to.
++
++|10000000000000F6000000685DFB3767_png|
++
++
++
++Combined activities
++~~~~~~~~~~~~~~~~~~~
++
++The following shows what “combined” activities may look like on the activity interface.
++
++|10000000000000F40000019A110DD159_png|
++
++.. |10000000000000F1000000F56125BDBA_png| image:: images/10000000000000F1000000F56125BDBA.png
++    :width: 2.5102in
++    :height: 2.552in
++
++
++.. |10000000000000F6000000685DFB3767_png| image:: images/10000000000000F6000000685DFB3767.png
++    :width: 2.5626in
++    :height: 1.0835in
++
++
++.. |10000000000000F500000067A8845EF8_png| image:: images/10000000000000F500000067A8845EF8.png
++    :width: 2.552in
++    :height: 1.0728in
++
++
++.. |1000000000000050000000DB83B8FA5B_png| image:: images/1000000000000050000000DB83B8FA5B.png
++    :width: 0.8335in
++    :height: 2.2811in
++
++
++.. |10000000000000F60000006754ED2A1E_png| image:: images/10000000000000F60000006754ED2A1E.png
++    :width: 2.5626in
++    :height: 1.0728in
++
++
++.. |10000000000000F1000000F6704F46D3_png| image:: images/10000000000000F1000000F6704F46D3.png
++    :width: 2.5102in
++    :height: 2.5626in
++
++
++.. |10000000000000F40000019A110DD159_png| image:: images/10000000000000F40000019A110DD159.png
++    :width: 2.5417in
++    :height: 4.2701in
++
++
++.. |10000000000000F5000000675DC5F68C_png| image:: images/10000000000000F5000000675DC5F68C.png
++    :width: 2.552in
++    :height: 1.0728in
++
++
++.. |10000000000000F300000068AF0ECD53_png| image:: images/10000000000000F300000068AF0ECD53.png
++    :width: 2.5311in
++    :height: 1.0835in
++
diff --cc core/doc/admin/_sources/activity/index.txt
index 0000000,0000000..c40cbc8
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/activity/index.txt
@@@ -1,0 -1,0 +1,10 @@@
++**ownCloud Activity**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration
++    Utilization
++    RSS_Feed
diff --cc core/doc/admin/_sources/antivirus/Configuration.txt
index 0000000,0000000..779170a
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/antivirus/Configuration.txt
@@@ -1,0 -1,0 +1,127 @@@
++Configuration
++=============
++
++Enable The app
++--------------
++
++To enable the Antivirus App, navigate to the Apps page and select “Antivirus App for Files” and enable.
++
++|10000000000001800000009A9494E037_png|
++
++Install ClamAV
++--------------
++
++ClamAV must be installed on the server (either the local for Executable or Daemon Socket mode or a remote server for Daemon mode).
++
++To install, use the repository’s installation method to install “clamav”.
++For example:
++
++#apt-get install clamav
++
++For daemon mode, the ClamAV daemon must also be installed (either on the local machine for Daemon Socket or the remote machine for daemon mode).
++
++#apt-get install clamav-daemon
++
++Configure Logging
++-----------------
++
++Set log level to Everything in the Admin page.
++
++|10000000000001AC000000477C76808F_png|
++
++Executable Mode
++---------------
++
++To run in executable mode, ClamAV must be installed on the local server.
++From the Admin page, configure Antivirus as follows:
++
++|1000000000000165000000D3FF2168AB_png|
++
++The Stream Length is defined as the ClamAV StreamMaxLengeth Size.
++The default value, according to the ClamAV web site is 10M which equates to 10485760 bytes as shown in the above example.
++
++The Path to clamscan is the path for the executable clamscan file.
++By default it installs in /usr/bin/clamscan.
++
++When files are uploaded, they will be scanned and, if clean, the following logs will appear:
++
++{"app":"files_antivirus","message":"Scanning file : \/Lab.txt","level":0,"time":"2013-12-17T15:24:05+00:00"}
++
++{"app":"files_antivirus","message":"Exec scan: \/Lab.txt","level":0,"time":"2013-12-17T15:24:05+00:00"}
++
++{"app":"files_antivirus","message":"Result CLEAN!","level":0,"time":"2013-12-17T15:24:09+00:00"}
++
++
++Daemon Mode
++-----------
++
++When running in Daemon Mode, install ClamAV and clamAV-Daemon on a remote server.
++
++The port, upon which ClamAV listens must be configured.
++To do this, add the following line in /etc/clamav/clamd.conf:
++
++TCPSocket 3310
++
++Then restart the Clamd service:
++
++/etc/init.d/clamav-daemon restart
++
++Back on the ownCloud server, navigate to the Admin page and configure the Antivirus Configuration as follows:
++
++|1000000000000194000000FAD39BC0D8_png|
++
++Where the host is the IP of the server running the ClamAV Daemon and the Port is what was configured in the above step.
++
++Upon upload of files to the ownCloud server, the following logs will appear indicating the files are clean.
++
++{"app":"files_antivirus","message":"Scanning file : \/Lab.txt","level":0,"time":"2013-12-17T17:39:35+00:00"}
++
++{"app":"files_antivirus","message":"Response :: stream: OK\n","level":0,"time":"2013-12-17T17:39:48+00:00"}
++
++
++Daemon Socket mode
++------------------
++
++To run in Daemon socket mode, install clamav and clamav-daemon on the ownCloud server.
++
++Configure the Admin page as such:
++
++|1000000000000160000000DBB2FB0223_png|
++
++Where Socket is the location of the Clamd executable.
++
++Upon upload of a clean file to the ownCloud server, the following logs will appear.
++
++
++{"app":"files_antivirus","message":"Scanning file : \/Lab.txt","level":0,"time":"2013-12-17T18:19:08+00:00"}
++
++{"app":"files_antivirus","message":"Response :: stream: OK\n","level":0,"time":"2013-12-17T18:19:08+00:00"}
++
++
++
++
++
++.. |10000000000001AC000000477C76808F_png| image:: images/10000000000001AC000000477C76808F.png
++    :width: 4.4583in
++    :height: 0.7398in
++
++
++.. |10000000000001800000009A9494E037_png| image:: images/10000000000001800000009A9494E037.png
++    :width: 4in
++    :height: 1.6043in
++
++
++.. |1000000000000194000000FAD39BC0D8_png| image:: images/1000000000000194000000FAD39BC0D8.png
++    :width: 4.2083in
++    :height: 2.6043in
++
++
++.. |1000000000000165000000D3FF2168AB_png| image:: images/1000000000000165000000D3FF2168AB.png
++    :width: 3.7189in
++    :height: 2.198in
++
++
++.. |1000000000000160000000DBB2FB0223_png| image:: images/1000000000000160000000DBB2FB0223.png
++    :width: 3.6665in
++    :height: 2.2811in
++
diff --cc core/doc/admin/_sources/antivirus/Introduction.txt
index 0000000,0000000..c86722a
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/antivirus/Introduction.txt
@@@ -1,0 -1,0 +1,34 @@@
++Introduction
++============
++
++ownCloud integrates with ClamAV, an open source (GPL) antivirus engine, to provide an antivirus solution for files which are uploaded to the ownCloud server.
++Via this method, ownCloud/ClamAV can detect Trojans, viruses, malware and other malicious threats.
++Files are scanned for virus upon initial upload to the ownCloud server.
++
++The ownCloud antivirus app is supported on ownCloud instances which are installed on a Linux operating system.
++
++The antivirus app can run in one of three modes:
++
++*   Executable – ClamAV is running on the same server as the ownCloud instance.
++    For executable mode, the ClamAV process is started and stopped with each file upload.
++
++
++
++*   Daemon – ClamAV is running on a different server from the ownCloud instance
++
++
++
++*   Daemon (Socket) – ClamAV is running on the same server as the ownCloud instance. In this mode, the ClamAV process is running in the background at all times.
++    It is a bit quicker for scanning than executable mode, but requires system administrator skills and root access.
++
++
++
++In addition, there are two possible actions which may occur when an infected file is found:
++
++*   Only Log – A log entry is created when an infected file is found.
++
++
++
++*   Delete File – The infected file is deleted.
++
++
diff --cc core/doc/admin/_sources/antivirus/Table_of_Contents.txt
index 0000000,0000000..cfc8715
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/antivirus/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc375553047>`_
diff --cc core/doc/admin/_sources/antivirus/index.txt
index 0000000,0000000..0456002
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/antivirus/index.txt
@@@ -1,0 -1,0 +1,8 @@@
++**ownCloud Antivirus**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration
diff --cc core/doc/admin/_sources/config/APPS.txt
index 0000000,0000000..a16b239
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/APPS.txt
@@@ -1,0 -1,0 +1,50 @@@
++APPS
++====
++
++The following parameters are used for ownCloud apps.
++
+++-----------------------+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**         | **Format**                                          | **Description**                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
+++-----------------------+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Apps Paths**        | "apps_paths" => array(                              | Use this parameter to set the location of the apps folder which should be scanned for available apps and/or where user specific apps should be installed. |
++|                       |                                                     | The path defines the absolute file system path to the app folder.                                                                                         |
++|                       | 0 => array(                                         | 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.                                                                                     |
++|                       | 'path'=> '/var/www/owncloud/apps',                  |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | 'url' => '/apps',                                   |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | 'writable' => true,                                 |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | ),                                                  |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | 1 => array (                                        |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | ‘path’ =>                                           |                                                                                                                                                           |
++|                       | ‘/var/www/owncloud/apps2’,                          |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | ‘url’ => ‘/apps2’,                                  |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | Writable => false,                                  |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | ),                                                  |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
++|                       | ),                                                  |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
+++-----------------------+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **App Store Enabled** | "appstoreenabled" => true,                          | When enabled, admins may install apps from the ownCloud app store.                                                                                        |
++|                       |                                                     |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
+++-----------------------+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **App Store URL**     | "appstoreurl" => "http://api.apps.owncloud.com/v1", | The URL of the appstore.                                                                                                                                  |
++|                       |                                                     |                                                                                                                                                           |
++|                       |                                                     |                                                                                                                                                           |
+++-----------------------+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **App Code Checker**  | "appcodechecker" => "",                             | Checks for malicious code fragments of 3                                                                                                                  |
++|                       |                                                     | rd                                                                                                                                                        |
++|                       |                                                     | party apps.                                                                                                                                               |
++|                       |                                                     |                                                                                                                                                           |
+++-----------------------+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
++
++
diff --cc core/doc/admin/_sources/config/Code_Locations.txt
index 0000000,0000000..34785aa
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Code_Locations.txt
@@@ -1,0 -1,0 +1,38 @@@
++Code Locations
++==============
++
++ownCloud has the ability to find parts of its code in non-standard locations.
++This section describes how to configure ownCloud for that functionality.
++
+++--------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**      | **Format**                                                                                         | **Description**                                                                                                                                                                |
++|                    |                                                                                                    |                                                                                                                                                                                |
+++--------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Theme**          | "theme" => "",                                                                                     | If the instance of ownCloud is themed, the name of the theme should be configured here.                                                                                        |
++|                    |                                                                                                    | For more information on this parameter, see the document on Theming.                                                                                                           |
++|                    |                                                                                                    |                                                                                                                                                                                |
+++--------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **3**              | "3rdpartyroot" => "",                                                                              | ownCloud uses some 3                                                                                                                                                           |
++| rd                 |                                                                                                    | rd                                                                                                                                                                             |
++| ** Party Root**    |                                                                                                    | party PHP components to provide certain functionality.                                                                                                                         |
++|                    |                                                                                                    | These components are shipped as part of the software package and reside in                                                                                                     |
++|                    |                                                                                                    | ~/owncloud/3rdparty.                                                                                                                                                           |
++|                    |                                                                                                    | However, if this folder resides elsewhere, the location can be configured here.                                                                                                |
++|                    |                                                                                                    | For example /srv/http/path/to/3rdparty.                                                                                                                                        |
++|                    |                                                                                                    |                                                                                                                                                                                |
+++--------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **3**              | "3rdpartyurl" => "",                                                                               | In the event that the 3rdpartyroot is configured, this parameter should be configured as well to show the http web path to the 3rdpartyroot starting at the owncloud web root. |
++| rd                 |                                                                                                    | For instance /path/to/3rdparty.                                                                                                                                                |
++| ** Party URL**     |                                                                                                    |                                                                                                                                                                                |
++|                    |                                                                                                    |                                                                                                                                                                                |
+++--------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Custome Client** | 'customclient_desktop' => '', //http://owncloud.org/sync-clients/                                  | The location where ownCloud will bring the user to download clients.                                                                                                           |
++|                    |                                                                                                    | The link is in the first run wizard or the Personal page.                                                                                                                      |
++|                    | 'customclient_android' => '', //https://play.google.com/store/apps/details?id=com.owncloud.android |                                                                                                                                                                                |
++|                    |                                                                                                    |                                                                                                                                                                                |
++|                    | 'customclient_ios' => '', //https://itunes.apple.com/us/app/owncloud/id543672169?mt=8              |                                                                                                                                                                                |
++|                    |                                                                                                    |                                                                                                                                                                                |
+++--------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++
++
++
diff --cc core/doc/admin/_sources/config/Default_Parameters.txt
index 0000000,0000000..0f6db35
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Default_Parameters.txt
@@@ -1,0 -1,0 +1,63 @@@
++Default Parameters
++==================
++
++The following parameters are automatically configured by ownCloud upon the initial admin login.
++These parameters are mandatory for the ownCloud instance to operate properly.
++
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**       | **Format**                | **Description**                                                                                                                                                                     |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Debug**           | define("DEBUG", true);    | When set to true, additional information is written to the logs.                                                                                                                    |
++|                     |                           | This is to be used only for local development and not in a production environment.                                                                                                  |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Installed**       | "installed" => false,     | This flag indicates whether the ownCloud instance was installed successfully.                                                                                                       |
++|                     |                           | When set to true, the install was successful.                                                                                                                                       |
++|                     |                           | When set to false the instance is not properly installed.                                                                                                                           |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **DB Type**         | "dbtype" => "sqlite",     | The dbtype indicates what type of database is being used with this install.                                                                                                         |
++|                     |                           |                                                                                                                                                                                     |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **DB Name**         | "dbname" => "owncloud",   | The ownCloud database within the SQL instance.                                                                                                                                      |
++|                     |                           | ownCloud database configuration guides use “owncloud” in the instructions, it is the default for this field.                                                                        |
++|                     |                           | This may be set to any valid table name.                                                                                                                                            |
++|                     |                           | If the table doesn’t exist, the setup will attempt to create it, provided it has proper permissions.                                                                                |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **DB User**         | "dbuser" => "",           | This is the user that ownCloud uses to write to the databse.                                                                                                                        |
++|                     |                           | This must be unique across ownCloud instances using the same SQL database.                                                                                                          |
++|                     |                           | The user will be created when the install wizard is complete.                                                                                                                       |
++|                     |                           | Since the database user in the initial login screen has admin privileges (root), ownCloud creates a new user to ensure ownCloud does not run with unnecessary database permissions. |
++|                     |                           | ownCloud prefixes “oc_” to the userid to prevent a collision between the ownCloud admin user and any existing database users.                                                       |
++|                     |                           | This is generated at the time of the initial login and is the Admin User as entered by the ownCloud admin.                                                                          |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **DB Password**     | "dbpassword" => "",       | When a new database user is created for ownCloud, a password for the database is generated by hashing the admin user password.                                                      |
++|                     |                           | This hash is stored in this parameter.                                                                                                                                              |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **DB Host**         | "dbhost" => "",           | This parameter shows the location of the database.                                                                                                                                  |
++|                     |                           | Can be an IP pointing to the database server, a Fully Qualified Domain Name (FQDN) or localhost.                                                                                    |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **DB Table Prefix** | "dbtableprefix" => "oc_", | All tables in the database will begin with this prefix.                                                                                                                             |
++|                     |                           | By default the prefix is “oc_”.                                                                                                                                                     |
++|                     |                           | If this prefix is changed in the config file, the tables in the database will need to be manually renamed.                                                                          |
++|                     |                           | ownCloud will not detect a change to this option so changing this prefix without manually renaming the tables will break the instance of ownCloud.                                  |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Password Salt**   | "passwordsalt" => "",     | This is the salt used to hash passwords within the ownCloud instance.                                                                                                               |
++|                     |                           | It is important not to remove or lose this password.                                                                                                                                |
++|                     |                           | If lost, all passwords within the ownCloud instance will be lost.                                                                                                                   |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Data Directory**  | "datadirectory" => "",    | This parameter tells ownCloud where the default data directory is located.                                                                                                          |
++|                     |                           | It is configured in the installation wizard.                                                                                                                                        |
++|                     |                           | If using SQLITE, the database is stored in this data directory as well.                                                                                                             |
++|                     |                           |                                                                                                                                                                                     |
++|                     |                           |                                                                                                                                                                                     |
+++---------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++
diff --cc core/doc/admin/_sources/config/Deleted_Items.txt
index 0000000,0000000..4ed976d
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Deleted_Items.txt
@@@ -1,0 -1,0 +1,18 @@@
++Deleted Items
++=============
++
++These parameters are related to the deleted files app.
++
+++---------------------------+----------------------------------------+------------------------------------------------------------------------------------------------------------+
++| **Parameter**             | **Format**                             | **Description**                                                                                            |
++|                           |                                        |                                                                                                            |
+++---------------------------+----------------------------------------+------------------------------------------------------------------------------------------------------------+
++| **Trash Bin Rentention**  | 'trashbin_retention_obligation' => 30, | When the delete app is enabled (default), this is the amount of days a file will be kept in the trash bin. |
++|                           |                                        | Default is 30 days.                                                                                        |
++|                           |                                        |                                                                                                            |
+++---------------------------+----------------------------------------+------------------------------------------------------------------------------------------------------------+
++| **Trash Bin Auto Expire** | 'trashbin_auto_expire' => true,        |                                                                                                            |
++|                           |                                        |                                                                                                            |
++|                           |                                        |                                                                                                            |
+++---------------------------+----------------------------------------+------------------------------------------------------------------------------------------------------------+
++
diff --cc core/doc/admin/_sources/config/Introduction.txt
index 0000000,0000000..e04d1b0
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Introduction.txt
@@@ -1,0 -1,0 +1,10 @@@
++Introduction
++============
++
++ownCloud uses a configuration file to set certain parameters.
++The configuration file is entitled config.php and resides in the ~/owncloud/config directory.
++Also residing in that directory is a sample configuration file entitled config.sample.php.
++This file lists all the configurable parameters within ownCloud along with a brief description.
++This document will provide more details as to what each parameter is used for.
++
++
diff --cc core/doc/admin/_sources/config/Logging.txt
index 0000000,0000000..83b6a14
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Logging.txt
@@@ -1,0 -1,0 +1,52 @@@
++Logging
++=======
++
++This section describes parameters associated with ownCloud’s logging abilities.
++
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**        | **Format**                                           | **Description**                                                                                                                            |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log Type**         | "log_type" => "owncloud",                            | By default the ownCloud logs are sent to the owncloud.log file within the default data directory.                                          |
++|                      |                                                      | If syslogging is desired, set this parameter to syslog.                                                                                    |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log File**         | "logfile" => "",                                     | The log file, by default, is owncloud.log and stored in the default data directory.                                                        |
++|                      |                                                      | Use this parameter to change the name to something other than owncloud.log.                                                                |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log Level**        | "loglevel" => "",                                    | ownCloud has several levels of logging.                                                                                                    |
++|                      |                                                      | This may be set on the Admin page of the webUI or directly in the configuration file using this parameter.                                 |
++|                      |                                                      | Valid values are: 0=Debug, 1=Info, 2=Warning, 3=Error.                                                                                     |
++|                      |                                                      | The default value is Warning                                                                                                               |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log Date Format**  | 'logdateformat' => 'F d, Y H:i:s',                   | ownCloud allows the admin to specify the format of the time and date within the log file.                                                  |
++|                      |                                                      | Valid values may be found at the following website:                                                                                        |
++|                      |                                                      | `http://www.php.net/manual/en/function.date.php <http://www.php.net/manual/en/function.date.php>`_                                         |
++|                      |                                                      | .                                                                                                                                          |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log Time Zone**    | 'logtimezone' => 'Europe/Berlin',                    | By default, the time zone displayed in the ownCloud logs is UTC.                                                                           |
++|                      |                                                      | To change the displayed time zone to the local time zone, use this parameter.                                                              |
++|                      |                                                      | For a list of valid values, see the following website:                                                                                     |
++|                      |                                                      | `http://php.net/manual/en/timezones.php <http://php.net/manual/en/timezones.php>`_                                                         |
++|                      |                                                      | .                                                                                                                                          |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log Query**        | "log_query" => false,                                | When set to “true”, all SQL queries performed by ownCloud will be written to the log file.                                                 |
++|                      |                                                      | Default is false.                                                                                                                          |
++|                      |                                                      | It is not recommended to run with this enabled as it will fill up the log file.                                                            |
++|                      |                                                      | Use only for debugging purposes.                                                                                                           |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log Auth Fail IP** | "log_authfailip" => false,                           | When set to true, the IP addresses of failed login attempts will be logged.                                                                |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++| **Log Rotate Size**  | 'log_rotate_size' => false, // 104857600, // 100 MiB | Since ownCloud log files can get large in size, this parameter may be used to rotate to a new log file once it reaches the specified size. |
++|                      |                                                      | This should be configured in bytes.                                                                                                        |
++|                      |                                                      | Default is false, or 0, which will not rotate the file.                                                                                    |
++|                      |                                                      |                                                                                                                                            |
+++----------------------+------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
++
++
diff --cc core/doc/admin/_sources/config/Mail_Parameters.txt
index 0000000,0000000..fb44c2e
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Mail_Parameters.txt
@@@ -1,0 -1,0 +1,63 @@@
++Mail Parameters
++===============
++
++These parameters are related to ownCloud’s ability to send emails for lost passwords or file shares.
++
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**           | **Format**                         | **Description**                                                                                                                |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail Domain**         | "mail_domain" => "example.com",    | The domain to use when ownCloud sends emails.                                                                                  |
++|                         |                                    | Emails can be sent in such instances as to share a public link, share notification or lost password.                           |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Debug**     | "mail_smtpdebug" => false,         |                                                                                                                                |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Mode**      | "mail_smtpmode" => "sendmail",     | The method used to send mail.                                                                                                  |
++|                         |                                    | Valid values are smtp, php, sendmail and qmail.                                                                                |
++|                         |                                    |                                                                                                                                |
++|                         |                                    | If using local or remote SMTP, set to smtp.                                                                                    |
++|                         |                                    |                                                                                                                                |
++|                         |                                    | If using PHP mail it is necessary to have an installed and working email system on the server.                                 |
++|                         |                                    | The program used to send email is defined in the PHP.ini file.                                                                 |
++|                         |                                    |                                                                                                                                |
++|                         |                                    | If using sendmail, it is necessary to have an installed and working email system on the server.                                |
++|                         |                                    | The sendmail binary is /usr/sbin/sendmail and should be installed on your \*nix system.                                         |
++|                         |                                    |                                                                                                                                |
++|                         |                                    | If using qmail to send email, the binary is /var/qmail/bin/sendmail and should be installed in your \*nix system.               |
++|                         |                                    |                                                                                                                                |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Host**      | "mail_smtphost" => "127.0.0.1",    | Mail server host.                                                                                                              |
++|                         |                                    | May contain multiple hosts separated by a semi colon.                                                                          |
++|                         |                                    | Also possible is to set the port used a particular host by following the host with a colon then the port number.               |
++|                         |                                    |                                                                                                                                |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Port**      | "mail_smtpport" => 25,             | Port used to communicate with the mail server.                                                                                 |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP TIMEOUT**   | "mail_smtptimeout" => 10,          | In the event that a malware or SPAM scanner is running on the SMTP server, it could be necessary to increase the SMTP timeout. |
++|                         |                                    | That can be done using this parameter.                                                                                         |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Secure**    | "mail_smtpsecure" => "",           | Default value is no security.                                                                                                  |
++|                         |                                    | May be ssl or tls depending on the required level of security.                                                                 |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **MAIL SMPT AUTH**      | "mail_smtpauth" => false,          | Determine if the mail server requires authentication.                                                                          |
++|                         |                                    | Default is false.                                                                                                              |
++|                         |                                    | If true, the following parameters should be configured as well.                                                                |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Auth Type** | "mail_smtpauthtype" => "LOGIN",    | If SMTP authentication is required, choose the authentication type as login (default) or plain.                                |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Name**      | "mail_smtpname" => "username",     | The username to use when authentication is enabled.                                                                            |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++| **Mail SMTP Password**  | "mail_smtppassword" => "password", | The password to use when authentication is enabled.                                                                            |
++|                         |                                    |                                                                                                                                |
+++-------------------------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
++
diff --cc core/doc/admin/_sources/config/Maintenance.txt
index 0000000,0000000..7a41846
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Maintenance.txt
@@@ -1,0 -1,0 +1,19 @@@
++Maintenance
++===========
++
++This section discusses the different stages of maintenance.
++
+++-----------------+-------------------------+---------------------------------------------------------------------------------------------------+
++| **Parameter**   | **Format**              | **Description**                                                                                   |
++|                 |                         |                                                                                                   |
+++-----------------+-------------------------+---------------------------------------------------------------------------------------------------+
++| **Single User** | 'singleuser' => false,  | When set to true, the ownCloud instance will be unavailable for all users not in the admin group. |
++|                 |                         | This is useful when performing maintenance.                                                       |
++|                 |                         |                                                                                                   |
+++-----------------+-------------------------+---------------------------------------------------------------------------------------------------+
++| **Maintenance** | "maintenance" => false, | Enable maintenance mode to disable ownCloud.                                                      |
++|                 |                         | When performing upgrades, ownCloud automatically enters maintenance mode.                         |
++|                 |                         | When enabled, users who are already logged-in are kicked out of ownCloud instantly.               |
++|                 |                         |                                                                                                   |
+++-----------------+-------------------------+---------------------------------------------------------------------------------------------------+
++
diff --cc core/doc/admin/_sources/config/Miscellaneous.txt
index 0000000,0000000..e0cbc00
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Miscellaneous.txt
@@@ -1,0 -1,0 +1,56 @@@
++Miscellaneous
++=============
++
++The remaining parameters are listed below.
++
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**     | **Format**                                                                                                                                                                  | **Description**                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Open SSL**      | 'openssl' => array(                                                                                                                                                         |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
++|                   | //'config' => '/absolute/location/of/openssl.cnf',                                                                                                                          |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
++|                   | ),                                                                                                                                                                          |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **User Backends** | 'user_backends'=>array(                                                                                                                                                     | It is possible to configure additional user backends in ownCloud.                                                                                                                 |
++|                   |                                                                                                                                                                             | The “External user Support” (user_external) app provides the following backends: IMAP (OC_User_IMAP), SMB (OC_User_SMB), FTP (OC_User_FTP).                                       |
++|                   | array(                                                                                                                                                                      |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
++|                   | 'class'=>'OC_User_IMAP',                                                                                                                                                    |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
++|                   | 'arguments'=>array('{imap.gmail.com:993/imap/ssl}INBOX'),                                                                                                                   |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
++|                   | ),                                                                                                                                                                          |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
++|                   | ),                                                                                                                                                                          |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **CSP Policy**    | "custom_csp_policy" => "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src \*; img-src \*; font-src 'self' data:; media-src \*", |                                                                                                                                                                                   |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **X Frame**       | “xframe_restriction" => true,                                                                                                                                               | XFrame-restriction is a header which                                                                                                                                              |
++|                   |                                                                                                                                                                             | prevents browsers from showing the site inside an iframe.                                                                                                                         |
++|                   |                                                                                                                                                                             | This may be used to prevent clickjacking.                                                                                                                                         |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Mem Cache**     | "memcached_server" => array('localhost', 11211),                                                                                                                            | Server details for one or more memcached servers to use for memory caching.                                                                                                       |
++|                   |                                                                                                                                                                             | Memcache is only used if other memory cache options (xcache, apc, apcu) are not available.                                                                                        |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Force SSL**     | "forcessl" => false,                                                                                                                                                        | If the admin checks “Enforce HTTPS” in the Admin page of the ownCloud WebUI. This will be set to true indicating that only HTTPS may be used to access this instance of ownCloud. |
++|                   |                                                                                                                                                                             | HTTP requests will be denied.                                                                                                                                                     |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Black List**    | "blacklisted_files" => array('.htaccess'),                                                                                                                                  | Files listed in this array will not be uploaded to ownCloud.                                                                                                                      |
++|                   |                                                                                                                                                                             | It should be noted that wildcards are not supported in this array.                                                                                                                |
++|                   |                                                                                                                                                                             | The configured must be exact file names to be blocked.                                                                                                                            |
++|                   |                                                                                                                                                                             | If wildcards are                                                                                                                                                                  |
++|                   |                                                                                                                                                                             | required, use the ownCloud firewall.                                                                                                                                              |
++|                   |                                                                                                                                                                             |                                                                                                                                                                                   |
+++-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++
++
++
diff --cc core/doc/admin/_sources/config/Previews.txt
index 0000000,0000000..634b782
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Previews.txt
@@@ -1,0 -1,0 +1,35 @@@
++Previews
++========
++
++ownCloud allows for thumbnail previews of files.
++This section contains the different configuration parameters available for that functionality.
++
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++| **Parameter**              | **Format**                                            | **Description**                                                       |
++|                            |                                                       |                                                                       |
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++| **Enable Previews**        | 'enable_previews' => true,                            | When enabled, default, the user will have file thumbnails visible.    |
++|                            |                                                       | Disable to remove thumbnails.                                         |
++|                            |                                                       |                                                                       |
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++| **Preview Width**          | 'preview_max_x' => null,                              | Maximum width of the thumbnail.                                       |
++|                            |                                                       | Default is null meaning no limit.                                     |
++|                            |                                                       |                                                                       |
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++| **Preview Height**         | 'preview_max_y' => null,                              | The maximum height of the thumbnail.                                  |
++|                            |                                                       | Default is set to null meaning no limit.                              |
++|                            |                                                       |                                                                       |
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++| **Scale Factor**           | 'preview_max_scale_factor' => 10,                     | Scale the thumbnail by this factor.                                   |
++|                            |                                                       | Default is 10.                                                        |
++|                            |                                                       |                                                                       |
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++| **Libreoffice Path**       | 'preview_libreoffice_path' => '/usr/bin/libreoffice', | ownCloud uses Libre Office for previews.                              |
++|                            |                                                       | This parameter indicates the location of the Libre Office executable. |
++|                            |                                                       |                                                                       |
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++| **Libreoffice Parameters** | 'preview_office_cl_parameters' => '',                 | Use this if Libre Office requires additional arguments                |
++|                            |                                                       |                                                                       |
+++----------------------------+-------------------------------------------------------+-----------------------------------------------------------------------+
++
++
diff --cc core/doc/admin/_sources/config/Reverse_Proxy_Configurations.txt
index 0000000,0000000..2a8da73
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Reverse_Proxy_Configurations.txt
@@@ -1,0 -1,0 +1,51 @@@
++Reverse Proxy Configurations
++============================
++
++The following parameters are used in the instance that Proxies are being used within the network.
++
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**           | **Format**                             | **Description**                                                                                                                                                                                                                 |
++|                         |                                        |                                                                                                                                                                                                                                 |
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Overwrite Host**      | "overwritehost" => "",                 | By default, ownCloud attempts to detect what outside host can access the instance (www.example.com                                                                                                                              |
++|                         |                                        | ) for generating URLs.                                                                                                                                                                                                          |
++|                         |                                        | However, due to some reverse proxies, the automatically detected value may be incorrect (www.example.com:88) which would lead to incorrect URLs being generated.                                                                |
++|                         |                                        | Use this field to enter the proper URL.                                                                                                                                                                                         |
++|                         |                                        |                                                                                                                                                                                                                                 |
++|                         |                                        | If set as follows: “overwritehost” => “http://www.example.com:88”,                                                                                                                                                              |
++|                         |                                        |                                                                                                                                                                                                                                 |
++|                         |                                        | When logging into ownCloud, the browser will point to port 88.                                                                                                                                                                  |
++|                         |                                        |                                                                                                                                                                                                                                 |
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Overwrite Protocol**  | "overwriteprotocol" => "",             | When generating URLs, ownCloud attempts to detect whether the server is accessed via https or http.                                                                                                                             |
++|                         |                                        | However, if ownCloud is behind a proxy and the proxy handles the https calls, thereby leaving ownCloud running without SSL, ownCloud would not realize that ssl is in use which would result in incorrect URLs being generated. |
++|                         |                                        | Valid values are “http” and “https”.                                                                                                                                                                                            |
++|                         |                                        |                                                                                                                                                                                                                                 |
++|                         |                                        | If set as follows:                                                                                                                                                                                                              |
++|                         |                                        |                                                                                                                                                                                                                                 |
++|                         |                                        | “overwriteprotocol” => “https”,                                                                                                                                                                                                 |
++|                         |                                        |                                                                                                                                                                                                                                 |
++|                         |                                        | ownCloud will generate all URLs as HTTPS rather than HTTP.                                                                                                                                                                      |
++|                         |                                        |                                                                                                                                                                                                                                 |
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Overwrite Web Root**  | "overwritewebroot" => "",              | As with the host and protocol, ownCloud attempts to detect the webroot for generating URLs automatically.                                                                                                                       |
++|                         |                                        | The webroot is the path used to access ownCloud relative to the domain, for instance, if                                                                                                                                        |
++|                         |                                        | `www.example.com/owncloud <http://www.example.com/owncloud>`_                                                                                                                                                                   |
++|                         |                                        | is the URL pointing to the ownCloud instance, the webroot would be /owncloud.                                                                                                                                                   |
++|                         |                                        | When proxies are in use, it may be difficult for ownCloud to detect this parameter resulting in invalid URLs.                                                                                                                   |
++|                         |                                        |                                                                                                                                                                                                                                 |
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Overwrite Cond Addr** | "overwritecondaddr" => "",             |                                                                                                                                                                                                                                 |
++|                         |                                        |                                                                                                                                                                                                                                 |
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Proxy**               | "proxy" => "",                         | In the instance where a proxy is required to access the internet, the proxy should be configured in this parameter.                                                                                                             |
++|                         |                                        | ownCloud requires access to the internet for several functions, and thus needs to have the proxy information configured to access the internet.                                                                                 |
++|                         |                                        |                                                                                                                                                                                                                                 |
++|                         |                                        |                                                                                                                                                                                                                                 |
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Proxy User Password** | "proxyuserpwd" => "username:password", | In the event that a proxy is configured and requires authentication, the username and password would be configured in this parameter.                                                                                           |
++|                         |                                        |                                                                                                                                                                                                                                 |
++|                         |                                        |                                                                                                                                                                                                                                 |
+++-------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++
++
diff --cc core/doc/admin/_sources/config/Session_Info.txt
index 0000000,0000000..5ad9706
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Session_Info.txt
@@@ -1,0 -1,0 +1,24 @@@
++Session Info
++============
++
++The following parameters are related to sessions within ownCloud.
++
+++------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**                | **Format**                                       | **Description**                                                                                                                                    |
++|                              |                                                  |                                                                                                                                                    |
+++------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Remember Cookie Lifetime** | "remember_login_cookie_lifetime" => 60*60*24*15, | ownCloud provides the user the option of remembering their login credentials (this option appears as the “remember” checkbox on the login screen). |
++|                              |                                                  | This parameter allows the admin to configure the length of time which ownCloud will remember that user.                                            |
++|                              |                                                  | Default is 15 days.                                                                                                                                |
++|                              |                                                  | The configuration is in seconds.                                                                                                                   |
++|                              |                                                  |                                                                                                                                                    |
++|                              |                                                  |                                                                                                                                                    |
+++------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
++| **Session Lifetime**         | "session_lifetime" => 60 * 60 * 24,              | ownCloud will automatically logout a user after a period of inactivity.                                                                            |
++|                              |                                                  | The default is 1 day.                                                                                                                              |
++|                              |                                                  | This parameter can be used to modify that time.                                                                                                    |
++|                              |                                                  | Configuration is in seconds.                                                                                                                       |
++|                              |                                                  |                                                                                                                                                    |
++|                              |                                                  |                                                                                                                                                    |
+++------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
++
diff --cc core/doc/admin/_sources/config/Table_of_Contents.txt
index 0000000,0000000..ee4ad50
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,5 @@@
++Table of Contents
++=================
++
++` <#_Toc377032819>`_
++
diff --cc core/doc/admin/_sources/config/User_Experience.txt
index 0000000,0000000..c9fcd30
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/User_Experience.txt
@@@ -1,0 -1,0 +1,35 @@@
++User Experience
++===============
++
++The following parameters are those that influence the end user’s experience.
++
+++----------------------------+----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
++| **Parameter**              | **Format**                                   | **Description**                                                                                                            |
++|                            |                                              |                                                                                                                            |
+++----------------------------+----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
++| **Default Language**       | "default_language" => "en",                  | This is the default language for the ownCloud WebUI. When configured, the default language will be the same for all users. |
++|                            |                                              | Users may then configure their own language preference in their Personal page.                                             |
++|                            |                                              | When not configured, the default language is determined form the headers sent by the web browser.                          |
++|                            |                                              | For instance, if the browser is in Spanish, ownCloud will be presented in Spanish                                          |
++|                            |                                              |                                                                                                                            |
+++----------------------------+----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
++| **Default App**            | "defaultapp" => "files",                     | By default, when a user logs into ownCloud, they are brought to the files page.                                            |
++|                            |                                              | If, for instance, the admin desires a different page to be loaded upon login, configure that app here.                     |
++|                            |                                              | Valid values are app id’s (for example news, files, gallery).                                                              |
++|                            |                                              |                                                                                                                            |
++|                            |                                              |                                                                                                                            |
+++----------------------------+----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
++| **Knowledge Base Enabled** | "knowledgebaseenabled" => true,              | When enabled, default, the help menu brings up the user documentation.                                                     |
++|                            |                                              |                                                                                                                            |
+++----------------------------+----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
++| **Enable Avatars**         | 'enable_avatars' => true,                    | Allows for the ability to use avatars.                                                                                     |
++|                            |                                              |                                                                                                                            |
++|                            |                                              |                                                                                                                            |
+++----------------------------+----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
++| **Display Name**           | 'allow_user_to_change_display_name' => true, | Users can modify their display name in the Personal page.                                                                  |
++|                            |                                              | If this parameter is set to false, they may not change their display                                                       |
++|                            |                                              | name.                                                                                                                      |
++|                            |                                              |                                                                                                                            |
++|                            |                                              |                                                                                                                            |
+++----------------------------+----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
++
diff --cc core/doc/admin/_sources/config/Verification.txt
index 0000000,0000000..67c1c12
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/Verification.txt
@@@ -1,0 -1,0 +1,29 @@@
++Verification
++============
++
++This section describes different verification checks that ownCloud may perform.
++
+++-----------------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------+
++| **Parameter**               | **Format**                            | **Description**                                                                                                      |
++|                             |                                       |                                                                                                                      |
+++-----------------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------+
++| **Update Checker**          | "updatechecker" => true,              | Provides information as to whether there is a new release of ownCloud available.                                     |
++|                             |                                       | When enabled, default, a banner will appear on the admin’s web interface when a newer version of ownCloud exists.    |
++|                             |                                       |                                                                                                                      |
++|                             |                                       |                                                                                                                      |
+++-----------------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------+
++| **Has Internet Connection** | "has_internet_connection" => true,    | Alerts ownCloud if there is an internet connection (true – default).                                                 |
++|                             |                                       | If set to false, ownCloud will not be able to look for updates, display the knowledgebase, or bring up the appstore. |
++|                             |                                       |                                                                                                                      |
+++-----------------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------+
++| **Working WebDAV**          | "check_for_working_webdav" => true,   | Allows ownCloud to verify a working WebDAV connection.                                                               |
++|                             |                                       | This is done by attempting to make a WebDAV request from PHP.                                                        |
++|                             |                                       |                                                                                                                      |
+++-----------------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------+
++| **Working .htaccess**       | "check_for_working_htaccess" => true, | Verifies whether the .htaccess file may be modified by ownCloud.                                                     |
++|                             |                                       | If set to false, this check will not be performed.                                                                   |
++|                             |                                       | If the file cannot be modified, items such as large file uploads cannot be performed.                                |
++|                             |                                       | This check only affects Apache servers.                                                                              |
++|                             |                                       |                                                                                                                      |
+++-----------------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------+
++
diff --cc core/doc/admin/_sources/config/index.txt
index 0000000,0000000..9aaf574
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/config/index.txt
@@@ -1,0 -1,0 +1,20 @@@
++**ownCloud config.php**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Default_Parameters
++    Reverse_Proxy_Configurations
++    User_Experience
++    Mail_Parameters
++    Deleted_Items
++    Verification
++    Logging
++    Session_Info
++    Code_Locations
++    APPS
++    Previews
++    Maintenance
++    Miscellaneous
diff --cc core/doc/admin/_sources/configuration/auth_ldap.txt
index 94bdcae,0000000..55952b4
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/auth_ldap.txt
+++ b/core/doc/admin/_sources/configuration/auth_ldap.txt
@@@ -1,607 -1,0 +1,615 @@@
 +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
 +
 +To connect to an LDAP server the configuration needs to be set up properly.
 +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.
 +
 +Configuration
 +-------------
 +
 +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.
 +
 +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.
 +
 +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.
 +
 +Server
 +~~~~~~
 +
 +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.
 +
 +Host:
 +  The host name of the LDAP server. It can also be a **ldaps://** URI, for
 +  instance.
 +
 +  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.
 +
 +  Examples:
 +
 +  * *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. 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*
 +
 +Password:
 +  The password for the user given above. Empty for anonymous access.
 +
 +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.
 +
 +By default, no groups will be availalble in ownCloud. You actively need to
 +enable groups.
 +
 +.. figure:: ../images/ldap-wizard-4-group.png
 +
 +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".
 +
 +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.
 +
 +
 +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. 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
 +
 +Connection Settings
 +~~~~~~~~~~~~~~~~~~~
 +
 +.. 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.
 +
 +  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*
 +
 +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*
 +
 +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.
 +
 +Case insensitive LDAP server (Windows):
 +  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!
 +
 +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.
 +
 +  Examples:
 +
 +  * ten minutes: *600*
 +  * one hour: *3600*
 +
 +Directory Settings
 +~~~~~~~~~~~~~~~~~~~
 +
 +.. 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.
 +
 +  *  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 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 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-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
 +---------------
 +
 +.. 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.
 +
 +  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).
 +
 +  * 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
 +--------------------------
 +
 +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 **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.
 +
++Groups
++------
++
++At the moment, only secondary groups are read. That means that only the groups
++are retrieved, which are returned by the attribute auto-detected (or manually
++chosen) in Group-Member association. Primary groups are not being taken into
++account.
++
 +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/background_jobs.txt
index 972e61c,0000000..139fbf9
mode 100644,000000..100644
--- a/core/doc/admin/_sources/configuration/background_jobs.txt
+++ b/core/doc/admin/_sources/configuration/background_jobs.txt
@@@ -1,66 -1,0 +1,66 @@@
 +Background Jobs
 +===============
 +A system like ownCloud sometimes requires tasks to be done on a regular
 +base without blocking the user interface. For that purpose you, as a system
 +administrator, can define background jobs which make it possible to execute
 +tasks without any need of user interaction, e.g. database clean-ups etc.
 +For the sake of completeness it is worth to know that additionally background
 +jobs can also be defined by installed apps.
 +
 +Parameters
 +----------
 +In the admin settings menu you can configure how cron-jobs should be executed. 
 +You can choose between the following options:
 +
 +-   AJAX
 +-   Webcron
 +-   Cron
 +
 +Cron-Jobs
 +---------
 +
 +OwnCloud requires various automated background jobs to be run. There are three methods to achieve this.
 +The default way is AJAX and the recommended way is cron.
 +
 +AJAX
 +~~~~
 +
 +This option is the default option, although it is the least reliable. Every
 +time a user visits the ownCloud page a single background job will be executed.
 +The advantage of this mechanism is, that is does not require access to the
 +system nor registration at a third party service.
 +The disadvantage of this solution compared to the Webcron service is, that it
 +requires regular visits of the page to get triggered.
 +
 +Webcron
 +~~~~~~~
 +
 +By registering your ownCloud ``cron.php`` script address at an external webcron
 +service, like e.g. easyCron_, you ensure that background jobs will be executed
 +regularly. To use such a service your server need to be reachable via the Internet.
 +
 +**Example**
 +
 +::
 +
 +  URL to call: http[s]://<domain-of-your-server>/owncloud/cron.php
 +
 +Cron
 +~~~~
 +
 +Using the systems cron feature is the preferred way to run regular tasks,
 +because it allows to execute jobs without the limitations which a web server
 +may have.
 +
 +**Example**
 +
- To run a cron job on a *nix system, e.g. every 15min, under the default web server
++To run a cron job on a \*nix system, e.g. every 15min, under the default web server
 +user, e.g. **www-data**, you need to set-up the following cron job to call the
 +**cron.php** script. Please check the crontab man page for the exact command syntax.
 +
 +::
 +
 +  # crontab -u www-data -e
 +  */15  *  *  *  * php -f /var/www/owncloud/cron.php
 +
 +.. _easyCron: http://www.easycron.com/  
diff --cc core/doc/admin/_sources/cron/Introduction.txt
index 0000000,0000000..488ab08
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/cron/Introduction.txt
@@@ -1,0 -1,0 +1,5 @@@
++Introduction
++============
++
++ownCloud is written in PHP, and because PHP is a request driven language – in other words it runs only when a client takes an action and calls php, and then it executes and ends – it does not have a built in CRON process. Instead, ownCloud provides Cron.php, which is called by the server’s CRON daemon. Cron.php is an ownCloud internal process that runs various background jobs on demand.
++It is called by the server cron, and can be set by the administrator. ownCloud plug-in applications register actions with cron.php automatically to take care of typical housekeeping operations, such as garbage collecting of temporary files or checking for newly updated files using filescan() for externally mounted file systems.
diff --cc core/doc/admin/_sources/cron/Usage.txt
index 0000000,0000000..446da99
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/cron/Usage.txt
@@@ -1,0 -1,0 +1,24 @@@
++Usage
++=====
++
++The interval at which this script is executed, and thus the ownCloud registered actions, can depend on the size of the installation and the load of the system.
++Recommended intervals are 15 or 30 minutes.
++
++Cron.php needs to be called by the system’s cron daemon and run as the same user the web server runs as.
++
++As an example, on an ordinary Linux distribution, place the following in the webserver’s user’s crontab:
++
++\*/15
++*
++*
++*
++* /usr/bin/php -f /srv/http/owncloud/cron.php /dev/null 2>&1
++
++
++This will run cron.php every 15 minutes and suppress any warnings or output which may be generated.
++
++
++
++
++
++
diff --cc core/doc/admin/_sources/cron/index.txt
index 0000000,0000000..1472d8f
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/cron/index.txt
@@@ -1,0 -1,0 +1,7 @@@
++**ownCloud cron.php**
++
++.. toctree::
++    :maxdepth: 2
++
++    Introduction
++    Usage
diff --cc core/doc/admin/_sources/dependencies/Configuration.txt
index 0000000,0000000..f1f9712
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/dependencies/Configuration.txt
@@@ -1,0 -1,0 +1,12 @@@
++Configuration
++=============
++
++By default, the ownCloud Dependencies App is disabled.
++To enable, navigate to the Apps page and select “ownCloud dependencies info” and enable.
++
++|10000000000001C9000000AF9C1CE57F_png|
++
++.. |10000000000001C9000000AF9C1CE57F_png| image:: images/10000000000001C9000000AF9C1CE57F.png
++    :width: 4.7602in
++    :height: 1.8228in
++
diff --cc core/doc/admin/_sources/dependencies/Introduction.txt
index 0000000,0000000..f434f8e
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/dependencies/Introduction.txt
@@@ -1,0 -1,0 +1,6 @@@
++Introduction
++============
++
++The ownCloud Dependencies App provides a list of modules required to run the current setup of ownCloud.
++All of the modules listed should be installed on the base operating system prior to using ownCloud.
++
diff --cc core/doc/admin/_sources/dependencies/Table_of_Contents.txt
index 0000000,0000000..3dcf50a
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/dependencies/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc374602312>`_
diff --cc core/doc/admin/_sources/dependencies/Utilization.txt
index 0000000,0000000..9007ddd
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/dependencies/Utilization.txt
@@@ -1,0 -1,0 +1,17 @@@
++Utilization
++===========
++
++Once this app is enabled, navigate to the Admin page and scroll to “Dependencies status”.
++This section will show a list of all modules required to execute this ownCloud setup as well as what part of ownCloud uses the given module.
++
++|100000000000013C0000017D4FC6CEF5_png|
++
++Modules in green are required and have been installed.
++Modules in red are required yet have not been installed.
++It is recommended to install these modules prior to using ownCloud.
++
++
++.. |100000000000013C0000017D4FC6CEF5_png| image:: images/100000000000013C0000017D4FC6CEF5.png
++    :width: 3.2917in
++    :height: 3.9689in
++
diff --cc core/doc/admin/_sources/dependencies/index.txt
index 0000000,0000000..d0c0996
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/dependencies/index.txt
@@@ -1,0 -1,0 +1,9 @@@
++**ownCloud Dependencies**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration
++    Utilization
diff --cc core/doc/admin/_sources/encryption/Configuration.txt
index 0000000,0000000..a863f13
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/encryption/Configuration.txt
@@@ -1,0 -1,0 +1,88 @@@
++Configuration
++=============
++
++To enable the encryption app, navigate to the Apps page and select Encryption, then enable.
++
++|10000000000001A3000000AAFE82893A_png|
++
++Once the app is enabled, the following message will appear for all users currently logged into the web browser as they navigate to a new page within the ownCloud web browser
++
++|10000000000001BF00000012349EAE2F_png|
++
++It is necessary to logout of ownCloud and re-login to initialize the encryption keys.
++
++Recovery Key
++------------
++
++Enabling the recovery key globally is done by the admin.
++Each user then has the option as to whether they wish to do so for their own account.
++If enabled, the admin will be able to reset the user’s encryption password using a predefined recovery password.
++This allows for the recovery of a user’s files in the event of a password loss.
++If recovery key is not enabled, there is no way to restore files if the login password is lost.
++
++Admin level
++~~~~~~~~~~~
++
++To enable the recovery key, the Admin must first enable this feature in the Admin page.
++
++|100000000000018E000000C4BA62B2A3_png|
++
++Once enabled, the Admin may change the recovery key password at any time.
++
++|1000000000000193000001AE9AB8B0A2_png|
++
++User level
++~~~~~~~~~~
++
++The user can then navigate to the Personal page and enable password recovery.
++
++|1000000000000227000000935D9B1EF6_png|
++
++Recovery
++~~~~~~~~
++
++In order for the admin to recover the user’s files in the event of a lost password, the admin should navigate to the “Users” tab and enter the Recovery Key Password into the “Admin Recovery Password” field at the top of the page.
++
++|10000000000003730000002B6865E951_png|
++
++This will allow the admin to generate a new encryption password for the user.
++
++*   For local user management, this will generate both a new log-in password as well as a new encryption password for the data.
++
++
++
++*   If LDAP authentication is in use, the admin would need to set the new log-in password in the LDAP server, and then enter the same password in the user management page for the encryption key.
++    It is important that both the password in the LDAP server and the password entered in the user management page are identical.
++
++
++
++
++.. |10000000000001BF00000012349EAE2F_png| image:: images/10000000000001BF00000012349EAE2F.png
++    :width: 4.6563in
++    :height: 0.1874in
++
++
++.. |100000000000018E000000C4BA62B2A3_png| image:: images/100000000000018E000000C4BA62B2A3.png
++    :width: 4.1457in
++    :height: 2.0417in
++
++
++.. |1000000000000193000001AE9AB8B0A2_png| image:: images/1000000000000193000001AE9AB8B0A2.png
++    :width: 4.198in
++    :height: 4.4791in
++
++
++.. |10000000000003730000002B6865E951_png| image:: images/10000000000003730000002B6865E951.png
++    :width: 6.5in
++    :height: 0.3165in
++
++
++.. |1000000000000227000000935D9B1EF6_png| image:: images/1000000000000227000000935D9B1EF6.png
++    :width: 5.7398in
++    :height: 1.5311in
++
++
++.. |10000000000001A3000000AAFE82893A_png| image:: images/10000000000001A3000000AAFE82893A.png
++    :width: 4.3646in
++    :height: 1.7701in
++
diff --cc core/doc/admin/_sources/encryption/File_Systems.txt
index 0000000,0000000..6e86ca6
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/encryption/File_Systems.txt
@@@ -1,0 -1,0 +1,65 @@@
++File Systems
++============
++
++Once enabled, all files within ownCloud are encrypted, with the exceptions mentioned above.
++This includes files in local storage, as well as files contained within external storage mounts.
++
++The encryption app creates several key files/folders when enabled.
++~/data/public-keys contains the public keys for all users, and ~/data/owncloud_private_keys contains system wide private keys utilized for public link shares as well as the recovery key.
++
++|10000000000002C700000048F3729BAA_png|
++
++The encryption app stores key information in the ~/data/<user>/files_encryption directory.
++
++|100000000000024400000027BEE1E4A9_png|
++
++As mentioned previously, the private key is generated from the user’s password.
++
++Each file that the user owns will have a corresponding keyfile maintained in the keyfiles directory.
++
++|100000000000026E0000003672ADCB6E_png|
++
++In addition a share key will be generated for each file in the event that there is an external storage mount by the admin for multiple users or groups.
++
++|100000000000029F000000B8A83D0275_png|
++
++When viewing a file directly on the ownCloud data directory, it will show up as encrypted.
++
++|10000000000002B30000003A5B960711_png|
++
++However, viewing the same file via the browser, the actual contents of the file are displayed.
++
++|10000000000001A40000006C954442CE_png|
++
++
++
++
++.. |10000000000002C700000048F3729BAA_png| image:: images/10000000000002C700000048F3729BAA.png
++    :width: 6.5in
++    :height: 0.6583in
++
++
++.. |100000000000024400000027BEE1E4A9_png| image:: images/100000000000024400000027BEE1E4A9.png
++    :width: 6.0417in
++    :height: 0.4063in
++
++
++.. |100000000000029F000000B8A83D0275_png| image:: images/100000000000029F000000B8A83D0275.png
++    :width: 6.5in
++    :height: 1.7819in
++
++
++.. |100000000000026E0000003672ADCB6E_png| image:: images/100000000000026E0000003672ADCB6E.png
++    :width: 6.4791in
++    :height: 0.5626in
++
++
++.. |10000000000001A40000006C954442CE_png| image:: images/10000000000001A40000006C954442CE.png
++    :width: 4.3752in
++    :height: 1.1252in
++
++
++.. |10000000000002B30000003A5B960711_png| image:: images/10000000000002B30000003A5B960711.png
++    :width: 6.5in
++    :height: 0.5457in
++
diff --cc core/doc/admin/_sources/encryption/Introduction.txt
index 0000000,0000000..8b68ac5
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/encryption/Introduction.txt
@@@ -1,0 -1,0 +1,57 @@@
++Introduction
++============
++
++ownCloud contains an encryption app which, when enabled, encrypts all files stored in ownCloud.
++The encryption is done automatically once the admin enables the app.
++All encryption and decryption occur on the ownCloud server, which allows the user to continue to use other apps to view and edit the data.
++
++The user’s password is used as the key to decrypt their data.
++This means that if the user loses their login password, data will be lost.
++To protect against password loss, the recovery key may be used as described in a later section.
++
++What gets encrypted?
++--------------------
++
++All files stored in ownCloud will be encrypted with the following exceptions:
++
++*   Old versions (versions created prior to enabling the encryption app)
++
++
++
++*   Old files in the trash bin (files deleted prior to enabling the encryption app)
++
++
++
++*   Existing files on external storage.
++    Only new files placed on the external storage mount after encryption was enabled are encrypted.
++
++
++
++*   Image thumbnails from the gallery app
++
++
++
++*   Search index form the full text search app.
++
++
++
++Decrypting the data
++-------------------
++
++If the encryption app is disable, users will get the following message alerting them how to decrypt their files.
++
++|100000000000023B000000125381F51B_png|
++
++Navigating to the Personal settings page, the user can enter their password and decrypt all files.
++
++|100000000000018B000000A090F31164_png|
++
++.. |100000000000023B000000125381F51B_png| image:: images/100000000000023B000000125381F51B.png
++    :width: 5.948in
++    :height: 0.1874in
++
++
++.. |100000000000018B000000A090F31164_png| image:: images/100000000000018B000000A090F31164.png
++    :width: 4.1146in
++    :height: 1.6665in
++
diff --cc core/doc/admin/_sources/encryption/Table_of_Contents.txt
index 0000000,0000000..0b4fcbb
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/encryption/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc374961923>`_
diff --cc core/doc/admin/_sources/encryption/index.txt
index 0000000,0000000..9c66e4b
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/encryption/index.txt
@@@ -1,0 -1,0 +1,9 @@@
++**ownCloud Enctryption**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration
++    File_Systems
diff --cc core/doc/admin/_sources/external/Configuration.txt
index 0000000,0000000..ce5ab7c
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/external/Configuration.txt
@@@ -1,0 -1,0 +1,875 @@@
++Configuration
++=============
++
++Enable the app
++--------------
++
++From the
++APPs
++Page within ownCloud, select
++External Storage Support
++and enable.
++
++|10000000000001980000009271BE0D26_png|
++
++Configure mounts
++----------------
++
++As stated previously, the Admin has the ability to configure these mounts, as well as decide whether an end user can configure mounts for themselves.
++For the Admin, the configuration is performed in the
++ADMIN page.
++For end users, the configuration is performed in the PERSONAL Page.
++This document will discuss how the Admin configures the mounts, however, the configuration is the same for the end user.
++
++On the ADMIN page, scroll to External Storage:
++
++|1000000000000631000000E19D116AA0_png|
++
++
++Enable users to mount their own devices
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++
++In order to allow end users to mount their own devices, select the radio button next to
++Enable User External Storage
++.
++
++
++Local Storage
++~~~~~~~~~~~~~
++
++This is used to mount storage that is outside ownCloud’s data directory
++
++|10000000000006060000006A0106CA0C_png|
++
++*   Location – The
++    directory to mount
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++|10000000000003DF00000071A41D8A1F_png|
++
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++|10000000000004770000008AAF3CFFDB_png|
++
++
++Amazon S3
++~~~~~~~~~
++
++This is used to mount to an S3 server
++
++|100000000000061D0000007047877972_png|
++
++*   Access Key – The access key provided by the S3 storage provider
++
++
++
++*   Secret Key – The secret key provided by the S3 storage provider
++
++
++
++*   Bucket – The bucket created within the S3 storage server
++
++
++
++*   Hostname (optional) – The host of the s3 storage server
++
++
++
++*   Port (optional) – The port to communicate to the host on
++
++
++
++*   Region (optional) – The region where the storage exists
++
++
++
++*   Applicable – A list of users who can see this mount
++
++
++
++|10000000000005BB0000007C1DF71FA7_png|
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++|100000000000063F00000090AAE1FA4A_png|
++
++Dropbox
++~~~~~~~
++
++Mounts a dropbox in the Dropbox cloud into the virtual file system.
++
++Configure DropBox
++^^^^^^^^^^^^^^^^^
++
++Log onto the Dropbox Developers page:
++`http://www.dropbox.com/developers <http://www.dropbox.com/developers>`_
++.
++
++Select App Console:
++
++|10000000000000A800000073F49785A6_png|
++
++This will ask you to accept terms and conditions.
++
++Select Dropbox API and configure down the page as follows:
++
++|1000000000000372000002AF943ADDA0_png|
++
++The name can be any unique name desired.
++
++Select Create App
++
++|10000000000000950000004412998BE7_png|
++
++Enter the OAuth redirect URI as follows:
++
++http://<ownCloud instance>/index.php/settings/personal
++
++http://<ownCloud instance>/index.php/settings/admin
++
++|10000000000003A6000002A9C7A660BE_png|
++
++
++Take note of the App Key and App Secret and enter into ownCloud.
++
++ownCloud Configuration
++^^^^^^^^^^^^^^^^^^^^^^
++
++
++|100000000000060300000065DF96536B_png|
++
++*   App key – The app key to login to your Dropbox
++
++
++
++*   App secret – The app secret to login to your Dropbox
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++|10000000000005EC00000073E678DFEC_png|
++
++Select “Grant Access” and the following appears
++
++|10000000000002950000021E245F6883_png|
++
++Note if you are not logged into Dropbox, you will first be prompted to login.
++
++Select Allow.
++
++
++|10000000000005E6000000676902E040_png|
++
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++|100000000000061A0000006FC014C3A4_png|
++
++FTP
++~~~
++
++Mounts a folder on a remote FTP or FTPS server
++
++|100000000000061E0000006BCF9ECC0B_png|
++
++*   URL – The hostname of the FTP/FTPS server
++
++
++
++*   Username – The username to login to the FTP/FTPS server
++
++
++
++*   Password – The password to login to the FTP/FTPS esrver
++
++
++
++*   Root – The folder inside the FTP/FTPS server to mount (optional – defaults to ‘/’)
++
++
++
++*   Secure ftps:// -- Whether to use ftps:// to connect to the FTP server instead of ftp://
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++|10000000000005AF00000074604B1A67_png|
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++|10000000000005D50000009458C5EE48_png|
++
++GoogleDrive
++~~~~~~~~~~~
++
++Mounts a share in the Google cloud.
++
++Configure GoogleDrive
++^^^^^^^^^^^^^^^^^^^^^
++
++All applications that access a Google API must be registered through the “Google Cloud Console”.
++This can be accessed at the following URL:
++
++`https://cloud.google.com <https://cloud.google.com>`_
++
++Once logged into Google, create a project by selecting
++Create Project
++
++|1000000000000247000000A77440E4D3_png|
++
++Enter a
++Project name
++and either keep or enter a new
++Project ID
++
++|100000000000027B0000011D10F70F88_png|
++
++
++Select the project and choose the
++APIs & auth
++menu entry
++
++|10000000000000B600000120706C3C75_png|
++
++Enable
++Drive API
++and
++Drive SDK
++and then select the
++|100000000000003800000018D49F1CE7_png|
++next to either
++Drive API
++or
++Drive SDK
++
++
++|10000000000004100000005657010336_png|
++
++Select
++API Access
++on the menu
++
++|10000000000000CD000000ECA8DE7780_png|
++
++Select
++REGISTER APP
++
++|10000000000001FD000000DF8D2D7546_png|
++
++Enter a name and select
++Web Application
++
++|10000000000002840000016729388B7F_png|
++
++Expand
++OAuth 2.0 Client ID
++
++Enter the following in the
++REDIRECT URI
++field
++
++http://<ownCloud instance>/index.php/settings/personal
++
++http://<ownCloud instance>/index.php/settings/admin
++
++Note: The
++<ownCloud instance>
++must be a Fully Qualified Domain Name.
++It cannot be an IP address
++
++Select
++Generate
++
++|10000000000003B30000021B5EE5D338_png|
++
++
++Verify that the required email addresses are in the
++Permissions
++tab
++
++|10000000000003A60000011E274A1A28_png|
++
++
++Configure ownCloud
++^^^^^^^^^^^^^^^^^^
++
++Prior to configuring the mount, an E-mail address needs to be configured in the
++Personal
++tab
++
++|10000000000001880000007EA4444400_png|
++
++
++
++|10000000000006000000005EDA7B96BE_png|
++
++*   Client ID – The client id to login to the Google Drive from
++    OAuth 2.0 Client ID
++    above
++
++
++
++*   Client secret – The client secret to login to the Google Drive from
++    OAuth 2.0 Client ID
++    above
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++Once the required fields are filled in, a
++Grant access
++button appears.
++Select this button
++
++|10000000000005F70000007E43DB8026_png|
++
++The following screen appears.
++Select
++Accept
++
++|10000000000001D30000014DC251C948_png|
++
++|10000000000004C0000000795BB2C146_png|
++
++
++|1000000000000552000000BF22E90239_png|
++
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++
++OpenStack Object Storage
++~~~~~~~~~~~~~~~~~~~~~~~~
++
++Mounts a container on an OpenStack Object Storage server.
++
++|100000000000053A00000067708C8F53_png|
++
++|10000000000002170000004A27056037_png|
++
++*   Username
++
++
++
++*   Bucket
++
++
++
++*   Region
++
++
++
++*   API Key
++
++
++
++*   Tenantname
++
++
++
++*   Password
++
++
++
++*   Service Name
++
++
++
++*   URL of identity Endpoint
++
++
++
++*   Timeout of HTTP request
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++
++SMB/CIFS
++~~~~~~~~
++
++Mounts a folder on a remote Samba server, NAS appliance, or Windows machine.
++
++|10000000000005FA0000005CE8491B77_png|
++
++*   URL – The host name of the Samba server.
++
++
++
++*   Username – The user name used to login to the Samba server.
++
++
++
++*   Password – The password to login to the Samba server.
++
++
++
++*   Share – The share on the Samba server to mount.
++
++
++
++*   Root – The folder inside the Samba share to mount (optional, defaults to ‘/’)
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++|10000000000005C30000006CAFFAAD61_png|
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++Note: The SMB backend requires smbclient to be installed on the server
++
++|10000000000005D00000003B29340A7A_png|
++
++ownCloud/WebDAV
++~~~~~~~~~~~~~~~
++
++Mounts a folder on a WebDAV server (or another ownCloud instance via WebDAV).
++
++
++|10000000000005F70000005F0912E904_png|
++
++*   URL – The hostname of the WebDAV server.
++
++
++
++*   Username – The username used to login to the WebDAV server.
++
++
++
++*   Password – The password used to login to the WebDAV server.
++
++
++
++*   Root – The folder inside the WebDav server to mount (optional, defaults to ‘/’)
++
++
++
++*   Secure https:// - Whether to use https:// to connect to the WebDav server instead of http://
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++|10000000000005B90000007866D92D14_png|
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++|10000000000005E20000009B1BA5A8CF_png|
++
++
++SFTP
++~~~~
++
++Mounts a folder on a remote SSH server.
++
++|10000000000005FF0000005F35710398_png|
++
++*   URL – The hostname of the SSH server.
++
++
++
++*   Username – The username used to login to the SSH server.
++
++
++
++*   Password – The password used to login to the SSH server.
++
++
++
++*   Root – The folder inside the SSH server to mount (optional, defaults to ‘/’)
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++|10000000000005970000006AE23997C9_png|
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++
++|10000000000005EB000000A68BA73E2D_png|
++
++
++iRODS
++~~~~~
++
++Mounts a folder on a iRODS server.
++
++|100000000000062A0000005F61A18950_png|
++
++*   Host
++
++
++
++*   Port
++
++
++
++*   Use ownCloud login
++
++
++
++*   Username
++
++
++
++*   Password
++
++
++
++*   Authentication Mode
++
++
++
++*   Zone
++
++
++
++*   Applicable – A list users of who can see this mount
++
++
++
++Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.
++
++
++Configuration File
++------------------
++
++The configuration of mounts created within the External Storage App are stored in the
++data/mount.json
++file.
++This file contains all settings in JSON (JavaScript Object Notation) format.
++Two different types of entries exist:
++
++*   Group mounts -
++    Each entry configures a mount for each user in group
++
++
++
++*   User mount – Each entry configures a mount for a single user or all users.
++
++
++
++For each type, there is a JSON array with the user/group name as key and an array of configuration values as the value.
++Each entry consist of the class name of the storage backend and an array of backend specific options (described above) and will be replaced by the user login.
++
++Although configuration may be done by making modifications to the mount.json file, it is recommended to use the Web-GUI in the administrator panel (as described in the above section) to add, remove, or modify mount options in order to prevent any problems.
++
++
++.. |1000000000000552000000BF22E90239_png| image:: images/1000000000000552000000BF22E90239.png
++    :width: 6.5in
++    :height: 0.911in
++
++
++.. |10000000000005EC00000073E678DFEC_png| image:: images/10000000000005EC00000073E678DFEC.png
++    :width: 6.5in
++    :height: 0.4929in
++
++
++.. |100000000000062A0000005F61A18950_png| image:: images/100000000000062A0000005F61A18950.png
++    :width: 6.5in
++    :height: 0.3909in
++
++
++.. |10000000000001FD000000DF8D2D7546_png| image:: images/10000000000001FD000000DF8D2D7546.png
++    :width: 5.302in
++    :height: 2.3228in
++
++
++.. |10000000000001980000009271BE0D26_png| image:: images/10000000000001980000009271BE0D26.png
++    :width: 4.25in
++    :height: 1.5201in
++
++
++.. |10000000000005B90000007866D92D14_png| image:: images/10000000000005B90000007866D92D14.png
++    :width: 6.5in
++    :height: 0.5319in
++
++
++.. |10000000000005D50000009458C5EE48_png| image:: images/10000000000005D50000009458C5EE48.png
++    :width: 6.5in
++    :height: 0.6437in
++
++
++.. |10000000000002170000004A27056037_png| image:: images/10000000000002170000004A27056037.png
++    :width: 5.5728in
++    :height: 0.7701in
++
++
++.. |10000000000005C30000006CAFFAAD61_png| image:: images/10000000000005C30000006CAFFAAD61.png
++    :width: 6.5in
++    :height: 0.4756in
++
++
++.. |100000000000060300000065DF96536B_png| image:: images/100000000000060300000065DF96536B.png
++    :width: 6.5in
++    :height: 0.4264in
++
++
++.. |10000000000003A60000011E274A1A28_png| image:: images/10000000000003A60000011E274A1A28.png
++    :width: 6.5in
++    :height: 1.9902in
++
++
++.. |10000000000001880000007EA4444400_png| image:: images/10000000000001880000007EA4444400.png
++    :width: 4.0835in
++    :height: 1.3126in
++
++
++.. |10000000000005BB0000007C1DF71FA7_png| image:: images/10000000000005BB0000007C1DF71FA7.png
++    :width: 6.5in
++    :height: 0.5492in
++
++
++.. |10000000000005FF0000005F35710398_png| image:: images/10000000000005FF0000005F35710398.png
++    :width: 6.5in
++    :height: 0.402in
++
++
++.. |10000000000005E6000000676902E040_png| image:: images/10000000000005E6000000676902E040.png
++    :width: 6.5in
++    :height: 0.4429in
++
++
++.. |10000000000005F70000007E43DB8026_png| image:: images/10000000000005F70000007E43DB8026.png
++    :width: 6.5in
++    :height: 0.5362in
++
++
++.. |10000000000000950000004412998BE7_png| image:: images/10000000000000950000004412998BE7.png
++    :width: 1.552in
++    :height: 0.7083in
++
++
++.. |100000000000061E0000006BCF9ECC0B_png| image:: images/100000000000061E0000006BCF9ECC0B.png
++    :width: 6.5in
++    :height: 0.4437in
++
++
++.. |100000000000063F00000090AAE1FA4A_png| image:: images/100000000000063F00000090AAE1FA4A.png
++    :width: 6.5in
++    :height: 0.5846in
++
++
++.. |10000000000004C0000000795BB2C146_png| image:: images/10000000000004C0000000795BB2C146.png
++    :width: 6.5in
++    :height: 0.6465in
++
++
++.. |100000000000027B0000011D10F70F88_png| image:: images/100000000000027B0000011D10F70F88.png
++    :width: 6.5in
++    :height: 2.9173in
++
++
++.. |100000000000061A0000006FC014C3A4_png| image:: images/100000000000061A0000006FC014C3A4.png
++    :width: 6.5in
++    :height: 0.461in
++
++
++.. |10000000000005D00000003B29340A7A_png| image:: images/10000000000005D00000003B29340A7A.png
++    :width: 6.5in
++    :height: 0.2575in
++
++
++.. |10000000000006060000006A0106CA0C_png| image:: images/10000000000006060000006A0106CA0C.png
++    :width: 6.5in
++    :height: 0.4465in
++
++
++.. |10000000000000A800000073F49785A6_png| image:: images/10000000000000A800000073F49785A6.png
++    :width: 1.75in
++    :height: 1.198in
++
++
++.. |10000000000000B600000120706C3C75_png| image:: images/10000000000000B600000120706C3C75.png
++    :width: 1.8957in
++    :height: 3in
++
++
++.. |10000000000004770000008AAF3CFFDB_png| image:: images/10000000000004770000008AAF3CFFDB.png
++    :width: 6.5in
++    :height: 0.7846in
++
++
++.. |10000000000002840000016729388B7F_png| image:: images/10000000000002840000016729388B7F.png
++    :width: 6.5in
++    :height: 3.6228in
++
++
++.. |10000000000003B30000021B5EE5D338_png| image:: images/10000000000003B30000021B5EE5D338.png
++    :width: 6.5in
++    :height: 3.6992in
++
++
++.. |10000000000006000000005EDA7B96BE_png| image:: images/10000000000006000000005EDA7B96BE.png
++    :width: 6.5in
++    :height: 0.398in
++
++
++.. |1000000000000372000002AF943ADDA0_png| image:: images/1000000000000372000002AF943ADDA0.png
++    :width: 6.5in
++    :height: 5.0634in
++
++
++.. |100000000000061D0000007047877972_png| image:: images/100000000000061D0000007047877972.png
++    :width: 6.5in
++    :height: 0.4654in
++
++
++.. |10000000000003A6000002A9C7A660BE_png| image:: images/10000000000003A6000002A9C7A660BE.png
++    :width: 6.5in
++    :height: 4.7398in
++
++
++.. |10000000000000CD000000ECA8DE7780_png| image:: images/10000000000000CD000000ECA8DE7780.png
++    :width: 2.1346in
++    :height: 2.4583in
++
++
++.. |100000000000053A00000067708C8F53_png| image:: images/100000000000053A00000067708C8F53.png
++    :width: 6.5in
++    :height: 0.5008in
++
++
++.. |10000000000005970000006AE23997C9_png| image:: images/10000000000005970000006AE23997C9.png
++    :width: 6.5in
++    :height: 0.4811in
++
++
++.. |1000000000000247000000A77440E4D3_png| image:: images/1000000000000247000000A77440E4D3.png
++    :width: 6.0728in
++    :height: 1.7398in
++
++
++.. |10000000000003DF00000071A41D8A1F_png| image:: images/10000000000003DF00000071A41D8A1F.png
++    :width: 6.5in
++    :height: 0.7409in
++
++
++.. |10000000000001D30000014DC251C948_png| image:: images/10000000000001D30000014DC251C948.png
++    :width: 4.8646in
++    :height: 3.4689in
++
++
++.. |10000000000005EB000000A68BA73E2D_png| image:: images/10000000000005EB000000A68BA73E2D.png
++    :width: 6.5in
++    :height: 0.7126in
++
++
++.. |10000000000005E20000009B1BA5A8CF_png| image:: images/10000000000005E20000009B1BA5A8CF.png
++    :width: 6.5in
++    :height: 0.6689in
++
++
++.. |100000000000003800000018D49F1CE7_png| image:: images/100000000000003800000018D49F1CE7.png
++    :width: 0.5835in
++    :height: 0.25in
++
++
++.. |1000000000000631000000E19D116AA0_png| image:: images/1000000000000631000000E19D116AA0.png
++    :width: 6.5in
++    :height: 0.9228in
++
++
++.. |10000000000005AF00000074604B1A67_png| image:: images/10000000000005AF00000074604B1A67.png
++    :width: 6.5in
++    :height: 0.5181in
++
++
++.. |10000000000005F70000005F0912E904_png| image:: images/10000000000005F70000005F0912E904.png
++    :width: 6.5in
++    :height: 0.4043in
++
++
++.. |10000000000002950000021E245F6883_png| image:: images/10000000000002950000021E245F6883.png
++    :width: 6.5in
++    :height: 5.3299in
++
++
++.. |10000000000004100000005657010336_png| image:: images/10000000000004100000005657010336.png
++    :width: 6.5in
++    :height: 0.5374in
++
++
++.. |10000000000005FA0000005CE8491B77_png| image:: images/10000000000005FA0000005CE8491B77.png
++    :width: 6.5in
++    :height: 0.3909in
++
diff --cc core/doc/admin/_sources/external/Introduction.txt
index 0000000,0000000..ca389e3
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/external/Introduction.txt
@@@ -1,0 -1,0 +1,54 @@@
++Introduction
++============
++
++ownCloud provides the ability to mount an external storage device.
++The external storage devices serves as a secondary storage device within ownCloud.
++
++The ownCloud Admin has the ability to create such a mount.
++In addition, the ownCloud Admin may decide to provide the end user the ability to create the mount.
++The mounts may be created on a per-user, per group, or all user basis.
++
++Supported mounts
++----------------
++
++The following lists the supported storage types.
++
++*   Local
++
++
++
++*   Amazon S3
++
++
++
++*   Dropbox
++
++
++
++*   FTP
++
++
++
++*   Google Drive
++
++
++
++*   OpenStack Object Storage
++
++
++
++*   SMB/CIFS
++
++
++
++*   ownCloud/WebDAV
++
++
++
++*   SFTP
++
++
++
++*   iRODS
++
++
diff --cc core/doc/admin/_sources/external/Table_of_Contents.txt
index 0000000,0000000..162a6ff
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/external/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <file:///C:/Users/ser72/Desktop/S3_parent/Support/DOCUMENTS/Community/HYPERLINK#_Toc374110003>`_
diff --cc core/doc/admin/_sources/external/index.txt
index 0000000,0000000..4b32d69
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/external/index.txt
@@@ -1,0 -1,0 +1,8 @@@
++**External Storage Mounts**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration
diff --cc core/doc/admin/_sources/first_run/Configuration.txt
index 0000000,0000000..a37ee09
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/first_run/Configuration.txt
@@@ -1,0 -1,0 +1,12 @@@
++Configuration
++=============
++
++The First Run Wizard app is enabled by default.
++To verify or disable this app, navigate to the apps page and select “First Run Wizard”
++
++|1000000000000200000000BCCCC35DEB_png|
++
++.. |1000000000000200000000BCCCC35DEB_png| image:: images/1000000000000200000000BCCCC35DEB.png
++    :width: 5.3335in
++    :height: 1.9583in
++
diff --cc core/doc/admin/_sources/first_run/Introduction.txt
index 0000000,0000000..301dfff
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/first_run/Introduction.txt
@@@ -1,0 -1,0 +1,4 @@@
++Introduction
++============
++
++The ownCloud First Run Wizard is a welcome screen which links users to the various ownCloud utilities such as the Sync Client, Mobile Apps, and WebDav
diff --cc core/doc/admin/_sources/first_run/Links.txt
index 0000000,0000000..97618d7
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/first_run/Links.txt
@@@ -1,0 -1,0 +1,54 @@@
++Links
++=====
++
++The wizard contains links for the Desktop app, Android App on Google Play, and iOS on the App store, as well as how to access files via WebDav.
++
++Desktop App
++-----------
++
++Selecting the Desktop App link will bring the user to ownCloud’s web site to download the client.
++
++|1000000000000557000002E148BAB6D4_png|
++
++
++Android App
++-----------
++
++Selecting the Android App will load the web page to purchase the android client from the Google Play store.
++
++|1000000000000668000002D29EAD9899_png|
++
++iOS App
++-------
++
++Selecting the iOS App loads the itunes web page to obtain the ownCloud iOS mobile client.
++
++|10000000000005F30000030F1372448D_png|
++
++Access files via WebDAV
++-----------------------
++
++This link brings up a link with documentation on how to access files on the ownCloud server using WebDAV.
++
++|100000000000066D000001AAD8CE8256_png|
++
++
++.. |1000000000000668000002D29EAD9899_png| image:: images/1000000000000668000002D29EAD9899.png
++    :width: 6.5in
++    :height: 2.861in
++
++
++.. |1000000000000557000002E148BAB6D4_png| image:: images/1000000000000557000002E148BAB6D4.png
++    :width: 6.5in
++    :height: 3.5043in
++
++
++.. |100000000000066D000001AAD8CE8256_png| image:: images/100000000000066D000001AAD8CE8256.png
++    :width: 6.5in
++    :height: 1.6835in
++
++
++.. |10000000000005F30000030F1372448D_png| image:: images/10000000000005F30000030F1372448D.png
++    :width: 6.5in
++    :height: 3.3417in
++
diff --cc core/doc/admin/_sources/first_run/Table_of_Contents.txt
index 0000000,0000000..4b801cc
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/first_run/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc374456284>`_
diff --cc core/doc/admin/_sources/first_run/Usage.txt
index 0000000,0000000..4653123
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/first_run/Usage.txt
@@@ -1,0 -1,0 +1,21 @@@
++Usage
++=====
++
++When enabled, a user entering the ownCloud web browser for the first time will have the Welcome screen popup.
++
++|10000000000004920000028D9C8DC2CB_png|
++
++To close the window, select the ‘x’ in the upper right corner.
++If the user would like to bring up this window at a later time, they may do so by navigating to the Personal menu selection and select “Show First Run Wizard again”
++
++|10000000000002A6000000BFBE298238_png|
++
++.. |10000000000004920000028D9C8DC2CB_png| image:: images/10000000000004920000028D9C8DC2CB.png
++    :width: 6.5in
++    :height: 3.628in
++
++
++.. |10000000000002A6000000BFBE298238_png| image:: images/10000000000002A6000000BFBE298238.png
++    :width: 6.5in
++    :height: 1.8311in
++
diff --cc core/doc/admin/_sources/first_run/index.txt
index 0000000,0000000..1f1cc34
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/first_run/index.txt
@@@ -1,0 -1,0 +1,10 @@@
++**ownCloud First Run Wizard**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration
++    Usage
++    Links
diff --cc core/doc/admin/_sources/installation/installation_linux.txt
index 4a3b95f,0000000..9a779d5
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_linux.txt
+++ b/core/doc/admin/_sources/installation/installation_linux.txt
@@@ -1,28 -1,0 +1,28 @@@
 +Linux Distributions
 +-------------------
 +
 +Supported Distribution Packages
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Ready-to-use packages are available at `openSUSE Build Service`_ for a variety of Linux distributions.
 +
 +If your distribution is not listed please follow :doc:`installation_source`.
 +
 +.. _openSUSE Build Service: http://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud
 +
 +
 +Additional installation guides and notes
 +****************************************
 +
 +**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.
 +
 +**Archlinux:** There are two AUR packages for ownCloud: `stable version`_ and `development version`_.
 +
- .. _stable version: http://aur.archlinux.org/packages.php?ID=47585
++.. _stable version: https://www.archlinux.org/packages/community/any/owncloud/
 +.. _development version: http://aur.archlinux.org/packages.php?ID=38767
 +
 +
 +**PCLinuxOS:** Follow the Tutorial `ownCloud, installation and setup`_ on the PCLinuxOS web site.
 +
 +.. _ownCloud, installation and setup: http://pclinuxoshelp.com/index.php/Owncloud,_installation_and_setup
diff --cc core/doc/admin/_sources/installation/installation_source.txt
index ac64e40,0000000..b41306d
mode 100644,000000..100644
--- a/core/doc/admin/_sources/installation/installation_source.txt
+++ b/core/doc/admin/_sources/installation/installation_source.txt
@@@ -1,339 -1,0 +1,573 @@@
 +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:
++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:
++
++This document provides a complete walk-through for installing ownCloud 
++on Ubuntu 12.04 LTS Server with Apache and MySQL.
++It also provides guidelines for installing it on other distributions,
++webservers and database systems.
 +
 +Prerequisites
 +~~~~~~~~~~~~~
 +
++.. note:: This tutorial assumes you have terminal access to the machine you want
++          to install owncloud on. Although this is not an absolute requirement,
++          installation without it is highly likely to require contacting your
++          hoster (e.g. for installing required modules).
++
 +To run ownCloud, your web server must have the following installed:
 +
- * PHP (>= 5.3.3, minimum recommended 5.4)
++* PHP (>= 5.3.3 minimum, 5.4 or higher recommended)
 +* PHP module ctype
 +* PHP module dom
 +* PHP module GD
 +* PHP module iconv
 +* PHP module JSON
 +* PHP module libxml
 +* PHP module mb multibyte
 +* PHP module SimpleXML
 +* PHP module zip
 +* PHP module zlib
 +
 +Database connectors (pick at least one):
 +
- * PHP module sqlite (>= 3)
++* PHP module sqlite (>= 3, usually not recommendable for performance reasons)
 +* PHP module mysql
 +* PHP module pgsql (requires PostgreSQL >= 9.0)
 +
- And as *optional* dependencies:
++*Recommended* packages:
 +
++* PHP module curl (highly recommended, some functionality, e.g. http user
++  authentication, depends on this)
++* PHP module fileinfo (highly recommended, enhances file analysis performance)
 +* PHP module bz2 (recommended, required for extraction of apps)
- * PHP module curl (highly recommended, some functionality depends on this)
- * PHP module exif (for image rotation in pictures app)
- * PHP module fileinfo (highly recommended, increases file analysis performance)
 +* PHP module intl (increases language translation performance)
- * PHP module ldap (for ldap integration)
 +* PHP module mcrypt (increases file encryption performance)
 +* PHP module openssl (required for accessing HTTPS resources)
 +
- For performance increase (*optional* / select one of the following):
++Required for specific apps (if you use the mentioned app, you must install that
++package):
++
++* PHP module ldap (for ldap integration)
++* smbclient (for SMB storage)
++* PHP module ftp (for FTP storage)
++
++Recommended for specific apps (*optional*):
++
++* PHP module exif (for image rotation in pictures app)
++
++For enhanced performance (*optional* / select only one of the following):
 +
 +* PHP module apc
 +* PHP module apcu
 +* PHP module xcache
 +
 +For preview generation (*optional*):
 +
 +* PHP module imagick
 +* avconv or ffmpeg
 +* OpenOffice or libreOffice
 +
- For external storage (*optional*):
++**Remarks:**
++
++* Please check your distribution, operating system or hosting partner documentation
++  on how to install/enable these modules.
++
++* Make sure your distribution's php version fulfils the version requirements
++  specified above. If it doesn't, there might be custom repositories you can use.
++  If you are e.g. running Ubuntu 10.04 LTS, you can update your
++  PHP using a custom `PHP PPA`_:
++  ::
++
++	sudo add-apt-repository ppa:ondrej/php5
++	sudo apt-get update
++	sudo apt-get install php5
++
++* You don’t need any WebDAV support module for your web server (i.e. Apache’s
++  mod_webdav) to access your ownCloud data via WebDAV. ownCloud has a built-in
++  WebDAV server of its own.
++  
++Example installation on Ubuntu 12.04.4 LTS Server
++*************************************************
++On a machine running a pristine Ubuntu 12.04.4 LTS server, you would install the
++required and recommended modules for a typical ownCloud installation, using
++Apache and MySQL by issuing the following commands in a terminal:
++::
++
++	sudo apt-get install apache2 mysql-server libapache2-mod-php5
++	sudo apt-get install php5-gd php5-json php5-mysql php5-curl
++	sudo apt-get install php5-intl php5-mcrypt php5-imagick
 +
- * smbclient (for SMB storage)
- * PHP module ftp (for FTP storage)
++**Remarks:**
 +
- Please check your distribution, operating system or hosting partner documentation on how to install/enable
- these modules.
++* If you want to use any other combination of distribution, webserver or database,
++  please consult the respective documentation.
 +
- The curl PHP module is required for some apps (e.g. http user authentication).
++* At the execution of each of the above commands you might be prompted whether you
++  want to continue; press "Y" for Yes (that is if your system language is English.
++  You might have to press a different key if you have a different system language).
 +
- If you are running Ubuntu 10.04 LTS you will need to update your PHP from
- this `PHP PPA`_:
++* At the installation of the MySQL server, you will be prompted for a root password.
++  Be sure to remember that password for later use.
 +
- ::
++* This installs the packages for the ownCloud core system. If you are planning on
++  running additional apps, keep in mind that they might require additional packages.
++  See the list above for details.
 +
-   sudo add-apt-repository ppa:ondrej/php5
-   sudo apt-get update
-   sudo apt-get install php5
++Download, extract and copy ownCloud to Your Web Server
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
++First, download the archive of the latest ownCloud version:
 +
- You don’t need any WebDAV support of your web server (i.e. apache’s mod_webdav)
- to access your ownCloud data via WebDAV, ownCloud has a WebDAV server built in.
- In fact, you should make sure that any built-in WebDAV module of your web server
- is disabled (at least for the ownCloud directory), as it can interfere with
- ownCloud's built-in WebDAV support.
++* Navigate to `http://owncloud.org/install`
++* Click "Tar or Zip file"
++* In the opening dialog, chose the "Linux" link.
++* This will start the download of a file named owncloud-x.y.z.tar.bz2 (where
++  x.y.z is the version number of the current latest version).
++* Save this file on the machine you want to install ownCloud on.
++* If that's a different machine than the one you are currently working on, use
++  e.g. FTP to transfer the downloaded archive file there.
++* Note down the directory where you put the file.
++* Extract the archive contents. Open a terminal on the machine
++  you plan to run ownCloud on, and run:
++  ::
 +
- Extract ownCloud and Copy to Your Web Server
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++	cd path/to/downloaded/archive
++	tar -xjf owncloud-x.y.z.tar.bz2
++
++  where :code:`path/to/downloaded/archive` is to be replaced by the path where you
++  put the downloaded archive, and x.y.z of course has to be replaced by the actual
++  version number as in the file you have downloaded.
++  
++* Copy the ownCloud files to their final destination in the document root of your
++  webserver (you can skip this step if you already downloaded and extracted the
++  files there):
++  ::
++
++	sudo cp -r owncloud /path/to/your/webserver/document-root
 +
- ::
 +
-   tar -xjf path/to/downloaded/owncloud-x.x.x.tar.bz2
-   cp -r owncloud /path/to/your/webserver
++  * If you don't know where your webserver's document root is located, consult its
++    documentation. For Apache on Ubuntu 12.04 LTS for example, this would usually be
++    :code:`/var/www`. So above command should look like this:
++    ::
++
++	sudo cp -r owncloud /var/www
++
++  * The above assumes you want to install ownCloud into a subdirectory "owncloud"
++    on your webserver. For installing it anywhere else, you'll have to adapt the
++    above command accordingly.
 +
 +Set the Directory Permissions
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
- The owner of your web server must own the apps/, data/ and config/ directories
- in your ownCloud install. You can do this by running the following command for
- the apps, data and config directories.
++The user running your web server must own at least the apps/, data/ and config/
++directories in your ownCloud installation folder.
++The following command will change the ownership of the whole folder to that user.
++
++* For Debian-based distributions (like Ubuntu, Debian or Linux Mint) and Gentoo, run:
++  ::
 +
- For Debian based distributions like Ubuntu, Debian or Linux Mint and Gentoo use::
++	sudo chown -R www-data:www-data /path/to/your/owncloud
++  
++* Continuing the example from above, for Ubuntu 12.04 LTS, where the install location
++  was :code:`/var/www`, you would run:
++  ::
 +
-   chown -R www-data:www-data /path/to/your/owncloud/install/data
++	sudo chown -R www-data:www-data /var/www/owncloud
 +
- For ArchLinux use::
++* For ArchLinux should run (as root):
++  ::
 +
-   chown -R http:http /path/to/your/owncloud/install/data
++	chown -R http:http /path/to/your/owncloud
 +
- Fedora users should use::
++* Fedora users should run (as root):
++  ::
 +
-   chown -R apache:apache /path/to/your/owncloud/install/data
++	chown -R apache:apache /path/to/your/owncloud
 +
- .. note:: The **data/** directory will only be created after setup has run (see below) and is not present by default in the tarballs.
++When using an NFS mount for the data directory, do not change ownership as above.
++The simple act of mounting the drive will set proper permissions for ownCloud to
++write to the directory. Changing ownership as above could result in some issues
++if the NFS mount is lost.
 +
 +Web Server Configuration
 +~~~~~~~~~~~~~~~~~~~~~~~~
 +
++.. note:: You can use ownCloud over plain http, but we strongly encourage you to
++          use SSL/TLS. If you don't use it, and you for example access your
++          ownCloud over an unsecured WiFi, everyone in the same WiFi can grab
++          your authentication data or the content of files synchronized while you
++          are on the WiFi.
++
 +Apache is the recommended web server.
 +
 +Apache Configuration
 +********************
 +
- Example Apache 2.2:
++Enabling SSL
++............
++
++An Apache installed under Ubuntu comes already set-up with a simple
++self-signed certificate. All you have to do is to enable the ssl module and
++the according site. Open a terminal and run
++::
++
++	sudo a2enmod ssl
++	sudo a2ensite default-ssl
++	sudo service apache2 reload
++
++If you are using a different distribution, check their documentation on how to
++enable SSL.
++
++.. note:: Self-signed certificates have their drawbacks - especially when you
++          plan to make your ownCloud server publicly accessible. You might want
++          to consider getting a certificate signed by an official signing
++          authority. If you're looking for a free certificate, you can consult
++          e.g. this article:
++          `https://www.sslshopper.com/article-free-ssl-certificates-from-a-free-certificate-authority.html`
++
++Configuring ownCloud
++....................
++
++Since there was a change in the way versions 2.2 and 2.4 are configured,
++you'll have to find out which Apache version you are using.
++
++Usually you can do this by running one of the following commands:
++::
++
++	sudo apachectl -v
++	apache2 -v
++
++Example output:
++::
++
++	Server version: Apache/2.2.22 (Ubuntu)
++	Server built:   Jul 12 2013 13:37:10
++
++This indicates an Apache of the 2.2 version branch (as e.g. you will find on
++Ubuntu 12.04 LTS).
++
++Example config for 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:
++Example config for Apache 2.4:
 +
 +.. code-block:: xml
 +
 +    <Directory /path/to/your/owncloud/install>
 +        Options Indexes FollowSymLinks MultiViews
 +        AllowOverride All
 +        Require all granted
 +    </Directory>
 +
++* This config entry needs to go into the configuration file of the "site" you want
++  to use.
++* On a Ubuntu system, this typically is the "default-ssl" site (to be found at
++  :code:`/etc/apache2/sites-available/default-ssl`).
++* Edit the site file with your favorite editor (note that you'll need root
++  permissions to modify that file). For Ubuntu 12.04 LTS, you could for example run
++  the following command in a Terminal:
++  ::
 +
- Enable mod_rewrite::
++	sudo nano /etc/apache2/sites-available/default-ssl
 +
- 	a2enmod rewrite
++* Add the entry shown above immediately before the line containing
++  ::
 +
- In distributions that do not come with a2enmod the :file:`/etc/httpd/httpd.conf` needs to be changed to enable **mod_rewrite**
++	</VirtualHost>
 +
- Then restart apache. For Ubuntu systems (or distributions using upstartd) use::
++  (this should be one of the last lines in the file).
 +
- 	service apache2 restart
++* For ownCloud to work correctly, we need the module mod_rewrite. Enable it by running::
 +
- For systemd systems (Fedora, ArchLinux, OpenSUSE) use::
++	sudo a2enmod rewrite
++
++* In distributions that do not come with a2enmod the module needs to be enabled
++  manually by editing the config Apache files, usually :file:`/etc/httpd/httpd.conf`.
++  consult the Apache documentation or your distributions documentation.
++
++* Then restart Apache.
++
++  * For Ubuntu systems (or distributions using upstartd), run::
++
++	sudo service apache2 restart
++
++  * For systemd systems (Fedora, ArchLinux, OpenSUSE), run::
 +
 +	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.
++* 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 (this should already be done,
++  see section `Set the Directory Permissions`_).
++
++* You should make sure that any built-in WebDAV module of your web server is disabled
++  (at least for the ownCloud directory), as it will interfere with ownCloud's
++  built-in WebDAV support.
 +
++  If you need the WebDAV support in the rest of your configuration, you can turn it off
++  specifically for the ownCloud entry by adding the following line in the
++  configuration of your ownCloud. In above "<Directory ..." code, add the following line
++  directly after the "allow from all" / "Require all granted" line):
++  ::
 +
++	Dav Off
++
++* Furthermore, you need to disable any server-configured authentication for ownCloud, as
++  it's internally using Basic authentication for its \*DAV services.
++  If you have turned on authentication on a parent folder (via e.g. an "AuthType Basic"
++  directive), you can turn off the authentication specifically for the ownCloud entry;
++  to do so, in above "<Directory ..." code, add the following line directly after the
++  "allow from all" / "Require all granted" line):
++  ::
++
++	Satisfy Any
++
++A minimal site configuration on Ubuntu 12.04 might look like this:
++
++.. code-block:: xml
++	<IfModule mod_ssl.c>
++	<VirtualHost _default_:443>
++		ServerName YourServerName
++		ServerAdmin webmaster at localhost
++		DocumentRoot /var/www
++		<Directory />
++			Options FollowSymLinks
++			AllowOverride None
++		</Directory>
++		<Directory /var/www/>
++			Options Indexes FollowSymLinks MultiViews
++			AllowOverride None
++			Order allow,deny
++			allow from all
++		</Directory>
++		ErrorLog ${APACHE_LOG_DIR}/error.log
++		LogLevel warn
++		CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
++		SSLEngine on
++		SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
++		SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
++		<FilesMatch "\.(cgi|shtml|phtml|php)$">
++			SSLOptions +StdEnvVars
++		</FilesMatch>
++		<Directory /usr/lib/cgi-bin>
++			SSLOptions +StdEnvVars
++		</Directory>
++		BrowserMatch "MSIE [2-6]" \
++			nokeepalive ssl-unclean-shutdown \
++			downgrade-1.0 force-response-1.0
++		BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
++		<Directory /var/www/owncloud>
++			Options Indexes FollowSymLinks MultiViews
++			AllowOverride All
++			Order allow,deny
++			Allow from all
++			# add any possibly required additional directives here
++			# e.g. the Satisfy directive:
++			Satisfy Any
++		</Directory>
++	</VirtualHost>
++	</IfModule>
++
++When using ssl, take special note on the ServerName. You should specify one in the
++server configuration, as well as in the CommonName field of the certificate. If you want
++your ownCloud to be reachable via the internet, then set both these to the domain you
++want to reach your ownCloud under.
++
++.. note:: By default, the certificates' CommonName will get set to the host name at the time
++          when the ssl-cert package was installed.
 +
 +Nginx Configuration
 +*******************
 +
 +-  You need to insert the following code into **your nginx config file.**
 +-  Adjust **server_name**, **root**, **ssl_certificate** and **ssl_certificate_key** to suit your needs.
 +-  Make sure your SSL certificates are readable by the server (see `http://wiki.nginx.org/HttpSslModule`_).
 +
 +.. code-block:: python
 +
 +    upstream php-handler {
 +            server 127.0.0.1:9000; 
 +            #server unix:/var/run/php5-fpm.sock;
 +    }
 +
 +    server {
 +            listen 80;
 +            server_name cloud.example.com;
 +            return 301 https://$server_name$request_uri;  # enforce https
 +    }
 +
 +    server {
 +            listen 443 ssl;
 +            server_name cloud.example.com;
 +
 +            ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
 +            ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
 +
 +            # Path to the root of your installation
 +            root /var/www/;
 +
 +            client_max_body_size 10G; # set max upload size
 +            fastcgi_buffers 64 4K;
 +
 +            rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
 +            rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
 +            rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
 +
 +            index index.php;
 +            error_page 403 /core/templates/403.php;
 +            error_page 404 /core/templates/404.php;
 +
 +            location = /robots.txt {
 +                allow all;
 +                log_not_found off;
 +                access_log off;
 +            }
 +
 +            location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
 +                    deny all;
 +            }
 +
 +            location / {
 +                    # The following 2 rules are only needed with webfinger
 +                    rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
 +                    rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
 +
 +                    rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
 +                    rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
 +
 +                    rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
 +
 +                    try_files $uri $uri/ index.php;
 +            }
 +
 +            location ~ ^(.+?\.php)(/.*)?$ {
 +                    try_files $1 = 404;
 +
 +                    include fastcgi_params;
 +                    fastcgi_param SCRIPT_FILENAME $document_root$1;
 +                    fastcgi_param PATH_INFO $2;
 +                    fastcgi_param HTTPS on;
 +                    fastcgi_pass php-handler;
 +            }
 +
 +            # Optional: set long EXPIRES header on static assets
 +            location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
 +                    expires 30d;
 +                    # Optional: Don't log access to assets
 +                    access_log off;
 +            }
 +
 +    }
 +
- .. note:: You can use ownCloud without SSL/TLS support, but we strongly encourage you not to do that:
- 
++To enable SSL support:
 +-  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
++.. 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
++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
++credentials and let ownCloud create its own database user, or enter a preconfigured user.  If you are not using Apache
 +as the web server, please set the data directory to a location outside of the document root. See the advanced
 +install settings.
 +
 +
 +.. _PHP PPA: https://launchpad.net/~ondrej/+archive/php5
 +.. _github gist for further instructions: https://gist.github.com/2200407
 +.. _`http://wiki.nginx.org/HttpSslModule`: http://wiki.nginx.org/HttpSslModule
diff --cc core/doc/admin/_sources/installation/installation_windows.txt
index 5cad510,0000000..9a594ff
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.
 +
 +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
++    :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.
 +
 +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.
 +
 +.. 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/update.txt
index d6c434b,0000000..b1e0f72
mode 100644,000000..100644
--- a/core/doc/admin/_sources/maintenance/update.txt
+++ b/core/doc/admin/_sources/maintenance/update.txt
@@@ -1,52 -1,0 +1,53 @@@
 +Updating ownCloud
 +=================
 +
 +.. note:: If you have installed ownCloud from a repository, your package management should take care of it. Probably
 +   you will need to look for compatible third party applications yourself. **Always do backups anyway.**
 +
 +Update
 +------
- Updating means updating ownCloud to the latest *point release*, e.g. ownCloud 4.0.6 → 4.0.7. This procedure uses the
++Updating means updating ownCloud to the latest *point release*, e.g. ownCloud 5.0.13 → 5.0.14a. This procedure uses the
 +ownCloud updater plugin called "Updater": it's an internal application already present in your ownCloud installation.
 +
 +To update ownCloud, follow those steps:
 +
 +#. Make a backup of the ownCloud folder and the database.
 +#. Make sure that updater plugin is enabled.
 +#. Navigate to the 'Admin' page.
 +#. Click 'Update'.
 +#. Refresh the page with Ctrl+F5.
 +
 +If this procedure doesn't work (for example, ownCloud 5.0.10 doesn't show new any new version) you could try to perform
 +a full upgrade to update to the latest point release (see below).
 +
 +Upgrade
 +-------
 +Upgrade is to bring an ownCloud instance to a new *major release*, e.g.
- ownCloud 4.0.7 → 4.5.0. Always do backups anyway.
++ownCloud 5.0.14a → 6.0.2. 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
++   version, e.g. 5.0.14a in the 5.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
 +
 +#. 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
-    
++
++#. Set the permissions properly   
 +#. 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/_sources/quota/Checking_available_space.txt
index 0000000,0000000..5699fdf
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/quota/Checking_available_space.txt
@@@ -1,0 -1,0 +1,22 @@@
++Checking available space
++========================
++
++A user can check their available space on the Personal page.
++
++|10000000000003A800000039364066E4_png|
++
++The available space for a given user is calculated using the following formula:
++
++|10000000000002BB000000266DB6AD1A_png|
++
++Where disk_free_space is the space available on the partition where the user’s home storage is located on the server.
++
++.. |10000000000003A800000039364066E4_png| image:: images/10000000000003A800000039364066E4.png
++    :width: 6.5in
++    :height: 0.3957in
++
++
++.. |10000000000002BB000000266DB6AD1A_png| image:: images/10000000000002BB000000266DB6AD1A.png
++    :width: 6.5in
++    :height: 0.3535in
++
diff --cc core/doc/admin/_sources/quota/Excluded_from_quota.txt
index 0000000,0000000..f9870b5
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/quota/Excluded_from_quota.txt
@@@ -1,0 -1,0 +1,40 @@@
++Excluded from quota
++===================
++
++The following sections describe information which is not counted in a user’s quota.
++
++Metadata and cache
++------------------
++
++Application metadata and cached information are excluded from total used space.
++Examples of such data are thumbnails (icon previews, pictures app), temporary files, and encryption keys.
++
++Deleted Files
++-------------
++
++Files which have been moved to the trash bin do not count against a user’s quota.
++Deleted items are permanently deleted, oldest to newest, should the user run out of space to make room for new files.
++
++For example, if the user has a 10GB quota, and has used 4GB of space and 5GB in the trash bin, the user will still have 6GB available space.
++If, however, the user uploads 6GB, ownCloud will permanently delete files from the trash bin in order to make room for the new files.
++
++Version Control
++---------------
++
++Older versions do not count against the user’s quota.
++The versions app will delete old versions, oldest to newest, should the user run out of space to make room for new files.
++
++For example, if the user has a 10GB quota, and has used 4GB and 5GB is used on older versions, the user will still have 6GB available space.
++If, however, the user uploads 6GB, ownCloud will discard older versions to make room for the new files.
++
++Encryption
++----------
++
++Encrypted files are slightly larger than their unencrypted equivalents.
++The unencrypted file size is used to determine the quota.
++
++External Storage
++----------------
++
++External storage, mounted by either a user or the admin, is not taken into consideration when calculating the user’s storage.
++
diff --cc core/doc/admin/_sources/quota/Introduction.txt
index 0000000,0000000..1bfc377
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/quota/Introduction.txt
@@@ -1,0 -1,0 +1,21 @@@
++Introduction
++============
++
++ownCloud allows the admin to specify a storage quota for users.
++This quota is the maximum space a user is allowed to utilize for files located in their home storage.
++
++The users quota is set in the Users page within ownCloud when creating a user.
++
++|10000000000003DF000000D953A456B6_png|
++
++Each user can have a different quota (shown above in the Storage column).
++In addition, there is a default quota should a user not have a quota specified.
++
++It is important to note that when setting a quota, the administrator needs to be aware that it applies only to the actual files and not the metadata.
++This means when allocating a quota, the admin should make sure at least 10% more space is available for each user.
++
++
++.. |10000000000003DF000000D953A456B6_png| image:: images/10000000000003DF000000D953A456B6.png
++    :width: 6.5in
++    :height: 1.4228in
++
diff --cc core/doc/admin/_sources/quota/Sharing.txt
index 0000000,0000000..5eb5d9f
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/quota/Sharing.txt
@@@ -1,0 -1,0 +1,26 @@@
++Sharing
++=======
++
++Shared files or directories are counted against the owner’s quota and not the “shared-to” user’s quota.
++
++Shared Files
++------------
++
++When user A shares a file with user B, the size of the file will be counted against user A’s quota.
++This is the case even if the file is modified by user B or if user B increases the file size.
++
++Shared Directories
++------------------
++
++When user A shares a directory with User B, all files uploaded to that directory by user B will count against user A’s quota.
++Likewise, files within that directory which are modified by user B will count against user A’s quota.
++
++Resharing
++---------
++
++If user A shares a file with user B who then reshares a file to user C, the space occupied by that file is counted against user A’s quota.
++
++Public sharing with upload permission
++-------------------------------------
++
++If user A publicly shares a directory via a link and enables “public upload” permission, files uploaded to that directory from the outside are counted against user A’s quota.
diff --cc core/doc/admin/_sources/quota/Table_of_Contents.txt
index 0000000,0000000..522ac71
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/quota/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc374966628>`_
diff --cc core/doc/admin/_sources/quota/index.txt
index 0000000,0000000..a7501a8
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/quota/index.txt
@@@ -1,0 -1,0 +1,10 @@@
++**ownCloud Quota Calculations**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Checking_available_space
++    Sharing
++    Excluded_from_quota
diff --cc core/doc/admin/_sources/share_app/Configuration.txt
index 0000000,0000000..988922e
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/share_app/Configuration.txt
@@@ -1,0 -1,0 +1,32 @@@
++Configuration
++=============
++
++Enable the app
++--------------
++
++The Share Files app is enabled by default.
++To verify this and/or disable this functionality, navigate to the APPS page in the web interface and select “Share Files”
++
++
++|1000000000000167000000B43E4BF478_png|
++
++Configuring the permitted functionality
++---------------------------------------
++
++There are several functions which may be enabled or disabled at the admin’s discretion.
++To configure these functions, navigate to the Admin page in the web interface and scroll to the “Sharing” section.
++
++|10000000000001CF00000176B0BE1EBC_png|
++
++The above parameters are self-explanatory and may be enabled or disabled as required.
++
++
++.. |10000000000001CF00000176B0BE1EBC_png| image:: images/10000000000001CF00000176B0BE1EBC.png
++    :width: 4.8228in
++    :height: 3.8957in
++
++
++.. |1000000000000167000000B43E4BF478_png| image:: images/1000000000000167000000B43E4BF478.png
++    :width: 3.7398in
++    :height: 1.8752in
++
diff --cc core/doc/admin/_sources/share_app/Introduction.txt
index 0000000,0000000..2998e99
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/share_app/Introduction.txt
@@@ -1,0 -1,0 +1,7 @@@
++Introduction
++============
++
++ownCloud allows users to share files and folders with both other ownCloud users, as well as publicly via a link.
++Sharing may be done either via the web interface or via the Sharing API.
++This document will discuss the web interface and sharing.
++For information on the Sharing API, please refer to that document.
diff --cc core/doc/admin/_sources/share_app/Retrieving_shared_data.txt
index 0000000,0000000..f3c104d
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/share_app/Retrieving_shared_data.txt
@@@ -1,0 -1,0 +1,46 @@@
++Retrieving shared data
++======================
++
++User/group shares
++-----------------
++
++When the shared with user logs into their ownCloud instance they will see a “Shared” folder.
++
++|100000000000046C000000C2D3E5CF30_png|
++
++Within that Shared folder are all files and folders which have been shared to that user by any other ownCloud user.
++
++|1000000000000462000000D44541CF9A_png|
++
++Share as link
++-------------
++
++To view a file/folder which was shared as a link, simply enter the link into the browser.
++
++|10000000000004CA000002B52116BE0C_png|
++
++To download the file/folder select the Download button on the upper right of the page.
++If this link was password protected, the user will be prompted with a password prior to this page appearing.
++
++|100000000000045800000197FE462F2B_png|
++
++
++.. |100000000000045800000197FE462F2B_png| image:: images/100000000000045800000197FE462F2B.png
++    :width: 6.5in
++    :height: 2.3791in
++
++
++.. |10000000000004CA000002B52116BE0C_png| image:: images/10000000000004CA000002B52116BE0C.png
++    :width: 6.5in
++    :height: 3.6744in
++
++
++.. |100000000000046C000000C2D3E5CF30_png| image:: images/100000000000046C000000C2D3E5CF30.png
++    :width: 6.5in
++    :height: 1.1138in
++
++
++.. |1000000000000462000000D44541CF9A_png| image:: images/1000000000000462000000D44541CF9A.png
++    :width: 6.5in
++    :height: 1.2283in
++
diff --cc core/doc/admin/_sources/share_app/Table_of_Contents.txt
index 0000000,0000000..7ab3243
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/share_app/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Table of Contents
++=================
++
++` <#_Toc377716145>`_
diff --cc core/doc/admin/_sources/share_app/Utilization.txt
index 0000000,0000000..af59df9
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/share_app/Utilization.txt
@@@ -1,0 -1,0 +1,96 @@@
++Utilization
++===========
++
++An ownCloud user may share files or entire folders with other individuals.
++The method of sharing is the same.
++
++Share with another ownCloud user
++--------------------------------
++
++Hover over the line containing the file or folder to be shared.
++And then select Share.
++The following dialog appears.
++
++|10000000000003EC000000AB60616FA7_png|
++
++In the “share with user or group” text box, enter the user to share with, or the group to share with.
++Note, as letters are typed, the users and groups who match the typed string will appear.
++As a short cut, simply select the desired user/group
++
++Setting Permissions on the share
++--------------------------------
++
++When a file or folder is shared, the permissions may be modified stating what the other user may do with the file/folder.
++Once the share with user or group has been entered, the dialog will expand as follows.
++
++|1000000000000404000000FCFC13E732_png|
++
++If the shared with user has an email address configured, the sharing user may choose to notify the shared with user of the share.
++To do this, select the checkbox next to “notify by email”.
++It is important to note, this checkbox appears whether or not the shared with user has email configured.
++
++When sharing a file/folder, it is obvious that the file may be viewed or downloaded.
++However, if the shared with user is allowed to modify the file in any way, the “can edit” box should be checked.
++The sharing user may allow the shared with user to update, delete, or re-share the file.
++Note, by default, all permissions are set.
++
++It should be noted that when sharing a folder, an additional permission, “create” is available.
++When enabled, the shared to users can create new files and folders within the shared folder.
++
++Share as a link
++---------------
++
++In the event that an ownCloud user desires to share a file with a non-ownCloud user, the file may be shared as a link.
++To share as a link, hover over the line containing the file and select Share.
++Then select the check box next to “Share link”
++
++|10000000000003E8000001524A147A04_png|
++
++The link is then shown in the text box.
++The link may be copied and pasted into an email and sent to the other user.
++Alternatively, if email is setup within ownCloud, the sharing user may input the shared with user’s email address in the text box and select send.
++The shared user will then receive an email from the ownCloud server with the link.
++
++There may be circumstances where the file owner wants some security on the link so it cannot be accessed by anyone other than the desired person.
++To do this, the link may be Password Protected by selecting the “Password Protect” checkbox and entering a desired password.
++
++|1000000000000403000001632F0B76F6_png|
++
++
++Setting Expiration Date
++-----------------------
++
++ownCloud allows the sharing user to expire a file or folder share at a given date.
++This expiration applies to all shares within the folder as well.
++So, if a user expires a folder share, all files within the folder will no longer be shared.
++
++To set an expiration, select the Set expiration date checkbox and then select the expiration date.
++(The calendar will appear when the mouse is clicked in the Expiration date text box.
++
++|10000000000004010000017E4A6552BC_png|
++
++
++.. |10000000000003E8000001524A147A04_png| image:: images/10000000000003E8000001524A147A04.png
++    :width: 6.5in
++    :height: 2.1965in
++
++
++.. |1000000000000404000000FCFC13E732_png| image:: images/1000000000000404000000FCFC13E732.png
++    :width: 6.5in
++    :height: 1.5929in
++
++
++.. |10000000000004010000017E4A6552BC_png| image:: images/10000000000004010000017E4A6552BC.png
++    :width: 6.5in
++    :height: 2.422in
++
++
++.. |1000000000000403000001632F0B76F6_png| image:: images/1000000000000403000001632F0B76F6.png
++    :width: 6.5in
++    :height: 2.2465in
++
++
++.. |10000000000003EC000000AB60616FA7_png| image:: images/10000000000003EC000000AB60616FA7.png
++    :width: 6.5in
++    :height: 1.1071in
++
diff --cc core/doc/admin/_sources/share_app/index.txt
index 0000000,0000000..8d0385b
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/share_app/index.txt
@@@ -1,0 -1,0 +1,11 @@@
++**ownCloud Sharing App**
++
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration
++    Utilization
++    Retrieving_shared_data
diff --cc core/doc/admin/_sources/sharing_api/Contents.txt
index 0000000,0000000..2d1b186
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/Contents.txt
@@@ -1,0 -1,0 +1,4 @@@
++Contents
++========
++
++` <file:///C:/Users/ser72/Desktop/S3_parent/Support/DOCUMENTS/Community/HYPERLINK#_Toc378743796>`_
diff --cc core/doc/admin/_sources/sharing_api/Create_a_new_Share.txt
index 0000000,0000000..f92a83d
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/Create_a_new_Share.txt
@@@ -1,0 -1,0 +1,261 @@@
++Create a new Share
++==================
++
++To create a new share the following may be used.
++This allows sharing with a user or group or as a link.
++
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Syntax             | <Base URL>                                    |         |                                                                     |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Method             | POST                                          |         |                                                                     |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Mandatory Argument | path                                          | string  | Full path of the file/folder being shared                           |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Mandatory Argument | shareType                                     | int     | ‘0’ = user, ‘1’ = group, ‘3’ = Public link                          |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Argument           | shareWith                                     | string  | User/group ID with who the file should be shared.                   |
++|                    |                                               |         | This is mandatory for shareType of 0 or 1                           |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Argument           | publicUpload                                  | boolean | If ‘false’ (default) public cannot upload to a public shared folder |
++|                    |                                               |         |                                                                     |
++|                    |                                               |         | If ‘true’ public can upload to a shared folder                      |
++|                    |                                               |         |                                                                     |
++|                    |                                               |         | Only available for public link shares                               |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Argument           | password                                      | string  | Password to protect a public link share                             |
++|                    |                                               |         |                                                                     |
++|                    |                                               |         | Only available for public link shares                               |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Argument           | permissions                                   | int     | From table in section 2.2 for user or group shares                  |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++| Result             | XML Code with share ID of newly created share |         |                                                                     |
++|                    |                                               |         |                                                                     |
+++--------------------+-----------------------------------------------+---------+---------------------------------------------------------------------+
++
++The following is a list of returned status codes:
++
+++------------------+---------------------------------+
++| HTTP Status Code | Description                     |
++|                  |                                 |
+++------------------+---------------------------------+
++| 100              | Successful                      |
++|                  |                                 |
+++------------------+---------------------------------+
++| 400              | Unknown Share type              |
++|                  |                                 |
+++------------------+---------------------------------+
++| 403              | Public Upload disabled by admin |
++|                  |                                 |
+++------------------+---------------------------------+
++| 404              | File couldn’t be shared         |
++|                  |                                 |
+++------------------+---------------------------------+
++
++
++Poster – Share as a link
++------------------------
++
++The following example shares the file “test/Lab.txt” as a public link
++
+++---------------+---------------------------------------------+
++| Field         | Value                                       |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **URL**       | Base URL for the API of the ownCloud server |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **User Auth** | User ID of the file owner                   |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Password**  | User’s Password                             |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Name**      | Argument being passed                       |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Value**     | Full path of file/folder shared             |
++|               |                                             |
+++---------------+---------------------------------------------+
++
++
++|1000000000000298000001874D3CA506_png|
++
++Navigate to the “Content to Send” tab and select “Body from Parameters”
++
++|1000000000000298000001870B0581FA_png|
++
++Select POST.
++
++
++Curl – Share as link
++--------------------
++
++#curl http://<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares -k -u user:password -X POST –data “path=<file>&shareType=3”
++
++#curl
++`http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares <http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares>`_
++
++-k -u ser72_oc6:Password01 -X POST –data “path=test/Lab.txt&shareType=3”
++
++
++Output
++------
++
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <?xml version="1.0"?>                                                                                       |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <ocs>                                                                                                       |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <meta>                                                                                                      |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <status>ok</status>                                                                                         |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <statuscode>100</statuscode>                                                                                | Status = 100: successful       |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <message/>                                                                                                  |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| </meta>                                                                                                     |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <data>                                                                                                      |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <id>9</id>                                                                                                  | Share ID = 9                   |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <url>http://192.168.1.63/owncloud6RC3/public.php?service=files&t=e1947aaeaa2b88a69cc1e90bf27ddfe2</url> | Share Link.                    |
++|                                                                                                             | Send this to the desired users |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| <token>e1947aaeaa2b88a69cc1e90bf27ddfe2</token>                                                             |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| </data>                                                                                                     |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++| **</ocs>**                                                                                                  |                                |
++|                                                                                                             |                                |
+++-------------------------------------------------------------------------------------------------------------+--------------------------------+
++
++
++Poster – Share with user
++------------------------
++
++The following example shares a file called “test/Lab.txt” with user “ser72”
++
+++---------------+---------------------------------------------+
++| Field         | Value                                       |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **URL**       | Base URL for the API of the ownCloud server |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **User Auth** | User ID of the file owner                   |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Password**  | User’s Password                             |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Name**      | Argument being passed                       |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Value**     | Full path of file/folder shared             |
++|               |                                             |
+++---------------+---------------------------------------------+
++
++
++|1000000000000289000001A9D7F3941F_png|
++
++
++Navigate to the “Content to Send Tab” and select “Body from Parameters”
++
++|10000000000002950000019EF5732E36_png|
++
++
++
++Select POST.
++
++Curl – Share with User
++----------------------
++
++#curl http://<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares -k -u user:password -X POST –data “path=<file>&shareType=0&shareWith=<user>”
++
++#curl
++`http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares <http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares>`_
++
++-k -u ser72_oc6:Password01 -X POST –data “path=test/Lab.txt&shareType=0&shareWith=ser72”
++
++
++output
++------
++
+++------------------------------+-------------------------+
++| <?xml version="1.0"?>        |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| <ocs>                        |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| <meta>                       |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| <status>ok</status>          |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| <statuscode>100</statuscode> | Status: 100: Successful |
++|                              |                         |
+++------------------------------+-------------------------+
++| <message/>                   |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| </meta>                      |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| <data>                       |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| <id>10</id>                  | Share ID = 10           |
++|                              |                         |
+++------------------------------+-------------------------+
++| </data>                      |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++| </ocs>                       |                         |
++|                              |                         |
+++------------------------------+-------------------------+
++
++
++
++.. |10000000000002950000019EF5732E36_png| image:: images/10000000000002950000019EF5732E36.png
++    :width: 6.5in
++    :height: 4.0701in
++
++
++.. |1000000000000289000001A9D7F3941F_png| image:: images/1000000000000289000001A9D7F3941F.png
++    :width: 6.5in
++    :height: 4.2563in
++
++
++.. |1000000000000298000001874D3CA506_png| image:: images/1000000000000298000001874D3CA506.png
++    :width: 6.5in
++    :height: 3.828in
++
++
++.. |1000000000000298000001870B0581FA_png| image:: images/1000000000000298000001870B0581FA.png
++    :width: 6.5in
++    :height: 3.828in
++
diff --cc core/doc/admin/_sources/sharing_api/Delete_Share.txt
index 0000000,0000000..a5110a0
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/Delete_Share.txt
@@@ -1,0 -1,0 +1,89 @@@
++Delete Share
++============
++
++The following method should be used in the event that a file share should be removed.
++
++Note: the share ID can be obtained from the output of any of the previous Share API calls or the creation of a new share.
++
+++----------+-----------------------+
++| Syntax   | <Base URL>/<share id> |
++|          |                       |
+++----------+-----------------------+
++| Method   | DELETE                |
++|          |                       |
+++----------+-----------------------+
++| Argument | Share ID (int)        |
++|          |                       |
+++----------+-----------------------+
++
++
++The following is a list of returned status codes:
++
+++------------------+--------------------------+
++| HTTP Status Code | Description              |
++|                  |                          |
+++------------------+--------------------------+
++| 100              | Successful               |
++|                  |                          |
+++------------------+--------------------------+
++| 404              | File couldn’t be deleted |
++|                  |                          |
+++------------------+--------------------------+
++
++Poster
++------
++
++To remove the share identified by ID 10, use the following method.
++
++|10000000000002910000018B31D51F03_png|
++
++Press DELETE
++
++
++Curl
++----
++
++#curl –X “DELETE” http://<user>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/files/<share_id>
++
++#curl –X “DELETE”
++`http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/10 <http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/10>`_
++
++
++output
++------
++
+++------------------------------+------------------------+
++| <?xml version="1.0"?>        |                        |
++|                              |                        |
+++------------------------------+------------------------+
++| <ocs>                        |                        |
++|                              |                        |
+++------------------------------+------------------------+
++| <meta>                       |                        |
++|                              |                        |
+++------------------------------+------------------------+
++| <status>ok</status>          |                        |
++|                              |                        |
+++------------------------------+------------------------+
++| <statuscode>100</statuscode> | Status=100: Successful |
++|                              |                        |
+++------------------------------+------------------------+
++| <message/>                   |                        |
++|                              |                        |
+++------------------------------+------------------------+
++| </meta>                      |                        |
++|                              |                        |
+++------------------------------+------------------------+
++| <data/>                      |                        |
++|                              |                        |
+++------------------------------+------------------------+
++| </ocs>                       |                        |
++|                              |                        |
+++------------------------------+------------------------+
++
++
++
++.. |10000000000002910000018B31D51F03_png| image:: images/10000000000002910000018B31D51F03.png
++    :width: 6.5in
++    :height: 3.9075in
++
diff --cc core/doc/admin/_sources/sharing_api/Get_All_Shares.txt
index 0000000,0000000..2f0b45a
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/Get_All_Shares.txt
@@@ -1,0 -1,0 +1,155 @@@
++Get All Shares
++==============
++
++To obtain a list of all files shared by a user, the following can be used.
++
+++--------+--------------------------------------+
++| Syntax | <Base URL>                           |
++|        |                                      |
+++--------+--------------------------------------+
++| Method | GET                                  |
++|        |                                      |
+++--------+--------------------------------------+
++| Result | XML code with all shares by the user |
++|        |                                      |
+++--------+--------------------------------------+
++
++
++The following is a list of returned status codes:
++
+++------------------+---------------------+
++| HTTP Status Code | Description         |
++|                  |                     |
+++------------------+---------------------+
++| 100              | Successful          |
++|                  |                     |
+++------------------+---------------------+
++| 404              | Couldn’t get shares |
++|                  |                     |
+++------------------+---------------------+
++
++
++Poster:
++-------
++
+++---------------+---------------------------------------------+
++| Field         | Value                                       |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **URL**       | Base URL for the API of the ownCloud server |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **User Auth** | User ID performing the Share                |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Password**  | User’s Password                             |
++|               |                                             |
+++---------------+---------------------------------------------+
++
++
++|10000201000002FC000001DC2DDAD2F1_png|
++
++
++Select “GET”
++
++
++Curl
++----
++
++The user is the id of the user who shares the files.
++The password belongs to that user as well.
++
++#curl http://<user>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares
++
++#curl
++`http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/appsi/files_sharing/api/v1/shares <http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/appsi/files_sharing/api/v1/shares>`_
++
++
++output
++------
++
+++--------------------------------------------------------+---------------------------------------------+
++| <?xml version="1.0"?>                                  |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <ocs>                                                  |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <meta>                                                 |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <status>ok</status>                                    |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <statuscode>100</statuscode>                           | Status = 100: Successful                    |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <message/>                                             |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| </meta>                                                |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <data>                                                 |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <element>                                              |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <id>6</id>                                             | Share ID = 6                                |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <item_type>file</item_type>                            |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <item_source>138</item_source>                         |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <parent/>                                              |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <share_type>0</share_type>                             | Share Type = 0: User share                  |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <share_with>ser72</share_with>                         | File shared with user ser72                 |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <file_source>138</file_source>                         |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <path>/Lab.txt</path>                                  | File name /Lab.txt                          |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <permissions>27</permissions>                          | Permissions: Re-share, Read, Delete, Update |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <stime>1386697532</stime>                              |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <expiration/>                                          |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <token/>                                               |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <storage>4</storage>                                   |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <mail_send>0</mail_send>                               | Do not send email alerting of the share     |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| <share_with_displayname>ser72</share_with_displayname> |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| </element>                                             |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| </data>                                                |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++| </ocs>                                                 |                                             |
++|                                                        |                                             |
+++--------------------------------------------------------+---------------------------------------------+
++
++.. |10000201000002FC000001DC2DDAD2F1_png| image:: images/10000201000002FC000001DC2DDAD2F1.png
++
diff --cc core/doc/admin/_sources/sharing_api/Get_Information_about_a_known_share.txt
index 0000000,0000000..f472268
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/Get_Information_about_a_known_share.txt
@@@ -1,0 -1,0 +1,160 @@@
++Get Information about a known share
++===================================
++
++To get information about a share when the share ID is known, use the following.
++
++Note: the share ID can be obtained from the output of any of the previous Share API calls or the creation of a new share.
++
+++-----------+---------------------------------+
++| Syntax    | <Base URL>/<share id>           |
++|           |                                 |
+++-----------+---------------------------------+
++| Method    | GET                             |
++|           |                                 |
+++-----------+---------------------------------+
++| Arguments | Share id (int)                  |
++|           |                                 |
+++-----------+---------------------------------+
++| Result    | XML code with share information |
++|           |                                 |
+++-----------+---------------------------------+
++|           |                                 |
+++-----------+---------------------------------+
++
++
++The following is a list of returned status codes:
++
+++------------------+---------------------+
++| HTTP Status Code | Description         |
++|                  |                     |
+++------------------+---------------------+
++| 100              | Successful          |
++|                  |                     |
+++------------------+---------------------+
++| 404              | Share doesn’t exist |
++|                  |                     |
+++------------------+---------------------+
++
++
++Poster
++------
++
++This example shows the output of share information for share ID “7”
++
+++---------------+--------------------------------------------------------+
++| Field         | Value                                                  |
++|               |                                                        |
+++---------------+--------------------------------------------------------+
++| **URL**       | Base URL for the API of the ownCloud server/<share id> |
++|               |                                                        |
+++---------------+--------------------------------------------------------+
++| **User Auth** | User ID of the file owner                              |
++|               |                                                        |
+++---------------+--------------------------------------------------------+
++| **Password**  | User’s Password                                        |
++|               |                                                        |
+++---------------+--------------------------------------------------------+
++
++
++
++|1000000000000288000001A1D5BE4881_png|
++
++
++Curl
++----
++
++#curl http://<user>:<passowrd>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares/<share_id>
++
++#curl http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/7
++
++
++output
++------
++
+++--------------------------------------------------------+------------------------+
++| <?xml version="1.0"?>                                  |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <ocs>                                                  |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <meta>                                                 |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <status>ok</status>                                    | Status=100: successful |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <statuscode>100</statuscode>                           |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <message/>                                             |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| </meta>                                                |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <data>                                                 |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <element>                                              |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <id>7</id>                                             | Share ID = 7           |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <item_type>file</item_type>                            |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <item_source>675</item_source>                         |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <parent/>                                              |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <share_type>0</share_type>                             | Share type = 0: user   |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <share_with>ser72</share_with>                         | Share with user ser72  |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <file_source>675</file_source>                         |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <path>/test share api/ieee.txt</path>                  |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <permissions>27</permissions>                          |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <stime>1386698116</stime>                              |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <expiration/>                                          |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <token/>                                               |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <storage>4</storage>                                   |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <mail_send>0</mail_send>                               |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| <share_with_displayname>ser72</share_with_displayname> |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| </element>                                             |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| </data>                                                |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++| </ocs>                                                 |                        |
++|                                                        |                        |
+++--------------------------------------------------------+------------------------+
++
++.. |1000000000000288000001A1D5BE4881_png| image:: images/1000000000000288000001A1D5BE4881.png
++    :width: 6.5in
++    :height: 4.1819in
++
diff --cc core/doc/admin/_sources/sharing_api/Get_Shares_from_a_Specific_File_or_Folder.txt
index 0000000,0000000..a9251c3
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/Get_Shares_from_a_Specific_File_or_Folder.txt
@@@ -1,0 -1,0 +1,364 @@@
++Get Shares from a Specific File or Folder
++=========================================
++
++The following will provide a list shares for a specific file.
++The input is the full path of the desired file.
++The output is a list of everyone who has the file shared with them.
++
+++------------------------+----------------------+---------+-----------------------------------------------------------------------------+
++| **Syntax**             | <Base URL>           |         |                                                                             |
++|                        |                      |         |                                                                             |
+++------------------------+----------------------+---------+-----------------------------------------------------------------------------+
++| **Method**             | GET                  |         |                                                                             |
++|                        |                      |         |                                                                             |
+++------------------------+----------------------+---------+-----------------------------------------------------------------------------+
++| **Mandatory Argument** | Path                 | string  | Path to file or folder                                                      |
++|                        |                      |         |                                                                             |
+++------------------------+----------------------+---------+-----------------------------------------------------------------------------+
++| **Argument**           | Reshares             | boolean | If set to ‘false’ (default), only shares from the current user are returned |
++|                        |                      |         |                                                                             |
++|                        |                      |         | If set to ‘true’, all shares from the given file are returned               |
++|                        |                      |         |                                                                             |
+++------------------------+----------------------+---------+-----------------------------------------------------------------------------+
++| **Argument**           | Subfiles             | boolean | If set to ‘false’ (default), lists only the folder being shared             |
++|                        |                      |         |                                                                             |
++|                        |                      |         | If set to ‘true’, all shared files within the folder are returned.          |
++|                        |                      |         |                                                                             |
+++------------------------+----------------------+---------+-----------------------------------------------------------------------------+
++| **Result**             | XML code with shares |         |                                                                             |
++|                        |                      |         |                                                                             |
+++------------------------+----------------------+---------+-----------------------------------------------------------------------------+
++
++
++The following is a list of returned status codes:
++
+++------------------+------------------------------------------------------+
++| HTTP Status Code | Description                                          |
++|                  |                                                      |
+++------------------+------------------------------------------------------+
++| 100              | Successful                                           |
++|                  |                                                      |
+++------------------+------------------------------------------------------+
++| 400              | Not a directory (if the ‘subfile’ argument was used) |
++|                  |                                                      |
+++------------------+------------------------------------------------------+
++| 404              | File does not exist                                  |
++|                  |                                                      |
+++------------------+------------------------------------------------------+
++
++
++Poster - Default arguments
++--------------------------
++
++This example shows the output of share information for “test share api/ieee.txt”
++
+++---------------+---------------------------------------------+
++| Field         | Value                                       |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **URL**       | Base URL for the API of the ownCloud server |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **User Auth** | User ID of the file owner                   |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Password**  | User’s Password                             |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Name**      | Argument being passed                       |
++|               |                                             |
+++---------------+---------------------------------------------+
++| **Value**     | Full path of file/folder shared             |
++|               |                                             |
+++---------------+---------------------------------------------+
++
++
++Navigate to the “Parameters” tab and input the Name and value.
++
++|10000000000002720000013FB6EDA793_png|
++
++
++
++Navigate to the “Content to Send” tab and select “Body from Parameters” to move the required parameters to the query.
++
++
++|1000000000000291000001951B69B9A6_png|
++
++
++Select GET.
++
++Curl – default configuration:
++-----------------------------
++
++#curl –G –data “path=test_share_api/ieee.txt” http://<userid>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares
++
++#curl –G –data “path=test_share_api/ieee.txt”
++`http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares <http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares>`_
++
++output
++------
++
+++--------------------------------------------------------+-------------------------------+
++| <?xml version="1.0"?>                                  |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <ocs>                                                  |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <meta>                                                 |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <status>ok</status>                                    |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <statuscode>100</statuscode>                           | Status=100: Successful        |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <message/>                                             |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| </meta>                                                |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <data>                                                 |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <element>                                              |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <id>7</id>                                             | Share ID=7                    |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <item_type>file</item_type>                            |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <item_source>675</item_source>                         |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <parent/>                                              |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <share_type>0</share_type>                             | Share Type=0: user            |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <share_with>ser72</share_with>                         | Share with user ser72         |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <file_source>675</file_source>                         |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <path>/test share api/ieee.txt</path>                  | File /test share api/ieee.txt |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <permissions>27</permissions>                          | Permissions 27                |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <stime>1386698116</stime>                              |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <expiration/>                                          |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <token/>                                               |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <storage>4</storage>                                   |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <mail_send>0</mail_send>                               |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| <share_with_displayname>ser72</share_with_displayname> |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| </element>                                             |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| </data>                                                |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++| </ocs>                                                 |                               |
++|                                                        |                               |
+++--------------------------------------------------------+-------------------------------+
++
++
++Poster - To add another argument, such as re-shares:
++----------------------------------------------------
++
++This example shows the output of share information for “test share api/ieee.txt”.
++reshares is set to true which will show output if the file is re-shared by another user.
++
++
++|1000000000000304000001B964698779_png|
++
++
++Navigate to the “Content to Send” tab and select “Body from Parameters”
++
++|100000000000029B0000018885B5282E_png|
++
++
++Select Get
++
++
++
++Curl – To add another argument, such as re-shares
++-------------------------------------------------
++
++#curl –G –data “path=test_share_api/ieee.tx&reshares=true” http://<userid>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares
++
++#curl –G –data “path=test_share_api/ieee.tx&reshares=true”
++`http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares <http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares>`_
++
++output
++------
++
+++--------------------------------------------------------+--------------------------------------+
++| <?xml version="1.0"?>                                  |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <ocs>                                                  |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <meta>                                                 |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <status>ok</status>                                    |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <statuscode>100</statuscode>                           | Status=100: Successful               |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <message/>                                             |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| </meta>                                                |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <data>                                                 |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <element>                                              |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <id>7</id>                                             | Share id = 7                         |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <item_type>file</item_type>                            |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <item_source>675</item_source>                         |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <parent/>                                              |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <share_type>0</share_type>                             | Share Type=0: User                   |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <share_with>ser72</share_with>                         | Share with user ser72                |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <file_source>675</file_source>                         |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <path>/test share api/ieee.txt</path>                  |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <permissions>27</permissions>                          | Permissions 27                       |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <stime>1386698116</stime>                              |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <expiration/>                                          |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <token/>                                               |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <storage>4</storage>                                   |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <mail_send>0</mail_send>                               |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <share_with_displayname>ser72</share_with_displayname> |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| </element>                                             |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <element>                                              |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <id>8</id>                                             | Share id 8                           |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <item_type>file</item_type>                            |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <parent>7</parent>                                     |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <share_type>0</share_type>                             | Parent share id = 7                  |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <share_with>ser73</share_with>                         | Share with ser73                     |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <file_source>675</file_source>                         |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <path>/test share api/ieee.txt</path>                  | Share file /test share api/ieee.txt  |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <permissions>19</permissions>                          | Permissions 19 – read, update, share |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <stime>1386698465</stime>                              |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <expiration/>                                          |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <token/>                                               |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <storage>4</storage>                                   |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <mail_send>0</mail_send>                               |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| <share_with_displayname>ser73</share_with_displayname> |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| </element>                                             |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| </data>                                                |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++| </ocs>                                                 |                                      |
++|                                                        |                                      |
+++--------------------------------------------------------+--------------------------------------+
++
++.. |10000000000002720000013FB6EDA793_png| image:: images/10000000000002720000013FB6EDA793.png
++    :width: 6.5in
++    :height: 3.3126in
++
++
++.. |1000000000000304000001B964698779_png| image:: images/1000000000000304000001B964698779.png
++    :width: 6.5in
++    :height: 3.7134in
++
++
++.. |100000000000029B0000018885B5282E_png| image:: images/100000000000029B0000018885B5282E.png
++    :width: 6.5in
++    :height: 3.8201in
++
++
++.. |1000000000000291000001951B69B9A6_png| image:: images/1000000000000291000001951B69B9A6.png
++    :width: 6.5in
++    :height: 4.0071in
++
diff --cc core/doc/admin/_sources/sharing_api/Introduction.txt
index 0000000,0000000..a391920
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/Introduction.txt
@@@ -1,0 -1,0 +1,48 @@@
++Introduction
++============
++
++This document will describe how to use the ownCloud Sharing API.
++The sharing API allows for the creation of new shares, obtaining a list of shares, and deleting shares.
++In addition, information such a lists of files shared to users can be obtained.
++
++In order to utilize this API, all user ID’s involved in the share, as well as full path names of files is required to be known.
++
++Two methods will be shown:
++Firefox Plugin “Poster” and Curl via the command line.
++
++The base URL for all calls to the share API is:
++owncloud_base_url>/ocs/v1.php/apps/files_sharing/api/v1/shares
++
++Permissions
++-----------
++
++The following table describes the Permissions of a share.
++The Permissions are contained in the XML code output of the command.
++
+++--------+------------------------------------------+
++| Value  | Permissions                              |
++|        |                                          |
+++--------+------------------------------------------+
++| **1**  | Read only – Default for “public” shares  |
++|        |                                          |
+++--------+------------------------------------------+
++| **2**  | Update                                   |
++|        |                                          |
+++--------+------------------------------------------+
++| **4**  | Create                                   |
++|        |                                          |
+++--------+------------------------------------------+
++| **8**  | Delete                                   |
++|        |                                          |
+++--------+------------------------------------------+
++| **16** | Re-share                                 |
++|        |                                          |
+++--------+------------------------------------------+
++| **31** | All above – Default for “private” shares |
++|        |                                          |
+++--------+------------------------------------------+
++
++
++To obtain combinations, add the desired values together.
++For instance, for “Re-Share”, “delete”, “read”, “update”, add 16+8+2+1 = 27.
++
diff --cc core/doc/admin/_sources/sharing_api/index.txt
index 0000000,0000000..9e01679
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sharing_api/index.txt
@@@ -1,0 -1,0 +1,13 @@@
++**ownCloud Sharing API**
++
++
++.. toctree::
++    :maxdepth: 2
++
++    Contents
++    Introduction
++    Get_All_Shares
++    Get_Shares_from_a_Specific_File_or_Folder
++    Get_Information_about_a_known_share
++    Create_a_new_Share
++    Delete_Share
diff --cc core/doc/admin/_sources/sync_client/Advanced_Usage.txt
index 0000000,0000000..e6b0836
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sync_client/Advanced_Usage.txt
@@@ -1,0 -1,0 +1,114 @@@
++Advanced Usage
++==============
++
++Options
++-------
++
++When invoking the client from the command line, the following options are supported.
++The invocation must be done as the admin user on Windows.
++
++*   -h, --help: opens a window showing all the below options.
++
++
++
++*   --logwindow: open a window to show log output.
++
++
++
++*   --logfile <filename>: write log output to file <filename>.
++
++
++
++*   --logdir <name>: write each sync log output to a new file in directory <name>.
++
++
++
++*   --logexpire <hours>: removes logs older than <hours> hours.
++    To be used with –logdir
++
++
++
++*   --logflush: flush the log file after every write.
++
++
++
++*   --confdir <dirname>: Use the given configuration directory.
++
++
++
++Config file
++-----------
++
++The ownCloud client reads a configuration file for certain parameters.
++
++The locations of the config file is as follows:
++
++*   Linux:
++    $HOME/.local/share/data/ownCloud/owncloud.cfg
++
++
++
++*   Windows:
++    %LOCALAPPDATA%\owncloud\owncloud.cfg
++
++
++
++*   MAC:
++    $HOME/Library/Application Support/owncloud
++
++
++
++The following parameters contained within the config file may be modified:
++
++*   remotePollinterval (default 30000): Poll time for the remote repository in milliseconds
++
++
++
++*   maxLogLines (default 20000): Maximum count of log lines shown in the long window.
++
++
++
++
++Comparison and Conflicts
++------------------------
++
++In a sync run, the client must detect if one of the two repositories have updated files.
++On the local repository, the client traverses the file tree and compares the modification time of each file with the value it was before.
++The previous value is stored in the client’s database.
++If it is not, it means the file was recently added to the local repository.
++Note that on the local side, the modification time is a good attribute to detect changes because it does not depend on time shifts.
++
++For the remote (i.e., ownCloud server) repository, the client compares the ETag of each file with its previous value.
++Like the client, the previous value is obtained from a database query.
++If the ETag is the same, the file has not changed.
++
++In case a file has changed on both, the local and remote repositories, since the last sync run, it cannot be determined which version of the file should be used.
++However, it is important not to lose any of the changes.
++
++This is called a conflict case.
++The client resolves it by creating a conflict file of the older of the two files and saves the newer one under the original file name.
++Conflict files are always created on the client and
++not the server.
++The conflict file has the same name as the original file appended with the timestamp of the conflict detection.
++
++Ignored Files
++-------------
++
++The ownCloud client will not sync the following files:
++
++*   Files matching one of the patterns in the Ignored Files Editor.
++
++
++
++*   Files containing special characters that do not work on certain file systems.
++
++
++
++*   Files starting in the .csync_journal.db (reserved for journaling).
++
++
++
++*   Files whose complete path is greater than 256 characters will cause an error and not sync.
++
++
++
diff --cc core/doc/admin/_sources/sync_client/Introduction.txt
index 0000000,0000000..3d4b1d4
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sync_client/Introduction.txt
@@@ -1,0 -1,0 +1,9 @@@
++Introduction
++============
++
++The ownCloud Sync Client is a desktop program installed on a user’s computer.
++It allows a user to specify one or more directories on the local machine to sync to the ownCloud server.
++It allows the user to always have the latest files wherever they may be.
++When a change is made to the file on the computer, it will sync to the ownCloud server via the sync client.
++
++The ownCloud Sync Client is available for Windows, MAC OS X, and various Linux distributions.
diff --cc core/doc/admin/_sources/sync_client/Obtaining_the_Client.txt
index 0000000,0000000..eb3dfaf
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sync_client/Obtaining_the_Client.txt
@@@ -1,0 -1,0 +1,29 @@@
++Obtaining the Client
++====================
++
++The latest version of the Client can be obtained on the ownCloud web site.
++
++The ownCloud client for Windows is provided as a NSIS-based setup file for machine-wide installation.
++
++Installing the ownCloud client on MAC OS follows the normal app bundle installation pattern:
++
++#.  Download the installation file: Click
++    ownCloud-x.y.z.dmg
++    a window with the ownCloud icon opens.
++
++
++
++#.  In that window, drag the ownCloud application into the
++    Applications
++    folder.
++
++
++
++#.  On the right side of
++    Applications
++    , choose
++    ownCloud
++
++
++
++The ownCloud client is also provided in a convenient repository for a wide range of Linux distributions.
diff --cc core/doc/admin/_sources/sync_client/Setting_up_an_Account.txt
index 0000000,0000000..8a1fa01
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sync_client/Setting_up_an_Account.txt
@@@ -1,0 -1,0 +1,54 @@@
++Setting up an Account
++=====================
++
++If no account has been configured, the ownCloud Client will automatically assist in connecting to the ownCloud server after the application has been started.
++
++The first step is to enter the URL to the ownCloud server.
++This is the same address that is used in the browser.
++
++|10000000000002650000018CA6A1BE66_png|
++
++Next, enter the username and password.
++These are the same credentials used to log into the web interface.
++
++|10000000000002690000018D3A8C9F17_png|
++
++Finally, select the folder that the ownCloud Client will sync the contents of the ownCloud account with.
++By default, this folder is called ownCloud, which resides in the home directory.
++
++|10000000000002650000018E4285E964_png|
++
++At this time, the synchronization between the root directories of the ownCloud server will begin.
++
++If selecting a local folder that already contains data, there are two options that exist.
++
++|100000000000026A000001DCAF8778F2_png|
++
++*   Keep local data: If selected, the files in the local folder on the client will be synced up to the ownCloud server.
++
++
++
++*   Start a clean sync: If selected, all files in the local folder on the client will be deleted and therefore not synced to the ownCloud server.
++
++
++
++
++.. |10000000000002690000018D3A8C9F17_png| image:: images/10000000000002690000018D3A8C9F17.png
++    :width: 6.4272in
++    :height: 4.1346in
++
++
++.. |10000000000002650000018CA6A1BE66_png| image:: images/10000000000002650000018CA6A1BE66.png
++    :width: 6.3846in
++    :height: 4.1252in
++
++
++.. |100000000000026A000001DCAF8778F2_png| image:: images/100000000000026A000001DCAF8778F2.png
++    :width: 6.4374in
++    :height: 4.9583in
++
++
++.. |10000000000002650000018E4285E964_png| image:: images/10000000000002650000018E4285E964.png
++    :width: 6.3846in
++    :height: 4.1457in
++
diff --cc core/doc/admin/_sources/sync_client/Table_of_Contents.txt
index 0000000,0000000..9835a09
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sync_client/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,7 @@@
++Table of Contents
++=================
++
++` <#_Toc374017118>`_
++
++Reviewed by:
++
diff --cc core/doc/admin/_sources/sync_client/Visual_Tour.txt
index 0000000,0000000..b5a5834
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sync_client/Visual_Tour.txt
@@@ -1,0 -1,0 +1,257 @@@
++Visual Tour
++===========
++
++Icon
++----
++
++The ownCloud Client remains in the background and is visible as an icon in the system tray (Windows, KDE), status bar (MAC OS X), or notification area (Ubuntu).
++
++|100000000000001D0000001E5C455170_png|
++
++Menu
++----
++
++A right click on the icon provides the following menu.
++
++|10000000000000D2000000F553818155_png|
++
++Where:
++
++*   Open ownCloud in browser: Opens the ownCloud web interface.
++
++
++
++*   Open folder ‘ownCloud’: Opens the local folder.
++    If multiple sync targets have been defined, an entry will exist for each local folder.
++
++
++
++*   Disk Space Indicator: Shows how much space is used on the server.
++
++
++
++*   Operation indicator: Shows the status of the current sync process, or ‘up to date’ if the client and server are in sync.
++
++
++
++|10000000000000F20000003BAA849B42_png|
++
++*   Recent changes: shows the last six files modified by sync operations and provides access to the Sync Activity window which lists all changes since the last restart of the ownCloud client.
++
++
++
++*   Settings…: Provides access to the settings menu.
++    Same result as a left click on the icon.
++
++
++
++*   Help: Opens a browser to display the documentation.
++
++
++
++*   Sign out: Signs the client out of the server.
++
++
++
++*   Quit ownCloud: Quits ownCloud, ending a currently running sync.
++
++
++
++
++Settings
++--------
++
++Account Settings
++~~~~~~~~~~~~~~~~
++
++The Account Settings tab provides an executive summary about the synced folders in the account and gives the ability to modify them.
++
++|10000000000002C1000001ED5CECCC6D_png|
++
++Where:
++
++*   “Connected to <ownCloud instance> as <user>”: Indicates the ownCloud server which the client is syncing with and the user account on that server.
++
++
++
++*   Add Folder…: Provides the ability to add another folder to sync.
++
++
++
++|10000000000001EE00000164642CCA08_png|
++
++
++The Directory and alias name must be unique.
++
++|10000000000001F40000016609A0CFCC_png|
++
++Select the folder on the server to sync with.
++It is important to note that, a server folder can only sync to the client one time.
++So, in the above example, the sync is to the server root directory and thus it is not possible to select another folder under the root to sync.
++
++*   Pause/Resume: will pause the current sync or prevent the client from starting a new sync.
++    Resume will resume the sync process.
++
++
++
++*   Remove:
++    Will remove the selected folder from being synced.
++    This is used, for instance, when there is a desire to sync only a few folders and not the root.
++    First, remove the root from sync, then add the folders to sync as desired.
++
++
++
++*   Storage Usage: Provides further details on the storage utilization on the ownCloud server.
++
++
++
++*   Edit Ignored Files: provides a list of files which will be ignored, i.e., will not sync between the client and server.
++    The ignored files editor allows adding patterns for files or directories that should be excluded from the sync process.
++    Besides normal characters, wild cards may be used, an asterisk ‘*’ indicating multiple characters, or a question mark ‘?’ indicating a single character.
++
++
++
++
++|10000000000001E50000018C3AD09A21_png|
++
++
++*   Modify Account: Allows the user to change the ownCloud server being synced to.
++    It brings up the Setting up an Account (section
++    above) windows.
++
++
++
++Activity
++~~~~~~~~
++
++The Activity window, which can be invoked either from the main menu (
++Recent Changes -> Details…
++) or the Activity tab on the left side of the settings window, provides an in-depth account of the recent sync activity.
++It will show files that have not been synced because they are on the ignored files list, or because they cannot be synced in a cross-platform manner due to containing special characters that cannot be stored on certain file systems.
++
++|10000000000002BB000001EABD7E6DF0_png|
++
++
++General
++~~~~~~~
++
++This tab provides several options:
++
++|10000000000002BF000001E5B544E7E7_png|
++
++*   Launch on System Startup: This option is automatically activated once a user has created his account.
++    Unchecking this box will cause the ownCloud client to not launch on startup for a particular user.
++
++
++
++*   Show Desktop Notifications: When checked, bubble notifications when a set of sync operations has been performed are provided.
++
++
++
++*   Use Monochrome Icons: Use less obtrusive icons.
++    Especially useful on MAC OS.
++
++
++
++*   About: provides information about authors as well as build conditions.
++    This information is valuable when submitting a support request.
++
++
++
++Network
++~~~~~~~
++
++This tab contains proxy settings and bandwidth limiting settings.
++
++|10000000000002C3000001EBBD39E47A_png|
++
++Proxy Settings
++^^^^^^^^^^^^^^
++
++*   No Proxy: Check this if the ownCloud client should circumvent the default proxy on the system.
++
++
++
++*   Use system proxy: Default value.
++    This will follow the system’s proxy settings.
++    On Linux it will use the value of the variable
++    http_proxy.
++
++
++
++*   Specify proxy manually as: Allows to specify custom proxy settings.
++    If it is required to go through a HTTP(S) proxy server.
++    SOCKSv5 on the other hand is useful in special company LAN setups, or in combination with the OpenSSH dynamic application level forwarding feature.
++
++
++
++*   Host: Enter the host name or IP address of the proxy server followed by the port number.
++    HTTP proxies usually listen on ports 8080 (default) or 3128.
++    SOCKS server usually listens on port 1080.
++
++
++
++*   Proxy server requires authentication: Should be checked if the proxy server does not allow anonymous usage.
++    If checked, a username and password must be provided.
++
++
++
++Bandwidth Limiting
++^^^^^^^^^^^^^^^^^^
++
++The Download Bandwidth can be either unlimited (default) or limited to a custom value.
++This is the bandwidth available for data flowing from the ownCloud Server to the client.
++
++The Upload Bandwidth, the bandwidth available or data flowing from the ownCloud client to the server, has an additional option to limit automatically.
++When this option is checked, the ownCloud client will surrender available bandwidth to other applications.
++Use this option if there are issues with real time communication in conjunction with the ownCloud Client.
++
++.. |10000000000002BB000001EABD7E6DF0_png| image:: images/10000000000002BB000001EABD7E6DF0.png
++    :width: 6.5in
++    :height: 4.5563in
++
++
++.. |10000000000002C1000001ED5CECCC6D_png| image:: images/10000000000002C1000001ED5CECCC6D.png
++    :width: 6.5in
++    :height: 4.5453in
++
++
++.. |10000000000001F40000016609A0CFCC_png| image:: images/10000000000001F40000016609A0CFCC.png
++    :width: 5.2083in
++    :height: 3.7291in
++
++
++.. |10000000000000D2000000F553818155_png| image:: images/10000000000000D2000000F553818155.png
++    :width: 2.1874in
++    :height: 2.552in
++
++
++.. |10000000000001EE00000164642CCA08_png| image:: images/10000000000001EE00000164642CCA08.png
++    :width: 5.1457in
++    :height: 3.7083in
++
++
++.. |10000000000002C3000001EBBD39E47A_png| image:: images/10000000000002C3000001EBBD39E47A.png
++    :width: 6.5in
++    :height: 4.5138in
++
++
++.. |10000000000002BF000001E5B544E7E7_png| image:: images/10000000000002BF000001E5B544E7E7.png
++    :width: 6.5in
++    :height: 4.4839in
++
++
++.. |100000000000001D0000001E5C455170_png| image:: images/100000000000001D0000001E5C455170.png
++    :width: 0.302in
++    :height: 0.3126in
++
++
++.. |10000000000001E50000018C3AD09A21_png| image:: images/10000000000001E50000018C3AD09A21.png
++    :width: 5.052in
++    :height: 4.1252in
++
++
++.. |10000000000000F20000003BAA849B42_png| image:: images/10000000000000F20000003BAA849B42.png
++    :width: 2.5201in
++    :height: 0.6146in
++
diff --cc core/doc/admin/_sources/sync_client/index.txt
index 0000000,0000000..2e5b7a5
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/sync_client/index.txt
@@@ -1,0 -1,0 +1,11 @@@
++**ownCloud Sync Client**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Obtaining_the_Client
++    Setting_up_an_Account
++    Visual_Tour
++    Advanced_Usage
diff --cc core/doc/admin/_sources/undelete/Configuration_and_storage_.txt
index 0000000,0000000..b0b9a90
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/undelete/Configuration_and_storage_.txt
@@@ -1,0 -1,0 +1,33 @@@
++Configuration and storage
++==========================
++
++Configuration
++-------------
++
++By default, the ownCloud deleted files app is enabled.
++To verify or disable, navigate to the apps
++page and select Deleted Files.
++
++|100000000000042F000000CC3EDDE79E_png|
++
++Storage
++-------
++
++Once a file has been deleted by the user, it is moved to the
++*~/data/<user>/files_trashbin/files*
++
++folder.
++
++|10000000000002B3000000365E1CD00D_png|
++
++The remaining directories retain information on encryption key files, and versions.
++
++.. |10000000000002B3000000365E1CD00D_png| image:: images/10000000000002B3000000365E1CD00D.png
++    :width: 6.5in
++    :height: 0.5075in
++
++
++.. |100000000000042F000000CC3EDDE79E_png| image:: images/100000000000042F000000CC3EDDE79E.png
++    :width: 6.5in
++    :height: 1.2382in
++
diff --cc core/doc/admin/_sources/undelete/Introduction.txt
index 0000000,0000000..098b100
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/undelete/Introduction.txt
@@@ -1,0 -1,0 +1,25 @@@
++Introduction
++============
++
++The ownCloud server stores deleted files in a temporary area in the event that the file was inadvertently deleted and/or needs to be restored.
++
++Expiry of deleted files
++-----------------------
++
++There are two instances in which ownCloud will automatically permanently remove a deleted file.
++
++Disk Utilization
++~~~~~~~~~~~~~~~~
++
++To prevent a user from running out of disk space, the ownCloud deleted files app will not utilize more than 50% of the currently available free space for deleted files.
++If the deleted files exceed this limit, ownCloud deletes the oldest files until it gets below this limit.
++
++Age
++~~~
++
++By default, deleted files remain in the trash bin for 30 days.
++This can be configured using the trashbin_retention_obligation parameter
++in the config.php
++file.
++Files older than the configured value (or default 30 days) will be permanently deleted.
++ownCloud checks the age of the files each time a new file is moved to the deleted files bin.
diff --cc core/doc/admin/_sources/undelete/Table_of_Contents.txt
index 0000000,0000000..cd13f7f
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/undelete/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,8 @@@
++Table of Contents
++=================
++
++` <#_Toc374622085>`_
++
++Reviewed
++
++Allen Gigler 12/5/2013
diff --cc core/doc/admin/_sources/undelete/Utilization.txt
index 0000000,0000000..9252ca4
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/undelete/Utilization.txt
@@@ -1,0 -1,0 +1,146 @@@
++Utilization
++===========
++
++The deleted files app, when enabled, automatically moves deleted files to the Deleted Files folder and leaves them available for restore or permanent deletion
++
++Delete a file
++-------------
++
++To delete a file, either select the file check box and select Delete
++on the upper right of the screen,
++or the “x”
++to the right of the file.
++
++|1000000000000530000001410CF0028A_png|
++
++
++To delete multiple files simultaneously, select the check box on all the desired files, then select Delete
++on the upper right of the screen.
++
++View Deleted Files
++------------------
++
++To view a list of the deleted files, select the Deleted files
++button on the upper right of the browser.
++
++|1000000000000532000000285DDBBF37_png|
++
++Once selected, a list of all deleted files will appear.
++
++
++Restore files
++-------------
++
++As with deleting files, there are two ways to restore a file.
++Either select the check box next to the file (or for bulk restore – files) and select restore
++on the upper right.
++Or hover over the file and select restore
++.
++
++|1000000000000527000000A7AB409FE0_png|
++|100000000000052500000088DBB95005_png|
++
++
++Permanently Delete Files
++------------------------
++
++Files in the Deleted Files
++folder can be permanently deleted.
++To do this, either select the check box next to the file (or for bulk deletion – files) and select Delete in the upper right corner.
++Or hover over the file and select the “x”.
++See figure in section
++.
++
++Nested files and restore
++------------------------
++
++If, for instance, the directory structure within ownCloud is
++*~/public/support/documentation/ownCloud undelete*
++.
++
++|1000000000000525000000BE30CF0423_png|
++
++Delete entire directory structure
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++
++When the public folder is deleted, all child folders/files will also be deleted.
++
++|100000000000052F000000C2867B7294_png|
++
++Suppose the file “ownCloud undelete.docx” was still required.
++A restore of the file will place it in the ‘root’ directory of the Files folder.
++
++
++Delete only the file
++~~~~~~~~~~~~~~~~~~~~
++
++If the file “ownCloud undelete.docx”
++was accidentally deleted, it may be restored following the steps described in section
++.
++The restore will place the file back into the directory structure from where it came.
++
++Delete the file then the directory structure
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++
++If the file “ownCloud undelete.docs”
++is deleted, then the entire directory structure is deleted, the file will appear in the ‘root’ of the Deleted Files folder.
++
++|1000000000000523000000C6F786381C_png|
++
++A restore of “ownCloud undelete.docx”
++will place it in the user’s ownCloud root directory.
++
++|100000000000053100000142D9A4C916_png|
++
++Shared files and restore
++------------------------
++
++When a
++shared file is deleted, the file will be deleted from the shared to user as well.
++Upon restore of the file by the file owner, the file is no longer shared.
++
++Restore files with Versions
++---------------------------
++
++When a file which has versions has been deleted, and then restored, the versions will exist upon restoration.
++
++
++.. |1000000000000525000000BE30CF0423_png| image:: images/1000000000000525000000BE30CF0423.png
++    :width: 6.5in
++    :height: 0.9374in
++
++
++.. |100000000000052F000000C2867B7294_png| image:: images/100000000000052F000000C2867B7294.png
++    :width: 6.5in
++    :height: 0.95in
++
++
++.. |100000000000052500000088DBB95005_png| image:: images/100000000000052500000088DBB95005.png
++    :width: 6.5in
++    :height: 0.6717in
++
++
++.. |1000000000000532000000285DDBBF37_png| image:: images/1000000000000532000000285DDBBF37.png
++    :width: 6.5in
++    :height: 0.1957in
++
++
++.. |1000000000000530000001410CF0028A_png| image:: images/1000000000000530000001410CF0028A.png
++    :width: 6.5in
++    :height: 1.5701in
++
++
++.. |1000000000000523000000C6F786381C_png| image:: images/1000000000000523000000C6F786381C.png
++    :width: 6.5in
++    :height: 0.9783in
++
++
++.. |1000000000000527000000A7AB409FE0_png| image:: images/1000000000000527000000A7AB409FE0.png
++    :width: 6.5in
++    :height: 0.8228in
++
++
++.. |100000000000053100000142D9A4C916_png| image:: images/100000000000053100000142D9A4C916.png
++    :width: 6.5in
++    :height: 1.5752in
++
diff --cc core/doc/admin/_sources/undelete/index.txt
index 0000000,0000000..13fea91
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/undelete/index.txt
@@@ -1,0 -1,0 +1,9 @@@
++**ownCloud Deleted Files**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Configuration_and_storage_
++    Utilization
diff --cc core/doc/admin/_sources/versions/Configuration_and_storage.txt
index 0000000,0000000..6005bf9
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/versions/Configuration_and_storage.txt
@@@ -1,0 -1,0 +1,52 @@@
++Configuration and storage
++=========================
++
++Configuration
++-------------
++
++By default, the ownCloud versions app is enabled.
++To verify or disable, navigate to the apps
++page and select Versions.
++
++|10000000000004ED000000BE3B9E25D5_png|
++|1000000000000336000000F38C3FAF84_png|
++|1000000000000336000000F38C3FAF84_png|
++|1000000000000336000000F38C3FAF84_png|
++|1000000000000336000000F38C3FAF84_png|
++
++Storage
++-------
++
++Previous versions of files are stored in the
++data/<user>/files_versions
++folder.
++
++|100000000000021C0000004CACBF786C_png|
++
++This directory is automatically created when the first file version is created.
++
++The naming convention of the files in this directory are
++<file_name>.v<unix_timestamp>.
++
++|10000000000002210000002DE3BE7515_png|
++
++
++.. |1000000000000336000000F38C3FAF84_png| image:: images/1000000000000336000000F38C3FAF84.png
++    :width: 6.5in
++    :height: 1.9217in
++
++
++.. |100000000000021C0000004CACBF786C_png| image:: images/100000000000021C0000004CACBF786C.png
++    :width: 5.6252in
++    :height: 0.7917in
++
++
++.. |10000000000002210000002DE3BE7515_png| image:: images/10000000000002210000002DE3BE7515.png
++    :width: 5.6772in
++    :height: 0.4689in
++
++
++.. |10000000000004ED000000BE3B9E25D5_png| image:: images/10000000000004ED000000BE3B9E25D5.png
++    :width: 6.5in
++    :height: 0.9791in
++
diff --cc core/doc/admin/_sources/versions/Introduction.txt
index 0000000,0000000..6c51e69
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/versions/Introduction.txt
@@@ -1,0 -1,0 +1,39 @@@
++Introduction
++============
++
++The ownCloud Versions app maintains older versions of a file which have been modified by an ownCloud user.
++
++Expiry of versions
++------------------
++
++The versions app expires old versions automatically to make certain that the user doesn’t run out of space.
++The following algorithm is used to delete old versions:
++
++*   ownCloud keeps one new version every 2 seconds for the first 10 seconds
++
++
++
++*   ownCloud keeps one new version every minute for the first hour
++
++
++
++*   ownCloud keeps one new version every hour for the first 24 hours
++
++
++
++*   ownCloud keeps one new version every day for the first 30 days
++
++
++
++*   ownCloud keeps one new version every week thereafter.
++
++
++
++The versions are adjusted along this algorithm every time a new version is created.
++
++Space limitations
++-----------------
++
++In addition to the expiry of versions, ownCloud’s versions app makes certain never to use more than 50% of the user’s currently available free space.
++If stored versions exceed this limit, ownCloud will delete the oldest versions first until it meets this limit.
++
diff --cc core/doc/admin/_sources/versions/Utilization.txt
index 0000000,0000000..7bf9c7c
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/versions/Utilization.txt
@@@ -1,0 -1,0 +1,114 @@@
++Utilization
++===========
++
++The versions app, when enabled, automatically creates a new version each time an existing, non-empty file is saved.
++
++Initial File creation
++---------------------
++
++Create a file on the ownCloud server – either directly via the browser, an upload, or a file sync from the client.
++In this example, the file versionText.txt was created via the web browser.
++
++|1000000000000427000000324F58266D_png|
++
++Note
++~~~~
++
++Since this file was initially created via the web browser, it is an empty file.
++
++Edit the file
++-------------
++
++Edit the file through the web browser.
++
++|100000000000019E0000004CD2A0F407_png|
++
++And save.
++
++Notes
++~~~~~
++
++Editing an empty file, as in this instance, for the first time, does not create a new version.
++
++Create version
++--------------
++
++Edit the non-zero byte file either via the web browser, via the sync client or via an upload.
++
++|1000000000000194000000498325A766_png|
++
++And save.
++
++Notes
++~~~~~
++
++When performing an upload of a file which already exists on the server, a dialog box appears asking whether to keep the existing file or the new file.
++
++|10000000000001C1000000FE663748B2_png|
++
++
++
++
++
++
++
++
++In order to create a version, the New File must be selected.
++If the Existing File is selected, the file is not replaced hence no new version is created.
++
++Accessing Versions
++------------------
++
++In order to view what versions exist for a given file, hover over the line containing the file and select Versions
++on the right side.
++
++|1000000000000430000000AF9D6E724E_png|
++
++
++In this case, there are two previous versions of versionTest.txt
++.
++The thumbnail and creation time can be used to identify what was in the file in that version.
++
++Reverting to a different version
++--------------------------------
++
++To revert to a previous version, simply select the restore next to the version as seen in
++.
++
++Notes
++~~~~~
++
++In the instance where a file is reverted to another version, the “existing” version of the file is versioned and can be reverted at a later date.
++
++Sharing and Versions
++--------------------
++
++If user-A shares a file with user-B, user-B may revert the file to any previous version.
++If user-B modifies the file, a new version is created.
++
++
++
++.. |10000000000001C1000000FE663748B2_png| image:: images/10000000000001C1000000FE663748B2.png
++    :width: 4.6772in
++    :height: 2.6457in
++
++
++.. |1000000000000430000000AF9D6E724E_png| image:: images/1000000000000430000000AF9D6E724E.png
++    :width: 6.5in
++    :height: 1.061in
++
++
++.. |1000000000000194000000498325A766_png| image:: images/1000000000000194000000498325A766.png
++    :width: 4.2083in
++    :height: 0.7602in
++
++
++.. |100000000000019E0000004CD2A0F407_png| image:: images/100000000000019E0000004CD2A0F407.png
++    :width: 4.3126in
++    :height: 0.7917in
++
++
++.. |1000000000000427000000324F58266D_png| image:: images/1000000000000427000000324F58266D.png
++    :width: 6.5in
++    :height: 0.3055in
++
diff --cc core/doc/admin/_sources/versions/index.txt
index 0000000,0000000..66e4cf2
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/versions/index.txt
@@@ -1,0 -1,0 +1,16 @@@
++**ownCloud Versioning**
++
++Table of Contents
++
++` <#_Toc374004001>`_
++
++Reviewers
++
++Allen Gigler 12/4/2013
++
++.. toctree::
++    :maxdepth: 2
++
++    Introduction
++    Configuration_and_storage
++    Utilization
diff --cc core/doc/admin/_sources/viewers/Configuration.txt
index 0000000,0000000..a600030
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/viewers/Configuration.txt
@@@ -1,0 -1,0 +1,28 @@@
++Configuration
++=============
++
++Text Editor
++-----------
++
++The Text Editor App allows users to view and edit text files.
++To enable this app, navigate to the Apps page and select “Text Editor” then Enable.
++
++|100000000000012C0000009C444B4720_png|
++
++Image Viewer
++------------
++
++The image viewer app allows users to preview image files within the ownCloud web interface.
++To enable, navigate to the Apps page and select “Image Viewer” then enable.
++
++|10000000000001400000008A557EF7E3_png|
++
++.. |10000000000001400000008A557EF7E3_png| image:: images/10000000000001400000008A557EF7E3.png
++    :width: 3.3335in
++    :height: 1.4374in
++
++
++.. |100000000000012C0000009C444B4720_png| image:: images/100000000000012C0000009C444B4720.png
++    :width: 3.1252in
++    :height: 1.6252in
++
diff --cc core/doc/admin/_sources/viewers/Introduction.txt
index 0000000,0000000..3d80eef
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/viewers/Introduction.txt
@@@ -1,0 -1,0 +1,5 @@@
++Introduction
++============
++
++ownCloud provides apps which allow users to view/edit
++text files and view images which exist on the ownCloud server.
diff --cc core/doc/admin/_sources/viewers/Utilization.txt
index 0000000,0000000..3fe22a9
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/viewers/Utilization.txt
@@@ -1,0 -1,0 +1,23 @@@
++Utilization
++===========
++
++When the apps are enabled, select the file name on the web interface Files tab and either the text editor or the image will appear.
++
++|10000000000001E50000006E3ECDC427_png|
++
++
++|100000000000044C000002B0B421E27E_png|
++
++
++When the apps are disabled, selecting the file name on the web interface will prompt the user to download the specified file.
++
++
++.. |100000000000044C000002B0B421E27E_png| image:: images/100000000000044C000002B0B421E27E.png
++    :width: 6.5in
++    :height: 4.0654in
++
++
++.. |10000000000001E50000006E3ECDC427_png| image:: images/10000000000001E50000006E3ECDC427.png
++    :width: 5.052in
++    :height: 1.1457in
++
diff --cc core/doc/admin/_sources/viewers/index.txt
index 0000000,0000000..8bae6a8
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/viewers/index.txt
@@@ -1,0 -1,0 +1,12 @@@
++**ownCloud Viewers**
++
++Table of Contents
++
++` <#_Toc376421150>`_
++
++.. toctree::
++    :maxdepth: 2
++
++    Introduction
++    Configuration
++    Utilization
diff --cc core/doc/admin/_sources/web_guide/Adding_Data.txt
index 0000000,0000000..58cdc36
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/Adding_Data.txt
@@@ -1,0 -1,0 +1,117 @@@
++Adding Data
++===========
++
++There are a few ways to add data to the ownCloud instance.
++Files may be uploaded or text files may be created directly within ownCloud.
++Folders may also be created directly within the ownCloud web interface.
++
++Creation
++--------
++
++To create a file or folder, select the New button in section 3 of the main ownCloud screen.
++
++|1000000000000163000000E9CDA84C92_png|
++
++Create a text file
++~~~~~~~~~~~~~~~~~~
++
++Select “Text file” from the menu and enter the desired file name.
++
++|1000000000000175000000FAB2A2B294_png|
++
++Then press enter.
++
++|100000000000047A000000FB86FF2A9A_png|
++
++Notice the file has been placed in section 2 of the main ownCloud window.
++Since it is an empty file, the size is “0 Bytes” and it was last modified a few seconds ago.
++
++Create a folder
++~~~~~~~~~~~~~~~
++
++To create a folder within ownCloud, simply select “Folder” from the menu and enter the desired folder name.
++
++|1000000000000195000000EF7E44082C_png|
++
++Then select Enter.
++
++Notice the folder appears in the window.
++
++|100000000000047A0000011C6682A254_png|
++
++
++Adding a file from a link
++~~~~~~~~~~~~~~~~~~~~~~~~~
++
++If the desired file exists on the internet already it is possible to add the file to ownCloud using the internet link.
++To do this, select “From link” from the menu and enter the URL of the file then select enter.
++
++|10000000000001CE000000F2E2084BA1_png|
++
++|100000000000046D0000015F4B5494A9_png|
++
++
++The file contained in the link now appears in the user’s ownCloud instance.
++
++Uploading files
++---------------
++
++There are two methods possible to upload files to the ownCloud web interface.
++
++Drag and Drop
++~~~~~~~~~~~~~
++
++Simply drag and drop one or more files from the client’s
++Desktop into section 2 of the main ownCloud window.
++These files will then be uploaded to ownCloud and appear in the data window.
++
++Upload Button
++~~~~~~~~~~~~~
++
++The second method to upload a file to ownCloud is to select the upload arrow on the top left of the main ownCloud screen.
++This will being up a File Upload selection box.
++
++|100000000000048100000245268CDB7A_png|
++
++Navigate to the directory containing the desired files and select the file for uploading and press Open.
++To upload multiple files simultaneously, use either the SHIFT or CTRL key during file selection as appropriate.
++
++.. |100000000000047A000000FB86FF2A9A_png| image:: images/100000000000047A000000FB86FF2A9A.png
++    :width: 6.5in
++    :height: 1.4228in
++
++
++.. |1000000000000163000000E9CDA84C92_png| image:: images/1000000000000163000000E9CDA84C92.png
++    :width: 3.698in
++    :height: 2.4272in
++
++
++.. |10000000000001CE000000F2E2084BA1_png| image:: images/10000000000001CE000000F2E2084BA1.png
++    :width: 4.8126in
++    :height: 2.5201in
++
++
++.. |1000000000000195000000EF7E44082C_png| image:: images/1000000000000195000000EF7E44082C.png
++    :width: 4.2189in
++    :height: 2.4898in
++
++
++.. |100000000000047A0000011C6682A254_png| image:: images/100000000000047A0000011C6682A254.png
++    :width: 6.5in
++    :height: 1.611in
++
++
++.. |100000000000046D0000015F4B5494A9_png| image:: images/100000000000046D0000015F4B5494A9.png
++    :width: 6.5in
++    :height: 2.0138in
++
++
++.. |1000000000000175000000FAB2A2B294_png| image:: images/1000000000000175000000FAB2A2B294.png
++    :width: 3.8846in
++    :height: 2.6043in
++
++
++.. |100000000000048100000245268CDB7A_png| image:: images/100000000000048100000245268CDB7A.png
++    :width: 6.5in
++    :height: 3.2756in
++
diff --cc core/doc/admin/_sources/web_guide/Initial_Log_In.txt
index 0000000,0000000..8c0649a
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/Initial_Log_In.txt
@@@ -1,0 -1,0 +1,29 @@@
++Initial Log In
++==============
++
++The ownCloud initial login screen is as follows.
++
++|1000000000000453000001BFFCF48776_png|
++
++It should be noted, that if the instance of ownCloud is themed differently, there will be a different logo on the screen.
++
++To log into ownCloud, enter the username and password provided by your ownCloud admin.
++To remain logged into ownCloud under the same credentials, select the checkbox next to Remember.
++
++Upon initial login, the user will most likely see the “Welcome to ownCloud” banner as below.
++
++|1000000000000479000002887E7F48EA_png|
++
++This banner provides links to download the desktop sync app (see Desktop Client document), as well as the mobile apps.
++This banner will appear upon the first login only, provided the admin has not disabled it.
++To close the banner and start using ownCloud, select the ‘x’ in the upper right corner of the banner.
++
++.. |1000000000000453000001BFFCF48776_png| image:: images/1000000000000453000001BFFCF48776.png
++    :width: 6.5in
++    :height: 2.6252in
++
++
++.. |1000000000000479000002887E7F48EA_png| image:: images/1000000000000479000002887E7F48EA.png
++    :width: 6.5in
++    :height: 3.6783in
++
diff --cc core/doc/admin/_sources/web_guide/Introduction.txt
index 0000000,0000000..a8185ce
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/Introduction.txt
@@@ -1,0 -1,0 +1,6 @@@
++Introduction
++============
++
++This document will discuss the ownCloud web interface from a user’s perspective.
++It will detail how to log into ownCloud, upload files, create files and folders, as well as describe the Personal Page settings.
++When possible, it will reference other more detailed documents on specific functionality.
diff --cc core/doc/admin/_sources/web_guide/Main_ownCloud_screen.txt
index 0000000,0000000..2a6d178
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/Main_ownCloud_screen.txt
@@@ -1,0 -1,0 +1,32 @@@
++Main ownCloud screen
++====================
++
++Once logged into ownCloud, the main screen will be displayed.
++
++|100000000000047700000219A3013A92_png|
++
++There are four sections in the main ownCloud screen
++
++#.  This is the apps bar.
++    Any user related apps will be displayed here.
++    In a default enterprise edition of ownCloud, the Files app and the Activity app are listed.
++
++
++
++#.  This section will display all data loaded into ownCloud.
++
++
++
++#.  The home button brings the user to the home directory.
++    The New button allows the user to create a file or folder, or link, and the upload arrow allows the user to upload a file.
++
++
++
++#.  The search box allows the user to search and the user name pull-down can bring the user to the Personal page for personal configurations as well as log the user out.
++
++
++
++.. |100000000000047700000219A3013A92_png| image:: images/100000000000047700000219A3013A92.png
++    :width: 6.5in
++    :height: 3.0535in
++
diff --cc core/doc/admin/_sources/web_guide/Navigation.txt
index 0000000,0000000..3d52901
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/Navigation.txt
@@@ -1,0 -1,0 +1,75 @@@
++Navigation
++==========
++
++Changing directories
++--------------------
++
++To navigate to other folders within ownCloud, simply click on the desired folder.
++
++|1000000000000470000001B68AE60DD3_png|
++
++Notice that Section 3 shows the currently displayed directory “my_folder”.
++To navigate back to the root directly, select the “Home” button.
++
++Viewing/Editing files
++---------------------
++
++ownCloud has the ability to view text files as well as pictures.
++To view a text file or a picture, click on the file.
++
++|10000000000004710000014BBC34499D_png|
++
++For text files, a text editor will be brought up allowing the user to modify the file as desired.
++Just type the desired text and select “Save” to commit the changes.
++Once changes have been made to the file, prior to saving, the name of the file will have an “*” next to it indicating it has yet to be saved.
++
++|100000000000046F000000DEA2BFCD9B_png|
++
++Once changes have been saved, a thumbnail of the text file will appear in the main data window.
++
++|100000000000041D0000003D52225C0D_png|
++
++Downloading a file
++------------------
++
++To download a file from ownCloud to your working computer, hover over the file and then select the “Download” button.
++
++|100000000000047200000129CB014025_png|
++
++For non-text or picture files, the user may also click on the file name to download it.
++
++Renaming files or Folders
++-------------------------
++
++To rename a file or folder within ownCloud, hover over the file and select Rename.
++Then type the new name of the file or folder.
++
++Sharing, Versions, Delete, and Activity
++---------------------------------------
++
++For more information on the sharing, versions, deletion or Activity features, please see the respective documents.
++
++.. |100000000000046F000000DEA2BFCD9B_png| image:: images/100000000000046F000000DEA2BFCD9B.png
++    :width: 6.5in
++    :height: 1.2717in
++
++
++.. |100000000000041D0000003D52225C0D_png| image:: images/100000000000041D0000003D52225C0D.png
++    :width: 6.5in
++    :height: 0.3764in
++
++
++.. |100000000000047200000129CB014025_png| image:: images/100000000000047200000129CB014025.png
++    :width: 6.5in
++    :height: 1.6965in
++
++
++.. |10000000000004710000014BBC34499D_png| image:: images/10000000000004710000014BBC34499D.png
++    :width: 6.5in
++    :height: 1.8925in
++
++
++.. |1000000000000470000001B68AE60DD3_png| image:: images/1000000000000470000001B68AE60DD3.png
++    :width: 6.5in
++    :height: 2.5063in
++
diff --cc core/doc/admin/_sources/web_guide/Personal_Configurations.txt
index 0000000,0000000..f995876
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/Personal_Configurations.txt
@@@ -1,0 -1,0 +1,84 @@@
++Personal Configurations
++=======================
++
++Each ownCloud user may configure some personal preferences.
++To make these configurations, navigate to the Personal page.
++Select the user name and the following menu will appear.
++
++|100000000000047A000000B727198874_png|
++
++
++Select Personal to get to the configuration page.
++
++Configuration options on this page may appear or disappear depending on what the ownCloud admin has configured.
++The basic configuration parameters are as follows.
++
++|1000000000000467000002B63162E59B_png|
++
++|10000000000004690000026615360BEB_png|
++
++Important links
++---------------
++
++The top section of the Personal page contains the same links as the First Run Wizard described earlier in this document.
++For more information on this, see the document on the First Run Wizard.
++
++Quota
++-----
++
++Below shows the used and remaining space for the user.
++For information as to how this is calculated, refer to the ownCloud Quota Calculations document.
++
++Password Change
++---------------
++
++If the user desires to change the password, do so in this section.
++Enter the current password followed by the new password and select “Change Password”.
++It should be noted, that when using LDAP authentication, the password is contained within the LDAP and not locally thus this field will not change the password.
++
++Change Display Name
++-------------------
++
++To change the way your name is displayed within ownCloud, enter the desired name under “Full Name”.
++
++Add Email Address
++-----------------
++
++For password recovery and share notifications, it is important for ownCloud to have an email on record.
++Enter the desired email address under the EMAIL section.
++
++Avatar
++------
++
++ownCloud allows a user to upload an Avatar for their ownCloud instance.
++This can be done under the “Profile Picture” section of the Personal Page.
++
++To upload a new Avatar, select the “Upload new” button.
++If the desired avatar exists on the ownCloud file system, select “Select new from Files” and to remove the avatar and return to the default, select “Remove image”
++
++Language
++--------
++
++If English is not the user’s native language, they may change the language in this section.
++
++WebDAV
++------
++
++This provides the address to use in order to access a user’s files via WebDav.
++
++
++
++.. |1000000000000467000002B63162E59B_png| image:: images/1000000000000467000002B63162E59B.png
++    :width: 6.5in
++    :height: 4.0028in
++
++
++.. |100000000000047A000000B727198874_png| image:: images/100000000000047A000000B727198874.png
++    :width: 6.5in
++    :height: 1.0382in
++
++
++.. |10000000000004690000026615360BEB_png| image:: images/10000000000004690000026615360BEB.png
++    :width: 6.5in
++    :height: 3.5346in
++
diff --cc core/doc/admin/_sources/web_guide/Table_of_Contents.txt
index 0000000,0000000..4f5ec5e
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/Table_of_Contents.txt
@@@ -1,0 -1,0 +1,5 @@@
++Table of Contents
++=================
++
++` <#_Toc375905226>`_
++
diff --cc core/doc/admin/_sources/web_guide/index.txt
index 0000000,0000000..edaa5ba
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/_sources/web_guide/index.txt
@@@ -1,0 -1,0 +1,12 @@@
++**ownCloud Web Interface Users Guide**
++
++.. toctree::
++    :maxdepth: 2
++
++    Table_of_Contents
++    Introduction
++    Initial_Log_In
++    Main_ownCloud_screen
++    Adding_Data
++    Navigation
++    Personal_Configurations
diff --cc core/doc/admin/activity/Configuration.html
index 0c88c56,0000000..d8ac147
mode 100644,000000..100644
--- a/core/doc/admin/activity/Configuration.html
+++ b/core/doc/admin/activity/Configuration.html
@@@ -1,172 -1,0 +1,150 @@@
 +
 +<!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>
++    <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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<p>The Activity App is enabled by default.
++To verify or to disable, navigate to the
++APPS
++page and search for
++Activity.</p>
++<p><img alt="10000000000002F3000000926CA65D02_png" src="../_images/10000000000002F3000000926CA65D02.png" style="width: 6.5in; height: 1.2571in;" /></p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/activity/Introduction.html
index 0c88c56,0000000..b4d3751
mode 100644,000000..100644
--- a/core/doc/admin/activity/Introduction.html
+++ b/core/doc/admin/activity/Introduction.html
@@@ -1,172 -1,0 +1,153 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>The ownCloud Activity app shows an activity feed where users can see what they did in the past and what happened to their files and what others did with their shared files.</p>
++<p>The Activity Stream introduces a central interface where all events that happen in a user’s ownCloud instance are shown.</p>
++<p>The following can be seen in the new interface:</p>
++<ul class="simple">
++<li>Creation, edit or deletion of files along with a thumbnail and date and path</li>
++<li>If someone shared a file with you</li>
++<li>If someone created, edited or deleted something in a folder you shared to them.</li>
++</ul>
++<p>All the events are presented with endless scrolling and also in an RSS feed which a user can subscribe to.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/activity/RSS_Feed.html
index 0c88c56,0000000..49de415
mode 100644,000000..100644
--- a/core/doc/admin/activity/RSS_Feed.html
+++ b/core/doc/admin/activity/RSS_Feed.html
@@@ -1,172 -1,0 +1,156 @@@
 +
 +<!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>
++    <title>RSS Feed — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="rss-feed">
++<h1>RSS Feed<a class="headerlink" href="#rss-feed" title="Permalink to this headline">¶</a></h1>
++<p>To subscribe to the RSS Feed, navigate to the
++Activity
++page and select
++RSS feed
++in the upper right of the browser.</p>
++<p><img alt="10000000000001440000005A2989832F_png" src="../_images/10000000000001440000005A2989832F.png" style="width: 3.3752in; height: 0.9374in;" /></p>
++<p>The resulting page will look something like this:</p>
++<p><img alt="10000000000002B1000002258C08D304_png" src="../_images/10000000000002B1000002258C08D304.png" style="width: 6.5in; height: 5.1791in;" /></p>
++<p>To subscribe, select the
++Subscribe Now
++button.</p>
++<p>The RSS Feed may be viewed via the browser’s capabilities.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/activity/Table_of_Contents.html
index 0c88c56,0000000..9076a1f
mode 100644,000000..100644
--- a/core/doc/admin/activity/Table_of_Contents.html
+++ b/core/doc/admin/activity/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc373137976>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/activity/Utilization.html
index 0000000,0000000..3770a71
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/activity/Utilization.html
@@@ -1,0 -1,0 +1,205 @@@
++
++<!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>Utilization — 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" />
++<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>
++<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="utilization">
++<h1>Utilization<a class="headerlink" href="#utilization" title="Permalink to this headline">¶</a></h1>
++<p>The Activities can be viewed by selecting
++Activity
++in the App bar on the left side of the ownCloud browser interface</p>
++<p><img alt="1000000000000050000000DB83B8FA5B_png" src="../_images/1000000000000050000000DB83B8FA5B.png" style="width: 0.8335in; height: 2.2811in;" /></p>
++<p>This will bring up the Activity interface showing all the activities which occurred for this user’s instance.</p>
++<div class="section" id="sample-activities">
++<h2>Sample Activities<a class="headerlink" href="#sample-activities" title="Permalink to this headline">¶</a></h2>
++<p>This section will show how the different activities may appear within this interface</p>
++<div class="section" id="create-file">
++<h3>Create file<a class="headerlink" href="#create-file" title="Permalink to this headline">¶</a></h3>
++<p>The following shows a file entitled
++DeleteMe.txt
++being created 3 days ago.</p>
++<p><img alt="10000000000000F300000068AF0ECD53_png" src="../_images/10000000000000F300000068AF0ECD53.png" style="width: 2.5311in; height: 1.0835in;" /></p>
++</div>
++<div class="section" id="delete-file">
++<h3>Delete File<a class="headerlink" href="#delete-file" title="Permalink to this headline">¶</a></h3>
++<p>The following shows a file entitled
++DeleteMe.txt
++being deleted 3 days ago.</p>
++<p><img alt="10000000000000F5000000675DC5F68C_png" src="../_images/10000000000000F5000000675DC5F68C.png" style="width: 2.552in; height: 1.0728in;" /></p>
++</div>
++<div class="section" id="edit-a-file">
++<h3>Edit a file<a class="headerlink" href="#edit-a-file" title="Permalink to this headline">¶</a></h3>
++<p>The following shows a file
++Shared/test.txt
++being edited mere seconds ago.</p>
++<p><img alt="10000000000000F1000000F6704F46D3_png" src="../_images/10000000000000F1000000F6704F46D3.png" style="width: 2.5102in; height: 2.5626in;" /></p>
++</div>
++<div class="section" id="share-a-file-with-a-user">
++<h3>Share a file with a user<a class="headerlink" href="#share-a-file-with-a-user" title="Permalink to this headline">¶</a></h3>
++<p>The following shows the file
++shareMe
++being shared with another user.</p>
++<p><img alt="10000000000000F1000000F56125BDBA_png" src="../_images/10000000000000F1000000F56125BDBA.png" style="width: 2.5102in; height: 2.552in;" /></p>
++</div>
++<div class="section" id="file-shared-to-user">
++<h3>File shared to user<a class="headerlink" href="#file-shared-to-user" title="Permalink to this headline">¶</a></h3>
++<p>The following shows the file
++Shared/test.txt
++being shared with this user almost an hour ago.</p>
++<p><img alt="10000000000000F60000006754ED2A1E_png" src="../_images/10000000000000F60000006754ED2A1E.png" style="width: 2.5626in; height: 1.0728in;" /></p>
++</div>
++<div class="section" id="file-created-by-another-user-in-shared-folder">
++<h3>File created by another user in Shared folder<a class="headerlink" href="#file-created-by-another-user-in-shared-folder" title="Permalink to this headline">¶</a></h3>
++<p>The following is shown when another user creates a file in your shared folder.</p>
++<p><img alt="10000000000000F500000067A8845EF8_png" src="../_images/10000000000000F500000067A8845EF8.png" style="width: 2.552in; height: 1.0728in;" /></p>
++</div>
++<div class="section" id="shared-file-modified">
++<h3>Shared file modified<a class="headerlink" href="#shared-file-modified" title="Permalink to this headline">¶</a></h3>
++<p>The following shows a file
++BoB/test.txt
++modified by a user who this file was shared to.</p>
++<p><img alt="10000000000000F6000000685DFB3767_png" src="../_images/10000000000000F6000000685DFB3767.png" style="width: 2.5626in; height: 1.0835in;" /></p>
++</div>
++<div class="section" id="combined-activities">
++<h3>Combined activities<a class="headerlink" href="#combined-activities" title="Permalink to this headline">¶</a></h3>
++<p>The following shows what “combined” activities may look like on the activity interface.</p>
++<p><img alt="10000000000000F40000019A110DD159_png" src="../_images/10000000000000F40000019A110DD159.png" style="width: 2.5417in; height: 4.2701in;" /></p>
++</div>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/activity/index.html
index 0c88c56,0000000..1e77c9d
mode 100644,000000..100644
--- a/core/doc/admin/activity/index.html
+++ b/core/doc/admin/activity/index.html
@@@ -1,172 -1,0 +1,154 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Activity</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Utilization.html">Utilization</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#sample-activities">Sample Activities</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="RSS_Feed.html">RSS Feed</a></li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/antivirus/Configuration.html
index 0000000,0000000..a59cd55
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/antivirus/Configuration.html
@@@ -1,0 -1,0 +1,202 @@@
++
++<!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" />
++<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>
++<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="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="enable-the-app">
++<h2>Enable The app<a class="headerlink" href="#enable-the-app" title="Permalink to this headline">¶</a></h2>
++<p>To enable the Antivirus App, navigate to the Apps page and select “Antivirus App for Files” and enable.</p>
++<p><img alt="10000000000001800000009A9494E037_png" src="../_images/10000000000001800000009A9494E037.png" style="width: 4in; height: 1.6043in;" /></p>
++</div>
++<div class="section" id="install-clamav">
++<h2>Install ClamAV<a class="headerlink" href="#install-clamav" title="Permalink to this headline">¶</a></h2>
++<p>ClamAV must be installed on the server (either the local for Executable or Daemon Socket mode or a remote server for Daemon mode).</p>
++<p>To install, use the repository’s installation method to install “clamav”.
++For example:</p>
++<p>#apt-get install clamav</p>
++<p>For daemon mode, the ClamAV daemon must also be installed (either on the local machine for Daemon Socket or the remote machine for daemon mode).</p>
++<p>#apt-get install clamav-daemon</p>
++</div>
++<div class="section" id="configure-logging">
++<h2>Configure Logging<a class="headerlink" href="#configure-logging" title="Permalink to this headline">¶</a></h2>
++<p>Set log level to Everything in the Admin page.</p>
++<p><img alt="10000000000001AC000000477C76808F_png" src="../_images/10000000000001AC000000477C76808F.png" style="width: 4.4583in; height: 0.7398in;" /></p>
++</div>
++<div class="section" id="executable-mode">
++<h2>Executable Mode<a class="headerlink" href="#executable-mode" title="Permalink to this headline">¶</a></h2>
++<p>To run in executable mode, ClamAV must be installed on the local server.
++From the Admin page, configure Antivirus as follows:</p>
++<p><img alt="1000000000000165000000D3FF2168AB_png" src="../_images/1000000000000165000000D3FF2168AB.png" style="width: 3.7189in; height: 2.198in;" /></p>
++<p>The Stream Length is defined as the ClamAV StreamMaxLengeth Size.
++The default value, according to the ClamAV web site is 10M which equates to 10485760 bytes as shown in the above example.</p>
++<p>The Path to clamscan is the path for the executable clamscan file.
++By default it installs in /usr/bin/clamscan.</p>
++<p>When files are uploaded, they will be scanned and, if clean, the following logs will appear:</p>
++<p>{“app”:”files_antivirus”,”message”:”Scanning file : /Lab.txt”,”level”:0,”time”:”2013-12-17T15:24:05+00:00”}</p>
++<p>{“app”:”files_antivirus”,”message”:”Exec scan: /Lab.txt”,”level”:0,”time”:”2013-12-17T15:24:05+00:00”}</p>
++<p>{“app”:”files_antivirus”,”message”:”Result CLEAN!”,”level”:0,”time”:”2013-12-17T15:24:09+00:00”}</p>
++</div>
++<div class="section" id="daemon-mode">
++<h2>Daemon Mode<a class="headerlink" href="#daemon-mode" title="Permalink to this headline">¶</a></h2>
++<p>When running in Daemon Mode, install ClamAV and clamAV-Daemon on a remote server.</p>
++<p>The port, upon which ClamAV listens must be configured.
++To do this, add the following line in /etc/clamav/clamd.conf:</p>
++<p>TCPSocket 3310</p>
++<p>Then restart the Clamd service:</p>
++<p>/etc/init.d/clamav-daemon restart</p>
++<p>Back on the ownCloud server, navigate to the Admin page and configure the Antivirus Configuration as follows:</p>
++<p><img alt="1000000000000194000000FAD39BC0D8_png" src="../_images/1000000000000194000000FAD39BC0D8.png" style="width: 4.2083in; height: 2.6043in;" /></p>
++<p>Where the host is the IP of the server running the ClamAV Daemon and the Port is what was configured in the above step.</p>
++<p>Upon upload of files to the ownCloud server, the following logs will appear indicating the files are clean.</p>
++<p>{“app”:”files_antivirus”,”message”:”Scanning file : /Lab.txt”,”level”:0,”time”:”2013-12-17T17:39:35+00:00”}</p>
++<p>{“app”:”files_antivirus”,”message”:”Response :: stream: OKn”,”level”:0,”time”:”2013-12-17T17:39:48+00:00”}</p>
++</div>
++<div class="section" id="daemon-socket-mode">
++<h2>Daemon Socket mode<a class="headerlink" href="#daemon-socket-mode" title="Permalink to this headline">¶</a></h2>
++<p>To run in Daemon socket mode, install clamav and clamav-daemon on the ownCloud server.</p>
++<p>Configure the Admin page as such:</p>
++<p><img alt="1000000000000160000000DBB2FB0223_png" src="../_images/1000000000000160000000DBB2FB0223.png" style="width: 3.6665in; height: 2.2811in;" /></p>
++<p>Where Socket is the location of the Clamd executable.</p>
++<p>Upon upload of a clean file to the ownCloud server, the following logs will appear.</p>
++<p>{“app”:”files_antivirus”,”message”:”Scanning file : /Lab.txt”,”level”:0,”time”:”2013-12-17T18:19:08+00:00”}</p>
++<p>{“app”:”files_antivirus”,”message”:”Response :: stream: OKn”,”level”:0,”time”:”2013-12-17T18:19:08+00:00”}</p>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/antivirus/Introduction.html
index 0c88c56,0000000..240142f
mode 100644,000000..100644
--- a/core/doc/admin/antivirus/Introduction.html
+++ b/core/doc/admin/antivirus/Introduction.html
@@@ -1,172 -1,0 +1,161 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud integrates with ClamAV, an open source (GPL) antivirus engine, to provide an antivirus solution for files which are uploaded to the ownCloud server.
++Via this method, ownCloud/ClamAV can detect Trojans, viruses, malware and other malicious threats.
++Files are scanned for virus upon initial upload to the ownCloud server.</p>
++<p>The ownCloud antivirus app is supported on ownCloud instances which are installed on a Linux operating system.</p>
++<p>The antivirus app can run in one of three modes:</p>
++<ul class="simple">
++<li>Executable – ClamAV is running on the same server as the ownCloud instance.
++For executable mode, the ClamAV process is started and stopped with each file upload.</li>
++<li>Daemon – ClamAV is running on a different server from the ownCloud instance</li>
++<li>Daemon (Socket) – ClamAV is running on the same server as the ownCloud instance. In this mode, the ClamAV process is running in the background at all times.
++It is a bit quicker for scanning than executable mode, but requires system administrator skills and root access.</li>
++</ul>
++<p>In addition, there are two possible actions which may occur when an infected file is found:</p>
++<ul class="simple">
++<li>Only Log – A log entry is created when an infected file is found.</li>
++<li>Delete File – The infected file is deleted.</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/antivirus/Table_of_Contents.html
index 0c88c56,0000000..dd0500e
mode 100644,000000..100644
--- a/core/doc/admin/antivirus/Table_of_Contents.html
+++ b/core/doc/admin/antivirus/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc375553047>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/antivirus/index.html
index 0c88c56,0000000..add9493
mode 100644,000000..100644
--- a/core/doc/admin/antivirus/index.html
+++ b/core/doc/admin/antivirus/index.html
@@@ -1,172 -1,0 +1,157 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Antivirus</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#enable-the-app">Enable The app</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#install-clamav">Install ClamAV</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#configure-logging">Configure Logging</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#executable-mode">Executable Mode</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#daemon-mode">Daemon Mode</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#daemon-socket-mode">Daemon Socket mode</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/APPS.html
index 0c88c56,0000000..cc964a8
mode 100644,000000..100644
--- a/core/doc/admin/config/APPS.html
+++ b/core/doc/admin/config/APPS.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>APPS — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="apps">
++<h1>APPS<a class="headerlink" href="#apps" title="Permalink to this headline">¶</a></h1>
++<p>The following parameters are used for ownCloud apps.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="10%" />
++<col width="23%" />
++<col width="67%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Apps Paths</strong></td>
++<td><p class="first">“apps_paths” => array(</p>
++<p>0 => array(</p>
++<p>‘path’=> ‘/var/www/owncloud/apps’,</p>
++<p>‘url’ => ‘/apps’,</p>
++<p>‘writable’ => true,</p>
++<p>),</p>
++<p>1 => array (</p>
++<p>‘path’ =>
++‘/var/www/owncloud/apps2’,</p>
++<p>‘url’ => ‘/apps2’,</p>
++<p>Writable => false,</p>
++<p>),</p>
++<p class="last">),</p>
++</td>
++<td>Use this parameter to set the location of the apps folder which should be scanned for available apps and/or where user specific apps should be installed.
++The 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.</td>
++</tr>
++<tr class="row-odd"><td><strong>App Store Enabled</strong></td>
++<td>“appstoreenabled” => true,</td>
++<td>When enabled, admins may install apps from the ownCloud app store.</td>
++</tr>
++<tr class="row-even"><td><strong>App Store URL</strong></td>
++<td>“appstoreurl” => “<a class="reference external" href="http://api.apps.owncloud.com/v1">http://api.apps.owncloud.com/v1</a>”,</td>
++<td>The URL of the appstore.</td>
++</tr>
++<tr class="row-odd"><td><strong>App Code Checker</strong></td>
++<td>“appcodechecker” => “”,</td>
++<td>Checks for malicious code fragments of 3
++rd
++party apps.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Code_Locations.html
index 0c88c56,0000000..774d4bf
mode 100644,000000..100644
--- a/core/doc/admin/config/Code_Locations.html
+++ b/core/doc/admin/config/Code_Locations.html
@@@ -1,172 -1,0 +1,191 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Code Locations — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="code-locations">
++<h1>Code Locations<a class="headerlink" href="#code-locations" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud has the ability to find parts of its code in non-standard locations.
++This section describes how to configure ownCloud for that functionality.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="7%" />
++<col width="34%" />
++<col width="59%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Theme</strong></td>
++<td>“theme” => “”,</td>
++<td>If the instance of ownCloud is themed, the name of the theme should be configured here.
++For more information on this parameter, see the document on Theming.</td>
++</tr>
++<tr class="row-odd"><td><strong>3</strong>
++rd
++** Party Root**</td>
++<td>“3rdpartyroot” => “”,</td>
++<td>ownCloud uses some 3
++rd
++party PHP components to provide certain functionality.
++These components are shipped as part of the software package and reside in
++~/owncloud/3rdparty.
++However, if this folder resides elsewhere, the location can be configured here.
++For example /srv/http/path/to/3rdparty.</td>
++</tr>
++<tr class="row-even"><td><strong>3</strong>
++rd
++** Party URL**</td>
++<td>“3rdpartyurl” => “”,</td>
++<td>In the event that the 3rdpartyroot is configured, this parameter should be configured as well to show the http web path to the 3rdpartyroot starting at the owncloud web root.
++For instance /path/to/3rdparty.</td>
++</tr>
++<tr class="row-odd"><td><strong>Custome Client</strong></td>
++<td><p class="first">‘customclient_desktop’ => ‘’, //<a class="reference external" href="http://owncloud.org/sync-clients/">http://owncloud.org/sync-clients/</a></p>
++<p>‘customclient_android’ => ‘’, //<a class="reference external" href="https://play.google.com/store/apps/details?id=com.owncloud.android">https://play.google.com/store/apps/details?id=com.owncloud.android</a></p>
++<p class="last">‘customclient_ios’ => ‘’, //<a class="reference external" href="https://itunes.apple.com/us/app/owncloud/id543672169?mt=8">https://itunes.apple.com/us/app/owncloud/id543672169?mt=8</a></p>
++</td>
++<td>The location where ownCloud will bring the user to download clients.
++The link is in the first run wizard or the Personal page.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Default_Parameters.html
index 0000000,0000000..5ead79f
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/config/Default_Parameters.html
@@@ -1,0 -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>Default Parameters — 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" />
++<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>
++<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="default-parameters">
++<h1>Default Parameters<a class="headerlink" href="#default-parameters" title="Permalink to this headline">¶</a></h1>
++<p>The following parameters are automatically configured by ownCloud upon the initial admin login.
++These parameters are mandatory for the ownCloud instance to operate properly.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="9%" />
++<col width="12%" />
++<col width="79%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Debug</strong></td>
++<td>define(“DEBUG”, true);</td>
++<td>When set to true, additional information is written to the logs.
++This is to be used only for local development and not in a production environment.</td>
++</tr>
++<tr class="row-odd"><td><strong>Installed</strong></td>
++<td>“installed” => false,</td>
++<td>This flag indicates whether the ownCloud instance was installed successfully.
++When set to true, the install was successful.
++When set to false the instance is not properly installed.</td>
++</tr>
++<tr class="row-even"><td><strong>DB Type</strong></td>
++<td>“dbtype” => “sqlite”,</td>
++<td>The dbtype indicates what type of database is being used with this install.</td>
++</tr>
++<tr class="row-odd"><td><strong>DB Name</strong></td>
++<td>“dbname” => “owncloud”,</td>
++<td>The ownCloud database within the SQL instance.
++ownCloud database configuration guides use “owncloud” in the instructions, it is the default for this field.
++This may be set to any valid table name.
++If the table doesn’t exist, the setup will attempt to create it, provided it has proper permissions.</td>
++</tr>
++<tr class="row-even"><td><strong>DB User</strong></td>
++<td>“dbuser” => “”,</td>
++<td>This is the user that ownCloud uses to write to the databse.
++This must be unique across ownCloud instances using the same SQL database.
++The user will be created when the install wizard is complete.
++Since the database user in the initial login screen has admin privileges (root), ownCloud creates a new user to ensure ownCloud does not run with unnecessary database permissions.
++ownCloud prefixes “<a href="#id1"><span class="problematic" id="id2">oc_</span></a>” to the userid to prevent a collision between the ownCloud admin user and any existing database users.
++This is generated at the time of the initial login and is the Admin User as entered by the ownCloud admin.</td>
++</tr>
++<tr class="row-odd"><td><strong>DB Password</strong></td>
++<td>“dbpassword” => “”,</td>
++<td>When a new database user is created for ownCloud, a password for the database is generated by hashing the admin user password.
++This hash is stored in this parameter.</td>
++</tr>
++<tr class="row-even"><td><strong>DB Host</strong></td>
++<td>“dbhost” => “”,</td>
++<td>This parameter shows the location of the database.
++Can be an IP pointing to the database server, a Fully Qualified Domain Name (FQDN) or localhost.</td>
++</tr>
++<tr class="row-odd"><td><strong>DB Table Prefix</strong></td>
++<td>“dbtableprefix” => “<a href="#id3"><span class="problematic" id="id4">oc_</span></a>”,</td>
++<td>All tables in the database will begin with this prefix.
++By default the prefix is “<a href="#id5"><span class="problematic" id="id6">oc_</span></a>”.
++If this prefix is changed in the config file, the tables in the database will need to be manually renamed.
++ownCloud will not detect a change to this option so changing this prefix without manually renaming the tables will break the instance of ownCloud.</td>
++</tr>
++<tr class="row-even"><td><strong>Password Salt</strong></td>
++<td>“passwordsalt” => “”,</td>
++<td>This is the salt used to hash passwords within the ownCloud instance.
++It is important not to remove or lose this password.
++If lost, all passwords within the ownCloud instance will be lost.</td>
++</tr>
++<tr class="row-odd"><td><strong>Data Directory</strong></td>
++<td>“datadirectory” => “”,</td>
++<td>This parameter tells ownCloud where the default data directory is located.
++It is configured in the installation wizard.
++If using SQLITE, the database is stored in this data directory as well.</td>
++</tr>
++</tbody>
++</table>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/config/Deleted_Items.html
index 0c88c56,0000000..29e7470
mode 100644,000000..100644
--- a/core/doc/admin/config/Deleted_Items.html
+++ b/core/doc/admin/config/Deleted_Items.html
@@@ -1,172 -1,0 +1,167 @@@
 +
 +<!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>
++    <title>Deleted Items — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="deleted-items">
++<h1>Deleted Items<a class="headerlink" href="#deleted-items" title="Permalink to this headline">¶</a></h1>
++<p>These parameters are related to the deleted files app.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="15%" />
++<col width="23%" />
++<col width="62%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Trash Bin Rentention</strong></td>
++<td>‘trashbin_retention_obligation’ => 30,</td>
++<td>When the delete app is enabled (default), this is the amount of days a file will be kept in the trash bin.
++Default is 30 days.</td>
++</tr>
++<tr class="row-odd"><td><strong>Trash Bin Auto Expire</strong></td>
++<td>‘trashbin_auto_expire’ => true,</td>
++<td> </td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Introduction.html
index 0c88c56,0000000..3f5ba82
mode 100644,000000..100644
--- a/core/doc/admin/config/Introduction.html
+++ b/core/doc/admin/config/Introduction.html
@@@ -1,172 -1,0 +1,149 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud uses a configuration file to set certain parameters.
++The configuration file is entitled config.php and resides in the ~/owncloud/config directory.
++Also residing in that directory is a sample configuration file entitled config.sample.php.
++This file lists all the configurable parameters within ownCloud along with a brief description.
++This document will provide more details as to what each parameter is used for.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Logging.html
index 0c88c56,0000000..15bb312
mode 100644,000000..100644
--- a/core/doc/admin/config/Logging.html
+++ b/core/doc/admin/config/Logging.html
@@@ -1,172 -1,0 +1,207 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Logging — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="logging">
++<h1>Logging<a class="headerlink" href="#logging" title="Permalink to this headline">¶</a></h1>
++<p>This section describes parameters associated with ownCloud’s logging abilities.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="10%" />
++<col width="25%" />
++<col width="65%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Log Type</strong></td>
++<td>“log_type” => “owncloud”,</td>
++<td>By default the ownCloud logs are sent to the owncloud.log file within the default data directory.
++If syslogging is desired, set this parameter to syslog.</td>
++</tr>
++<tr class="row-odd"><td><strong>Log File</strong></td>
++<td>“logfile” => “”,</td>
++<td>The log file, by default, is owncloud.log and stored in the default data directory.
++Use this parameter to change the name to something other than owncloud.log.</td>
++</tr>
++<tr class="row-even"><td><strong>Log Level</strong></td>
++<td>“loglevel” => “”,</td>
++<td>ownCloud has several levels of logging.
++This may be set on the Admin page of the webUI or directly in the configuration file using this parameter.
++Valid values are: 0=Debug, 1=Info, 2=Warning, 3=Error.
++The default value is Warning</td>
++</tr>
++<tr class="row-odd"><td><strong>Log Date Format</strong></td>
++<td>‘logdateformat’ => ‘F d, Y H:i:s’,</td>
++<td>ownCloud allows the admin to specify the format of the time and date within the log file.
++Valid values may be found at the following website:
++<a class="reference external" href="http://www.php.net/manual/en/function.date.php">http://www.php.net/manual/en/function.date.php</a>
++.</td>
++</tr>
++<tr class="row-even"><td><strong>Log Time Zone</strong></td>
++<td>‘logtimezone’ => ‘Europe/Berlin’,</td>
++<td>By default, the time zone displayed in the ownCloud logs is UTC.
++To change the displayed time zone to the local time zone, use this parameter.
++For a list of valid values, see the following website:
++<a class="reference external" href="http://php.net/manual/en/timezones.php">http://php.net/manual/en/timezones.php</a>
++.</td>
++</tr>
++<tr class="row-odd"><td><strong>Log Query</strong></td>
++<td>“log_query” => false,</td>
++<td>When set to “true”, all SQL queries performed by ownCloud will be written to the log file.
++Default is false.
++It is not recommended to run with this enabled as it will fill up the log file.
++Use only for debugging purposes.</td>
++</tr>
++<tr class="row-even"><td><strong>Log Auth Fail IP</strong></td>
++<td>“log_authfailip” => false,</td>
++<td>When set to true, the IP addresses of failed login attempts will be logged.</td>
++</tr>
++<tr class="row-odd"><td><strong>Log Rotate Size</strong></td>
++<td>‘log_rotate_size’ => false, // 104857600, // 100 MiB</td>
++<td>Since ownCloud log files can get large in size, this parameter may be used to rotate to a new log file once it reaches the specified size.
++This should be configured in bytes.
++Default is false, or 0, which will not rotate the file.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Mail_Parameters.html
index 0c88c56,0000000..258b712
mode 100644,000000..100644
--- a/core/doc/admin/config/Mail_Parameters.html
+++ b/core/doc/admin/config/Mail_Parameters.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Mail Parameters — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="mail-parameters">
++<h1>Mail Parameters<a class="headerlink" href="#mail-parameters" title="Permalink to this headline">¶</a></h1>
++<p>These parameters are related to ownCloud’s ability to send emails for lost passwords or file shares.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Maintenance.html
index 0c88c56,0000000..c5f57ee
mode 100644,000000..100644
--- a/core/doc/admin/config/Maintenance.html
+++ b/core/doc/admin/config/Maintenance.html
@@@ -1,172 -1,0 +1,169 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Maintenance — ownCloud Administrators Manual 6.0 documentation</title>
 +    
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
 +    
 +    <script type="text/javascript">
 +      var DOCUMENTATION_OPTIONS = {
 +        URL_ROOT:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <script type="text/javascript" src="../_static/underscore.js"></script>
 +    <script type="text/javascript" src="../_static/doctools.js"></script>
 +    <script type="text/javascript" src="../_static/bootstrap.js"></script>
 +    <link rel="top" title="ownCloud Administrators Manual 6.0 documentation" href="../index.html" />
-     <link rel="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="maintenance">
++<h1>Maintenance<a class="headerlink" href="#maintenance" title="Permalink to this headline">¶</a></h1>
++<p>This section discusses the different stages of maintenance.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="12%" />
++<col width="18%" />
++<col width="70%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Single User</strong></td>
++<td>‘singleuser’ => false,</td>
++<td>When set to true, the ownCloud instance will be unavailable for all users not in the admin group.
++This is useful when performing maintenance.</td>
++</tr>
++<tr class="row-odd"><td><strong>Maintenance</strong></td>
++<td>“maintenance” => false,</td>
++<td>Enable maintenance mode to disable ownCloud.
++When performing upgrades, ownCloud automatically enters maintenance mode.
++When enabled, users who are already logged-in are kicked out of ownCloud instantly.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Miscellaneous.html
index 0c88c56,0000000..712fadf
mode 100644,000000..100644
--- a/core/doc/admin/config/Miscellaneous.html
+++ b/core/doc/admin/config/Miscellaneous.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Miscellaneous — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="miscellaneous">
++<h1>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this headline">¶</a></h1>
++<p>The remaining parameters are listed below.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Previews.html
index 0c88c56,0000000..377aedb
mode 100644,000000..100644
--- a/core/doc/admin/config/Previews.html
+++ b/core/doc/admin/config/Previews.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Previews — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="previews">
++<h1>Previews<a class="headerlink" href="#previews" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud allows for thumbnail previews of files.
++This section contains the different configuration parameters available for that functionality.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="18%" />
++<col width="36%" />
++<col width="46%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Enable Previews</strong></td>
++<td>‘enable_previews’ => true,</td>
++<td>When enabled, default, the user will have file thumbnails visible.
++Disable to remove thumbnails.</td>
++</tr>
++<tr class="row-odd"><td><strong>Preview Width</strong></td>
++<td>‘preview_max_x’ => null,</td>
++<td>Maximum width of the thumbnail.
++Default is null meaning no limit.</td>
++</tr>
++<tr class="row-even"><td><strong>Preview Height</strong></td>
++<td>‘preview_max_y’ => null,</td>
++<td>The maximum height of the thumbnail.
++Default is set to null meaning no limit.</td>
++</tr>
++<tr class="row-odd"><td><strong>Scale Factor</strong></td>
++<td>‘preview_max_scale_factor’ => 10,</td>
++<td>Scale the thumbnail by this factor.
++Default is 10.</td>
++</tr>
++<tr class="row-even"><td><strong>Libreoffice Path</strong></td>
++<td>‘preview_libreoffice_path’ => ‘/usr/bin/libreoffice’,</td>
++<td>ownCloud uses Libre Office for previews.
++This parameter indicates the location of the Libre Office executable.</td>
++</tr>
++<tr class="row-odd"><td><strong>Libreoffice Parameters</strong></td>
++<td>‘preview_office_cl_parameters’ => ‘’,</td>
++<td>Use this if Libre Office requires additional arguments</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Reverse_Proxy_Configurations.html
index 0c88c56,0000000..99cde15
mode 100644,000000..100644
--- a/core/doc/admin/config/Reverse_Proxy_Configurations.html
+++ b/core/doc/admin/config/Reverse_Proxy_Configurations.html
@@@ -1,172 -1,0 +1,199 @@@
 +
 +<!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>
++    <title>Reverse Proxy Configurations — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="reverse-proxy-configurations">
++<h1>Reverse Proxy Configurations<a class="headerlink" href="#reverse-proxy-configurations" title="Permalink to this headline">¶</a></h1>
++<p>The following parameters are used in the instance that Proxies are being used within the network.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="9%" />
++<col width="14%" />
++<col width="78%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Overwrite Host</strong></td>
++<td>“overwritehost” => “”,</td>
++<td><p class="first">By default, ownCloud attempts to detect what outside host can access the instance (www.example.com
++) for generating URLs.
++However, due to some reverse proxies, the automatically detected value may be incorrect (www.example.com:88) which would lead to incorrect URLs being generated.
++Use this field to enter the proper URL.</p>
++<p>If set as follows: “overwritehost” => “<a class="reference external" href="http://www.example.com:88">http://www.example.com:88</a>”,</p>
++<p class="last">When logging into ownCloud, the browser will point to port 88.</p>
++</td>
++</tr>
++<tr class="row-odd"><td><strong>Overwrite Protocol</strong></td>
++<td>“overwriteprotocol” => “”,</td>
++<td><p class="first">When generating URLs, ownCloud attempts to detect whether the server is accessed via https or http.
++However, if ownCloud is behind a proxy and the proxy handles the https calls, thereby leaving ownCloud running without SSL, ownCloud would not realize that ssl is in use which would result in incorrect URLs being generated.
++Valid values are “http” and “https”.</p>
++<p>If set as follows:</p>
++<p>“overwriteprotocol” => “https”,</p>
++<p class="last">ownCloud will generate all URLs as HTTPS rather than HTTP.</p>
++</td>
++</tr>
++<tr class="row-even"><td><strong>Overwrite Web Root</strong></td>
++<td>“overwritewebroot” => “”,</td>
++<td>As with the host and protocol, ownCloud attempts to detect the webroot for generating URLs automatically.
++The webroot is the path used to access ownCloud relative to the domain, for instance, if
++<a class="reference external" href="http://www.example.com/owncloud">www.example.com/owncloud</a>
++is the URL pointing to the ownCloud instance, the webroot would be /owncloud.
++When proxies are in use, it may be difficult for ownCloud to detect this parameter resulting in invalid URLs.</td>
++</tr>
++<tr class="row-odd"><td><strong>Overwrite Cond Addr</strong></td>
++<td>“overwritecondaddr” => “”,</td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><strong>Proxy</strong></td>
++<td>“proxy” => “”,</td>
++<td>In the instance where a proxy is required to access the internet, the proxy should be configured in this parameter.
++ownCloud requires access to the internet for several functions, and thus needs to have the proxy information configured to access the internet.</td>
++</tr>
++<tr class="row-odd"><td><strong>Proxy User Password</strong></td>
++<td>“proxyuserpwd” => “username:password”,</td>
++<td>In the event that a proxy is configured and requires authentication, the username and password would be configured in this parameter.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Session_Info.html
index 0c88c56,0000000..ebc1c03
mode 100644,000000..100644
--- a/core/doc/admin/config/Session_Info.html
+++ b/core/doc/admin/config/Session_Info.html
@@@ -1,172 -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>
++    <title>Session Info — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="session-info">
++<h1>Session Info<a class="headerlink" href="#session-info" title="Permalink to this headline">¶</a></h1>
++<p>The following parameters are related to sessions within ownCloud.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="13%" />
++<col width="22%" />
++<col width="65%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Remember Cookie Lifetime</strong></td>
++<td>“remember_login_cookie_lifetime” => 60*60*24*15,</td>
++<td>ownCloud provides the user the option of remembering their login credentials (this option appears as the “remember” checkbox on the login screen).
++This parameter allows the admin to configure the length of time which ownCloud will remember that user.
++Default is 15 days.
++The configuration is in seconds.</td>
++</tr>
++<tr class="row-odd"><td><strong>Session Lifetime</strong></td>
++<td>“session_lifetime” => 60 * 60 * 24,</td>
++<td>ownCloud will automatically logout a user after a period of inactivity.
++The default is 1 day.
++This parameter can be used to modify that time.
++Configuration is in seconds.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Table_of_Contents.html
index 0c88c56,0000000..aeffb7d
mode 100644,000000..100644
--- a/core/doc/admin/config/Table_of_Contents.html
+++ b/core/doc/admin/config/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc377032819>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/User_Experience.html
index 0c88c56,0000000..cb51a19
mode 100644,000000..100644
--- a/core/doc/admin/config/User_Experience.html
+++ b/core/doc/admin/config/User_Experience.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>User Experience — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="user-experience">
++<h1>User Experience<a class="headerlink" href="#user-experience" title="Permalink to this headline">¶</a></h1>
++<p>The following parameters are those that influence the end user’s experience.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="14%" />
++<col width="23%" />
++<col width="63%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Default Language</strong></td>
++<td>“default_language” => “en”,</td>
++<td>This is the default language for the ownCloud WebUI. When configured, the default language will be the same for all users.
++Users may then configure their own language preference in their Personal page.
++When not configured, the default language is determined form the headers sent by the web browser.
++For instance, if the browser is in Spanish, ownCloud will be presented in Spanish</td>
++</tr>
++<tr class="row-odd"><td><strong>Default App</strong></td>
++<td>“defaultapp” => “files”,</td>
++<td>By default, when a user logs into ownCloud, they are brought to the files page.
++If, for instance, the admin desires a different page to be loaded upon login, configure that app here.
++Valid values are app id’s (for example news, files, gallery).</td>
++</tr>
++<tr class="row-even"><td><strong>Knowledge Base Enabled</strong></td>
++<td>“knowledgebaseenabled” => true,</td>
++<td>When enabled, default, the help menu brings up the user documentation.</td>
++</tr>
++<tr class="row-odd"><td><strong>Enable Avatars</strong></td>
++<td>‘enable_avatars’ => true,</td>
++<td>Allows for the ability to use avatars.</td>
++</tr>
++<tr class="row-even"><td><strong>Display Name</strong></td>
++<td>‘allow_user_to_change_display_name’ => true,</td>
++<td>Users can modify their display name in the Personal page.
++If this parameter is set to false, they may not change their display
++name.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/Verification.html
index 0c88c56,0000000..c34bafc
mode 100644,000000..100644
--- a/core/doc/admin/config/Verification.html
+++ b/core/doc/admin/config/Verification.html
@@@ -1,172 -1,0 +1,180 @@@
 +
 +<!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>
++    <title>Verification — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="verification">
++<h1>Verification<a class="headerlink" href="#verification" title="Permalink to this headline">¶</a></h1>
++<p>This section describes different verification checks that ownCloud may perform.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="16%" />
++<col width="21%" />
++<col width="63%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Parameter</strong></td>
++<td><strong>Format</strong></td>
++<td><strong>Description</strong></td>
++</tr>
++<tr class="row-even"><td><strong>Update Checker</strong></td>
++<td>“updatechecker” => true,</td>
++<td>Provides information as to whether there is a new release of ownCloud available.
++When enabled, default, a banner will appear on the admin’s web interface when a newer version of ownCloud exists.</td>
++</tr>
++<tr class="row-odd"><td><strong>Has Internet Connection</strong></td>
++<td>“has_internet_connection” => true,</td>
++<td>Alerts ownCloud if there is an internet connection (true – default).
++If set to false, ownCloud will not be able to look for updates, display the knowledgebase, or bring up the appstore.</td>
++</tr>
++<tr class="row-even"><td><strong>Working WebDAV</strong></td>
++<td>“check_for_working_webdav” => true,</td>
++<td>Allows ownCloud to verify a working WebDAV connection.
++This is done by attempting to make a WebDAV request from PHP.</td>
++</tr>
++<tr class="row-odd"><td><strong>Working .htaccess</strong></td>
++<td>“check_for_working_htaccess” => true,</td>
++<td>Verifies whether the .htaccess file may be modified by ownCloud.
++If set to false, this check will not be performed.
++If the file cannot be modified, items such as large file uploads cannot be performed.
++This check only affects Apache servers.</td>
++</tr>
++</tbody>
++</table>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/config/index.html
index 0c88c56,0000000..fd4bd63
mode 100644,000000..100644
--- a/core/doc/admin/config/index.html
+++ b/core/doc/admin/config/index.html
@@@ -1,172 -1,0 +1,161 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud config.php</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Default_Parameters.html">Default Parameters</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Reverse_Proxy_Configurations.html">Reverse Proxy Configurations</a></li>
++<li class="toctree-l1"><a class="reference internal" href="User_Experience.html">User Experience</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Mail_Parameters.html">Mail Parameters</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Deleted_Items.html">Deleted Items</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Verification.html">Verification</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Logging.html">Logging</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Session_Info.html">Session Info</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Code_Locations.html">Code Locations</a></li>
++<li class="toctree-l1"><a class="reference internal" href="APPS.html">APPS</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Previews.html">Previews</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Maintenance.html">Maintenance</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Miscellaneous.html">Miscellaneous</a></li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/auth_ldap.html
index 014a98a,0000000..39aaa1b
mode 100644,000000..100644
--- a/core/doc/admin/configuration/auth_ldap.html
+++ b/core/doc/admin/configuration/auth_ldap.html
@@@ -1,775 -1,0 +1,783 @@@
 +
 +<!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="User Management" href="configuration_users.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">User Authentication with LDAP</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#configuration">Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#advanced-settings">Advanced Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#expert-settings">Expert Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#testing-the-configuration">Testing the configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#owncloud-avatar-integration">ownCloud Avatar integration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#troubleshooting-tips-and-tricks">Troubleshooting, Tips and Tricks</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#ssl-certificate-verification-ldaps-tls">SSL Certificate Verification (LDAPS, TLS)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#microsoft-active-directory">Microsoft Active Directory</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#duplicating-server-configurations">Duplicating Server Configurations</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#owncloud-ldap-internals">ownCloud LDAP Internals</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#groups">Groups</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_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="user-authentication-with-ldap">
 +<h1>User Authentication with LDAP<a class="headerlink" href="#user-authentication-with-ldap" title="Permalink to this headline">¶</a></h1>
 +<p>ownCloud ships an LDAP backend, which allows full use of ownCloud for user
 +logging in with LDAP credentials including:</p>
 +<ul class="simple">
 +<li>LDAP group support</li>
 +<li>File sharing with users and groups</li>
 +<li>Access via WebDAV and of course ownCloud Desktop Client</li>
 +<li>Versioning, external Storages and all other ownCloud goodies</li>
 +</ul>
 +<p>To connect to an LDAP server the configuration needs to be set up properly.
 +Once the LDAP backend is activated (Apps Sidebar→Apps, choose <strong>LDAP user and
 +group backend</strong>, click on <strong>Enable</strong>) the configuration can be found on
 +Settings→Admin. Read on for a detailed description of the configuration fields.</p>
 +<div class="section" id="configuration">
 +<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
 +<p>The LDAP backend follows a wizard-like approach, splitted into four tabs. A
 +correctly completed first tab (“Server”) is mandatory to access the other tabs.
 +Also, the other tabs need to be reviewed by the admin, however the necessary
 +settings are detected automatically. An indicator will show whether the
 +configuration is incomplete, incorrect or OK.</p>
 +<p>The settings are changed automatically, as soon as a input element looses the
 +focus, i.e. the cursor is taken away by clicking somewhere else or pressing the
 +tabulator key.</p>
 +<p>The other tabs can be navigated by clicking the tabs or by using the <em>Continue</em>
 +and <em>Back</em> buttons. They are located on the lower right, next to the status
 +indicator.</p>
 +<div class="section" id="server">
 +<h3>Server<a class="headerlink" href="#server" title="Permalink to this headline">¶</a></h3>
 +<p>The server tab contains the basic information on the LDAP server. They make sure
 +that ownCloud will be able to connect to LDAP and be able to read data from
 +there. The admin at least needs to provide a hostname. If anonymous access is
 +not possible he will need to provide an account DN and a password, too. ownCloud
 +attempts to auto-detect the port and the base DN.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-1-server.png" src="../_images/ldap-wizard-1-server.png" />
 +</div>
 +<dl class="docutils">
 +<dt>Server configuration:</dt>
 +<dd>ownCloud can be configured to connect to multiple LDAP servers. Using this
 +control you can pick a configuration you want to edit or add a new one. The
 +button <strong>Delete Configuration</strong> deletes the current configuration.</dd>
 +<dt>Host:</dt>
 +<dd><p class="first">The host name of the LDAP server. It can also be a <strong>ldaps://</strong> URI, for
 +instance.</p>
 +<p>It is also possible to pass a port number, which speeds up port detection. It
 +is especially useful, if a custom port is used. ownCloud will move the value
 +to the port field subsequently.</p>
 +<p>Examples:</p>
 +<ul class="last simple">
 +<li><em>directory.my-company.com</em></li>
 +<li><em>ldaps://directory.my-company.com</em></li>
 +<li><em>directory.my-company.com:9876</em></li>
 +</ul>
 +</dd>
 +<dt>Port:</dt>
 +<dd><p class="first">The port on which to connect to the LDAP server. The field is disabled in the
 +beginning of a new configuration. The port will be detected automatically,
 +if the LDAP server is running on a standard port. After ownCloud attempted to
 +determine the port, the field will be enabled for user input. A successfully
 +found port will be inserted by ownCloud, of course.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>389</em></li>
 +</ul>
 +</dd>
 +<dt>User DN:</dt>
 +<dd><p class="first">The name as DN of a user who is able to do searches in the LDAP
 +directory. Leave it empty for anonymous access. It is recommended to have a
 +special system user for ownCloud.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>uid=owncloudsystemuser,cn=sysusers,dc=my-company,dc=com</em></li>
 +</ul>
 +</dd>
 +<dt>Password:</dt>
 +<dd>The password for the user given above. Empty for anonymous access.</dd>
 +<dt>Base DN:</dt>
 +<dd><p class="first">The base DN of LDAP, from where all users and groups can be reached. Separated
 +Base DNs for users and groups can be set in the Advanced tab. Nevertheless,
 +this field is mandatory. ownCloud attempts to determine the Base DN according
 +to the provided User DN or the provided Host.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>dc=my-company,dc=com</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="user-filter">
 +<h3>User Filter<a class="headerlink" href="#user-filter" title="Permalink to this headline">¶</a></h3>
 +<p>The settings in the user filter tab determine which LDAP users will appear and
 +are allowed to log in into ownCloud. It is also possible to enter a raw LDAP
 +filter.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-2-user.png" src="../_images/ldap-wizard-2-user.png" />
 +</div>
 +<dl class="docutils">
 +<dt>only those object classes:</dt>
 +<dd>ownCloud will determine the object classes that are typically availalble for
 +(ideally only) user objects in your LDAP. ownCloud will automatically select
 +the object class that returns the highest amount of users. You can select
 +multiple object classes.</dd>
 +<dt>only from those groups:</dt>
 +<dd><p class="first">If your LDAP server supports the member-of-overlay in LDAP filters, you can
 +define that only users from one or more certain groups are allowed to
 +appear and log in into ownCloud. By default, no value will be selected. You
 +can select multiple groups.</p>
 +<p class="last">If your LDAP server does not support the member-of-overlay in LDAP filters,
 +the input field is disabled. Please contact your LDAP administrator.</p>
 +</dd>
 +<dt>Edit raw filter instead:</dt>
 +<dd><p class="first">Clicking on this text will toggle the filter mode. Instead of the assisted
 +approach, you can enter the raw LDAP filter directly in the appearing field.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>objectClass=inetOrgPerson</em></li>
 +</ul>
 +</dd>
 +<dt>x users found:</dt>
 +<dd>This is an indicator that tells you approximately how many users will be
 +allowed to access ownCloud. The number will update after any change you do.</dd>
 +</dl>
 +</div>
 +<div class="section" id="login-filter">
 +<h3>Login Filter<a class="headerlink" href="#login-filter" title="Permalink to this headline">¶</a></h3>
 +<p>The settings in the login filter tab determine which user detail will be
 +compared to the login value entered by the user. It is possible to allow
 +multiple user details. It is also possible to enter a raw LDAP filter.</p>
 +<p>The user limitation as set up in the previous tab is in effect, unless you
 +manually configure the filter in raw mode.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-3-login.png" src="../_images/ldap-wizard-3-login.png" />
 +</div>
 +<dl class="docutils">
 +<dt>LDAP Username:</dt>
 +<dd>If this value is checked, the login value will be compared to the username in
 +the LDAP directory. The corresponding attribute, usually <em>uid</em> or
 +<em>samaccountname</em> will be detected automatically by ownCloud.</dd>
 +<dt>LDAP Email Address:</dt>
 +<dd>If this value is checked, the login value will be compared to an email address
 +in the LDAP directory. The email address will be looked for in the
 +<em>mailPrimaryAddress</em> and <em>mail</em> attributes.</dd>
 +<dt>Other Attributes:</dt>
 +<dd>This multiselect box allows you to select other attributes for the comparison.
 +The list is generated automatically based on the attributes that a user object
 +contains in your LDAP server.</dd>
 +<dt>Edit raw filter instead:</dt>
 +<dd><p class="first">Clicking on this text will toggle the filter mode. Instead of the assisted
 +approach, you can enter the raw LDAP filter directly in the appearing field.</p>
 +<p>The <strong>%uid</strong> placeholder will be replaced with the login name entered by the user
 +upon login. When you enter the filter manually.</p>
 +<p>Examples:</p>
 +<ul class="last simple">
 +<li>only username: <em>uid=%uid</em></li>
 +<li>username or email address: <em>(|(uid=%uid)(mail=$uid))</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="group-filter">
 +<h3>Group Filter<a class="headerlink" href="#group-filter" title="Permalink to this headline">¶</a></h3>
 +<p>The settings in the group filter tab determine which groups will be availalble
 +in ownCloud. It does not have any restrictions on logins, this has been dealed
 +with in the prior tabs.  It is also possible to enter a raw LDAP
 +filter.</p>
 +<p>By default, no groups will be availalble in ownCloud. You actively need to
 +enable groups.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-wizard-4-group.png" src="../_images/ldap-wizard-4-group.png" />
 +</div>
 +<dl class="docutils">
 +<dt>only those object classes:</dt>
 +<dd>ownCloud will determine the object classes that are typically availalble for
 +(ideally only) group objects in your LDAP. ownCloud will only list object
 +classes that return at least one group object. You can select multiple
 +object classes. A typical object class is “group”, or “posixGroup”.</dd>
 +<dt>only from those groups:</dt>
 +<dd>This setting lets you pick certain groups that shall be availalble in
 +ownCloud. This field follows a whitelist approach. ownCloud will generate a
 +list of available groups found in your LDAP server. You can select multiple
 +groups.</dd>
 +<dt>Edit raw filter instead:</dt>
 +<dd><p class="first">Clicking on this text will toggle the filter mode. Instead of the assisted
 +approach, you can enter the raw LDAP filter directly in the appearing field.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>objectClass=group</em></li>
 +<li><em>objectClass=posixGroup</em></li>
 +</ul>
 +</dd>
 +<dt>y groups found:</dt>
 +<dd>This is an indicator that tells you approximately how many groups will be
 +available in  ownCloud. The number will update after any change you do.</dd>
 +</dl>
 +</div>
 +</div>
 +<div class="section" id="advanced-settings">
 +<h2>Advanced Settings<a class="headerlink" href="#advanced-settings" title="Permalink to this headline">¶</a></h2>
 +<p>In the LDAP Advanced settings section you can define options, that are less
 +common to set. They are not needed for a working connection. It can also have a
 +positive effect on the performance to specify distinguished bases for user and
 +group searches.</p>
 +<p>The Advanced Settings are structured into three parts:</p>
 +<ul class="simple">
 +<li>Connection Settings</li>
 +<li>Directory Settings</li>
 +<li>Special Attributes</li>
 +</ul>
 +<div class="section" id="connection-settings">
 +<h3>Connection Settings<a class="headerlink" href="#connection-settings" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
 +<img alt="../_images/ldap-advanced-1-connection.png" src="../_images/ldap-advanced-1-connection.png" />
 +<p class="caption">LDAP Advanced Settings, section Connection Settings</p>
 +</div>
 +<dl class="docutils">
 +<dt>Configuration Active:</dt>
 +<dd><p class="first">Enables or Disables the current configuration. Disabled configuration will not
 +connect to the LDAP server.</p>
 +<p class="last">By default, it is turned off. It will be automatically turned on, when using
 +the wizard and the configuration is OK and a test connection successful.</p>
 +</dd>
 +<dt>Backup (Replica) Host:</dt>
 +<dd><p class="first">A backup server can be defined here. ownCloud tries to connect to the backup
 +server automatically, when the main host (as specified in basic settings)
 +cannot be reached. It is import that the backup server is a replica of the
 +main server, because the object UUIDs must match.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>directory2.my-company.com</em></li>
 +</ul>
 +</dd>
 +<dt>Backup (Replica) Port:</dt>
 +<dd><p class="first">The port on which to connect to the backup LDAP server. If no port is given,
 +but a host, then the main port (as specified above) will be used.</p>
 +<p>Example:</p>
 +<ul class="last simple">
 +<li><em>389</em></li>
 +</ul>
 +</dd>
 +<dt>Disable Main Server:</dt>
 +<dd>You can manually override the main server and make ownCloud only connect to
 +the backup server. It may be handy for planned downtimes.</dd>
 +<dt>Case insensitive LDAP server (Windows):</dt>
 +<dd>Whether the LDAP server is running on a Windows Host. Usually, it is not
 +necessary to check it, however.</dd>
 +<dt>Turn off SSL certificate validation:</dt>
 +<dd>Turns of check of valid SSL certificates. Use it – if needed –
 +for testing, only!</dd>
 +<dt>Cache Time-To-Live:</dt>
 +<dd><p class="first">A cache is introduced to avoid unnecessary LDAP traffic,
 +for example lookups check whether the users exists on every page request or
 +WebDAV interaction. It is also supposed to speed up the Admin → User page or
 +list of users to share with, once it is populated. Saving the configuration
 +empties the cache (changes are not necessary). The time is given in seconds.</p>
 +<p>Note that almost every PHP request would require to build up a new connection
 +to the LDAP server. If you require a most up-to-dateness it is recommended not
 +to totally switch off the cache, but define a minimum life time of 15s.</p>
 +<p>Examples:</p>
 +<ul class="last simple">
 +<li>ten minutes: <em>600</em></li>
 +<li>one hour: <em>3600</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="directory-settings">
 +<h3>Directory Settings<a class="headerlink" href="#directory-settings" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
 +<img alt="../_images/ldap-advanced-2-directory.png" src="../_images/ldap-advanced-2-directory.png" />
 +<p class="caption">LDAP Advanced Settings, section Directory Settings</p>
 +</div>
 +<dl class="docutils">
 +<dt>User Display Name Field:</dt>
 +<dd><p class="first">The attribute that should be used as display name in ownCloud.</p>
 +<ul class="last simple">
 +<li>Example: <em>displayName</em></li>
 +</ul>
 +</dd>
 +<dt>Base User Tree:</dt>
 +<dd><p class="first">The base DN of LDAP, from where all users can be reached. It needs to be given
 +completely despite to the Base DN from the Basic settings. You can specify
 +multiple base trees, one in each line.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>cn=programmers,dc=my-company,dc=com</em></div>
 +<div class="line"><em>cn=designers,dc=my-company,dc=com</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>User Search Attributes:</dt>
 +<dd><p class="first">These attributes are used when a search for users is done. This happens, for
 +instance, in the share dialogue. By default the user display name attribute as
 +specified above is being used. Multiple attributes can be given, one in each
 +line.</p>
 +<p>Beware that if an attribute is not available on a user object, the user will
 +neither be listed (e.g. in the share dialogue) nor be able to login. This also
 +affects the display name attribute as specified above. If you override the
 +default, the display name attribute will not be taken into account, unless you
 +specify it as well.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>displayName</em></div>
 +<div class="line"><em>mail</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>Group Display Name Field:</dt>
 +<dd><p class="first">The attribute that should be used as ownCloud group name. ownCloud allows a
 +limited set of characters (a-zA-Z0-9.-_@), every other character will be
 +replaced in ownCloud. Once a group name is assigned, it will not be changed,
 +i.e. changing this value will only have effect to new LDAP groups.</p>
 +<ul class="last simple">
 +<li>Example: <em>cn</em></li>
 +</ul>
 +</dd>
 +<dt>Base Group Tree:</dt>
 +<dd><p class="first">The base DN of LDAP, from where all groups can be reached.
 +It needs to be given completely despite to the Base DN from the Basic
 +settings. You can specify multiple base trees, one in each line.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>cn=barcelona,dc=my-company,dc=com</em></div>
 +<div class="line"><em>cn=madrid,dc=my-company,dc=com</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>Group Search Attributes:</dt>
 +<dd><p class="first">These attributes are used when a search for groups is done. This happens, for
 +instance, in the share dialogue. By default the group display name attribute
 +as specified above is being used. Multiple attributes can be given, one in
 +each line.</p>
 +<p>If you override the default, the group display name attribute will not be
 +taken into account, unless you specify it as well.</p>
 +<ul class="last">
 +<li><p class="first">Example:</p>
 +<div class="line-block">
 +<div class="line"><em>cn</em></div>
 +<div class="line"><em>description</em></div>
 +</div>
 +</li>
 +</ul>
 +</dd>
 +<dt>Group Member association:</dt>
 +<dd><p class="first">The attribute that is used to indicate group memberships, i.e. the attribute
 +used by LDAP groups to refer to their users.</p>
 +<p>ownCloud detects the value automatically, you should only change it, if you
 +have a very valid reason and know what you are doing.</p>
 +<ul class="last simple">
 +<li>Example: <em>uniquemember</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="special-attributes">
 +<h3>Special Attributes<a class="headerlink" href="#special-attributes" title="Permalink to this headline">¶</a></h3>
 +<div class="figure">
 +<img alt="../_images/ldap-advanced-3-attributes.png" src="../_images/ldap-advanced-3-attributes.png" />
 +<p class="caption">LDAP Advanced Settings, section Special Attributes</p>
 +</div>
 +<dl class="docutils">
 +<dt>Quota Field:</dt>
 +<dd><p class="first">ownCloud can read an LDAP attribute and set the user quota according to its
 +value. Specify the attribute here, otherwise keep it empty. The attribute
 +shall return human readable values, e.g. “2 GB”.</p>
 +<ul class="last simple">
 +<li>Example: <em>ownCloudQuota</em></li>
 +</ul>
 +</dd>
 +<dt>Quota Default:</dt>
 +<dd><p class="first">Override ownCloud default quota for LDAP users who do not
 +have a quota set in the attribute given above.</p>
 +<ul class="last simple">
 +<li>Example: <em>15 GB</em></li>
 +</ul>
 +</dd>
 +<dt>Email Field:</dt>
 +<dd><p class="first">ownCloud can read an LDAP attribute and set the user email
 +there from. Specify the attribute here, otherwise keep it empty.</p>
 +<p>Although the wizard offers you to check login by email, the correct email
 +attribute is not detected and you need to specify it manually.</p>
 +<ul class="last simple">
 +<li>Example: <em>mail</em></li>
 +</ul>
 +</dd>
 +<dt>User Home Folder Naming Rule:</dt>
 +<dd><p class="first">By default, the ownCloud creates the user
 +directory, where all files and meta data are kept, according to the ownCloud
 +user name. You may want to override this setting and name it after an
 +attribute value. The attribute given can also return an absolute path, e.g.
 +<tt class="docutils literal"><span class="pre">/mnt/storage43/alice</span></tt>. Leave it empty for default behavior.</p>
 +<ul class="last simple">
 +<li>Example: <em>cn</em></li>
 +</ul>
 +</dd>
 +</dl>
 +</div>
 +</div>
 +<div class="section" id="expert-settings">
 +<h2>Expert Settings<a class="headerlink" href="#expert-settings" title="Permalink to this headline">¶</a></h2>
 +<div class="figure">
 +<img alt="../_images/ldap-expert.png" src="../_images/ldap-expert.png" />
 +</div>
 +<p>In the Expert Settings fundamental behavior can be adjusted to your needs. The
 +configuration should be done before starting production use or when testing the
 +installation.</p>
 +<dl class="docutils">
 +<dt>Internal Username:</dt>
 +<dd><p class="first">The internal username is the identifier in ownCloud for LDAP users. By default
 +it will be created from the UUID attribute. By using the UUID attribute it is
 +made sure that the username is unique and characters do not need to be
 +converted. The internal username has the restriction that only these
 +characters are allowed: [a-zA-Z0-9_.@-]. Other characters are replaced with
 +their ASCII correspondence or are simply omitted.</p>
 +<p>The LDAP backend ensures that there are no duplicate internal usernames in
 +ownCloud, i.e. that it is checking all other activated user backends
 +(including local ownCloud users). On collisions a random number (between 1000
 +and 9999) will be attached to the retrieved value. For example, if “alice”
 +exists, the next username may be “alice_1337”.</p>
 +<p>The internal username is also the default name for the user home folder in
 +ownCloud. It is also a part of remote URLs, for instance for all *DAV services.
 +With this setting the default behaviour can be overridden.</p>
 +<p>Leave it empty for default behaviour. Changes will have effect only on newly
 +mapped (added) LDAP users.</p>
 +<ul class="last simple">
 +<li>Example: <em>uid</em></li>
 +</ul>
 +</dd>
 +<dt>Override UUID detection</dt>
 +<dd><p class="first">By default, ownCloud auto-detects the UUID attribute. The UUID attribute is
 +used to doubtlessly identify LDAP users and groups. Also, the internal
 +username will be created based on the UUID, if not specified otherwise above.</p>
 +<p>You can override the setting and pass an attribute of your choice. You must
 +make sure that the attribute of your choice can be fetched for both users and
 +groups and it is unique. Leave it empty for default behaviour. Changes will
 +have effect only on newly mapped (added) LDAP users and groups. It also will
 +have effect when a user’s or group’s DN changes and an old UUID was cached: It
 +will result in a new user. Because of this, the setting should be applied
 +before putting ownCloud in production use and cleaning the bindings
 +(see below).</p>
 +<ul class="last simple">
 +<li>Example: <em>cn</em></li>
 +</ul>
 +</dd>
 +<dt>Username-LDAP User Mapping</dt>
 +<dd><p class="first">ownCloud uses the usernames as key to store and assign data. In order to
 +precisely identify and recognize users, each LDAP user will have a internal
 +username in ownCloud. This requires a mapping from ownCloud username to LDAP
 +user. The created username is mapped to the UUID of the LDAP user.
 +Additionally the DN is cached as well to reduce LDAP interaction, but it is
 +not used for identification. If the DN changes, the change will be detected by
 +ownCloud by checking the UUID value.</p>
 +<p>The same is valid for groups.</p>
 +<p>The internal ownCloud name is used all over in ownCloud. Clearing the Mappings
 +will have leftovers everywhere. Do never clear the mappings
 +in a production environment. Only clear mappings in a testing or experimental
 +stage.</p>
 +<p class="last"><strong>Clearing the Mappings is not configuration sensitive, it affects all LDAP
 +configurations!</strong></p>
 +</dd>
 +</dl>
 +</div>
 +<div class="section" id="testing-the-configuration">
 +<h2>Testing the configuration<a class="headerlink" href="#testing-the-configuration" title="Permalink to this headline">¶</a></h2>
 +<p>In this version we introduced the <strong>Test Configuration</strong> button on the bottom
 +of the LDAP settings section. It will always check the values as currently
 +given in the input fields. You do not need to save before testing. By clicking
 +on the button, ownCloud will try to bind to the ownCloud server with the
 +settings currently given in the input fields. The response will look like this:</p>
 +<div class="figure">
 +<img alt="../_images/ldap-settings-invalid-oc45.png" src="../_images/ldap-settings-invalid-oc45.png" />
 +<p class="caption">Failure</p>
 +</div>
 +<p>In case the configuration fails, you can see details in ownCloud’s log, which
 +is in the data directory and called <strong>owncloud.log</strong> or on the bottom the
 +<strong>Settings →  Admin page</strong>. Unfortunately it requires a reload – sorry for the
 +inconvenience.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-settings-valid-oc45.png" src="../_images/ldap-settings-valid-oc45.png" />
 +<p class="caption">Success</p>
 +</div>
 +<p>In this case, Save the settings. You can check if the users and groups are
 +fetched correctly on the Settings → Users page.</p>
 +</div>
 +<div class="section" id="owncloud-avatar-integration">
 +<h2>ownCloud Avatar integration<a class="headerlink" href="#owncloud-avatar-integration" title="Permalink to this headline">¶</a></h2>
 +<p>ownCloud 6 incorporates a user profile picture feature, called Avatar. If a user
 +has a photo stored in the <em>jpegPhoto</em> attribute, it will be used as Avatar. The
 +user then is not able to change his avatar in the personal settings. It must be
 +done within LDAP.</p>
 +<div class="figure">
 +<img alt="../_images/ldap-fetched-avatar.png" src="../_images/ldap-fetched-avatar.png" />
 +<p class="caption">Profile picture fetched from LDAP, Personal Settings</p>
 +</div>
 +<p>If the <em>jpegPhoto</em> attribute is not set or empty, the default ownCloud behaviour
 +is active, i.e. the user will be able to set and change his profile picture in
 +the personal settings. If the user sets a profile picture within ownCloud it
 +will _not_ be stored in LDAP.</p>
 +<p>The <em>jpegPhoto</em> attribute will be fetched once a day to make sure the current
 +photo from LDAP is used in ownCloud. If a picture is added later, a possibly set
 +profile picture will be overridden with the LDAP one. If a photo stored in the
 +<em>jpegPhoto</em> attribute is deleted later, the last profile picture in ownCloud
 +will still be used.</p>
 +<p>The photo taken from LDAP will be adjusted to the requirements of the ownCloud
 +avatar automatically. I.e. it will be transformed into a square. If the photo
 +needs to be cut, it will be done equally from both affected sides. The original
 +photo stored in LDAP will stay the same, of course.</p>
 +</div>
 +<div class="section" id="troubleshooting-tips-and-tricks">
 +<h2>Troubleshooting, Tips and Tricks<a class="headerlink" href="#troubleshooting-tips-and-tricks" title="Permalink to this headline">¶</a></h2>
 +</div>
 +<div class="section" id="ssl-certificate-verification-ldaps-tls">
 +<h2>SSL Certificate Verification (LDAPS, TLS)<a class="headerlink" href="#ssl-certificate-verification-ldaps-tls" title="Permalink to this headline">¶</a></h2>
 +<p>A common mistake with SSL certificates is that they may not be known to PHP.
 +If you have trouble with certificate validation make sure that</p>
 +<ul class="simple">
 +<li>you have the certificate of the server installed on the ownCloud server</li>
 +<li>the certificate is announced in the system’s LDAP configuration file (usually
 +<em>/etc/ldap/ldap.conf</em> on Linux, <em>C:\openldap\sysconf\ldap.conf</em> or
 +<em>C:\ldap.conf</em> on Windows) using a <strong>TLS_CACERT /path/to/cert</strong> line.</li>
 +<li>Using LDAPS, also make sure that the port is correctly configured (by default
 +686)</li>
 +</ul>
 +</div>
 +<div class="section" id="microsoft-active-directory">
 +<h2>Microsoft Active Directory<a class="headerlink" href="#microsoft-active-directory" title="Permalink to this headline">¶</a></h2>
 +<p>Compared to earlier ownCloud versions, no further tweaks need to be done to
 +make ownCloud work with Active Directory. ownCloud will automatically find the
 +correct configuration in the wizard-like set up process.</p>
 +</div>
 +<div class="section" id="duplicating-server-configurations">
 +<h2>Duplicating Server Configurations<a class="headerlink" href="#duplicating-server-configurations" title="Permalink to this headline">¶</a></h2>
 +<p>In case you have a working configuration and want to create a similar one or
 +“snapshot” configurations before modifying them you can do the following:</p>
 +<ol class="arabic simple">
 +<li>Go to the <strong>Server</strong> tab</li>
 +<li>On <strong>Server Configuration</strong> choose <em>Add Server Configuration</em></li>
 +<li>Answer the question <em>Take over settings from recent server configuration?</em>
 +with <em>yes</em>.</li>
 +<li>(optional) Switch to <strong>Advanced</strong> tab and uncheck <strong>Configuration Active</strong>
 +in the <em>Connection Settings</em>, so the new configuration is not used on Save</li>
 +<li>Click on <strong>Save</strong></li>
 +</ol>
 +<p>Now you can modify the configuration and enable it if you wish.</p>
 +</div>
 +<div class="section" id="owncloud-ldap-internals">
 +<h2>ownCloud LDAP Internals<a class="headerlink" href="#owncloud-ldap-internals" title="Permalink to this headline">¶</a></h2>
 +<p>Some parts of how the LDAP backend works are described here. May it be helpful.</p>
 +</div>
++<div class="section" id="groups">
++<h2>Groups<a class="headerlink" href="#groups" title="Permalink to this headline">¶</a></h2>
++<p>At the moment, only secondary groups are read. That means that only the groups
++are retrieved, which are returned by the attribute auto-detected (or manually
++chosen) in Group-Member association. Primary groups are not being taken into
++account.</p>
++</div>
 +<div class="section" id="user-and-group-mapping">
 +<h2>User and Group Mapping<a class="headerlink" href="#user-and-group-mapping" title="Permalink to this headline">¶</a></h2>
 +<p>In ownCloud the user or group name is used to have all relevant information in
 +the database assigned. To work reliably a permanent internal user name and
 +group name is created and mapped to the LDAP DN and UUID. If the DN changes in
 +LDAP it will be detected, there will be no conflicts.</p>
 +<p>Those mappings are done in the database table ldap_user_mapping and
 +ldap_group_mapping. The user name is also used for the user’s folder (except
 +something else is specified in <em>User Home Folder Naming Rule</em>), which
 +contains files and meta data.</p>
 +<p>As of ownCloud 5 internal user name and a visible display name are separated.
 +This is not the case for group names, yet, i.e. group cannot be altered.</p>
 +<p>That means that your LDAP configuration should be good and ready before putting
 +it into production. The mapping tables are filled early, but as long as you are
 +testing, you can empty the tables any time. Do not do this in production. If you
 +want to rename a group, be very careful. Do not rename the user’s internal name.</p>
 +</div>
 +<div class="section" id="caching">
 +<h2>Caching<a class="headerlink" href="#caching" title="Permalink to this headline">¶</a></h2>
 +<p>For performance reasons a cache has been introduced to ownCloud. He we store
 +all users and groups, group memberships or internal userExists-requests. Since
 +ownCloud is written in PHP and each and every page request (also done by Ajax)
 +loads ownCloud and would execute one or more LDAP queries again, you do want to
 +have some of those queries cached and save those requests and traffic. It is
 +highly recommended to have the cache filled for a small amount of time, which
 +comes also very handy when using the sync client, as it is yet another request
 +for PHP.</p>
 +</div>
 +<div class="section" id="handling-with-backup-server">
 +<h2>Handling with Backup Server<a class="headerlink" href="#handling-with-backup-server" title="Permalink to this headline">¶</a></h2>
 +<p>When ownCloud is not able to contact the main server, he will be treated as
 +offline and no connection attempts will be done for the time specified in
 +<strong>Cache Time-To-Live</strong>. If a backup server is configured, it will be connected
 +instead. If you plan a maintained downtime, check <strong>Disable Main Server</strong> for
 +the time being to avoid unnecessary connection attempts every now and then.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/configuration/background_jobs.html
index 7b131d0,0000000..08be0e4
mode 100644,000000..100644
--- a/core/doc/admin/configuration/background_jobs.html
+++ b/core/doc/admin/configuration/background_jobs.html
@@@ -1,227 -1,0 +1,227 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Background Jobs — ownCloud Administrators Manual 6.0 documentation</title>
 +    
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
 +    
 +    <script type="text/javascript">
 +      var DOCUMENTATION_OPTIONS = {
 +        URL_ROOT:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <script type="text/javascript" src="../_static/underscore.js"></script>
 +    <script type="text/javascript" src="../_static/doctools.js"></script>
 +    <script type="text/javascript" src="../_static/bootstrap.js"></script>
 +    <link rel="top" title="ownCloud Administrators Manual 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Configuration" href="index.html" />
 +    <link rel="next" title="3rd-Party Configuration" href="configuration_3rdparty.html" />
 +    <link rel="prev" title="User Authentication with LDAP" href="auth_ldap.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuration</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="configuration_apps.html">Apps Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_users.html">User Management</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="auth_ldap.html">User Authentication with LDAP</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Background Jobs</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#cron-jobs">Cron-Jobs</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_3rdparty.html">3rd-Party Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_automation.html">Automatic Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_custom_clients.html">Custom Client Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_database.html">Database Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_encryption.html">Use Server-Side Encryption</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_knowledgebase.html">Knowledge Base Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_language.html">Language Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_logging.html">Logging Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_mail.html">Mail Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_maintenance.html">Maintenance Mode Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_preview.html">Preview Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration_reverseproxy.html">Reverse Proxy Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html">Uploading big files > 512MB (as set by default)</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="configuring_big_file_upload.html#enabling-uploading-big-files">Enabling uploading big files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config_gui.html">Custom Mount Configuration Web-GUI</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_mount_config.html">Custom Mount Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="custom_user_backend.html">Custom User Backend Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="xsendfile.html">Serving static files via web server</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="background-jobs">
 +<h1>Background Jobs<a class="headerlink" href="#background-jobs" title="Permalink to this headline">¶</a></h1>
 +<p>A system like ownCloud sometimes requires tasks to be done on a regular
 +base without blocking the user interface. For that purpose you, as a system
 +administrator, can define background jobs which make it possible to execute
 +tasks without any need of user interaction, e.g. database clean-ups etc.
 +For the sake of completeness it is worth to know that additionally background
 +jobs can also be defined by installed apps.</p>
 +<div class="section" id="parameters">
 +<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
 +<p>In the admin settings menu you can configure how cron-jobs should be executed.
 +You can choose between the following options:</p>
 +<ul class="simple">
 +<li>AJAX</li>
 +<li>Webcron</li>
 +<li>Cron</li>
 +</ul>
 +</div>
 +<div class="section" id="cron-jobs">
 +<h2>Cron-Jobs<a class="headerlink" href="#cron-jobs" title="Permalink to this headline">¶</a></h2>
 +<p>OwnCloud requires various automated background jobs to be run. There are three methods to achieve this.
 +The default way is AJAX and the recommended way is cron.</p>
 +<div class="section" id="ajax">
 +<h3>AJAX<a class="headerlink" href="#ajax" title="Permalink to this headline">¶</a></h3>
 +<p>This option is the default option, although it is the least reliable. Every
 +time a user visits the ownCloud page a single background job will be executed.
 +The advantage of this mechanism is, that is does not require access to the
 +system nor registration at a third party service.
 +The disadvantage of this solution compared to the Webcron service is, that it
 +requires regular visits of the page to get triggered.</p>
 +</div>
 +<div class="section" id="webcron">
 +<h3>Webcron<a class="headerlink" href="#webcron" title="Permalink to this headline">¶</a></h3>
 +<p>By registering your ownCloud <tt class="docutils literal"><span class="pre">cron.php</span></tt> script address at an external webcron
 +service, like e.g. <a class="reference external" href="http://www.easycron.com/">easyCron</a>, you ensure that background jobs will be executed
 +regularly. To use such a service your server need to be reachable via the Internet.</p>
 +<p><strong>Example</strong></p>
 +<div class="highlight-python"><pre>URL to call: http[s]://<domain-of-your-server>/owncloud/cron.php</pre>
 +</div>
 +</div>
 +<div class="section" id="cron">
 +<h3>Cron<a class="headerlink" href="#cron" title="Permalink to this headline">¶</a></h3>
 +<p>Using the systems cron feature is the preferred way to run regular tasks,
 +because it allows to execute jobs without the limitations which a web server
 +may have.</p>
 +<p><strong>Example</strong></p>
- <p>To run a cron job on a <em>nix system, e.g. every 15min, under the default web server
- user, e.g. **www-data*</em>, you need to set-up the following cron job to call the
++<p>To run a cron job on a *nix system, e.g. every 15min, under the default web server
++user, e.g. <strong>www-data</strong>, you need to set-up the following cron job to call the
 +<strong>cron.php</strong> script. Please check the crontab man page for the exact command syntax.</p>
 +<div class="highlight-python"><pre># crontab -u www-data -e
 +*/15  *  *  *  * php -f /var/www/owncloud/cron.php</pre>
 +</div>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/contents.html
index d85659f,0000000..fe6be93
mode 100644,000000..100644
--- a/core/doc/admin/contents.html
+++ b/core/doc/admin/contents.html
@@@ -1,335 -1,0 +1,336 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>ownCloud documentation contents — ownCloud Administrators Manual 6.0 documentation</title>
 +    
 +    <link rel="stylesheet" href="_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
 +    <link rel="stylesheet" href="_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
 +    
 +    <script type="text/javascript">
 +      var DOCUMENTATION_OPTIONS = {
 +        URL_ROOT:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <script type="text/javascript" src="_static/underscore.js"></script>
 +    <script type="text/javascript" src="_static/doctools.js"></script>
 +    <script type="text/javascript" src="_static/bootstrap.js"></script>
 +    <link rel="top" title="ownCloud Administrators Manual 6.0 documentation" href="index.html" />
 +    <link rel="next" title="Admin Documentation" href="index.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="#">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="#">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">Admin Documentation</a></li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="installation/index.html">Installation</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="owncloud-documentation-contents">
 +<span id="contents"></span><h1>ownCloud documentation contents<a class="headerlink" href="#owncloud-documentation-contents" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +</div>
 +<div class="toctree-wrapper compound">
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="installation/index.html">Installation</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_appliance.html">Appliances</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_appliance.html#software-appliances">Software Appliances</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_appliance.html#owncloud-on-hardware-appliances">ownCloud on Hardware Appliances</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_linux.html">Linux Distributions</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_linux.html#supported-distribution-packages">Supported Distribution Packages</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_macos.html">Mac OS X</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_windows.html">Windows 7 and Windows Server 2008</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#activate-iis-with-cgi-support">Activate IIS with CGI Support</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#installing-php">Installing PHP</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#installing-mysql">Installing MySQL</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#installing-owncloud">Installing ownCloud</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#ensure-proper-http-verb-handling">Ensure Proper HTTP-Verb handling</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_windows.html#configuring-owncloud-php-and-iis-for-large-file-uploads">Configuring ownCloud, PHP and IIS for Large File Uploads</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_ucs.html">Univention Corporate Server</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#pre-configuration">Pre configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#installation">Installation</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#postconfiguration-optional">Postconfiguration (optional)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_ucs.html#using-owncloud">Using ownCloud</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_source.html">Manual Installation</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#prerequisites">Prerequisites</a></li>
- <li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#extract-owncloud-and-copy-to-your-web-server">Extract ownCloud and Copy to Your Web Server</a></li>
++<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#download-extract-and-copy-owncloud-to-your-web-server">Download, extract and copy ownCloud to Your Web Server</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#set-the-directory-permissions">Set the Directory Permissions</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#web-server-configuration">Web Server Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="installation/installation_source.html#follow-the-install-wizard">Follow the Install Wizard</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_others.html">PageKite Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation/installation_others.html#open-wrt">Open Wrt</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="configuration/index.html">Configuration</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_apps.html">Apps Configuration</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_apps.html#parameters">Parameters</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/configuration_users.html">User Management</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_users.html#users">Users</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/configuration_users.html#user-groups">User Groups</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="configuration/auth_ldap.html">User Authentication with LDAP</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#configuration">Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#advanced-settings">Advanced Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#expert-settings">Expert Settings</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#testing-the-configuration">Testing the configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#owncloud-avatar-integration">ownCloud Avatar integration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#troubleshooting-tips-and-tricks">Troubleshooting, Tips and Tricks</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#ssl-certificate-verification-ldaps-tls">SSL Certificate Verification (LDAPS, TLS)</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#microsoft-active-directory">Microsoft Active Directory</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#duplicating-server-configurations">Duplicating Server Configurations</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#owncloud-ldap-internals">ownCloud LDAP Internals</a></li>
++<li class="toctree-l3"><a class="reference internal" href="configuration/auth_ldap.html#groups">Groups</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_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/cron/Introduction.html
index 0c88c56,0000000..6f938d5
mode 100644,000000..100644
--- a/core/doc/admin/cron/Introduction.html
+++ b/core/doc/admin/cron/Introduction.html
@@@ -1,172 -1,0 +1,146 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud is written in PHP, and because PHP is a request driven language – in other words it runs only when a client takes an action and calls php, and then it executes and ends – it does not have a built in CRON process. Instead, ownCloud provides Cron.php, which is called by the server’s CRON daemon. Cron.php is an ownCloud internal process that runs various background jobs on demand.
++It is called by the server cron, and can be set by the administrator. ownCloud plug-in applications register actions with cron.php automatically to take care of typical housekeeping operations, such as garbage collecting of temporary files or checking for newly updated files using filescan() for externally mounted file systems.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/cron/Usage.html
index 0c88c56,0000000..5e597dc
mode 100644,000000..100644
--- a/core/doc/admin/cron/Usage.html
+++ b/core/doc/admin/cron/Usage.html
@@@ -1,172 -1,0 +1,154 @@@
 +
 +<!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>
++    <title>Usage — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="usage">
++<h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h1>
++<p>The interval at which this script is executed, and thus the ownCloud registered actions, can depend on the size of the installation and the load of the system.
++Recommended intervals are 15 or 30 minutes.</p>
++<p>Cron.php needs to be called by the system’s cron daemon and run as the same user the web server runs as.</p>
++<p>As an example, on an ordinary Linux distribution, place the following in the webserver’s user’s crontab:</p>
++<p>*/15
++*
++*
++*
++* /usr/bin/php -f /srv/http/owncloud/cron.php /dev/null 2>&1</p>
++<p>This will run cron.php every 15 minutes and suppress any warnings or output which may be generated.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/cron/index.html
index 0c88c56,0000000..be33609
mode 100644,000000..100644
--- a/core/doc/admin/cron/index.html
+++ b/core/doc/admin/cron/index.html
@@@ -1,172 -1,0 +1,148 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud cron.php</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Usage.html">Usage</a></li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/dependencies/Configuration.html
index 0c88c56,0000000..d235b04
mode 100644,000000..100644
--- a/core/doc/admin/dependencies/Configuration.html
+++ b/core/doc/admin/dependencies/Configuration.html
@@@ -1,172 -1,0 +1,147 @@@
 +
 +<!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>
++    <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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<p>By default, the ownCloud Dependencies App is disabled.
++To enable, navigate to the Apps page and select “ownCloud dependencies info” and enable.</p>
++<p><img alt="10000000000001C9000000AF9C1CE57F_png" src="../_images/10000000000001C9000000AF9C1CE57F.png" style="width: 4.7602in; height: 1.8228in;" /></p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/dependencies/Introduction.html
index 0c88c56,0000000..580a6b8
mode 100644,000000..100644
--- a/core/doc/admin/dependencies/Introduction.html
+++ b/core/doc/admin/dependencies/Introduction.html
@@@ -1,172 -1,0 +1,146 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>The ownCloud Dependencies App provides a list of modules required to run the current setup of ownCloud.
++All of the modules listed should be installed on the base operating system prior to using ownCloud.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/dependencies/Table_of_Contents.html
index 0c88c56,0000000..c3e7e60
mode 100644,000000..100644
--- a/core/doc/admin/dependencies/Table_of_Contents.html
+++ b/core/doc/admin/dependencies/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc374602312>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/dependencies/Utilization.html
index 0c88c56,0000000..47e5bc5
mode 100644,000000..100644
--- a/core/doc/admin/dependencies/Utilization.html
+++ b/core/doc/admin/dependencies/Utilization.html
@@@ -1,172 -1,0 +1,150 @@@
 +
 +<!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>
++    <title>Utilization — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="utilization">
++<h1>Utilization<a class="headerlink" href="#utilization" title="Permalink to this headline">¶</a></h1>
++<p>Once this app is enabled, navigate to the Admin page and scroll to “Dependencies status”.
++This section will show a list of all modules required to execute this ownCloud setup as well as what part of ownCloud uses the given module.</p>
++<p><img alt="100000000000013C0000017D4FC6CEF5_png" src="../_images/100000000000013C0000017D4FC6CEF5.png" style="width: 3.2917in; height: 3.9689in;" /></p>
++<p>Modules in green are required and have been installed.
++Modules in red are required yet have not been installed.
++It is recommended to install these modules prior to using ownCloud.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/dependencies/index.html
index 0c88c56,0000000..86fe62e
mode 100644,000000..100644
--- a/core/doc/admin/dependencies/index.html
+++ b/core/doc/admin/dependencies/index.html
@@@ -1,172 -1,0 +1,150 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Dependencies</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Utilization.html">Utilization</a></li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/encryption/Configuration.html
index 0c88c56,0000000..51fdf04
mode 100644,000000..100644
--- a/core/doc/admin/encryption/Configuration.html
+++ b/core/doc/admin/encryption/Configuration.html
@@@ -1,172 -1,0 +1,180 @@@
 +
 +<!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>
++    <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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<p>To enable the encryption app, navigate to the Apps page and select Encryption, then enable.</p>
++<p><img alt="10000000000001A3000000AAFE82893A_png" src="../_images/10000000000001A3000000AAFE82893A.png" style="width: 4.3646in; height: 1.7701in;" /></p>
++<p>Once the app is enabled, the following message will appear for all users currently logged into the web browser as they navigate to a new page within the ownCloud web browser</p>
++<p><img alt="10000000000001BF00000012349EAE2F_png" src="../_images/10000000000001BF00000012349EAE2F.png" style="width: 4.6563in; height: 0.1874in;" /></p>
++<p>It is necessary to logout of ownCloud and re-login to initialize the encryption keys.</p>
++<div class="section" id="recovery-key">
++<h2>Recovery Key<a class="headerlink" href="#recovery-key" title="Permalink to this headline">¶</a></h2>
++<p>Enabling the recovery key globally is done by the admin.
++Each user then has the option as to whether they wish to do so for their own account.
++If enabled, the admin will be able to reset the user’s encryption password using a predefined recovery password.
++This allows for the recovery of a user’s files in the event of a password loss.
++If recovery key is not enabled, there is no way to restore files if the login password is lost.</p>
++<div class="section" id="admin-level">
++<h3>Admin level<a class="headerlink" href="#admin-level" title="Permalink to this headline">¶</a></h3>
++<p>To enable the recovery key, the Admin must first enable this feature in the Admin page.</p>
++<p><img alt="100000000000018E000000C4BA62B2A3_png" src="../_images/100000000000018E000000C4BA62B2A3.png" style="width: 4.1457in; height: 2.0417in;" /></p>
++<p>Once enabled, the Admin may change the recovery key password at any time.</p>
++<p><img alt="1000000000000193000001AE9AB8B0A2_png" src="../_images/1000000000000193000001AE9AB8B0A2.png" style="width: 4.198in; height: 4.4791in;" /></p>
++</div>
++<div class="section" id="user-level">
++<h3>User level<a class="headerlink" href="#user-level" title="Permalink to this headline">¶</a></h3>
++<p>The user can then navigate to the Personal page and enable password recovery.</p>
++<p><img alt="1000000000000227000000935D9B1EF6_png" src="../_images/1000000000000227000000935D9B1EF6.png" style="width: 5.7398in; height: 1.5311in;" /></p>
++</div>
++<div class="section" id="recovery">
++<h3>Recovery<a class="headerlink" href="#recovery" title="Permalink to this headline">¶</a></h3>
++<p>In order for the admin to recover the user’s files in the event of a lost password, the admin should navigate to the “Users” tab and enter the Recovery Key Password into the “Admin Recovery Password” field at the top of the page.</p>
++<p><img alt="10000000000003730000002B6865E951_png" src="../_images/10000000000003730000002B6865E951.png" style="width: 6.5in; height: 0.3165in;" /></p>
++<p>This will allow the admin to generate a new encryption password for the user.</p>
++<ul class="simple">
++<li>For local user management, this will generate both a new log-in password as well as a new encryption password for the data.</li>
++<li>If LDAP authentication is in use, the admin would need to set the new log-in password in the LDAP server, and then enter the same password in the user management page for the encryption key.
++It is important that both the password in the LDAP server and the password entered in the user management page are identical.</li>
++</ul>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/encryption/File_Systems.html
index 0c88c56,0000000..1493abd
mode 100644,000000..100644
--- a/core/doc/admin/encryption/File_Systems.html
+++ b/core/doc/admin/encryption/File_Systems.html
@@@ -1,172 -1,0 +1,160 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>File Systems — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="file-systems">
++<h1>File Systems<a class="headerlink" href="#file-systems" title="Permalink to this headline">¶</a></h1>
++<p>Once enabled, all files within ownCloud are encrypted, with the exceptions mentioned above.
++This includes files in local storage, as well as files contained within external storage mounts.</p>
++<p>The encryption app creates several key files/folders when enabled.
++~/data/public-keys contains the public keys for all users, and ~/data/owncloud_private_keys contains system wide private keys utilized for public link shares as well as the recovery key.</p>
++<p><img alt="10000000000002C700000048F3729BAA_png" src="../_images/10000000000002C700000048F3729BAA.png" style="width: 6.5in; height: 0.6583in;" /></p>
++<p>The encryption app stores key information in the ~/data/<user>/files_encryption directory.</p>
++<p><img alt="100000000000024400000027BEE1E4A9_png" src="../_images/100000000000024400000027BEE1E4A9.png" style="width: 6.0417in; height: 0.4063in;" /></p>
++<p>As mentioned previously, the private key is generated from the user’s password.</p>
++<p>Each file that the user owns will have a corresponding keyfile maintained in the keyfiles directory.</p>
++<p><img alt="100000000000026E0000003672ADCB6E_png" src="../_images/100000000000026E0000003672ADCB6E.png" style="width: 6.4791in; height: 0.5626in;" /></p>
++<p>In addition a share key will be generated for each file in the event that there is an external storage mount by the admin for multiple users or groups.</p>
++<p><img alt="100000000000029F000000B8A83D0275_png" src="../_images/100000000000029F000000B8A83D0275.png" style="width: 6.5in; height: 1.7819in;" /></p>
++<p>When viewing a file directly on the ownCloud data directory, it will show up as encrypted.</p>
++<p><img alt="10000000000002B30000003A5B960711_png" src="../_images/10000000000002B30000003A5B960711.png" style="width: 6.5in; height: 0.5457in;" /></p>
++<p>However, viewing the same file via the browser, the actual contents of the file are displayed.</p>
++<p><img alt="10000000000001A40000006C954442CE_png" src="../_images/10000000000001A40000006C954442CE.png" style="width: 4.3752in; height: 1.1252in;" /></p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/encryption/Introduction.html
index 0c88c56,0000000..269268d
mode 100644,000000..100644
--- a/core/doc/admin/encryption/Introduction.html
+++ b/core/doc/admin/encryption/Introduction.html
@@@ -1,172 -1,0 +1,169 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud contains an encryption app which, when enabled, encrypts all files stored in ownCloud.
++The encryption is done automatically once the admin enables the app.
++All encryption and decryption occur on the ownCloud server, which allows the user to continue to use other apps to view and edit the data.</p>
++<p>The user’s password is used as the key to decrypt their data.
++This means that if the user loses their login password, data will be lost.
++To protect against password loss, the recovery key may be used as described in a later section.</p>
++<div class="section" id="what-gets-encrypted">
++<h2>What gets encrypted?<a class="headerlink" href="#what-gets-encrypted" title="Permalink to this headline">¶</a></h2>
++<p>All files stored in ownCloud will be encrypted with the following exceptions:</p>
++<ul class="simple">
++<li>Old versions (versions created prior to enabling the encryption app)</li>
++<li>Old files in the trash bin (files deleted prior to enabling the encryption app)</li>
++<li>Existing files on external storage.
++Only new files placed on the external storage mount after encryption was enabled are encrypted.</li>
++<li>Image thumbnails from the gallery app</li>
++<li>Search index form the full text search app.</li>
++</ul>
 +</div>
++<div class="section" id="decrypting-the-data">
++<h2>Decrypting the data<a class="headerlink" href="#decrypting-the-data" title="Permalink to this headline">¶</a></h2>
++<p>If the encryption app is disable, users will get the following message alerting them how to decrypt their files.</p>
++<p><img alt="100000000000023B000000125381F51B_png" src="../_images/100000000000023B000000125381F51B.png" style="width: 5.948in; height: 0.1874in;" /></p>
++<p>Navigating to the Personal settings page, the user can enter their password and decrypt all files.</p>
++<p><img alt="100000000000018B000000A090F31164_png" src="../_images/100000000000018B000000A090F31164.png" style="width: 4.1146in; height: 1.6665in;" /></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/encryption/Table_of_Contents.html
index 0c88c56,0000000..f71de11
mode 100644,000000..100644
--- a/core/doc/admin/encryption/Table_of_Contents.html
+++ b/core/doc/admin/encryption/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc374961923>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/encryption/index.html
index 0c88c56,0000000..5811c85
mode 100644,000000..100644
--- a/core/doc/admin/encryption/index.html
+++ b/core/doc/admin/encryption/index.html
@@@ -1,172 -1,0 +1,157 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Enctryption</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Introduction.html#what-gets-encrypted">What gets encrypted?</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Introduction.html#decrypting-the-data">Decrypting the data</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#recovery-key">Recovery Key</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="File_Systems.html">File Systems</a></li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/external/Configuration.html
index 0000000,0000000..1236ca6
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/external/Configuration.html
@@@ -1,0 -1,0 +1,494 @@@
++
++<!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" />
++<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>
++<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="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="enable-the-app">
++<h2>Enable the app<a class="headerlink" href="#enable-the-app" title="Permalink to this headline">¶</a></h2>
++<p>From the
++APPs
++Page within ownCloud, select
++External Storage Support
++and enable.</p>
++<p><img alt="10000000000001980000009271BE0D26_png" src="../_images/10000000000001980000009271BE0D26.png" style="width: 4.25in; height: 1.5201in;" /></p>
++</div>
++<div class="section" id="configure-mounts">
++<h2>Configure mounts<a class="headerlink" href="#configure-mounts" title="Permalink to this headline">¶</a></h2>
++<p>As stated previously, the Admin has the ability to configure these mounts, as well as decide whether an end user can configure mounts for themselves.
++For the Admin, the configuration is performed in the
++ADMIN page.
++For end users, the configuration is performed in the PERSONAL Page.
++This document will discuss how the Admin configures the mounts, however, the configuration is the same for the end user.</p>
++<p>On the ADMIN page, scroll to External Storage:</p>
++<p><img alt="1000000000000631000000E19D116AA0_png" src="../_images/1000000000000631000000E19D116AA0.png" style="width: 6.5in; height: 0.9228in;" /></p>
++<div class="section" id="enable-users-to-mount-their-own-devices">
++<h3>Enable users to mount their own devices<a class="headerlink" href="#enable-users-to-mount-their-own-devices" title="Permalink to this headline">¶</a></h3>
++<p>In order to allow end users to mount their own devices, select the radio button next to
++Enable User External Storage
++.</p>
++</div>
++<div class="section" id="local-storage">
++<h3>Local Storage<a class="headerlink" href="#local-storage" title="Permalink to this headline">¶</a></h3>
++<p>This is used to mount storage that is outside ownCloud’s data directory</p>
++<p><img alt="10000000000006060000006A0106CA0C_png" src="../_images/10000000000006060000006A0106CA0C.png" style="width: 6.5in; height: 0.4465in;" /></p>
++<ul class="simple">
++<li>Location – The
++directory to mount</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p><img alt="10000000000003DF00000071A41D8A1F_png" src="../_images/10000000000003DF00000071A41D8A1F.png" style="width: 6.5in; height: 0.7409in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++<p><img alt="10000000000004770000008AAF3CFFDB_png" src="../_images/10000000000004770000008AAF3CFFDB.png" style="width: 6.5in; height: 0.7846in;" /></p>
++</div>
++<div class="section" id="amazon-s3">
++<h3>Amazon S3<a class="headerlink" href="#amazon-s3" title="Permalink to this headline">¶</a></h3>
++<p>This is used to mount to an S3 server</p>
++<p><img alt="100000000000061D0000007047877972_png" src="../_images/100000000000061D0000007047877972.png" style="width: 6.5in; height: 0.4654in;" /></p>
++<ul class="simple">
++<li>Access Key – The access key provided by the S3 storage provider</li>
++<li>Secret Key – The secret key provided by the S3 storage provider</li>
++<li>Bucket – The bucket created within the S3 storage server</li>
++<li>Hostname (optional) – The host of the s3 storage server</li>
++<li>Port (optional) – The port to communicate to the host on</li>
++<li>Region (optional) – The region where the storage exists</li>
++<li>Applicable – A list of users who can see this mount</li>
++</ul>
++<p><img alt="10000000000005BB0000007C1DF71FA7_png" src="../_images/10000000000005BB0000007C1DF71FA7.png" style="width: 6.5in; height: 0.5492in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++<p><img alt="100000000000063F00000090AAE1FA4A_png" src="../_images/100000000000063F00000090AAE1FA4A.png" style="width: 6.5in; height: 0.5846in;" /></p>
++</div>
++<div class="section" id="dropbox">
++<h3>Dropbox<a class="headerlink" href="#dropbox" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a dropbox in the Dropbox cloud into the virtual file system.</p>
++<div class="section" id="configure-dropbox">
++<h4>Configure DropBox<a class="headerlink" href="#configure-dropbox" title="Permalink to this headline">¶</a></h4>
++<p>Log onto the Dropbox Developers page:
++<a class="reference external" href="http://www.dropbox.com/developers">http://www.dropbox.com/developers</a>
++.</p>
++<p>Select App Console:</p>
++<p><img alt="10000000000000A800000073F49785A6_png" src="../_images/10000000000000A800000073F49785A6.png" style="width: 1.75in; height: 1.198in;" /></p>
++<p>This will ask you to accept terms and conditions.</p>
++<p>Select Dropbox API and configure down the page as follows:</p>
++<p><img alt="1000000000000372000002AF943ADDA0_png" src="../_images/1000000000000372000002AF943ADDA0.png" style="width: 6.5in; height: 5.0634in;" /></p>
++<p>The name can be any unique name desired.</p>
++<p>Select Create App</p>
++<p><img alt="10000000000000950000004412998BE7_png" src="../_images/10000000000000950000004412998BE7.png" style="width: 1.552in; height: 0.7083in;" /></p>
++<p>Enter the OAuth redirect URI as follows:</p>
++<p><a class="reference external" href="http:/">http:/</a>/<ownCloud instance>/index.php/settings/personal</p>
++<p><a class="reference external" href="http:/">http:/</a>/<ownCloud instance>/index.php/settings/admin</p>
++<p><img alt="10000000000003A6000002A9C7A660BE_png" src="../_images/10000000000003A6000002A9C7A660BE.png" style="width: 6.5in; height: 4.7398in;" /></p>
++<p>Take note of the App Key and App Secret and enter into ownCloud.</p>
++</div>
++<div class="section" id="owncloud-configuration">
++<h4>ownCloud Configuration<a class="headerlink" href="#owncloud-configuration" title="Permalink to this headline">¶</a></h4>
++<p><img alt="100000000000060300000065DF96536B_png" src="../_images/100000000000060300000065DF96536B.png" style="width: 6.5in; height: 0.4264in;" /></p>
++<ul class="simple">
++<li>App key – The app key to login to your Dropbox</li>
++<li>App secret – The app secret to login to your Dropbox</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p><img alt="10000000000005EC00000073E678DFEC_png" src="../_images/10000000000005EC00000073E678DFEC.png" style="width: 6.5in; height: 0.4929in;" /></p>
++<p>Select “Grant Access” and the following appears</p>
++<p><img alt="10000000000002950000021E245F6883_png" src="../_images/10000000000002950000021E245F6883.png" style="width: 6.5in; height: 5.3299in;" /></p>
++<p>Note if you are not logged into Dropbox, you will first be prompted to login.</p>
++<p>Select Allow.</p>
++<p><img alt="10000000000005E6000000676902E040_png" src="../_images/10000000000005E6000000676902E040.png" style="width: 6.5in; height: 0.4429in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++<p><img alt="100000000000061A0000006FC014C3A4_png" src="../_images/100000000000061A0000006FC014C3A4.png" style="width: 6.5in; height: 0.461in;" /></p>
++</div>
++</div>
++<div class="section" id="ftp">
++<h3>FTP<a class="headerlink" href="#ftp" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a folder on a remote FTP or FTPS server</p>
++<p><img alt="100000000000061E0000006BCF9ECC0B_png" src="../_images/100000000000061E0000006BCF9ECC0B.png" style="width: 6.5in; height: 0.4437in;" /></p>
++<ul class="simple">
++<li>URL – The hostname of the FTP/FTPS server</li>
++<li>Username – The username to login to the FTP/FTPS server</li>
++<li>Password – The password to login to the FTP/FTPS esrver</li>
++<li>Root – The folder inside the FTP/FTPS server to mount (optional – defaults to ‘/’)</li>
++<li>Secure ftps:// – Whether to use ftps:// to connect to the FTP server instead of ftp://</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p><img alt="10000000000005AF00000074604B1A67_png" src="../_images/10000000000005AF00000074604B1A67.png" style="width: 6.5in; height: 0.5181in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++<p><img alt="10000000000005D50000009458C5EE48_png" src="../_images/10000000000005D50000009458C5EE48.png" style="width: 6.5in; height: 0.6437in;" /></p>
++</div>
++<div class="section" id="googledrive">
++<h3>GoogleDrive<a class="headerlink" href="#googledrive" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a share in the Google cloud.</p>
++<div class="section" id="configure-googledrive">
++<h4>Configure GoogleDrive<a class="headerlink" href="#configure-googledrive" title="Permalink to this headline">¶</a></h4>
++<p>All applications that access a Google API must be registered through the “Google Cloud Console”.
++This can be accessed at the following URL:</p>
++<p><a class="reference external" href="https://cloud.google.com">https://cloud.google.com</a></p>
++<p>Once logged into Google, create a project by selecting
++Create Project</p>
++<p><img alt="1000000000000247000000A77440E4D3_png" src="../_images/1000000000000247000000A77440E4D3.png" style="width: 6.0728in; height: 1.7398in;" /></p>
++<p>Enter a
++Project name
++and either keep or enter a new
++Project ID</p>
++<p><img alt="100000000000027B0000011D10F70F88_png" src="../_images/100000000000027B0000011D10F70F88.png" style="width: 6.5in; height: 2.9173in;" /></p>
++<p>Select the project and choose the
++APIs & auth
++menu entry</p>
++<p><img alt="10000000000000B600000120706C3C75_png" src="../_images/10000000000000B600000120706C3C75.png" style="width: 1.8957in; height: 3in;" /></p>
++<p>Enable
++Drive API
++and
++Drive SDK
++and then select the
++<img alt="100000000000003800000018D49F1CE7_png" src="../_images/100000000000003800000018D49F1CE7.png" style="width: 0.5835in; height: 0.25in;" />
++next to either
++Drive API
++or
++Drive SDK</p>
++<p><img alt="10000000000004100000005657010336_png" src="../_images/10000000000004100000005657010336.png" style="width: 6.5in; height: 0.5374in;" /></p>
++<p>Select
++API Access
++on the menu</p>
++<p><img alt="10000000000000CD000000ECA8DE7780_png" src="../_images/10000000000000CD000000ECA8DE7780.png" style="width: 2.1346in; height: 2.4583in;" /></p>
++<p>Select
++REGISTER APP</p>
++<p><img alt="10000000000001FD000000DF8D2D7546_png" src="../_images/10000000000001FD000000DF8D2D7546.png" style="width: 5.302in; height: 2.3228in;" /></p>
++<p>Enter a name and select
++Web Application</p>
++<p><img alt="10000000000002840000016729388B7F_png" src="../_images/10000000000002840000016729388B7F.png" style="width: 6.5in; height: 3.6228in;" /></p>
++<p>Expand
++OAuth 2.0 Client ID</p>
++<p>Enter the following in the
++REDIRECT URI
++field</p>
++<p><a class="reference external" href="http:/">http:/</a>/<ownCloud instance>/index.php/settings/personal</p>
++<p><a class="reference external" href="http:/">http:/</a>/<ownCloud instance>/index.php/settings/admin</p>
++<p>Note: The
++<ownCloud instance>
++must be a Fully Qualified Domain Name.
++It cannot be an IP address</p>
++<p>Select
++Generate</p>
++<p><img alt="10000000000003B30000021B5EE5D338_png" src="../_images/10000000000003B30000021B5EE5D338.png" style="width: 6.5in; height: 3.6992in;" /></p>
++<p>Verify that the required email addresses are in the
++Permissions
++tab</p>
++<p><img alt="10000000000003A60000011E274A1A28_png" src="../_images/10000000000003A60000011E274A1A28.png" style="width: 6.5in; height: 1.9902in;" /></p>
++</div>
++<div class="section" id="configure-owncloud">
++<h4>Configure ownCloud<a class="headerlink" href="#configure-owncloud" title="Permalink to this headline">¶</a></h4>
++<p>Prior to configuring the mount, an E-mail address needs to be configured in the
++Personal
++tab</p>
++<p><img alt="10000000000001880000007EA4444400_png" src="../_images/10000000000001880000007EA4444400.png" style="width: 4.0835in; height: 1.3126in;" /></p>
++<p><img alt="10000000000006000000005EDA7B96BE_png" src="../_images/10000000000006000000005EDA7B96BE.png" style="width: 6.5in; height: 0.398in;" /></p>
++<ul class="simple">
++<li>Client ID – The client id to login to the Google Drive from
++OAuth 2.0 Client ID
++above</li>
++<li>Client secret – The client secret to login to the Google Drive from
++OAuth 2.0 Client ID
++above</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p>Once the required fields are filled in, a
++Grant access
++button appears.
++Select this button</p>
++<p><img alt="10000000000005F70000007E43DB8026_png" src="../_images/10000000000005F70000007E43DB8026.png" style="width: 6.5in; height: 0.5362in;" /></p>
++<p>The following screen appears.
++Select
++Accept</p>
++<p><img alt="10000000000001D30000014DC251C948_png" src="../_images/10000000000001D30000014DC251C948.png" style="width: 4.8646in; height: 3.4689in;" /></p>
++<p><img alt="10000000000004C0000000795BB2C146_png" src="../_images/10000000000004C0000000795BB2C146.png" style="width: 6.5in; height: 0.6465in;" /></p>
++<p><img alt="1000000000000552000000BF22E90239_png" src="../_images/1000000000000552000000BF22E90239.png" style="width: 6.5in; height: 0.911in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++</div>
++</div>
++<div class="section" id="openstack-object-storage">
++<h3>OpenStack Object Storage<a class="headerlink" href="#openstack-object-storage" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a container on an OpenStack Object Storage server.</p>
++<p><img alt="100000000000053A00000067708C8F53_png" src="../_images/100000000000053A00000067708C8F53.png" style="width: 6.5in; height: 0.5008in;" /></p>
++<p><img alt="10000000000002170000004A27056037_png" src="../_images/10000000000002170000004A27056037.png" style="width: 5.5728in; height: 0.7701in;" /></p>
++<ul class="simple">
++<li>Username</li>
++<li>Bucket</li>
++<li>Region</li>
++<li>API Key</li>
++<li>Tenantname</li>
++<li>Password</li>
++<li>Service Name</li>
++<li>URL of identity Endpoint</li>
++<li>Timeout of HTTP request</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++</div>
++<div class="section" id="smb-cifs">
++<h3>SMB/CIFS<a class="headerlink" href="#smb-cifs" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a folder on a remote Samba server, NAS appliance, or Windows machine.</p>
++<p><img alt="10000000000005FA0000005CE8491B77_png" src="../_images/10000000000005FA0000005CE8491B77.png" style="width: 6.5in; height: 0.3909in;" /></p>
++<ul class="simple">
++<li>URL – The host name of the Samba server.</li>
++<li>Username – The user name used to login to the Samba server.</li>
++<li>Password – The password to login to the Samba server.</li>
++<li>Share – The share on the Samba server to mount.</li>
++<li>Root – The folder inside the Samba share to mount (optional, defaults to ‘/’)</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p><img alt="10000000000005C30000006CAFFAAD61_png" src="../_images/10000000000005C30000006CAFFAAD61.png" style="width: 6.5in; height: 0.4756in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++<p>Note: The SMB backend requires smbclient to be installed on the server</p>
++<p><img alt="10000000000005D00000003B29340A7A_png" src="../_images/10000000000005D00000003B29340A7A.png" style="width: 6.5in; height: 0.2575in;" /></p>
++</div>
++<div class="section" id="owncloud-webdav">
++<h3>ownCloud/WebDAV<a class="headerlink" href="#owncloud-webdav" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a folder on a WebDAV server (or another ownCloud instance via WebDAV).</p>
++<p><img alt="10000000000005F70000005F0912E904_png" src="../_images/10000000000005F70000005F0912E904.png" style="width: 6.5in; height: 0.4043in;" /></p>
++<ul class="simple">
++<li>URL – The hostname of the WebDAV server.</li>
++<li>Username – The username used to login to the WebDAV server.</li>
++<li>Password – The password used to login to the WebDAV server.</li>
++<li>Root – The folder inside the WebDav server to mount (optional, defaults to ‘/’)</li>
++<li>Secure <a class="reference external" href="https://">https://</a> - Whether to use <a class="reference external" href="https://">https://</a> to connect to the WebDav server instead of <a class="reference external" href="http://">http://</a></li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p><img alt="10000000000005B90000007866D92D14_png" src="../_images/10000000000005B90000007866D92D14.png" style="width: 6.5in; height: 0.5319in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++<p><img alt="10000000000005E20000009B1BA5A8CF_png" src="../_images/10000000000005E20000009B1BA5A8CF.png" style="width: 6.5in; height: 0.6689in;" /></p>
++</div>
++<div class="section" id="sftp">
++<h3>SFTP<a class="headerlink" href="#sftp" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a folder on a remote SSH server.</p>
++<p><img alt="10000000000005FF0000005F35710398_png" src="../_images/10000000000005FF0000005F35710398.png" style="width: 6.5in; height: 0.402in;" /></p>
++<ul class="simple">
++<li>URL – The hostname of the SSH server.</li>
++<li>Username – The username used to login to the SSH server.</li>
++<li>Password – The password used to login to the SSH server.</li>
++<li>Root – The folder inside the SSH server to mount (optional, defaults to ‘/’)</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p><img alt="10000000000005970000006AE23997C9_png" src="../_images/10000000000005970000006AE23997C9.png" style="width: 6.5in; height: 0.4811in;" /></p>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++<p><img alt="10000000000005EB000000A68BA73E2D_png" src="../_images/10000000000005EB000000A68BA73E2D.png" style="width: 6.5in; height: 0.7126in;" /></p>
++</div>
++<div class="section" id="irods">
++<h3>iRODS<a class="headerlink" href="#irods" title="Permalink to this headline">¶</a></h3>
++<p>Mounts a folder on a iRODS server.</p>
++<p><img alt="100000000000062A0000005F61A18950_png" src="../_images/100000000000062A0000005F61A18950.png" style="width: 6.5in; height: 0.3909in;" /></p>
++<ul class="simple">
++<li>Host</li>
++<li>Port</li>
++<li>Use ownCloud login</li>
++<li>Username</li>
++<li>Password</li>
++<li>Authentication Mode</li>
++<li>Zone</li>
++<li>Applicable – A list users of who can see this mount</li>
++</ul>
++<p>Note: When configured correctly, a
++Green Light
++will appear next to the Folder Name.
++If misconfigured, a
++Red Light
++will appear.</p>
++</div>
++</div>
++<div class="section" id="configuration-file">
++<h2>Configuration File<a class="headerlink" href="#configuration-file" title="Permalink to this headline">¶</a></h2>
++<p>The configuration of mounts created within the External Storage App are stored in the
++data/mount.json
++file.
++This file contains all settings in JSON (JavaScript Object Notation) format.
++Two different types of entries exist:</p>
++<ul class="simple">
++<li>Group mounts -
++Each entry configures a mount for each user in group</li>
++<li>User mount – Each entry configures a mount for a single user or all users.</li>
++</ul>
++<p>For each type, there is a JSON array with the user/group name as key and an array of configuration values as the value.
++Each entry consist of the class name of the storage backend and an array of backend specific options (described above) and will be replaced by the user login.</p>
++<p>Although configuration may be done by making modifications to the mount.json file, it is recommended to use the Web-GUI in the administrator panel (as described in the above section) to add, remove, or modify mount options in order to prevent any problems.</p>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/external/Introduction.html
index 0c88c56,0000000..3571cb1
mode 100644,000000..100644
--- a/core/doc/admin/external/Introduction.html
+++ b/core/doc/admin/external/Introduction.html
@@@ -1,172 -1,0 +1,165 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud provides the ability to mount an external storage device.
++The external storage devices serves as a secondary storage device within ownCloud.</p>
++<p>The ownCloud Admin has the ability to create such a mount.
++In addition, the ownCloud Admin may decide to provide the end user the ability to create the mount.
++The mounts may be created on a per-user, per group, or all user basis.</p>
++<div class="section" id="supported-mounts">
++<h2>Supported mounts<a class="headerlink" href="#supported-mounts" title="Permalink to this headline">¶</a></h2>
++<p>The following lists the supported storage types.</p>
++<ul class="simple">
++<li>Local</li>
++<li>Amazon S3</li>
++<li>Dropbox</li>
++<li>FTP</li>
++<li>Google Drive</li>
++<li>OpenStack Object Storage</li>
++<li>SMB/CIFS</li>
++<li>ownCloud/WebDAV</li>
++<li>SFTP</li>
++<li>iRODS</li>
++</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/external/Table_of_Contents.html
index 0c88c56,0000000..0c7a478
mode 100644,000000..100644
--- a/core/doc/admin/external/Table_of_Contents.html
+++ b/core/doc/admin/external/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <<a class="reference external" href="file:///C:/Users/ser72/Desktop/S3_parent/Support/DOCUMENTS/Community/HYPERLINK#_Toc374110003">file:///C:/Users/ser72/Desktop/S3_parent/Support/DOCUMENTS/Community/HYPERLINK#_Toc374110003</a>>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/external/index.html
index 0c88c56,0000000..b6580a8
mode 100644,000000..100644
--- a/core/doc/admin/external/index.html
+++ b/core/doc/admin/external/index.html
@@@ -1,172 -1,0 +1,157 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>External Storage Mounts</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Introduction.html#supported-mounts">Supported mounts</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#enable-the-app">Enable the app</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#configure-mounts">Configure mounts</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#configuration-file">Configuration File</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/first_run/Configuration.html
index 0c88c56,0000000..769a1e2
mode 100644,000000..100644
--- a/core/doc/admin/first_run/Configuration.html
+++ b/core/doc/admin/first_run/Configuration.html
@@@ -1,172 -1,0 +1,147 @@@
 +
 +<!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>
++    <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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<p>The First Run Wizard app is enabled by default.
++To verify or disable this app, navigate to the apps page and select “First Run Wizard”</p>
++<p><img alt="1000000000000200000000BCCCC35DEB_png" src="../_images/1000000000000200000000BCCCC35DEB.png" style="width: 5.3335in; height: 1.9583in;" /></p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/first_run/Introduction.html
index 0c88c56,0000000..da6f254
mode 100644,000000..100644
--- a/core/doc/admin/first_run/Introduction.html
+++ b/core/doc/admin/first_run/Introduction.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>The ownCloud First Run Wizard is a welcome screen which links users to the various ownCloud utilities such as the Sync Client, Mobile Apps, and WebDav</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/first_run/Links.html
index 0c88c56,0000000..82e014e
mode 100644,000000..100644
--- a/core/doc/admin/first_run/Links.html
+++ b/core/doc/admin/first_run/Links.html
@@@ -1,172 -1,0 +1,165 @@@
 +
 +<!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>
++    <title>Links — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="links">
++<h1>Links<a class="headerlink" href="#links" title="Permalink to this headline">¶</a></h1>
++<p>The wizard contains links for the Desktop app, Android App on Google Play, and iOS on the App store, as well as how to access files via WebDav.</p>
++<div class="section" id="desktop-app">
++<h2>Desktop App<a class="headerlink" href="#desktop-app" title="Permalink to this headline">¶</a></h2>
++<p>Selecting the Desktop App link will bring the user to ownCloud’s web site to download the client.</p>
++<p><img alt="1000000000000557000002E148BAB6D4_png" src="../_images/1000000000000557000002E148BAB6D4.png" style="width: 6.5in; height: 3.5043in;" /></p>
++</div>
++<div class="section" id="android-app">
++<h2>Android App<a class="headerlink" href="#android-app" title="Permalink to this headline">¶</a></h2>
++<p>Selecting the Android App will load the web page to purchase the android client from the Google Play store.</p>
++<p><img alt="1000000000000668000002D29EAD9899_png" src="../_images/1000000000000668000002D29EAD9899.png" style="width: 6.5in; height: 2.861in;" /></p>
++</div>
++<div class="section" id="ios-app">
++<h2>iOS App<a class="headerlink" href="#ios-app" title="Permalink to this headline">¶</a></h2>
++<p>Selecting the iOS App loads the itunes web page to obtain the ownCloud iOS mobile client.</p>
++<p><img alt="10000000000005F30000030F1372448D_png" src="../_images/10000000000005F30000030F1372448D.png" style="width: 6.5in; height: 3.3417in;" /></p>
 +</div>
++<div class="section" id="access-files-via-webdav">
++<h2>Access files via WebDAV<a class="headerlink" href="#access-files-via-webdav" title="Permalink to this headline">¶</a></h2>
++<p>This link brings up a link with documentation on how to access files on the ownCloud server using WebDAV.</p>
++<p><img alt="100000000000066D000001AAD8CE8256_png" src="../_images/100000000000066D000001AAD8CE8256.png" style="width: 6.5in; height: 1.6835in;" /></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/first_run/Table_of_Contents.html
index 0c88c56,0000000..e051e1d
mode 100644,000000..100644
--- a/core/doc/admin/first_run/Table_of_Contents.html
+++ b/core/doc/admin/first_run/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc374456284>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/first_run/Usage.html
index 0c88c56,0000000..8b90f2c
mode 100644,000000..100644
--- a/core/doc/admin/first_run/Usage.html
+++ b/core/doc/admin/first_run/Usage.html
@@@ -1,172 -1,0 +1,149 @@@
 +
 +<!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>
++    <title>Usage — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="usage">
++<h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h1>
++<p>When enabled, a user entering the ownCloud web browser for the first time will have the Welcome screen popup.</p>
++<p><img alt="10000000000004920000028D9C8DC2CB_png" src="../_images/10000000000004920000028D9C8DC2CB.png" style="width: 6.5in; height: 3.628in;" /></p>
++<p>To close the window, select the ‘x’ in the upper right corner.
++If the user would like to bring up this window at a later time, they may do so by navigating to the Personal menu selection and select “Show First Run Wizard again”</p>
++<p><img alt="10000000000002A6000000BFBE298238_png" src="../_images/10000000000002A6000000BFBE298238.png" style="width: 6.5in; height: 1.8311in;" /></p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/first_run/index.html
index 0c88c56,0000000..02278cb
mode 100644,000000..100644
--- a/core/doc/admin/first_run/index.html
+++ b/core/doc/admin/first_run/index.html
@@@ -1,172 -1,0 +1,157 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud First Run Wizard</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Usage.html">Usage</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Links.html">Links</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Links.html#desktop-app">Desktop App</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Links.html#android-app">Android App</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Links.html#ios-app">iOS App</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Links.html#access-files-via-webdav">Access files via WebDAV</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_linux.html
index 0c88c56,0000000..61d1a79
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_linux.html
+++ b/core/doc/admin/installation/installation_linux.html
@@@ -1,172 -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="#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">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>
 +<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>Archlinux:</strong> There are two AUR packages for ownCloud: <a class="reference external" href="https://www.archlinux.org/packages/community/any/owncloud/">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>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_source.html
index 0335ab8,0000000..75a5950
mode 100644,000000..100644
--- a/core/doc/admin/installation/installation_source.html
+++ b/core/doc/admin/installation/installation_source.html
@@@ -1,457 -1,0 +1,655 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Manual Installation — ownCloud Administrators Manual 6.0 documentation</title>
 +    
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
 +    
 +    <script type="text/javascript">
 +      var DOCUMENTATION_OPTIONS = {
 +        URL_ROOT:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <script type="text/javascript" src="../_static/underscore.js"></script>
 +    <script type="text/javascript" src="../_static/doctools.js"></script>
 +    <script type="text/javascript" src="../_static/bootstrap.js"></script>
 +    <link rel="top" title="ownCloud Administrators Manual 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Installation" href="index.html" />
 +    <link rel="next" title="PageKite Configuration" href="installation_others.html" />
 +    <link rel="prev" title="Univention Corporate Server" href="installation_ucs.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud Administrators Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">Admin Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Installation</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="installation_appliance.html">Appliances</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_linux.html">Linux Distributions</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_macos.html">Mac OS X</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_windows.html">Windows 7 and Windows Server 2008</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_ucs.html">Univention Corporate Server</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Manual Installation</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#extract-owncloud-and-copy-to-your-web-server">Extract ownCloud and Copy to Your Web Server</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#download-extract-and-copy-owncloud-to-your-web-server">Download, extract and copy ownCloud to Your Web Server</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#set-the-directory-permissions">Set the Directory Permissions</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#web-server-configuration">Web Server Configuration</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#follow-the-install-wizard">Follow the Install Wizard</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_others.html">PageKite Configuration</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="manual-installation">
 +<h1>Manual Installation<a class="headerlink" href="#manual-installation" title="Permalink to this headline">¶</a></h1>
- <p>If you do not want to use packages, here is how you setup ownCloud on from scratch
- using a classic <abbr title="Linux, Apache, MySQL, PHP">LAMP</abbr> setup:</p>
++<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>
++<p>This document provides a complete walk-through for installing ownCloud
++on Ubuntu 12.04 LTS Server with Apache and MySQL.
++It also provides guidelines for installing it on other distributions,
++webservers and database systems.</p>
 +<div class="section" id="prerequisites">
 +<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">This tutorial assumes you have terminal access to the machine you want
++to install owncloud on. Although this is not an absolute requirement,
++installation without it is highly likely to require contacting your
++hoster (e.g. for installing required modules).</p>
++</div>
 +<p>To run ownCloud, your web server must have the following installed:</p>
 +<ul class="simple">
- <li>PHP (>= 5.3.3, minimum recommended 5.4)</li>
++<li>PHP (>= 5.3.3 minimum, 5.4 or higher recommended)</li>
 +<li>PHP module ctype</li>
 +<li>PHP module dom</li>
 +<li>PHP module GD</li>
 +<li>PHP module iconv</li>
 +<li>PHP module JSON</li>
 +<li>PHP module libxml</li>
 +<li>PHP module mb multibyte</li>
 +<li>PHP module SimpleXML</li>
 +<li>PHP module zip</li>
 +<li>PHP module zlib</li>
 +</ul>
 +<p>Database connectors (pick at least one):</p>
 +<ul class="simple">
- <li>PHP module sqlite (>= 3)</li>
++<li>PHP module sqlite (>= 3, usually not recommendable for performance reasons)</li>
 +<li>PHP module mysql</li>
 +<li>PHP module pgsql (requires PostgreSQL >= 9.0)</li>
 +</ul>
- <p>And as <em>optional</em> dependencies:</p>
++<p><em>Recommended</em> packages:</p>
 +<ul class="simple">
++<li>PHP module curl (highly recommended, some functionality, e.g. http user
++authentication, depends on this)</li>
++<li>PHP module fileinfo (highly recommended, enhances file analysis performance)</li>
 +<li>PHP module bz2 (recommended, required for extraction of apps)</li>
- <li>PHP module curl (highly recommended, some functionality depends on this)</li>
- <li>PHP module exif (for image rotation in pictures app)</li>
- <li>PHP module fileinfo (highly recommended, increases file analysis performance)</li>
 +<li>PHP module intl (increases language translation performance)</li>
- <li>PHP module ldap (for ldap integration)</li>
 +<li>PHP module mcrypt (increases file encryption performance)</li>
 +<li>PHP module openssl (required for accessing HTTPS resources)</li>
 +</ul>
- <p>For performance increase (<em>optional</em> / select one of the following):</p>
++<p>Required for specific apps (if you use the mentioned app, you must install that
++package):</p>
++<ul class="simple">
++<li>PHP module ldap (for ldap integration)</li>
++<li>smbclient (for SMB storage)</li>
++<li>PHP module ftp (for FTP storage)</li>
++</ul>
++<p>Recommended for specific apps (<em>optional</em>):</p>
++<ul class="simple">
++<li>PHP module exif (for image rotation in pictures app)</li>
++</ul>
++<p>For enhanced performance (<em>optional</em> / select only 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>PHP module 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 PHP module is required 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>
++<p><strong>Remarks:</strong></p>
++<ul>
++<li><p class="first">Please check your distribution, operating system or hosting partner documentation
++on how to install/enable these modules.</p>
++</li>
++<li><p class="first">Make sure your distribution’s php version fulfils the version requirements
++specified above. If it doesn’t, there might be custom repositories you can use.
++If you are e.g. running Ubuntu 10.04 LTS, you can update your
++PHP using a custom <a class="reference external" href="https://launchpad.net/~ondrej/+archive/php5">PHP PPA</a>:</p>
 +<div class="highlight-python"><pre>sudo add-apt-repository ppa:ondrej/php5
 +sudo apt-get update
 +sudo apt-get install php5</pre>
 +</div>
- <p>You don’t need any WebDAV support of your web server (i.e. apache’s mod_webdav)
- to access your ownCloud data via WebDAV, ownCloud has a WebDAV server built in.
- In fact, you should make sure that any built-in WebDAV module of your web server
- is disabled (at least for the ownCloud directory), as it can interfere with
- ownCloud’s built-in WebDAV support.</p>
++</li>
++<li><p class="first">You don’t need any WebDAV support module for your web server (i.e. Apache’s
++mod_webdav) to access your ownCloud data via WebDAV. ownCloud has a built-in
++WebDAV server of its own.</p>
++</li>
++</ul>
++<div class="section" id="example-installation-on-ubuntu-12-04-4-lts-server">
++<h3>Example installation on Ubuntu 12.04.4 LTS Server<a class="headerlink" href="#example-installation-on-ubuntu-12-04-4-lts-server" title="Permalink to this headline">¶</a></h3>
++<p>On a machine running a pristine Ubuntu 12.04.4 LTS server, you would install the
++required and recommended modules for a typical ownCloud installation, using
++Apache and MySQL by issuing the following commands in a terminal:</p>
++<div class="highlight-python"><pre>sudo apt-get install apache2 mysql-server libapache2-mod-php5
++sudo apt-get install php5-gd php5-json php5-mysql php5-curl
++sudo apt-get install php5-intl php5-mcrypt php5-imagick</pre>
++</div>
++<p><strong>Remarks:</strong></p>
++<ul class="simple">
++<li>If you want to use any other combination of distribution, webserver or database,
++please consult the respective documentation.</li>
++<li>At the execution of each of the above commands you might be prompted whether you
++want to continue; press “Y” for Yes (that is if your system language is English.
++You might have to press a different key if you have a different system language).</li>
++<li>At the installation of the MySQL server, you will be prompted for a root password.
++Be sure to remember that password for later use.</li>
++<li>This installs the packages for the ownCloud core system. If you are planning on
++running additional apps, keep in mind that they might require additional packages.
++See the list above for details.</li>
++</ul>
 +</div>
- <div class="section" id="extract-owncloud-and-copy-to-your-web-server">
- <h2>Extract ownCloud and Copy to Your Web Server<a class="headerlink" href="#extract-owncloud-and-copy-to-your-web-server" title="Permalink to this headline">¶</a></h2>
- <div class="highlight-python"><pre>tar -xjf path/to/downloaded/owncloud-x.x.x.tar.bz2
- cp -r owncloud /path/to/your/webserver</pre>
 +</div>
++<div class="section" id="download-extract-and-copy-owncloud-to-your-web-server">
++<h2>Download, extract and copy ownCloud to Your Web Server<a class="headerlink" href="#download-extract-and-copy-owncloud-to-your-web-server" title="Permalink to this headline">¶</a></h2>
++<p>First, download the archive of the latest ownCloud version:</p>
++<ul>
++<li><p class="first">Navigate to <cite>http://owncloud.org/install</cite></p>
++</li>
++<li><p class="first">Click “Tar or Zip file”</p>
++</li>
++<li><p class="first">In the opening dialog, chose the “Linux” link.</p>
++</li>
++<li><p class="first">This will start the download of a file named owncloud-x.y.z.tar.bz2 (where
++x.y.z is the version number of the current latest version).</p>
++</li>
++<li><p class="first">Save this file on the machine you want to install ownCloud on.</p>
++</li>
++<li><p class="first">If that’s a different machine than the one you are currently working on, use
++e.g. FTP to transfer the downloaded archive file there.</p>
++</li>
++<li><p class="first">Note down the directory where you put the file.</p>
++</li>
++<li><p class="first">Extract the archive contents. Open a terminal on the machine
++you plan to run ownCloud on, and run:</p>
++<div class="highlight-python"><pre>cd path/to/downloaded/archive
++tar -xjf owncloud-x.y.z.tar.bz2</pre>
++</div>
++<p>where <tt class="code docutils literal"><span class="pre">path/to/downloaded/archive</span></tt> is to be replaced by the path where you
++put the downloaded archive, and x.y.z of course has to be replaced by the actual
++version number as in the file you have downloaded.</p>
++</li>
++<li><p class="first">Copy the ownCloud files to their final destination in the document root of your
++webserver (you can skip this step if you already downloaded and extracted the
++files there):</p>
++<div class="highlight-python"><pre>sudo cp -r owncloud /path/to/your/webserver/document-root</pre>
++</div>
++<ul>
++<li><p class="first">If you don’t know where your webserver’s document root is located, consult its
++documentation. For Apache on Ubuntu 12.04 LTS for example, this would usually be
++<tt class="code docutils literal"><span class="pre">/var/www</span></tt>. So above command should look like this:</p>
++<div class="highlight-python"><pre>sudo cp -r owncloud /var/www</pre>
++</div>
++</li>
++<li><p class="first">The above assumes you want to install ownCloud into a subdirectory “owncloud”
++on your webserver. For installing it anywhere else, you’ll have to adapt the
++above command accordingly.</p>
++</li>
++</ul>
++</li>
++</ul>
 +</div>
 +<div class="section" id="set-the-directory-permissions">
 +<h2>Set the Directory Permissions<a class="headerlink" href="#set-the-directory-permissions" title="Permalink to this headline">¶</a></h2>
- <p>The owner of your web server must own the apps/, data/ and config/ directories
- in your ownCloud install. You can do this by running the following command for
- the apps, data and config directories.</p>
- <p>For Debian based distributions like Ubuntu, Debian or Linux Mint and Gentoo use:</p>
- <div class="highlight-python"><pre>chown -R www-data:www-data /path/to/your/owncloud/install/data</pre>
++<p>The user running your web server must own at least the apps/, data/ and config/
++directories in your ownCloud installation folder.
++The following command will change the ownership of the whole folder to that user.</p>
++<ul>
++<li><p class="first">For Debian-based distributions (like Ubuntu, Debian or Linux Mint) and Gentoo, run:</p>
++<div class="highlight-python"><pre>sudo chown -R www-data:www-data /path/to/your/owncloud</pre>
 +</div>
- <p>For ArchLinux use:</p>
- <div class="highlight-python"><pre>chown -R http:http /path/to/your/owncloud/install/data</pre>
++</li>
++<li><p class="first">Continuing the example from above, for Ubuntu 12.04 LTS, where the install location
++was <tt class="code docutils literal"><span class="pre">/var/www</span></tt>, you would run:</p>
++<div class="highlight-python"><pre>sudo chown -R www-data:www-data /var/www/owncloud</pre>
 +</div>
- <p>Fedora users should use:</p>
- <div class="highlight-python"><pre>chown -R apache:apache /path/to/your/owncloud/install/data</pre>
++</li>
++<li><p class="first">For ArchLinux should run (as root):</p>
++<div class="highlight-python"><pre>chown -R http:http /path/to/your/owncloud</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>
++</li>
++<li><p class="first">Fedora users should run (as root):</p>
++<div class="highlight-python"><pre>chown -R apache:apache /path/to/your/owncloud</pre>
 +</div>
++</li>
++</ul>
++<p>When using an NFS mount for the data directory, do not change ownership as above.
++The simple act of mounting the drive will set proper permissions for ownCloud to
++write to the directory. Changing ownership as above could result in some issues
++if the NFS mount is lost.</p>
 +</div>
 +<div class="section" id="web-server-configuration">
 +<h2>Web Server Configuration<a class="headerlink" href="#web-server-configuration" title="Permalink to this headline">¶</a></h2>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">You can use ownCloud over plain http, but we strongly encourage you to
++use SSL/TLS. If you don’t use it, and you for example access your
++ownCloud over an unsecured WiFi, everyone in the same WiFi can grab
++your authentication data or the content of files synchronized while you
++are on the WiFi.</p>
++</div>
 +<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="section" id="enabling-ssl">
++<h4>Enabling SSL<a class="headerlink" href="#enabling-ssl" title="Permalink to this headline">¶</a></h4>
++<p>An Apache installed under Ubuntu comes already set-up with a simple
++self-signed certificate. All you have to do is to enable the ssl module and
++the according site. Open a terminal and run</p>
++<div class="highlight-python"><pre>sudo a2enmod ssl
++sudo a2ensite default-ssl
++sudo service apache2 reload</pre>
++</div>
++<p>If you are using a different distribution, check their documentation on how to
++enable SSL.</p>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">Self-signed certificates have their drawbacks - especially when you
++plan to make your ownCloud server publicly accessible. You might want
++to consider getting a certificate signed by an official signing
++authority. If you’re looking for a free certificate, you can consult
++e.g. this article:
++<cite>https://www.sslshopper.com/article-free-ssl-certificates-from-a-free-certificate-authority.html</cite></p>
++</div>
++</div>
++<div class="section" id="configuring-owncloud">
++<h4>Configuring ownCloud<a class="headerlink" href="#configuring-owncloud" title="Permalink to this headline">¶</a></h4>
++<p>Since there was a change in the way versions 2.2 and 2.4 are configured,
++you’ll have to find out which Apache version you are using.</p>
++<p>Usually you can do this by running one of the following commands:</p>
++<div class="highlight-python"><pre>sudo apachectl -v
++apache2 -v</pre>
++</div>
++<p>Example output:</p>
++<div class="highlight-python"><pre>Server version: Apache/2.2.22 (Ubuntu)
++Server built:   Jul 12 2013 13:37:10</pre>
++</div>
++<p>This indicates an Apache of the 2.2 version branch (as e.g. you will find on
++Ubuntu 12.04 LTS).</p>
++<p>Example config for 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>
++<p>Example config for Apache 2.4:</p>
 +<div class="highlight-xml"><pre><Directory /path/to/your/owncloud/install>
 +    Options Indexes FollowSymLinks MultiViews
 +    AllowOverride All
 +    Require all granted
 +</Directory></pre>
 +</div>
- <p>Enable mod_rewrite:</p>
- <div class="highlight-python"><pre>a2enmod rewrite</pre>
++<ul>
++<li><p class="first">This config entry needs to go into the configuration file of the “site” you want
++to use.</p>
++</li>
++<li><p class="first">On a Ubuntu system, this typically is the “default-ssl” site (to be found at
++<tt class="code docutils literal"><span class="pre">/etc/apache2/sites-available/default-ssl</span></tt>).</p>
++</li>
++<li><p class="first">Edit the site file with your favorite editor (note that you’ll need root
++permissions to modify that file). For Ubuntu 12.04 LTS, you could for example run
++the following command in a Terminal:</p>
++<div class="highlight-python"><pre>sudo nano /etc/apache2/sites-available/default-ssl</pre>
++</div>
++</li>
++<li><p class="first">Add the entry shown above immediately before the line containing</p>
++<div class="highlight-python"><pre></VirtualHost></pre>
++</div>
++<p>(this should be one of the last lines in the file).</p>
++</li>
++<li><p class="first">For ownCloud to work correctly, we need the module mod_rewrite. Enable it by running:</p>
++<div class="highlight-python"><pre>sudo a2enmod rewrite</pre>
 +</div>
- <p>In distributions that do not come with a2enmod the <tt class="file docutils literal"><span class="pre">/etc/httpd/httpd.conf</span></tt> needs to be changed to enable <strong>mod_rewrite</strong></p>
- <p>Then restart apache. For Ubuntu systems (or distributions using upstartd) use:</p>
- <div class="highlight-python"><pre>service apache2 restart</pre>
++</li>
++<li><p class="first">In distributions that do not come with a2enmod the module needs to be enabled
++manually by editing the config Apache files, usually <tt class="file docutils literal"><span class="pre">/etc/httpd/httpd.conf</span></tt>.
++consult the Apache documentation or your distributions documentation.</p>
++</li>
++<li><p class="first">Then restart Apache.</p>
++<ul>
++<li><p class="first">For Ubuntu systems (or distributions using upstartd), run:</p>
++<div class="highlight-python"><pre>sudo service apache2 restart</pre>
 +</div>
- <p>For systemd systems (Fedora, ArchLinux, OpenSUSE) use:</p>
++</li>
++<li><p class="first">For systemd systems (Fedora, ArchLinux, OpenSUSE), run:</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>
++</li>
++</ul>
++</li>
++<li><p class="first">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 (this should already be done,
++see section <a class="reference internal" href="#set-the-directory-permissions">Set the Directory Permissions</a>).</p>
++</li>
++<li><p class="first">You should make sure that any built-in WebDAV module of your web server is disabled
++(at least for the ownCloud directory), as it will interfere with ownCloud’s
++built-in WebDAV support.</p>
++<p>If you need the WebDAV support in the rest of your configuration, you can turn it off
++specifically for the ownCloud entry by adding the following line in the
++configuration of your ownCloud. In above “<Directory ...” code, add the following line
++directly after the “allow from all” / “Require all granted” line):</p>
++<div class="highlight-python"><pre>Dav Off</pre>
++</div>
++</li>
++<li><p class="first">Furthermore, you need to disable any server-configured authentication for ownCloud, as
++it’s internally using Basic authentication for its *DAV services.
++If you have turned on authentication on a parent folder (via e.g. an “AuthType Basic”
++directive), you can turn off the authentication specifically for the ownCloud entry;
++to do so, in above “<Directory ...” code, add the following line directly after the
++“allow from all” / “Require all granted” line):</p>
++<div class="highlight-python"><pre>Satisfy Any</pre>
++</div>
++</li>
++</ul>
++<p>A minimal site configuration on Ubuntu 12.04 might look like this:</p>
++<p>When using ssl, take special note on the ServerName. You should specify one in the
++server configuration, as well as in the CommonName field of the certificate. If you want
++your ownCloud to be reachable via the internet, then set both these to the domain you
++want to reach your ownCloud under.</p>
++<div class="admonition note">
++<p class="first admonition-title">Note</p>
++<p class="last">By default, the certificates’ CommonName will get set to the host name at the time
++when the ssl-cert package was installed.</p>
++</div>
++</div>
 +</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>upstream php-handler {
 +        server 127.0.0.1:9000;
 +        #server unix:/var/run/php5-fpm.sock;
 +}
 +
 +server {
 +        listen 80;
 +        server_name cloud.example.com;
 +        return 301 https://$server_name$request_uri;  # enforce https
 +}
 +
 +server {
 +        listen 443 ssl;
 +        server_name cloud.example.com;
 +
 +        ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
 +        ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
 +
 +        # Path to the root of your installation
 +        root /var/www/;
 +
 +        client_max_body_size 10G; # set max upload size
 +        fastcgi_buffers 64 4K;
 +
 +        rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
 +        rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
 +        rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
 +
 +        index index.php;
 +        error_page 403 /core/templates/403.php;
 +        error_page 404 /core/templates/404.php;
 +
 +        location = /robots.txt {
 +            allow all;
 +            log_not_found off;
 +            access_log off;
 +        }
 +
 +        location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
 +                deny all;
 +        }
 +
 +        location / {
 +                # The following 2 rules are only needed with webfinger
 +                rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
 +                rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
 +
 +                rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
 +                rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
 +
 +                rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
 +
 +                try_files $uri $uri/ index.php;
 +        }
 +
 +        location ~ ^(.+?\.php)(/.*)?$ {
 +                try_files $1 = 404;
 +
 +                include fastcgi_params;
 +                fastcgi_param SCRIPT_FILENAME $document_root$1;
 +                fastcgi_param PATH_INFO $2;
 +                fastcgi_param HTTPS on;
 +                fastcgi_pass php-handler;
 +        }
 +
 +        # Optional: set long EXPIRES header on static assets
 +        location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
 +                expires 30d;
 +                # Optional: Don't log access to assets
 +                access_log off;
 +        }
 +
 +}</pre>
 +</div>
++<p>To enable SSL support:
++-  Remove the server block containing the redirect
++-  Change <strong>listen 443 ssl</strong> to <strong>listen 80;</strong>
++-  Remove <strong>ssl_certificate</strong> and <strong>ssl_certificate_key</strong>.
++-  Remove <strong>fastcgi_params HTTPS on;</strong></p>
 +<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
++<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
++<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
++credentials and let ownCloud create its own database user, or enter a preconfigured user.  If you are not using Apache
 +as the web server, please set the data directory to a location outside of the document root. See the advanced
 +install settings.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/installation/installation_windows.html
index 702d0dc,0000000..251258b
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">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
 +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;" />
++<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,
 +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,
 +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>
 +<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
 +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/update.html
index 24715af,0000000..1bdafb5
mode 100644,000000..100644
--- a/core/doc/admin/maintenance/update.html
+++ b/core/doc/admin/maintenance/update.html
@@@ -1,213 -1,0 +1,215 @@@
 +
 +<!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>
 +</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
++<p>Updating means updating ownCloud to the latest <em>point release</em>, e.g. ownCloud 5.0.13 → 5.0.14a. This procedure uses the
 +ownCloud updater plugin called “Updater”: it’s an internal application already present in your ownCloud installation.</p>
 +<p>To update ownCloud, follow those steps:</p>
 +<ol class="arabic simple">
 +<li>Make a backup of the ownCloud folder and the database.</li>
 +<li>Make sure that updater plugin is enabled.</li>
 +<li>Navigate to the ‘Admin’ page.</li>
 +<li>Click ‘Update’.</li>
 +<li>Refresh the page with Ctrl+F5.</li>
 +</ol>
 +<p>If this procedure doesn’t work (for example, ownCloud 5.0.10 doesn’t show new any new version) you could try to perform
 +a full upgrade to update to the latest point release (see below).</p>
 +</div>
 +<div class="section" id="upgrade">
 +<h2>Upgrade<a class="headerlink" href="#upgrade" title="Permalink to this headline">¶</a></h2>
 +<p>Upgrade is to bring an ownCloud instance to a new <em>major release</em>, e.g.
- ownCloud 4.0.7 → 4.5.0. Always do backups anyway.</p>
++ownCloud 5.0.14a → 6.0.2. 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
++version, e.g. 5.0.14a in the 5.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>
 +<div class="highlight-python"><pre>wget http://download.owncloud.org/community/owncloud-latest.tar.bz2</pre>
 +</div>
 +</li>
 +<li><p class="first">Deactivate all third party applications.</p>
 +</li>
 +<li><p class="first">Delete everything from your ownCloud installation directory, except data and
 +config. Assuming that it’s your working directory, you could execute this command:</p>
 +<div class="highlight-python"><pre>ls | grep -v 'data\|config' | xargs rm -r</pre>
 +</div>
 +</li>
 +<li><p class="first">Unpack the release tarball in the ownCloud directory (or copy the
 +files thereto). Assuming that your installation directory is called ‘owncloud’ and that it’s inside your working
 +directory, you could execute this command:</p>
 +<div class="highlight-python"><pre>tar xfj owncloud-latest.tar.bz2</pre>
 +</div>
 +</li>
++<li><p class="first">Set the permissions properly</p>
++</li>
 +<li><p class="first">With the next page request the update procedures will run.</p>
 +</li>
 +<li><p class="first">If you had 3rd party applications, check if they provide versions compatible
 +with the new release. If so, install and enable them, update procedures will run if needed.</p>
 +</li>
 +</ol>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/quota/Checking_available_space.html
index 0c88c56,0000000..cb81c1c
mode 100644,000000..100644
--- a/core/doc/admin/quota/Checking_available_space.html
+++ b/core/doc/admin/quota/Checking_available_space.html
@@@ -1,172 -1,0 +1,149 @@@
 +
 +<!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>
++    <title>Checking available space — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="checking-available-space">
++<h1>Checking available space<a class="headerlink" href="#checking-available-space" title="Permalink to this headline">¶</a></h1>
++<p>A user can check their available space on the Personal page.</p>
++<p><img alt="10000000000003A800000039364066E4_png" src="../_images/10000000000003A800000039364066E4.png" style="width: 6.5in; height: 0.3957in;" /></p>
++<p>The available space for a given user is calculated using the following formula:</p>
++<p><img alt="10000000000002BB000000266DB6AD1A_png" src="../_images/10000000000002BB000000266DB6AD1A.png" style="width: 6.5in; height: 0.3535in;" /></p>
++<p>Where disk_free_space is the space available on the partition where the user’s home storage is located on the server.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/quota/Excluded_from_quota.html
index 0c88c56,0000000..e0d91d6
mode 100644,000000..100644
--- a/core/doc/admin/quota/Excluded_from_quota.html
+++ b/core/doc/admin/quota/Excluded_from_quota.html
@@@ -1,172 -1,0 +1,173 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Excluded from quota — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="excluded-from-quota">
++<h1>Excluded from quota<a class="headerlink" href="#excluded-from-quota" title="Permalink to this headline">¶</a></h1>
++<p>The following sections describe information which is not counted in a user’s quota.</p>
++<div class="section" id="metadata-and-cache">
++<h2>Metadata and cache<a class="headerlink" href="#metadata-and-cache" title="Permalink to this headline">¶</a></h2>
++<p>Application metadata and cached information are excluded from total used space.
++Examples of such data are thumbnails (icon previews, pictures app), temporary files, and encryption keys.</p>
++</div>
++<div class="section" id="deleted-files">
++<h2>Deleted Files<a class="headerlink" href="#deleted-files" title="Permalink to this headline">¶</a></h2>
++<p>Files which have been moved to the trash bin do not count against a user’s quota.
++Deleted items are permanently deleted, oldest to newest, should the user run out of space to make room for new files.</p>
++<p>For example, if the user has a 10GB quota, and has used 4GB of space and 5GB in the trash bin, the user will still have 6GB available space.
++If, however, the user uploads 6GB, ownCloud will permanently delete files from the trash bin in order to make room for the new files.</p>
++</div>
++<div class="section" id="version-control">
++<h2>Version Control<a class="headerlink" href="#version-control" title="Permalink to this headline">¶</a></h2>
++<p>Older versions do not count against the user’s quota.
++The versions app will delete old versions, oldest to newest, should the user run out of space to make room for new files.</p>
++<p>For example, if the user has a 10GB quota, and has used 4GB and 5GB is used on older versions, the user will still have 6GB available space.
++If, however, the user uploads 6GB, ownCloud will discard older versions to make room for the new files.</p>
++</div>
++<div class="section" id="encryption">
++<h2>Encryption<a class="headerlink" href="#encryption" title="Permalink to this headline">¶</a></h2>
++<p>Encrypted files are slightly larger than their unencrypted equivalents.
++The unencrypted file size is used to determine the quota.</p>
 +</div>
++<div class="section" id="external-storage">
++<h2>External Storage<a class="headerlink" href="#external-storage" title="Permalink to this headline">¶</a></h2>
++<p>External storage, mounted by either a user or the admin, is not taken into consideration when calculating the user’s storage.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/quota/Introduction.html
index 0c88c56,0000000..983c24f
mode 100644,000000..100644
--- a/core/doc/admin/quota/Introduction.html
+++ b/core/doc/admin/quota/Introduction.html
@@@ -1,172 -1,0 +1,152 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud allows the admin to specify a storage quota for users.
++This quota is the maximum space a user is allowed to utilize for files located in their home storage.</p>
++<p>The users quota is set in the Users page within ownCloud when creating a user.</p>
++<p><img alt="10000000000003DF000000D953A456B6_png" src="../_images/10000000000003DF000000D953A456B6.png" style="width: 6.5in; height: 1.4228in;" /></p>
++<p>Each user can have a different quota (shown above in the Storage column).
++In addition, there is a default quota should a user not have a quota specified.</p>
++<p>It is important to note that when setting a quota, the administrator needs to be aware that it applies only to the actual files and not the metadata.
++This means when allocating a quota, the admin should make sure at least 10% more space is available for each user.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/quota/Sharing.html
index 0c88c56,0000000..2205f4d
mode 100644,000000..100644
--- a/core/doc/admin/quota/Sharing.html
+++ b/core/doc/admin/quota/Sharing.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Sharing — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="sharing">
++<h1>Sharing<a class="headerlink" href="#sharing" title="Permalink to this headline">¶</a></h1>
++<p>Shared files or directories are counted against the owner’s quota and not the “shared-to” user’s quota.</p>
++<div class="section" id="shared-files">
++<h2>Shared Files<a class="headerlink" href="#shared-files" title="Permalink to this headline">¶</a></h2>
++<p>When user A shares a file with user B, the size of the file will be counted against user A’s quota.
++This is the case even if the file is modified by user B or if user B increases the file size.</p>
++</div>
++<div class="section" id="shared-directories">
++<h2>Shared Directories<a class="headerlink" href="#shared-directories" title="Permalink to this headline">¶</a></h2>
++<p>When user A shares a directory with User B, all files uploaded to that directory by user B will count against user A’s quota.
++Likewise, files within that directory which are modified by user B will count against user A’s quota.</p>
++</div>
++<div class="section" id="resharing">
++<h2>Resharing<a class="headerlink" href="#resharing" title="Permalink to this headline">¶</a></h2>
++<p>If user A shares a file with user B who then reshares a file to user C, the space occupied by that file is counted against user A’s quota.</p>
 +</div>
++<div class="section" id="public-sharing-with-upload-permission">
++<h2>Public sharing with upload permission<a class="headerlink" href="#public-sharing-with-upload-permission" title="Permalink to this headline">¶</a></h2>
++<p>If user A publicly shares a directory via a link and enables “public upload” permission, files uploaded to that directory from the outside are counted against user A’s quota.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/quota/Table_of_Contents.html
index 0c88c56,0000000..d069d7f
mode 100644,000000..100644
--- a/core/doc/admin/quota/Table_of_Contents.html
+++ b/core/doc/admin/quota/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc374966628>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/quota/index.html
index 0c88c56,0000000..0064c6f
mode 100644,000000..100644
--- a/core/doc/admin/quota/index.html
+++ b/core/doc/admin/quota/index.html
@@@ -1,172 -1,0 +1,164 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Quota Calculations</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Checking_available_space.html">Checking available space</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Sharing.html">Sharing</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Sharing.html#shared-files">Shared Files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Sharing.html#shared-directories">Shared Directories</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Sharing.html#resharing">Resharing</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Sharing.html#public-sharing-with-upload-permission">Public sharing with upload permission</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Excluded_from_quota.html">Excluded from quota</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Excluded_from_quota.html#metadata-and-cache">Metadata and cache</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Excluded_from_quota.html#deleted-files">Deleted Files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Excluded_from_quota.html#version-control">Version Control</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Excluded_from_quota.html#encryption">Encryption</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Excluded_from_quota.html#external-storage">External Storage</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/share_app/Configuration.html
index 0c88c56,0000000..e3c0d80
mode 100644,000000..100644
--- a/core/doc/admin/share_app/Configuration.html
+++ b/core/doc/admin/share_app/Configuration.html
@@@ -1,172 -1,0 +1,157 @@@
 +
 +<!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>
++    <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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="enable-the-app">
++<h2>Enable the app<a class="headerlink" href="#enable-the-app" title="Permalink to this headline">¶</a></h2>
++<p>The Share Files app is enabled by default.
++To verify this and/or disable this functionality, navigate to the APPS page in the web interface and select “Share Files”</p>
++<p><img alt="1000000000000167000000B43E4BF478_png" src="../_images/1000000000000167000000B43E4BF478.png" style="width: 3.7398in; height: 1.8752in;" /></p>
 +</div>
++<div class="section" id="configuring-the-permitted-functionality">
++<h2>Configuring the permitted functionality<a class="headerlink" href="#configuring-the-permitted-functionality" title="Permalink to this headline">¶</a></h2>
++<p>There are several functions which may be enabled or disabled at the admin’s discretion.
++To configure these functions, navigate to the Admin page in the web interface and scroll to the “Sharing” section.</p>
++<p><img alt="10000000000001CF00000176B0BE1EBC_png" src="../_images/10000000000001CF00000176B0BE1EBC.png" style="width: 4.8228in; height: 3.8957in;" /></p>
++<p>The above parameters are self-explanatory and may be enabled or disabled as required.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/share_app/Introduction.html
index 0c88c56,0000000..5388849
mode 100644,000000..100644
--- a/core/doc/admin/share_app/Introduction.html
+++ b/core/doc/admin/share_app/Introduction.html
@@@ -1,172 -1,0 +1,148 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud allows users to share files and folders with both other ownCloud users, as well as publicly via a link.
++Sharing may be done either via the web interface or via the Sharing API.
++This document will discuss the web interface and sharing.
++For information on the Sharing API, please refer to that document.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/share_app/Retrieving_shared_data.html
index 0c88c56,0000000..84b1cea
mode 100644,000000..100644
--- a/core/doc/admin/share_app/Retrieving_shared_data.html
+++ b/core/doc/admin/share_app/Retrieving_shared_data.html
@@@ -1,172 -1,0 +1,159 @@@
 +
 +<!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>
++    <title>Retrieving shared data — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="retrieving-shared-data">
++<h1>Retrieving shared data<a class="headerlink" href="#retrieving-shared-data" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="user-group-shares">
++<h2>User/group shares<a class="headerlink" href="#user-group-shares" title="Permalink to this headline">¶</a></h2>
++<p>When the shared with user logs into their ownCloud instance they will see a “Shared” folder.</p>
++<p><img alt="100000000000046C000000C2D3E5CF30_png" src="../_images/100000000000046C000000C2D3E5CF30.png" style="width: 6.5in; height: 1.1138in;" /></p>
++<p>Within that Shared folder are all files and folders which have been shared to that user by any other ownCloud user.</p>
++<p><img alt="1000000000000462000000D44541CF9A_png" src="../_images/1000000000000462000000D44541CF9A.png" style="width: 6.5in; height: 1.2283in;" /></p>
 +</div>
++<div class="section" id="share-as-link">
++<h2>Share as link<a class="headerlink" href="#share-as-link" title="Permalink to this headline">¶</a></h2>
++<p>To view a file/folder which was shared as a link, simply enter the link into the browser.</p>
++<p><img alt="10000000000004CA000002B52116BE0C_png" src="../_images/10000000000004CA000002B52116BE0C.png" style="width: 6.5in; height: 3.6744in;" /></p>
++<p>To download the file/folder select the Download button on the upper right of the page.
++If this link was password protected, the user will be prompted with a password prior to this page appearing.</p>
++<p><img alt="100000000000045800000197FE462F2B_png" src="../_images/100000000000045800000197FE462F2B.png" style="width: 6.5in; height: 2.3791in;" /></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/share_app/Table_of_Contents.html
index 0c88c56,0000000..c3db146
mode 100644,000000..100644
--- a/core/doc/admin/share_app/Table_of_Contents.html
+++ b/core/doc/admin/share_app/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc377716145>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/share_app/Utilization.html
index 0000000,0000000..d89665b
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/share_app/Utilization.html
@@@ -1,0 -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>Utilization — 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" />
++<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>
++<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="utilization">
++<h1>Utilization<a class="headerlink" href="#utilization" title="Permalink to this headline">¶</a></h1>
++<p>An ownCloud user may share files or entire folders with other individuals.
++The method of sharing is the same.</p>
++<div class="section" id="share-with-another-owncloud-user">
++<h2>Share with another ownCloud user<a class="headerlink" href="#share-with-another-owncloud-user" title="Permalink to this headline">¶</a></h2>
++<p>Hover over the line containing the file or folder to be shared.
++And then select Share.
++The following dialog appears.</p>
++<p><img alt="10000000000003EC000000AB60616FA7_png" src="../_images/10000000000003EC000000AB60616FA7.png" style="width: 6.5in; height: 1.1071in;" /></p>
++<p>In the “share with user or group” text box, enter the user to share with, or the group to share with.
++Note, as letters are typed, the users and groups who match the typed string will appear.
++As a short cut, simply select the desired user/group</p>
++</div>
++<div class="section" id="setting-permissions-on-the-share">
++<h2>Setting Permissions on the share<a class="headerlink" href="#setting-permissions-on-the-share" title="Permalink to this headline">¶</a></h2>
++<p>When a file or folder is shared, the permissions may be modified stating what the other user may do with the file/folder.
++Once the share with user or group has been entered, the dialog will expand as follows.</p>
++<p><img alt="1000000000000404000000FCFC13E732_png" src="../_images/1000000000000404000000FCFC13E732.png" style="width: 6.5in; height: 1.5929in;" /></p>
++<p>If the shared with user has an email address configured, the sharing user may choose to notify the shared with user of the share.
++To do this, select the checkbox next to “notify by email”.
++It is important to note, this checkbox appears whether or not the shared with user has email configured.</p>
++<p>When sharing a file/folder, it is obvious that the file may be viewed or downloaded.
++However, if the shared with user is allowed to modify the file in any way, the “can edit” box should be checked.
++The sharing user may allow the shared with user to update, delete, or re-share the file.
++Note, by default, all permissions are set.</p>
++<p>It should be noted that when sharing a folder, an additional permission, “create” is available.
++When enabled, the shared to users can create new files and folders within the shared folder.</p>
++</div>
++<div class="section" id="share-as-a-link">
++<h2>Share as a link<a class="headerlink" href="#share-as-a-link" title="Permalink to this headline">¶</a></h2>
++<p>In the event that an ownCloud user desires to share a file with a non-ownCloud user, the file may be shared as a link.
++To share as a link, hover over the line containing the file and select Share.
++Then select the check box next to “Share link”</p>
++<p><img alt="10000000000003E8000001524A147A04_png" src="../_images/10000000000003E8000001524A147A04.png" style="width: 6.5in; height: 2.1965in;" /></p>
++<p>The link is then shown in the text box.
++The link may be copied and pasted into an email and sent to the other user.
++Alternatively, if email is setup within ownCloud, the sharing user may input the shared with user’s email address in the text box and select send.
++The shared user will then receive an email from the ownCloud server with the link.</p>
++<p>There may be circumstances where the file owner wants some security on the link so it cannot be accessed by anyone other than the desired person.
++To do this, the link may be Password Protected by selecting the “Password Protect” checkbox and entering a desired password.</p>
++<p><img alt="1000000000000403000001632F0B76F6_png" src="../_images/1000000000000403000001632F0B76F6.png" style="width: 6.5in; height: 2.2465in;" /></p>
++</div>
++<div class="section" id="setting-expiration-date">
++<h2>Setting Expiration Date<a class="headerlink" href="#setting-expiration-date" title="Permalink to this headline">¶</a></h2>
++<p>ownCloud allows the sharing user to expire a file or folder share at a given date.
++This expiration applies to all shares within the folder as well.
++So, if a user expires a folder share, all files within the folder will no longer be shared.</p>
++<p>To set an expiration, select the Set expiration date checkbox and then select the expiration date.
++(The calendar will appear when the mouse is clicked in the Expiration date text box.</p>
++<p><img alt="10000000000004010000017E4A6552BC_png" src="../_images/10000000000004010000017E4A6552BC.png" style="width: 6.5in; height: 2.422in;" /></p>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/share_app/index.html
index 0c88c56,0000000..91cf8d6
mode 100644,000000..100644
--- a/core/doc/admin/share_app/index.html
+++ b/core/doc/admin/share_app/index.html
@@@ -1,172 -1,0 +1,165 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Sharing App</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#enable-the-app">Enable the app</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#configuring-the-permitted-functionality">Configuring the permitted functionality</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Utilization.html">Utilization</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#share-with-another-owncloud-user">Share with another ownCloud user</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#setting-permissions-on-the-share">Setting Permissions on the share</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#share-as-a-link">Share as a link</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#setting-expiration-date">Setting Expiration Date</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Retrieving_shared_data.html">Retrieving shared data</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Retrieving_shared_data.html#user-group-shares">User/group shares</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Retrieving_shared_data.html#share-as-link">Share as link</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sharing_api/Contents.html
index 0c88c56,0000000..82f657b
mode 100644,000000..100644
--- a/core/doc/admin/sharing_api/Contents.html
+++ b/core/doc/admin/sharing_api/Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="contents">
++<h1>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h1>
++<p>` <<a class="reference external" href="file:///C:/Users/ser72/Desktop/S3_parent/Support/DOCUMENTS/Community/HYPERLINK#_Toc378743796">file:///C:/Users/ser72/Desktop/S3_parent/Support/DOCUMENTS/Community/HYPERLINK#_Toc378743796</a>>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sharing_api/Create_a_new_Share.html
index 0000000,0000000..824b959
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/sharing_api/Create_a_new_Share.html
@@@ -1,0 -1,0 +1,408 @@@
++
++<!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>Create a new Share — 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" />
++<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>
++<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="create-a-new-share">
++<h1>Create a new Share<a class="headerlink" href="#create-a-new-share" title="Permalink to this headline">¶</a></h1>
++<p>To create a new share the following may be used.
++This allows sharing with a user or group or as a link.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="14%" />
++<col width="32%" />
++<col width="6%" />
++<col width="48%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Syntax</td>
++<td><Base URL></td>
++<td> </td>
++<td> </td>
++</tr>
++<tr class="row-even"><td>Method</td>
++<td>POST</td>
++<td> </td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td>Mandatory Argument</td>
++<td>path</td>
++<td>string</td>
++<td>Full path of the file/folder being shared</td>
++</tr>
++<tr class="row-even"><td>Mandatory Argument</td>
++<td>shareType</td>
++<td>int</td>
++<td>‘0’ = user, ‘1’ = group, ‘3’ = Public link</td>
++</tr>
++<tr class="row-odd"><td>Argument</td>
++<td>shareWith</td>
++<td>string</td>
++<td>User/group ID with who the file should be shared.
++This is mandatory for shareType of 0 or 1</td>
++</tr>
++<tr class="row-even"><td>Argument</td>
++<td>publicUpload</td>
++<td>boolean</td>
++<td><p class="first">If ‘false’ (default) public cannot upload to a public shared folder</p>
++<p>If ‘true’ public can upload to a shared folder</p>
++<p class="last">Only available for public link shares</p>
++</td>
++</tr>
++<tr class="row-odd"><td>Argument</td>
++<td>password</td>
++<td>string</td>
++<td><p class="first">Password to protect a public link share</p>
++<p class="last">Only available for public link shares</p>
++</td>
++</tr>
++<tr class="row-even"><td>Argument</td>
++<td>permissions</td>
++<td>int</td>
++<td>From table in section 2.2 for user or group shares</td>
++</tr>
++<tr class="row-odd"><td>Result</td>
++<td>XML Code with share ID of newly created share</td>
++<td> </td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++<p>The following is a list of returned status codes:</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="35%" />
++<col width="65%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>HTTP Status Code</td>
++<td>Description</td>
++</tr>
++<tr class="row-even"><td>100</td>
++<td>Successful</td>
++</tr>
++<tr class="row-odd"><td>400</td>
++<td>Unknown Share type</td>
++</tr>
++<tr class="row-even"><td>403</td>
++<td>Public Upload disabled by admin</td>
++</tr>
++<tr class="row-odd"><td>404</td>
++<td>File couldn’t be shared</td>
++</tr>
++</tbody>
++</table>
++<div class="section" id="poster-share-as-a-link">
++<h2>Poster – Share as a link<a class="headerlink" href="#poster-share-as-a-link" title="Permalink to this headline">¶</a></h2>
++<p>The following example shares the file “test/Lab.txt” as a public link</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="25%" />
++<col width="75%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Field</td>
++<td>Value</td>
++</tr>
++<tr class="row-even"><td><strong>URL</strong></td>
++<td>Base URL for the API of the ownCloud server</td>
++</tr>
++<tr class="row-odd"><td><strong>User Auth</strong></td>
++<td>User ID of the file owner</td>
++</tr>
++<tr class="row-even"><td><strong>Password</strong></td>
++<td>User’s Password</td>
++</tr>
++<tr class="row-odd"><td><strong>Name</strong></td>
++<td>Argument being passed</td>
++</tr>
++<tr class="row-even"><td><strong>Value</strong></td>
++<td>Full path of file/folder shared</td>
++</tr>
++</tbody>
++</table>
++<p><img alt="1000000000000298000001874D3CA506_png" src="../_images/1000000000000298000001874D3CA506.png" style="width: 6.5in; height: 3.828in;" /></p>
++<p>Navigate to the “Content to Send” tab and select “Body from Parameters”</p>
++<p><img alt="1000000000000298000001870B0581FA_png" src="../_images/1000000000000298000001870B0581FA.png" style="width: 6.5in; height: 3.828in;" /></p>
++<p>Select POST.</p>
++</div>
++<div class="section" id="curl-share-as-link">
++<h2>Curl – Share as link<a class="headerlink" href="#curl-share-as-link" title="Permalink to this headline">¶</a></h2>
++<p>#curl <a class="reference external" href="http:/">http:/</a>/<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares -k -u user:password -X POST –data “path=<file>&shareType=3”</p>
++<p>#curl
++<a class="reference external" href="http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares">http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares</a></p>
++<p>-k -u ser72_oc6:Password01 -X POST –data “path=test/Lab.txt&shareType=3”</p>
++</div>
++<div class="section" id="output">
++<h2>Output<a class="headerlink" href="#output" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="77%" />
++<col width="23%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><?xml version=”1.0”?></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><ocs></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><status>ok</status></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><statuscode>100</statuscode></td>
++<td>Status = 100: successful</td>
++</tr>
++<tr class="row-even"><td><message/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><id>9</id></td>
++<td>Share ID = 9</td>
++</tr>
++<tr class="row-even"><td><url>http://192.168.1.63/owncloud6RC3/public.php?service=files&amp;t=e1947aaeaa2b88a69cc1e90bf27ddfe2</url></td>
++<td>Share Link.
++Send this to the desired users</td>
++</tr>
++<tr class="row-odd"><td><token>e1947aaeaa2b88a69cc1e90bf27ddfe2</token></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td></data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><strong></ocs></strong></td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++</div>
++<div class="section" id="poster-share-with-user">
++<h2>Poster – Share with user<a class="headerlink" href="#poster-share-with-user" title="Permalink to this headline">¶</a></h2>
++<p>The following example shares a file called “test/Lab.txt” with user “ser72”</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="25%" />
++<col width="75%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Field</td>
++<td>Value</td>
++</tr>
++<tr class="row-even"><td><strong>URL</strong></td>
++<td>Base URL for the API of the ownCloud server</td>
++</tr>
++<tr class="row-odd"><td><strong>User Auth</strong></td>
++<td>User ID of the file owner</td>
++</tr>
++<tr class="row-even"><td><strong>Password</strong></td>
++<td>User’s Password</td>
++</tr>
++<tr class="row-odd"><td><strong>Name</strong></td>
++<td>Argument being passed</td>
++</tr>
++<tr class="row-even"><td><strong>Value</strong></td>
++<td>Full path of file/folder shared</td>
++</tr>
++</tbody>
++</table>
++<p><img alt="1000000000000289000001A9D7F3941F_png" src="../_images/1000000000000289000001A9D7F3941F.png" style="width: 6.5in; height: 4.2563in;" /></p>
++<p>Navigate to the “Content to Send Tab” and select “Body from Parameters”</p>
++<p><img alt="10000000000002950000019EF5732E36_png" src="../_images/10000000000002950000019EF5732E36.png" style="width: 6.5in; height: 4.0701in;" /></p>
++<p>Select POST.</p>
++</div>
++<div class="section" id="curl-share-with-user">
++<h2>Curl – Share with User<a class="headerlink" href="#curl-share-with-user" title="Permalink to this headline">¶</a></h2>
++<p>#curl <a class="reference external" href="http:/">http:/</a>/<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares -k -u user:password -X POST –data “path=<file>&shareType=0&shareWith=<user>”</p>
++<p>#curl
++<a class="reference external" href="http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares">http://192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares</a></p>
++<p>-k -u ser72_oc6:Password01 -X POST –data “path=test/Lab.txt&shareType=0&shareWith=ser72”</p>
++</div>
++<div class="section" id="id2">
++<h2>output<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="55%" />
++<col width="45%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><?xml version=”1.0”?></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><ocs></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><status>ok</status></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><statuscode>100</statuscode></td>
++<td>Status: 100: Successful</td>
++</tr>
++<tr class="row-even"><td><message/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><id>10</id></td>
++<td>Share ID = 10</td>
++</tr>
++<tr class="row-even"><td></data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></ocs></td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/sharing_api/Delete_Share.html
index 0c88c56,0000000..bb6e617
mode 100644,000000..100644
--- a/core/doc/admin/sharing_api/Delete_Share.html
+++ b/core/doc/admin/sharing_api/Delete_Share.html
@@@ -1,172 -1,0 +1,231 @@@
 +
 +<!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>
++    <title>Delete Share — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="delete-share">
++<h1>Delete Share<a class="headerlink" href="#delete-share" title="Permalink to this headline">¶</a></h1>
++<p>The following method should be used in the event that a file share should be removed.</p>
++<p>Note: the share ID can be obtained from the output of any of the previous Share API calls or the creation of a new share.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="30%" />
++<col width="70%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Syntax</td>
++<td><Base URL>/<share id></td>
++</tr>
++<tr class="row-even"><td>Method</td>
++<td>DELETE</td>
++</tr>
++<tr class="row-odd"><td>Argument</td>
++<td>Share ID (int)</td>
++</tr>
++</tbody>
++</table>
++<p>The following is a list of returned status codes:</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="41%" />
++<col width="59%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>HTTP Status Code</td>
++<td>Description</td>
++</tr>
++<tr class="row-even"><td>100</td>
++<td>Successful</td>
++</tr>
++<tr class="row-odd"><td>404</td>
++<td>File couldn’t be deleted</td>
++</tr>
++</tbody>
++</table>
++<div class="section" id="poster">
++<h2>Poster<a class="headerlink" href="#poster" title="Permalink to this headline">¶</a></h2>
++<p>To remove the share identified by ID 10, use the following method.</p>
++<p><img alt="10000000000002910000018B31D51F03_png" src="../_images/10000000000002910000018B31D51F03.png" style="width: 6.5in; height: 3.9075in;" /></p>
++<p>Press DELETE</p>
++</div>
++<div class="section" id="curl">
++<h2>Curl<a class="headerlink" href="#curl" title="Permalink to this headline">¶</a></h2>
++<p>#curl –X “DELETE” <a class="reference external" href="http:/">http:/</a>/<user>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/files/<share_id></p>
++<p>#curl –X “DELETE”
++<a class="reference external" href="http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/10">http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/10</a></p>
 +</div>
++<div class="section" id="output">
++<h2>output<a class="headerlink" href="#output" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="56%" />
++<col width="44%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><?xml version=”1.0”?></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><ocs></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><status>ok</status></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><statuscode>100</statuscode></td>
++<td>Status=100: Successful</td>
++</tr>
++<tr class="row-even"><td><message/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><data/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></ocs></td>
++<td> </td>
++</tr>
++</tbody>
++</table>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sharing_api/Get_All_Shares.html
index 0000000,0000000..a1c7c78
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/sharing_api/Get_All_Shares.html
@@@ -1,0 -1,0 +1,305 @@@
++
++<!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>Get All Shares — 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" />
++<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>
++<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="get-all-shares">
++<h1>Get All Shares<a class="headerlink" href="#get-all-shares" title="Permalink to this headline">¶</a></h1>
++<p>To obtain a list of all files shared by a user, the following can be used.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="17%" />
++<col width="83%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Syntax</td>
++<td><Base URL></td>
++</tr>
++<tr class="row-even"><td>Method</td>
++<td>GET</td>
++</tr>
++<tr class="row-odd"><td>Result</td>
++<td>XML code with all shares by the user</td>
++</tr>
++</tbody>
++</table>
++<p>The following is a list of returned status codes:</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="46%" />
++<col width="54%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>HTTP Status Code</td>
++<td>Description</td>
++</tr>
++<tr class="row-even"><td>100</td>
++<td>Successful</td>
++</tr>
++<tr class="row-odd"><td>404</td>
++<td>Couldn’t get shares</td>
++</tr>
++</tbody>
++</table>
++<div class="section" id="poster">
++<h2>Poster:<a class="headerlink" href="#poster" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="25%" />
++<col width="75%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Field</td>
++<td>Value</td>
++</tr>
++<tr class="row-even"><td><strong>URL</strong></td>
++<td>Base URL for the API of the ownCloud server</td>
++</tr>
++<tr class="row-odd"><td><strong>User Auth</strong></td>
++<td>User ID performing the Share</td>
++</tr>
++<tr class="row-even"><td><strong>Password</strong></td>
++<td>User’s Password</td>
++</tr>
++</tbody>
++</table>
++<p><img alt="10000201000002FC000001DC2DDAD2F1_png" src="../_images/10000201000002FC000001DC2DDAD2F1.png" /></p>
++<p>Select “GET”</p>
++</div>
++<div class="section" id="curl">
++<h2>Curl<a class="headerlink" href="#curl" title="Permalink to this headline">¶</a></h2>
++<p>The user is the id of the user who shares the files.
++The password belongs to that user as well.</p>
++<p>#curl <a class="reference external" href="http:/">http:/</a>/<user>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares</p>
++<p>#curl
++<a class="reference external" href="http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/appsi/files_sharing/api/v1/shares">http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/appsi/files_sharing/api/v1/shares</a></p>
++</div>
++<div class="section" id="output">
++<h2>output<a class="headerlink" href="#output" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="55%" />
++<col width="45%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><?xml version=”1.0”?></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><ocs></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><status>ok</status></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><statuscode>100</statuscode></td>
++<td>Status = 100: Successful</td>
++</tr>
++<tr class="row-even"><td><message/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><id>6</id></td>
++<td>Share ID = 6</td>
++</tr>
++<tr class="row-odd"><td><item_type>file</item_type></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><item_source>138</item_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><parent/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_type>0</share_type></td>
++<td>Share Type = 0: User share</td>
++</tr>
++<tr class="row-odd"><td><share_with>ser72</share_with></td>
++<td>File shared with user ser72</td>
++</tr>
++<tr class="row-even"><td><file_source>138</file_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><path>/Lab.txt</path></td>
++<td>File name /Lab.txt</td>
++</tr>
++<tr class="row-even"><td><permissions>27</permissions></td>
++<td>Permissions: Re-share, Read, Delete, Update</td>
++</tr>
++<tr class="row-odd"><td><stime>1386697532</stime></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><expiration/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><token/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><storage>4</storage></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><mail_send>0</mail_send></td>
++<td>Do not send email alerting of the share</td>
++</tr>
++<tr class="row-even"><td><share_with_displayname>ser72</share_with_displayname></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td></data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></ocs></td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/sharing_api/Get_Information_about_a_known_share.html
index 0000000,0000000..d23fa83
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/sharing_api/Get_Information_about_a_known_share.html
@@@ -1,0 -1,0 +1,309 @@@
++
++<!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>Get Information about a known share — 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" />
++<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>
++<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="get-information-about-a-known-share">
++<h1>Get Information about a known share<a class="headerlink" href="#get-information-about-a-known-share" title="Permalink to this headline">¶</a></h1>
++<p>To get information about a share when the share ID is known, use the following.</p>
++<p>Note: the share ID can be obtained from the output of any of the previous Share API calls or the creation of a new share.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="25%" />
++<col width="75%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Syntax</td>
++<td><Base URL>/<share id></td>
++</tr>
++<tr class="row-even"><td>Method</td>
++<td>GET</td>
++</tr>
++<tr class="row-odd"><td>Arguments</td>
++<td>Share id (int)</td>
++</tr>
++<tr class="row-even"><td>Result</td>
++<td>XML code with share information</td>
++</tr>
++<tr class="row-odd"><td> </td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++<p>The following is a list of returned status codes:</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="46%" />
++<col width="54%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>HTTP Status Code</td>
++<td>Description</td>
++</tr>
++<tr class="row-even"><td>100</td>
++<td>Successful</td>
++</tr>
++<tr class="row-odd"><td>404</td>
++<td>Share doesn’t exist</td>
++</tr>
++</tbody>
++</table>
++<div class="section" id="poster">
++<h2>Poster<a class="headerlink" href="#poster" title="Permalink to this headline">¶</a></h2>
++<p>This example shows the output of share information for share ID “7”</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="21%" />
++<col width="79%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Field</td>
++<td>Value</td>
++</tr>
++<tr class="row-even"><td><strong>URL</strong></td>
++<td>Base URL for the API of the ownCloud server/<share id></td>
++</tr>
++<tr class="row-odd"><td><strong>User Auth</strong></td>
++<td>User ID of the file owner</td>
++</tr>
++<tr class="row-even"><td><strong>Password</strong></td>
++<td>User’s Password</td>
++</tr>
++</tbody>
++</table>
++<p><img alt="1000000000000288000001A1D5BE4881_png" src="../_images/1000000000000288000001A1D5BE4881.png" style="width: 6.5in; height: 4.1819in;" /></p>
++</div>
++<div class="section" id="curl">
++<h2>Curl<a class="headerlink" href="#curl" title="Permalink to this headline">¶</a></h2>
++<p>#curl <a class="reference external" href="http:/">http:/</a>/<user>:<passowrd>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares/<share_id></p>
++<p>#curl <a class="reference external" href="http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/7">http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/7</a></p>
++</div>
++<div class="section" id="output">
++<h2>output<a class="headerlink" href="#output" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="70%" />
++<col width="30%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><?xml version=”1.0”?></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><ocs></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><status>ok</status></td>
++<td>Status=100: successful</td>
++</tr>
++<tr class="row-odd"><td><statuscode>100</statuscode></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><message/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><id>7</id></td>
++<td>Share ID = 7</td>
++</tr>
++<tr class="row-odd"><td><item_type>file</item_type></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><item_source>675</item_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><parent/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_type>0</share_type></td>
++<td>Share type = 0: user</td>
++</tr>
++<tr class="row-odd"><td><share_with>ser72</share_with></td>
++<td>Share with user ser72</td>
++</tr>
++<tr class="row-even"><td><file_source>675</file_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><path>/test share api/ieee.txt</path></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><permissions>27</permissions></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><stime>1386698116</stime></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><expiration/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><token/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><storage>4</storage></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><mail_send>0</mail_send></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_with_displayname>ser72</share_with_displayname></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td></data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></ocs></td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/sharing_api/Get_Shares_from_a_Specific_File_or_Folder.html
index 0000000,0000000..ae5e8c5
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/sharing_api/Get_Shares_from_a_Specific_File_or_Folder.html
@@@ -1,0 -1,0 +1,500 @@@
++
++<!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>Get Shares from a Specific File or Folder — 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" />
++<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>
++<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="get-shares-from-a-specific-file-or-folder">
++<h1>Get Shares from a Specific File or Folder<a class="headerlink" href="#get-shares-from-a-specific-file-or-folder" title="Permalink to this headline">¶</a></h1>
++<p>The following will provide a list shares for a specific file.
++The input is the full path of the desired file.
++The output is a list of everyone who has the file shared with them.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="18%" />
++<col width="17%" />
++<col width="7%" />
++<col width="58%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><strong>Syntax</strong></td>
++<td><Base URL></td>
++<td> </td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><strong>Method</strong></td>
++<td>GET</td>
++<td> </td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><strong>Mandatory Argument</strong></td>
++<td>Path</td>
++<td>string</td>
++<td>Path to file or folder</td>
++</tr>
++<tr class="row-even"><td><strong>Argument</strong></td>
++<td>Reshares</td>
++<td>boolean</td>
++<td><p class="first">If set to ‘false’ (default), only shares from the current user are returned</p>
++<p class="last">If set to ‘true’, all shares from the given file are returned</p>
++</td>
++</tr>
++<tr class="row-odd"><td><strong>Argument</strong></td>
++<td>Subfiles</td>
++<td>boolean</td>
++<td><p class="first">If set to ‘false’ (default), lists only the folder being shared</p>
++<p class="last">If set to ‘true’, all shared files within the folder are returned.</p>
++</td>
++</tr>
++<tr class="row-even"><td><strong>Result</strong></td>
++<td>XML code with shares</td>
++<td> </td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++<p>The following is a list of returned status codes:</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="25%" />
++<col width="75%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>HTTP Status Code</td>
++<td>Description</td>
++</tr>
++<tr class="row-even"><td>100</td>
++<td>Successful</td>
++</tr>
++<tr class="row-odd"><td>400</td>
++<td>Not a directory (if the ‘subfile’ argument was used)</td>
++</tr>
++<tr class="row-even"><td>404</td>
++<td>File does not exist</td>
++</tr>
++</tbody>
++</table>
++<div class="section" id="poster-default-arguments">
++<h2>Poster - Default arguments<a class="headerlink" href="#poster-default-arguments" title="Permalink to this headline">¶</a></h2>
++<p>This example shows the output of share information for “test share api/ieee.txt”</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="25%" />
++<col width="75%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Field</td>
++<td>Value</td>
++</tr>
++<tr class="row-even"><td><strong>URL</strong></td>
++<td>Base URL for the API of the ownCloud server</td>
++</tr>
++<tr class="row-odd"><td><strong>User Auth</strong></td>
++<td>User ID of the file owner</td>
++</tr>
++<tr class="row-even"><td><strong>Password</strong></td>
++<td>User’s Password</td>
++</tr>
++<tr class="row-odd"><td><strong>Name</strong></td>
++<td>Argument being passed</td>
++</tr>
++<tr class="row-even"><td><strong>Value</strong></td>
++<td>Full path of file/folder shared</td>
++</tr>
++</tbody>
++</table>
++<p>Navigate to the “Parameters” tab and input the Name and value.</p>
++<p><img alt="10000000000002720000013FB6EDA793_png" src="../_images/10000000000002720000013FB6EDA793.png" style="width: 6.5in; height: 3.3126in;" /></p>
++<p>Navigate to the “Content to Send” tab and select “Body from Parameters” to move the required parameters to the query.</p>
++<p><img alt="1000000000000291000001951B69B9A6_png" src="../_images/1000000000000291000001951B69B9A6.png" style="width: 6.5in; height: 4.0071in;" /></p>
++<p>Select GET.</p>
++</div>
++<div class="section" id="curl-default-configuration">
++<h2>Curl – default configuration:<a class="headerlink" href="#curl-default-configuration" title="Permalink to this headline">¶</a></h2>
++<p>#curl –G –data “path=test_share_api/ieee.txt” <a class="reference external" href="http:/">http:/</a>/<userid>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares</p>
++<p>#curl –G –data “path=test_share_api/ieee.txt”
++<a class="reference external" href="http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares">http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares</a></p>
++</div>
++<div class="section" id="output">
++<h2>output<a class="headerlink" href="#output" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="64%" />
++<col width="36%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><?xml version=”1.0”?></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><ocs></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><status>ok</status></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><statuscode>100</statuscode></td>
++<td>Status=100: Successful</td>
++</tr>
++<tr class="row-even"><td><message/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><id>7</id></td>
++<td>Share ID=7</td>
++</tr>
++<tr class="row-odd"><td><item_type>file</item_type></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><item_source>675</item_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><parent/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_type>0</share_type></td>
++<td>Share Type=0: user</td>
++</tr>
++<tr class="row-odd"><td><share_with>ser72</share_with></td>
++<td>Share with user ser72</td>
++</tr>
++<tr class="row-even"><td><file_source>675</file_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><path>/test share api/ieee.txt</path></td>
++<td>File /test share api/ieee.txt</td>
++</tr>
++<tr class="row-even"><td><permissions>27</permissions></td>
++<td>Permissions 27</td>
++</tr>
++<tr class="row-odd"><td><stime>1386698116</stime></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><expiration/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><token/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><storage>4</storage></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><mail_send>0</mail_send></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_with_displayname>ser72</share_with_displayname></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td></data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></ocs></td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++</div>
++<div class="section" id="poster-to-add-another-argument-such-as-re-shares">
++<h2>Poster - To add another argument, such as re-shares:<a class="headerlink" href="#poster-to-add-another-argument-such-as-re-shares" title="Permalink to this headline">¶</a></h2>
++<p>This example shows the output of share information for “test share api/ieee.txt”.
++reshares is set to true which will show output if the file is re-shared by another user.</p>
++<p><img alt="1000000000000304000001B964698779_png" src="../_images/1000000000000304000001B964698779.png" style="width: 6.5in; height: 3.7134in;" /></p>
++<p>Navigate to the “Content to Send” tab and select “Body from Parameters”</p>
++<p><img alt="100000000000029B0000018885B5282E_png" src="../_images/100000000000029B0000018885B5282E.png" style="width: 6.5in; height: 3.8201in;" /></p>
++<p>Select Get</p>
++</div>
++<div class="section" id="curl-to-add-another-argument-such-as-re-shares">
++<h2>Curl – To add another argument, such as re-shares<a class="headerlink" href="#curl-to-add-another-argument-such-as-re-shares" title="Permalink to this headline">¶</a></h2>
++<p>#curl –G –data “path=test_share_api/ieee.tx&reshares=true” <a class="reference external" href="http:/">http:/</a>/<userid>:<password>@<ip>/ocs/v1.php/apps/files_sharing/api/v1/shares</p>
++<p>#curl –G –data “path=test_share_api/ieee.tx&reshares=true”
++<a class="reference external" href="http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares">http://ser72_oc6:Password01@192.168.1.63/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares</a></p>
++</div>
++<div class="section" id="id2">
++<h2>output<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
++<table border="1" class="docutils">
++<colgroup>
++<col width="60%" />
++<col width="40%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td><?xml version=”1.0”?></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><ocs></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><status>ok</status></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><statuscode>100</statuscode></td>
++<td>Status=100: Successful</td>
++</tr>
++<tr class="row-even"><td><message/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></meta></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><id>7</id></td>
++<td>Share id = 7</td>
++</tr>
++<tr class="row-odd"><td><item_type>file</item_type></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><item_source>675</item_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><parent/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_type>0</share_type></td>
++<td>Share Type=0: User</td>
++</tr>
++<tr class="row-odd"><td><share_with>ser72</share_with></td>
++<td>Share with user ser72</td>
++</tr>
++<tr class="row-even"><td><file_source>675</file_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><path>/test share api/ieee.txt</path></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><permissions>27</permissions></td>
++<td>Permissions 27</td>
++</tr>
++<tr class="row-odd"><td><stime>1386698116</stime></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><expiration/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><token/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><storage>4</storage></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><mail_send>0</mail_send></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_with_displayname>ser72</share_with_displayname></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><element></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><id>8</id></td>
++<td>Share id 8</td>
++</tr>
++<tr class="row-even"><td><item_type>file</item_type></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><parent>7</parent></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_type>0</share_type></td>
++<td>Parent share id = 7</td>
++</tr>
++<tr class="row-odd"><td><share_with>ser73</share_with></td>
++<td>Share with ser73</td>
++</tr>
++<tr class="row-even"><td><file_source>675</file_source></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><path>/test share api/ieee.txt</path></td>
++<td>Share file /test share api/ieee.txt</td>
++</tr>
++<tr class="row-even"><td><permissions>19</permissions></td>
++<td>Permissions 19 – read, update, share</td>
++</tr>
++<tr class="row-odd"><td><stime>1386698465</stime></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><expiration/></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><token/></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><storage>4</storage></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td><mail_send>0</mail_send></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td><share_with_displayname>ser73</share_with_displayname></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></element></td>
++<td> </td>
++</tr>
++<tr class="row-even"><td></data></td>
++<td> </td>
++</tr>
++<tr class="row-odd"><td></ocs></td>
++<td> </td>
++</tr>
++</tbody>
++</table>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/sharing_api/Introduction.html
index 0c88c56,0000000..ff2254f
mode 100644,000000..100644
--- a/core/doc/admin/sharing_api/Introduction.html
+++ b/core/doc/admin/sharing_api/Introduction.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>This document will describe how to use the ownCloud Sharing API.
++The sharing API allows for the creation of new shares, obtaining a list of shares, and deleting shares.
++In addition, information such a lists of files shared to users can be obtained.</p>
++<p>In order to utilize this API, all user ID’s involved in the share, as well as full path names of files is required to be known.</p>
++<p>Two methods will be shown:
++Firefox Plugin “Poster” and Curl via the command line.</p>
++<p>The base URL for all calls to the share API is:
++owncloud_base_url>/ocs/v1.php/apps/files_sharing/api/v1/shares</p>
++<div class="section" id="permissions">
++<h2>Permissions<a class="headerlink" href="#permissions" title="Permalink to this headline">¶</a></h2>
++<p>The following table describes the Permissions of a share.
++The Permissions are contained in the XML code output of the command.</p>
++<table border="1" class="docutils">
++<colgroup>
++<col width="16%" />
++<col width="84%" />
++</colgroup>
++<tbody valign="top">
++<tr class="row-odd"><td>Value</td>
++<td>Permissions</td>
++</tr>
++<tr class="row-even"><td><strong>1</strong></td>
++<td>Read only – Default for “public” shares</td>
++</tr>
++<tr class="row-odd"><td><strong>2</strong></td>
++<td>Update</td>
++</tr>
++<tr class="row-even"><td><strong>4</strong></td>
++<td>Create</td>
++</tr>
++<tr class="row-odd"><td><strong>8</strong></td>
++<td>Delete</td>
++</tr>
++<tr class="row-even"><td><strong>16</strong></td>
++<td>Re-share</td>
++</tr>
++<tr class="row-odd"><td><strong>31</strong></td>
++<td>All above – Default for “private” shares</td>
++</tr>
++</tbody>
++</table>
++<p>To obtain combinations, add the desired values together.
++For instance, for “Re-Share”, “delete”, “read”, “update”, add 16+8+2+1 = 27.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sharing_api/index.html
index 0000000,0000000..1542421
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/sharing_api/index.html
@@@ -1,0 -1,0 +1,187 @@@
++
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
++  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
++
++
++<html xmlns="http://www.w3.org/1999/xhtml">
++  <head>
++    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
++    
++    <title><no title> — 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" />
++<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>
++<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">
++						
++  <p><strong>ownCloud Sharing API</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Contents.html">Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Introduction.html#permissions">Permissions</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Get_All_Shares.html">Get All Shares</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Get_All_Shares.html#poster">Poster:</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_All_Shares.html#curl">Curl</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_All_Shares.html#output">output</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Get_Shares_from_a_Specific_File_or_Folder.html">Get Shares from a Specific File or Folder</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Get_Shares_from_a_Specific_File_or_Folder.html#poster-default-arguments">Poster - Default arguments</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_Shares_from_a_Specific_File_or_Folder.html#curl-default-configuration">Curl – default configuration:</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_Shares_from_a_Specific_File_or_Folder.html#output">output</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_Shares_from_a_Specific_File_or_Folder.html#poster-to-add-another-argument-such-as-re-shares">Poster - To add another argument, such as re-shares:</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_Shares_from_a_Specific_File_or_Folder.html#curl-to-add-another-argument-such-as-re-shares">Curl – To add another argument, such as re-shares</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_Shares_from_a_Specific_File_or_Folder.html#id2">output</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Get_Information_about_a_known_share.html">Get Information about a known share</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Get_Information_about_a_known_share.html#poster">Poster</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_Information_about_a_known_share.html#curl">Curl</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Get_Information_about_a_known_share.html#output">output</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Create_a_new_Share.html">Create a new Share</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Create_a_new_Share.html#poster-share-as-a-link">Poster – Share as a link</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Create_a_new_Share.html#curl-share-as-link">Curl – Share as link</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Create_a_new_Share.html#output">Output</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Create_a_new_Share.html#poster-share-with-user">Poster – Share with user</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Create_a_new_Share.html#curl-share-with-user">Curl – Share with User</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Create_a_new_Share.html#id2">output</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Delete_Share.html">Delete Share</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Delete_Share.html#poster">Poster</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Delete_Share.html#curl">Curl</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Delete_Share.html#output">output</a></li>
++</ul>
++</li>
++</ul>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/sync_client/Advanced_Usage.html
index 0000000,0000000..b9b1f5a
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/sync_client/Advanced_Usage.html
@@@ -1,0 -1,0 +1,205 @@@
++
++<!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>Advanced Usage — 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" />
++<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>
++<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="advanced-usage">
++<h1>Advanced Usage<a class="headerlink" href="#advanced-usage" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="options">
++<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
++<p>When invoking the client from the command line, the following options are supported.
++The invocation must be done as the admin user on Windows.</p>
++<ul class="simple">
++<li>-h, –help: opens a window showing all the below options.</li>
++<li>–logwindow: open a window to show log output.</li>
++<li>–logfile <filename>: write log output to file <filename>.</li>
++<li>–logdir <name>: write each sync log output to a new file in directory <name>.</li>
++<li>–logexpire <hours>: removes logs older than <hours> hours.
++To be used with –logdir</li>
++<li>–logflush: flush the log file after every write.</li>
++<li>–confdir <dirname>: Use the given configuration directory.</li>
++</ul>
++</div>
++<div class="section" id="config-file">
++<h2>Config file<a class="headerlink" href="#config-file" title="Permalink to this headline">¶</a></h2>
++<p>The ownCloud client reads a configuration file for certain parameters.</p>
++<p>The locations of the config file is as follows:</p>
++<ul class="simple">
++<li>Linux:
++$HOME/.local/share/data/ownCloud/owncloud.cfg</li>
++<li>Windows:
++%LOCALAPPDATA%owncloudowncloud.cfg</li>
++<li>MAC:
++$HOME/Library/Application Support/owncloud</li>
++</ul>
++<p>The following parameters contained within the config file may be modified:</p>
++<ul class="simple">
++<li>remotePollinterval (default 30000): Poll time for the remote repository in milliseconds</li>
++<li>maxLogLines (default 20000): Maximum count of log lines shown in the long window.</li>
++</ul>
++</div>
++<div class="section" id="comparison-and-conflicts">
++<h2>Comparison and Conflicts<a class="headerlink" href="#comparison-and-conflicts" title="Permalink to this headline">¶</a></h2>
++<p>In a sync run, the client must detect if one of the two repositories have updated files.
++On the local repository, the client traverses the file tree and compares the modification time of each file with the value it was before.
++The previous value is stored in the client’s database.
++If it is not, it means the file was recently added to the local repository.
++Note that on the local side, the modification time is a good attribute to detect changes because it does not depend on time shifts.</p>
++<p>For the remote (i.e., ownCloud server) repository, the client compares the ETag of each file with its previous value.
++Like the client, the previous value is obtained from a database query.
++If the ETag is the same, the file has not changed.</p>
++<p>In case a file has changed on both, the local and remote repositories, since the last sync run, it cannot be determined which version of the file should be used.
++However, it is important not to lose any of the changes.</p>
++<p>This is called a conflict case.
++The client resolves it by creating a conflict file of the older of the two files and saves the newer one under the original file name.
++Conflict files are always created on the client and
++not the server.
++The conflict file has the same name as the original file appended with the timestamp of the conflict detection.</p>
++</div>
++<div class="section" id="ignored-files">
++<h2>Ignored Files<a class="headerlink" href="#ignored-files" title="Permalink to this headline">¶</a></h2>
++<p>The ownCloud client will not sync the following files:</p>
++<ul class="simple">
++<li>Files matching one of the patterns in the Ignored Files Editor.</li>
++<li>Files containing special characters that do not work on certain file systems.</li>
++<li>Files starting in the .csync_journal.db (reserved for journaling).</li>
++<li>Files whose complete path is greater than 256 characters will cause an error and not sync.</li>
++</ul>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/sync_client/Introduction.html
index 0c88c56,0000000..6554175
mode 100644,000000..100644
--- a/core/doc/admin/sync_client/Introduction.html
+++ b/core/doc/admin/sync_client/Introduction.html
@@@ -1,172 -1,0 +1,149 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>The ownCloud Sync Client is a desktop program installed on a user’s computer.
++It allows a user to specify one or more directories on the local machine to sync to the ownCloud server.
++It allows the user to always have the latest files wherever they may be.
++When a change is made to the file on the computer, it will sync to the ownCloud server via the sync client.</p>
++<p>The ownCloud Sync Client is available for Windows, MAC OS X, and various Linux distributions.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sync_client/Obtaining_the_Client.html
index 0c88c56,0000000..f67f22f
mode 100644,000000..100644
--- a/core/doc/admin/sync_client/Obtaining_the_Client.html
+++ b/core/doc/admin/sync_client/Obtaining_the_Client.html
@@@ -1,172 -1,0 +1,160 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Obtaining the Client — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="obtaining-the-client">
++<h1>Obtaining the Client<a class="headerlink" href="#obtaining-the-client" title="Permalink to this headline">¶</a></h1>
++<p>The latest version of the Client can be obtained on the ownCloud web site.</p>
++<p>The ownCloud client for Windows is provided as a NSIS-based setup file for machine-wide installation.</p>
++<p>Installing the ownCloud client on MAC OS follows the normal app bundle installation pattern:</p>
++<ol class="arabic simple">
++<li>Download the installation file: Click
++ownCloud-x.y.z.dmg
++a window with the ownCloud icon opens.</li>
++<li>In that window, drag the ownCloud application into the
++Applications
++folder.</li>
++<li>On the right side of
++Applications
++, choose
++ownCloud</li>
++</ol>
++<p>The ownCloud client is also provided in a convenient repository for a wide range of Linux distributions.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sync_client/Setting_up_an_Account.html
index 0c88c56,0000000..e7410f9
mode 100644,000000..100644
--- a/core/doc/admin/sync_client/Setting_up_an_Account.html
+++ b/core/doc/admin/sync_client/Setting_up_an_Account.html
@@@ -1,172 -1,0 +1,161 @@@
 +
 +<!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>
++    <title>Setting up an Account — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="setting-up-an-account">
++<h1>Setting up an Account<a class="headerlink" href="#setting-up-an-account" title="Permalink to this headline">¶</a></h1>
++<p>If no account has been configured, the ownCloud Client will automatically assist in connecting to the ownCloud server after the application has been started.</p>
++<p>The first step is to enter the URL to the ownCloud server.
++This is the same address that is used in the browser.</p>
++<p><img alt="10000000000002650000018CA6A1BE66_png" src="../_images/10000000000002650000018CA6A1BE66.png" style="width: 6.3846in; height: 4.1252in;" /></p>
++<p>Next, enter the username and password.
++These are the same credentials used to log into the web interface.</p>
++<p><img alt="10000000000002690000018D3A8C9F17_png" src="../_images/10000000000002690000018D3A8C9F17.png" style="width: 6.4272in; height: 4.1346in;" /></p>
++<p>Finally, select the folder that the ownCloud Client will sync the contents of the ownCloud account with.
++By default, this folder is called ownCloud, which resides in the home directory.</p>
++<p><img alt="10000000000002650000018E4285E964_png" src="../_images/10000000000002650000018E4285E964.png" style="width: 6.3846in; height: 4.1457in;" /></p>
++<p>At this time, the synchronization between the root directories of the ownCloud server will begin.</p>
++<p>If selecting a local folder that already contains data, there are two options that exist.</p>
++<p><img alt="100000000000026A000001DCAF8778F2_png" src="../_images/100000000000026A000001DCAF8778F2.png" style="width: 6.4374in; height: 4.9583in;" /></p>
++<ul class="simple">
++<li>Keep local data: If selected, the files in the local folder on the client will be synced up to the ownCloud server.</li>
++<li>Start a clean sync: If selected, all files in the local folder on the client will be deleted and therefore not synced to the ownCloud server.</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sync_client/Table_of_Contents.html
index 0c88c56,0000000..bd435af
mode 100644,000000..100644
--- a/core/doc/admin/sync_client/Table_of_Contents.html
+++ b/core/doc/admin/sync_client/Table_of_Contents.html
@@@ -1,172 -1,0 +1,146 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc374017118>`_</p>
++<p>Reviewed by:</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/sync_client/Visual_Tour.html
index 0000000,0000000..282816f
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/sync_client/Visual_Tour.html
@@@ -1,0 -1,0 +1,261 @@@
++
++<!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>Visual Tour — 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" />
++<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>
++<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="visual-tour">
++<h1>Visual Tour<a class="headerlink" href="#visual-tour" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="icon">
++<h2>Icon<a class="headerlink" href="#icon" title="Permalink to this headline">¶</a></h2>
++<p>The ownCloud Client remains in the background and is visible as an icon in the system tray (Windows, KDE), status bar (MAC OS X), or notification area (Ubuntu).</p>
++<p><img alt="100000000000001D0000001E5C455170_png" src="../_images/100000000000001D0000001E5C455170.png" style="width: 0.302in; height: 0.3126in;" /></p>
++</div>
++<div class="section" id="menu">
++<h2>Menu<a class="headerlink" href="#menu" title="Permalink to this headline">¶</a></h2>
++<p>A right click on the icon provides the following menu.</p>
++<p><img alt="10000000000000D2000000F553818155_png" src="../_images/10000000000000D2000000F553818155.png" style="width: 2.1874in; height: 2.552in;" /></p>
++<p>Where:</p>
++<ul class="simple">
++<li>Open ownCloud in browser: Opens the ownCloud web interface.</li>
++<li>Open folder ‘ownCloud’: Opens the local folder.
++If multiple sync targets have been defined, an entry will exist for each local folder.</li>
++<li>Disk Space Indicator: Shows how much space is used on the server.</li>
++<li>Operation indicator: Shows the status of the current sync process, or ‘up to date’ if the client and server are in sync.</li>
++</ul>
++<p><img alt="10000000000000F20000003BAA849B42_png" src="../_images/10000000000000F20000003BAA849B42.png" style="width: 2.5201in; height: 0.6146in;" /></p>
++<ul class="simple">
++<li>Recent changes: shows the last six files modified by sync operations and provides access to the Sync Activity window which lists all changes since the last restart of the ownCloud client.</li>
++<li>Settings…: Provides access to the settings menu.
++Same result as a left click on the icon.</li>
++<li>Help: Opens a browser to display the documentation.</li>
++<li>Sign out: Signs the client out of the server.</li>
++<li>Quit ownCloud: Quits ownCloud, ending a currently running sync.</li>
++</ul>
++</div>
++<div class="section" id="settings">
++<h2>Settings<a class="headerlink" href="#settings" title="Permalink to this headline">¶</a></h2>
++<div class="section" id="account-settings">
++<h3>Account Settings<a class="headerlink" href="#account-settings" title="Permalink to this headline">¶</a></h3>
++<p>The Account Settings tab provides an executive summary about the synced folders in the account and gives the ability to modify them.</p>
++<p><img alt="10000000000002C1000001ED5CECCC6D_png" src="../_images/10000000000002C1000001ED5CECCC6D.png" style="width: 6.5in; height: 4.5453in;" /></p>
++<p>Where:</p>
++<ul class="simple">
++<li>“Connected to <ownCloud instance> as <user>”: Indicates the ownCloud server which the client is syncing with and the user account on that server.</li>
++<li>Add Folder…: Provides the ability to add another folder to sync.</li>
++</ul>
++<p><img alt="10000000000001EE00000164642CCA08_png" src="../_images/10000000000001EE00000164642CCA08.png" style="width: 5.1457in; height: 3.7083in;" /></p>
++<p>The Directory and alias name must be unique.</p>
++<p><img alt="10000000000001F40000016609A0CFCC_png" src="../_images/10000000000001F40000016609A0CFCC.png" style="width: 5.2083in; height: 3.7291in;" /></p>
++<p>Select the folder on the server to sync with.
++It is important to note that, a server folder can only sync to the client one time.
++So, in the above example, the sync is to the server root directory and thus it is not possible to select another folder under the root to sync.</p>
++<ul class="simple">
++<li>Pause/Resume: will pause the current sync or prevent the client from starting a new sync.
++Resume will resume the sync process.</li>
++<li>Remove:
++Will remove the selected folder from being synced.
++This is used, for instance, when there is a desire to sync only a few folders and not the root.
++First, remove the root from sync, then add the folders to sync as desired.</li>
++<li>Storage Usage: Provides further details on the storage utilization on the ownCloud server.</li>
++<li>Edit Ignored Files: provides a list of files which will be ignored, i.e., will not sync between the client and server.
++The ignored files editor allows adding patterns for files or directories that should be excluded from the sync process.
++Besides normal characters, wild cards may be used, an asterisk ‘*’ indicating multiple characters, or a question mark ‘?’ indicating a single character.</li>
++</ul>
++<p><img alt="10000000000001E50000018C3AD09A21_png" src="../_images/10000000000001E50000018C3AD09A21.png" style="width: 5.052in; height: 4.1252in;" /></p>
++<ul class="simple">
++<li>Modify Account: Allows the user to change the ownCloud server being synced to.
++It brings up the Setting up an Account (section
++above) windows.</li>
++</ul>
++</div>
++<div class="section" id="activity">
++<h3>Activity<a class="headerlink" href="#activity" title="Permalink to this headline">¶</a></h3>
++<p>The Activity window, which can be invoked either from the main menu (
++Recent Changes -> Details…
++) or the Activity tab on the left side of the settings window, provides an in-depth account of the recent sync activity.
++It will show files that have not been synced because they are on the ignored files list, or because they cannot be synced in a cross-platform manner due to containing special characters that cannot be stored on certain file systems.</p>
++<p><img alt="10000000000002BB000001EABD7E6DF0_png" src="../_images/10000000000002BB000001EABD7E6DF0.png" style="width: 6.5in; height: 4.5563in;" /></p>
++</div>
++<div class="section" id="general">
++<h3>General<a class="headerlink" href="#general" title="Permalink to this headline">¶</a></h3>
++<p>This tab provides several options:</p>
++<p><img alt="10000000000002BF000001E5B544E7E7_png" src="../_images/10000000000002BF000001E5B544E7E7.png" style="width: 6.5in; height: 4.4839in;" /></p>
++<ul class="simple">
++<li>Launch on System Startup: This option is automatically activated once a user has created his account.
++Unchecking this box will cause the ownCloud client to not launch on startup for a particular user.</li>
++<li>Show Desktop Notifications: When checked, bubble notifications when a set of sync operations has been performed are provided.</li>
++<li>Use Monochrome Icons: Use less obtrusive icons.
++Especially useful on MAC OS.</li>
++<li>About: provides information about authors as well as build conditions.
++This information is valuable when submitting a support request.</li>
++</ul>
++</div>
++<div class="section" id="network">
++<h3>Network<a class="headerlink" href="#network" title="Permalink to this headline">¶</a></h3>
++<p>This tab contains proxy settings and bandwidth limiting settings.</p>
++<p><img alt="10000000000002C3000001EBBD39E47A_png" src="../_images/10000000000002C3000001EBBD39E47A.png" style="width: 6.5in; height: 4.5138in;" /></p>
++<div class="section" id="proxy-settings">
++<h4>Proxy Settings<a class="headerlink" href="#proxy-settings" title="Permalink to this headline">¶</a></h4>
++<ul class="simple">
++<li>No Proxy: Check this if the ownCloud client should circumvent the default proxy on the system.</li>
++<li>Use system proxy: Default value.
++This will follow the system’s proxy settings.
++On Linux it will use the value of the variable
++http_proxy.</li>
++<li>Specify proxy manually as: Allows to specify custom proxy settings.
++If it is required to go through a HTTP(S) proxy server.
++SOCKSv5 on the other hand is useful in special company LAN setups, or in combination with the OpenSSH dynamic application level forwarding feature.</li>
++<li>Host: Enter the host name or IP address of the proxy server followed by the port number.
++HTTP proxies usually listen on ports 8080 (default) or 3128.
++SOCKS server usually listens on port 1080.</li>
++<li>Proxy server requires authentication: Should be checked if the proxy server does not allow anonymous usage.
++If checked, a username and password must be provided.</li>
++</ul>
++</div>
++<div class="section" id="bandwidth-limiting">
++<h4>Bandwidth Limiting<a class="headerlink" href="#bandwidth-limiting" title="Permalink to this headline">¶</a></h4>
++<p>The Download Bandwidth can be either unlimited (default) or limited to a custom value.
++This is the bandwidth available for data flowing from the ownCloud Server to the client.</p>
++<p>The Upload Bandwidth, the bandwidth available or data flowing from the ownCloud client to the server, has an additional option to limit automatically.
++When this option is checked, the ownCloud client will surrender available bandwidth to other applications.
++Use this option if there are issues with real time communication in conjunction with the ownCloud Client.</p>
++</div>
++</div>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/sync_client/index.html
index 0c88c56,0000000..1ce8f64
mode 100644,000000..100644
--- a/core/doc/admin/sync_client/index.html
+++ b/core/doc/admin/sync_client/index.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Sync Client</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Obtaining_the_Client.html">Obtaining the Client</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Setting_up_an_Account.html">Setting up an Account</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Visual_Tour.html">Visual Tour</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Visual_Tour.html#icon">Icon</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Visual_Tour.html#menu">Menu</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Visual_Tour.html#settings">Settings</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Advanced_Usage.html">Advanced Usage</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Advanced_Usage.html#options">Options</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Advanced_Usage.html#config-file">Config file</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Advanced_Usage.html#comparison-and-conflicts">Comparison and Conflicts</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Advanced_Usage.html#ignored-files">Ignored Files</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/undelete/Configuration_and_storage_.html
index 0c88c56,0000000..a47fa88
mode 100644,000000..100644
--- a/core/doc/admin/undelete/Configuration_and_storage_.html
+++ b/core/doc/admin/undelete/Configuration_and_storage_.html
@@@ -1,172 -1,0 +1,159 @@@
 +
 +<!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>
++    <title>Configuration and storage — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="configuration-and-storage">
++<h1>Configuration and storage<a class="headerlink" href="#configuration-and-storage" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="configuration">
++<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
++<p>By default, the ownCloud deleted files app is enabled.
++To verify or disable, navigate to the apps
++page and select Deleted Files.</p>
++<p><img alt="100000000000042F000000CC3EDDE79E_png" src="../_images/100000000000042F000000CC3EDDE79E.png" style="width: 6.5in; height: 1.2382in;" /></p>
 +</div>
++<div class="section" id="storage">
++<h2>Storage<a class="headerlink" href="#storage" title="Permalink to this headline">¶</a></h2>
++<p>Once a file has been deleted by the user, it is moved to the
++<em>~/data/<user>/files_trashbin/files</em></p>
++<p>folder.</p>
++<p><img alt="10000000000002B3000000365E1CD00D_png" src="../_images/10000000000002B3000000365E1CD00D.png" style="width: 6.5in; height: 0.5075in;" /></p>
++<p>The remaining directories retain information on encryption key files, and versions.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/undelete/Introduction.html
index 0c88c56,0000000..32d7044
mode 100644,000000..100644
--- a/core/doc/admin/undelete/Introduction.html
+++ b/core/doc/admin/undelete/Introduction.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>The ownCloud server stores deleted files in a temporary area in the event that the file was inadvertently deleted and/or needs to be restored.</p>
++<div class="section" id="expiry-of-deleted-files">
++<h2>Expiry of deleted files<a class="headerlink" href="#expiry-of-deleted-files" title="Permalink to this headline">¶</a></h2>
++<p>There are two instances in which ownCloud will automatically permanently remove a deleted file.</p>
++<div class="section" id="disk-utilization">
++<h3>Disk Utilization<a class="headerlink" href="#disk-utilization" title="Permalink to this headline">¶</a></h3>
++<p>To prevent a user from running out of disk space, the ownCloud deleted files app will not utilize more than 50% of the currently available free space for deleted files.
++If the deleted files exceed this limit, ownCloud deletes the oldest files until it gets below this limit.</p>
++</div>
++<div class="section" id="age">
++<h3>Age<a class="headerlink" href="#age" title="Permalink to this headline">¶</a></h3>
++<p>By default, deleted files remain in the trash bin for 30 days.
++This can be configured using the trashbin_retention_obligation parameter
++in the config.php
++file.
++Files older than the configured value (or default 30 days) will be permanently deleted.
++ownCloud checks the age of the files each time a new file is moved to the deleted files bin.</p>
 +</div>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/undelete/Table_of_Contents.html
index 0c88c56,0000000..136c77d
mode 100644,000000..100644
--- a/core/doc/admin/undelete/Table_of_Contents.html
+++ b/core/doc/admin/undelete/Table_of_Contents.html
@@@ -1,172 -1,0 +1,147 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc374622085>`_</p>
++<p>Reviewed</p>
++<p>Allen Gigler 12/5/2013</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/undelete/Utilization.html
index 0000000,0000000..87b3dac
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/undelete/Utilization.html
@@@ -1,0 -1,0 +1,221 @@@
++
++<!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>Utilization — 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" />
++<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>
++<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="utilization">
++<h1>Utilization<a class="headerlink" href="#utilization" title="Permalink to this headline">¶</a></h1>
++<p>The deleted files app, when enabled, automatically moves deleted files to the Deleted Files folder and leaves them available for restore or permanent deletion</p>
++<div class="section" id="delete-a-file">
++<h2>Delete a file<a class="headerlink" href="#delete-a-file" title="Permalink to this headline">¶</a></h2>
++<p>To delete a file, either select the file check box and select Delete
++on the upper right of the screen,
++or the “x”
++to the right of the file.</p>
++<p><img alt="1000000000000530000001410CF0028A_png" src="../_images/1000000000000530000001410CF0028A.png" style="width: 6.5in; height: 1.5701in;" /></p>
++<p>To delete multiple files simultaneously, select the check box on all the desired files, then select Delete
++on the upper right of the screen.</p>
++</div>
++<div class="section" id="view-deleted-files">
++<h2>View Deleted Files<a class="headerlink" href="#view-deleted-files" title="Permalink to this headline">¶</a></h2>
++<p>To view a list of the deleted files, select the Deleted files
++button on the upper right of the browser.</p>
++<p><img alt="1000000000000532000000285DDBBF37_png" src="../_images/1000000000000532000000285DDBBF37.png" style="width: 6.5in; height: 0.1957in;" /></p>
++<p>Once selected, a list of all deleted files will appear.</p>
++</div>
++<div class="section" id="restore-files">
++<h2>Restore files<a class="headerlink" href="#restore-files" title="Permalink to this headline">¶</a></h2>
++<p>As with deleting files, there are two ways to restore a file.
++Either select the check box next to the file (or for bulk restore – files) and select restore
++on the upper right.
++Or hover over the file and select restore
++.</p>
++<p><img alt="1000000000000527000000A7AB409FE0_png" src="../_images/1000000000000527000000A7AB409FE0.png" style="width: 6.5in; height: 0.8228in;" />
++<img alt="100000000000052500000088DBB95005_png" src="../_images/100000000000052500000088DBB95005.png" style="width: 6.5in; height: 0.6717in;" /></p>
++</div>
++<div class="section" id="permanently-delete-files">
++<h2>Permanently Delete Files<a class="headerlink" href="#permanently-delete-files" title="Permalink to this headline">¶</a></h2>
++<p>Files in the Deleted Files
++folder can be permanently deleted.
++To do this, either select the check box next to the file (or for bulk deletion – files) and select Delete in the upper right corner.
++Or hover over the file and select the “x”.
++See figure in section
++.</p>
++</div>
++<div class="section" id="nested-files-and-restore">
++<h2>Nested files and restore<a class="headerlink" href="#nested-files-and-restore" title="Permalink to this headline">¶</a></h2>
++<p>If, for instance, the directory structure within ownCloud is
++<em>~/public/support/documentation/ownCloud undelete</em>
++.</p>
++<p><img alt="1000000000000525000000BE30CF0423_png" src="../_images/1000000000000525000000BE30CF0423.png" style="width: 6.5in; height: 0.9374in;" /></p>
++<div class="section" id="delete-entire-directory-structure">
++<h3>Delete entire directory structure<a class="headerlink" href="#delete-entire-directory-structure" title="Permalink to this headline">¶</a></h3>
++<p>When the public folder is deleted, all child folders/files will also be deleted.</p>
++<p><img alt="100000000000052F000000C2867B7294_png" src="../_images/100000000000052F000000C2867B7294.png" style="width: 6.5in; height: 0.95in;" /></p>
++<p>Suppose the file “ownCloud undelete.docx” was still required.
++A restore of the file will place it in the ‘root’ directory of the Files folder.</p>
++</div>
++<div class="section" id="delete-only-the-file">
++<h3>Delete only the file<a class="headerlink" href="#delete-only-the-file" title="Permalink to this headline">¶</a></h3>
++<p>If the file “ownCloud undelete.docx”
++was accidentally deleted, it may be restored following the steps described in section
++.
++The restore will place the file back into the directory structure from where it came.</p>
++</div>
++<div class="section" id="delete-the-file-then-the-directory-structure">
++<h3>Delete the file then the directory structure<a class="headerlink" href="#delete-the-file-then-the-directory-structure" title="Permalink to this headline">¶</a></h3>
++<p>If the file “ownCloud undelete.docs”
++is deleted, then the entire directory structure is deleted, the file will appear in the ‘root’ of the Deleted Files folder.</p>
++<p><img alt="1000000000000523000000C6F786381C_png" src="../_images/1000000000000523000000C6F786381C.png" style="width: 6.5in; height: 0.9783in;" /></p>
++<p>A restore of “ownCloud undelete.docx”
++will place it in the user’s ownCloud root directory.</p>
++<p><img alt="100000000000053100000142D9A4C916_png" src="../_images/100000000000053100000142D9A4C916.png" style="width: 6.5in; height: 1.5752in;" /></p>
++</div>
++</div>
++<div class="section" id="shared-files-and-restore">
++<h2>Shared files and restore<a class="headerlink" href="#shared-files-and-restore" title="Permalink to this headline">¶</a></h2>
++<p>When a
++shared file is deleted, the file will be deleted from the shared to user as well.
++Upon restore of the file by the file owner, the file is no longer shared.</p>
++</div>
++<div class="section" id="restore-files-with-versions">
++<h2>Restore files with Versions<a class="headerlink" href="#restore-files-with-versions" title="Permalink to this headline">¶</a></h2>
++<p>When a file which has versions has been deleted, and then restored, the versions will exist upon restoration.</p>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/undelete/index.html
index 0c88c56,0000000..745d177
mode 100644,000000..100644
--- a/core/doc/admin/undelete/index.html
+++ b/core/doc/admin/undelete/index.html
@@@ -1,172 -1,0 +1,166 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Deleted Files</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Introduction.html#expiry-of-deleted-files">Expiry of deleted files</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration_and_storage_.html">Configuration and storage</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Configuration_and_storage_.html#configuration">Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration_and_storage_.html#storage">Storage</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Utilization.html">Utilization</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#delete-a-file">Delete a file</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#view-deleted-files">View Deleted Files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#restore-files">Restore files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#permanently-delete-files">Permanently Delete Files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#nested-files-and-restore">Nested files and restore</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#shared-files-and-restore">Shared files and restore</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#restore-files-with-versions">Restore files with Versions</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/versions/Configuration_and_storage.html
index 0c88c56,0000000..62ae67e
mode 100644,000000..100644
--- a/core/doc/admin/versions/Configuration_and_storage.html
+++ b/core/doc/admin/versions/Configuration_and_storage.html
@@@ -1,172 -1,0 +1,166 @@@
 +
 +<!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>
++    <title>Configuration and storage — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="configuration-and-storage">
++<h1>Configuration and storage<a class="headerlink" href="#configuration-and-storage" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="configuration">
++<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
++<p>By default, the ownCloud versions app is enabled.
++To verify or disable, navigate to the apps
++page and select Versions.</p>
++<p><img alt="10000000000004ED000000BE3B9E25D5_png" src="../_images/10000000000004ED000000BE3B9E25D5.png" style="width: 6.5in; height: 0.9791in;" />
++<img alt="1000000000000336000000F38C3FAF84_png" src="../_images/1000000000000336000000F38C3FAF84.png" style="width: 6.5in; height: 1.9217in;" />
++<img alt="1000000000000336000000F38C3FAF84_png" src="../_images/1000000000000336000000F38C3FAF84.png" style="width: 6.5in; height: 1.9217in;" />
++<img alt="1000000000000336000000F38C3FAF84_png" src="../_images/1000000000000336000000F38C3FAF84.png" style="width: 6.5in; height: 1.9217in;" />
++<img alt="1000000000000336000000F38C3FAF84_png" src="../_images/1000000000000336000000F38C3FAF84.png" style="width: 6.5in; height: 1.9217in;" /></p>
 +</div>
++<div class="section" id="storage">
++<h2>Storage<a class="headerlink" href="#storage" title="Permalink to this headline">¶</a></h2>
++<p>Previous versions of files are stored in the
++data/<user>/files_versions
++folder.</p>
++<p><img alt="100000000000021C0000004CACBF786C_png" src="../_images/100000000000021C0000004CACBF786C.png" style="width: 5.6252in; height: 0.7917in;" /></p>
++<p>This directory is automatically created when the first file version is created.</p>
++<p>The naming convention of the files in this directory are
++<file_name>.v<unix_timestamp>.</p>
++<p><img alt="10000000000002210000002DE3BE7515_png" src="../_images/10000000000002210000002DE3BE7515.png" style="width: 5.6772in; height: 0.4689in;" /></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/versions/Introduction.html
index 0c88c56,0000000..fba948b
mode 100644,000000..100644
--- a/core/doc/admin/versions/Introduction.html
+++ b/core/doc/admin/versions/Introduction.html
@@@ -1,172 -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>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>The ownCloud Versions app maintains older versions of a file which have been modified by an ownCloud user.</p>
++<div class="section" id="expiry-of-versions">
++<h2>Expiry of versions<a class="headerlink" href="#expiry-of-versions" title="Permalink to this headline">¶</a></h2>
++<p>The versions app expires old versions automatically to make certain that the user doesn’t run out of space.
++The following algorithm is used to delete old versions:</p>
++<ul class="simple">
++<li>ownCloud keeps one new version every 2 seconds for the first 10 seconds</li>
++<li>ownCloud keeps one new version every minute for the first hour</li>
++<li>ownCloud keeps one new version every hour for the first 24 hours</li>
++<li>ownCloud keeps one new version every day for the first 30 days</li>
++<li>ownCloud keeps one new version every week thereafter.</li>
++</ul>
++<p>The versions are adjusted along this algorithm every time a new version is created.</p>
 +</div>
++<div class="section" id="space-limitations">
++<h2>Space limitations<a class="headerlink" href="#space-limitations" title="Permalink to this headline">¶</a></h2>
++<p>In addition to the expiry of versions, ownCloud’s versions app makes certain never to use more than 50% of the user’s currently available free space.
++If stored versions exceed this limit, ownCloud will delete the oldest versions first until it meets this limit.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/versions/Utilization.html
index 0000000,0000000..b3b0641
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/versions/Utilization.html
@@@ -1,0 -1,0 +1,201 @@@
++
++<!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>Utilization — 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" />
++<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>
++<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="utilization">
++<h1>Utilization<a class="headerlink" href="#utilization" title="Permalink to this headline">¶</a></h1>
++<p>The versions app, when enabled, automatically creates a new version each time an existing, non-empty file is saved.</p>
++<div class="section" id="initial-file-creation">
++<h2>Initial File creation<a class="headerlink" href="#initial-file-creation" title="Permalink to this headline">¶</a></h2>
++<p>Create a file on the ownCloud server – either directly via the browser, an upload, or a file sync from the client.
++In this example, the file versionText.txt was created via the web browser.</p>
++<p><img alt="1000000000000427000000324F58266D_png" src="../_images/1000000000000427000000324F58266D.png" style="width: 6.5in; height: 0.3055in;" /></p>
++<div class="section" id="note">
++<h3>Note<a class="headerlink" href="#note" title="Permalink to this headline">¶</a></h3>
++<p>Since this file was initially created via the web browser, it is an empty file.</p>
++</div>
++</div>
++<div class="section" id="edit-the-file">
++<h2>Edit the file<a class="headerlink" href="#edit-the-file" title="Permalink to this headline">¶</a></h2>
++<p>Edit the file through the web browser.</p>
++<p><img alt="100000000000019E0000004CD2A0F407_png" src="../_images/100000000000019E0000004CD2A0F407.png" style="width: 4.3126in; height: 0.7917in;" /></p>
++<p>And save.</p>
++<div class="section" id="notes">
++<h3>Notes<a class="headerlink" href="#notes" title="Permalink to this headline">¶</a></h3>
++<p>Editing an empty file, as in this instance, for the first time, does not create a new version.</p>
++</div>
++</div>
++<div class="section" id="create-version">
++<h2>Create version<a class="headerlink" href="#create-version" title="Permalink to this headline">¶</a></h2>
++<p>Edit the non-zero byte file either via the web browser, via the sync client or via an upload.</p>
++<p><img alt="1000000000000194000000498325A766_png" src="../_images/1000000000000194000000498325A766.png" style="width: 4.2083in; height: 0.7602in;" /></p>
++<p>And save.</p>
++<div class="section" id="id1">
++<h3>Notes<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
++<p>When performing an upload of a file which already exists on the server, a dialog box appears asking whether to keep the existing file or the new file.</p>
++<p><img alt="10000000000001C1000000FE663748B2_png" src="../_images/10000000000001C1000000FE663748B2.png" style="width: 4.6772in; height: 2.6457in;" /></p>
++<p>In order to create a version, the New File must be selected.
++If the Existing File is selected, the file is not replaced hence no new version is created.</p>
++</div>
++</div>
++<div class="section" id="accessing-versions">
++<h2>Accessing Versions<a class="headerlink" href="#accessing-versions" title="Permalink to this headline">¶</a></h2>
++<p>In order to view what versions exist for a given file, hover over the line containing the file and select Versions
++on the right side.</p>
++<p><img alt="1000000000000430000000AF9D6E724E_png" src="../_images/1000000000000430000000AF9D6E724E.png" style="width: 6.5in; height: 1.061in;" /></p>
++<p>In this case, there are two previous versions of versionTest.txt
++.
++The thumbnail and creation time can be used to identify what was in the file in that version.</p>
++</div>
++<div class="section" id="reverting-to-a-different-version">
++<h2>Reverting to a different version<a class="headerlink" href="#reverting-to-a-different-version" title="Permalink to this headline">¶</a></h2>
++<p>To revert to a previous version, simply select the restore next to the version as seen in
++.</p>
++<div class="section" id="id2">
++<h3>Notes<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
++<p>In the instance where a file is reverted to another version, the “existing” version of the file is versioned and can be reverted at a later date.</p>
++</div>
++</div>
++<div class="section" id="sharing-and-versions">
++<h2>Sharing and Versions<a class="headerlink" href="#sharing-and-versions" title="Permalink to this headline">¶</a></h2>
++<p>If user-A shares a file with user-B, user-B may revert the file to any previous version.
++If user-B modifies the file, a new version is created.</p>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/versions/index.html
index 0c88c56,0000000..0e20cc4
mode 100644,000000..100644
--- a/core/doc/admin/versions/index.html
+++ b/core/doc/admin/versions/index.html
@@@ -1,172 -1,0 +1,169 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Versioning</strong></p>
++<p>Table of Contents</p>
++<p>` <#_Toc374004001>`_</p>
++<p>Reviewers</p>
++<p>Allen Gigler 12/4/2013</p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Introduction.html#expiry-of-versions">Expiry of versions</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Introduction.html#space-limitations">Space limitations</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration_and_storage.html">Configuration and storage</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Configuration_and_storage.html#configuration">Configuration</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration_and_storage.html#storage">Storage</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Utilization.html">Utilization</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#initial-file-creation">Initial File creation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#edit-the-file">Edit the file</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#create-version">Create version</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#accessing-versions">Accessing Versions</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#reverting-to-a-different-version">Reverting to a different version</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Utilization.html#sharing-and-versions">Sharing and Versions</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/viewers/Configuration.html
index 0c88c56,0000000..ce9a6e8
mode 100644,000000..100644
--- a/core/doc/admin/viewers/Configuration.html
+++ b/core/doc/admin/viewers/Configuration.html
@@@ -1,172 -1,0 +1,156 @@@
 +
 +<!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>
++    <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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="configuration">
++<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="text-editor">
++<h2>Text Editor<a class="headerlink" href="#text-editor" title="Permalink to this headline">¶</a></h2>
++<p>The Text Editor App allows users to view and edit text files.
++To enable this app, navigate to the Apps page and select “Text Editor” then Enable.</p>
++<p><img alt="100000000000012C0000009C444B4720_png" src="../_images/100000000000012C0000009C444B4720.png" style="width: 3.1252in; height: 1.6252in;" /></p>
 +</div>
++<div class="section" id="image-viewer">
++<h2>Image Viewer<a class="headerlink" href="#image-viewer" title="Permalink to this headline">¶</a></h2>
++<p>The image viewer app allows users to preview image files within the ownCloud web interface.
++To enable, navigate to the Apps page and select “Image Viewer” then enable.</p>
++<p><img alt="10000000000001400000008A557EF7E3_png" src="../_images/10000000000001400000008A557EF7E3.png" style="width: 3.3335in; height: 1.4374in;" /></p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/viewers/Introduction.html
index 0c88c56,0000000..8fca80d
mode 100644,000000..100644
--- a/core/doc/admin/viewers/Introduction.html
+++ b/core/doc/admin/viewers/Introduction.html
@@@ -1,172 -1,0 +1,146 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>ownCloud provides apps which allow users to view/edit
++text files and view images which exist on the ownCloud server.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/viewers/Utilization.html
index 0c88c56,0000000..00f9951
mode 100644,000000..100644
--- a/core/doc/admin/viewers/Utilization.html
+++ b/core/doc/admin/viewers/Utilization.html
@@@ -1,172 -1,0 +1,148 @@@
 +
 +<!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>
++    <title>Utilization — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="utilization">
++<h1>Utilization<a class="headerlink" href="#utilization" title="Permalink to this headline">¶</a></h1>
++<p>When the apps are enabled, select the file name on the web interface Files tab and either the text editor or the image will appear.</p>
++<p><img alt="10000000000001E50000006E3ECDC427_png" src="../_images/10000000000001E50000006E3ECDC427.png" style="width: 5.052in; height: 1.1457in;" /></p>
++<p><img alt="100000000000044C000002B0B421E27E_png" src="../_images/100000000000044C000002B0B421E27E.png" style="width: 6.5in; height: 4.0654in;" /></p>
++<p>When the apps are disabled, selecting the file name on the web interface will prompt the user to download the specified file.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/viewers/index.html
index 0c88c56,0000000..e4efc3d
mode 100644,000000..100644
--- a/core/doc/admin/viewers/index.html
+++ b/core/doc/admin/viewers/index.html
@@@ -1,172 -1,0 +1,155 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Viewers</strong></p>
++<p>Table of Contents</p>
++<p>` <#_Toc376421150>`_</p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Configuration.html">Configuration</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#text-editor">Text Editor</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Configuration.html#image-viewer">Image Viewer</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Utilization.html">Utilization</a></li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/web_guide/Adding_Data.html
index 0000000,0000000..35506c8
new file mode 100644
--- /dev/null
+++ b/core/doc/admin/web_guide/Adding_Data.html
@@@ -1,0 -1,0 +1,195 @@@
++
++<!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>Adding Data — 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" />
++<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>
++<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="adding-data">
++<h1>Adding Data<a class="headerlink" href="#adding-data" title="Permalink to this headline">¶</a></h1>
++<p>There are a few ways to add data to the ownCloud instance.
++Files may be uploaded or text files may be created directly within ownCloud.
++Folders may also be created directly within the ownCloud web interface.</p>
++<div class="section" id="creation">
++<h2>Creation<a class="headerlink" href="#creation" title="Permalink to this headline">¶</a></h2>
++<p>To create a file or folder, select the New button in section 3 of the main ownCloud screen.</p>
++<p><img alt="1000000000000163000000E9CDA84C92_png" src="../_images/1000000000000163000000E9CDA84C92.png" style="width: 3.698in; height: 2.4272in;" /></p>
++<div class="section" id="create-a-text-file">
++<h3>Create a text file<a class="headerlink" href="#create-a-text-file" title="Permalink to this headline">¶</a></h3>
++<p>Select “Text file” from the menu and enter the desired file name.</p>
++<p><img alt="1000000000000175000000FAB2A2B294_png" src="../_images/1000000000000175000000FAB2A2B294.png" style="width: 3.8846in; height: 2.6043in;" /></p>
++<p>Then press enter.</p>
++<p><img alt="100000000000047A000000FB86FF2A9A_png" src="../_images/100000000000047A000000FB86FF2A9A.png" style="width: 6.5in; height: 1.4228in;" /></p>
++<p>Notice the file has been placed in section 2 of the main ownCloud window.
++Since it is an empty file, the size is “0 Bytes” and it was last modified a few seconds ago.</p>
++</div>
++<div class="section" id="create-a-folder">
++<h3>Create a folder<a class="headerlink" href="#create-a-folder" title="Permalink to this headline">¶</a></h3>
++<p>To create a folder within ownCloud, simply select “Folder” from the menu and enter the desired folder name.</p>
++<p><img alt="1000000000000195000000EF7E44082C_png" src="../_images/1000000000000195000000EF7E44082C.png" style="width: 4.2189in; height: 2.4898in;" /></p>
++<p>Then select Enter.</p>
++<p>Notice the folder appears in the window.</p>
++<p><img alt="100000000000047A0000011C6682A254_png" src="../_images/100000000000047A0000011C6682A254.png" style="width: 6.5in; height: 1.611in;" /></p>
++</div>
++<div class="section" id="adding-a-file-from-a-link">
++<h3>Adding a file from a link<a class="headerlink" href="#adding-a-file-from-a-link" title="Permalink to this headline">¶</a></h3>
++<p>If the desired file exists on the internet already it is possible to add the file to ownCloud using the internet link.
++To do this, select “From link” from the menu and enter the URL of the file then select enter.</p>
++<p><img alt="10000000000001CE000000F2E2084BA1_png" src="../_images/10000000000001CE000000F2E2084BA1.png" style="width: 4.8126in; height: 2.5201in;" /></p>
++<p><img alt="100000000000046D0000015F4B5494A9_png" src="../_images/100000000000046D0000015F4B5494A9.png" style="width: 6.5in; height: 2.0138in;" /></p>
++<p>The file contained in the link now appears in the user’s ownCloud instance.</p>
++</div>
++</div>
++<div class="section" id="uploading-files">
++<h2>Uploading files<a class="headerlink" href="#uploading-files" title="Permalink to this headline">¶</a></h2>
++<p>There are two methods possible to upload files to the ownCloud web interface.</p>
++<div class="section" id="drag-and-drop">
++<h3>Drag and Drop<a class="headerlink" href="#drag-and-drop" title="Permalink to this headline">¶</a></h3>
++<p>Simply drag and drop one or more files from the client’s
++Desktop into section 2 of the main ownCloud window.
++These files will then be uploaded to ownCloud and appear in the data window.</p>
++</div>
++<div class="section" id="upload-button">
++<h3>Upload Button<a class="headerlink" href="#upload-button" title="Permalink to this headline">¶</a></h3>
++<p>The second method to upload a file to ownCloud is to select the upload arrow on the top left of the main ownCloud screen.
++This will being up a File Upload selection box.</p>
++<p><img alt="100000000000048100000245268CDB7A_png" src="../_images/100000000000048100000245268CDB7A.png" style="width: 6.5in; height: 3.2756in;" /></p>
++<p>Navigate to the directory containing the desired files and select the file for uploading and press Open.
++To upload multiple files simultaneously, use either the SHIFT or CTRL key during file selection as appropriate.</p>
++</div>
++</div>
++</div>
++
++
++					</div>
++				</div>
++			</div>
++    
++  </div>
++</div>
++  </body>
++</html>
diff --cc core/doc/admin/web_guide/Initial_Log_In.html
index 0c88c56,0000000..c0ced61
mode 100644,000000..100644
--- a/core/doc/admin/web_guide/Initial_Log_In.html
+++ b/core/doc/admin/web_guide/Initial_Log_In.html
@@@ -1,172 -1,0 +1,154 @@@
 +
 +<!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>
++    <title>Initial Log In — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="initial-log-in">
++<h1>Initial Log In<a class="headerlink" href="#initial-log-in" title="Permalink to this headline">¶</a></h1>
++<p>The ownCloud initial login screen is as follows.</p>
++<p><img alt="1000000000000453000001BFFCF48776_png" src="../_images/1000000000000453000001BFFCF48776.png" style="width: 6.5in; height: 2.6252in;" /></p>
++<p>It should be noted, that if the instance of ownCloud is themed differently, there will be a different logo on the screen.</p>
++<p>To log into ownCloud, enter the username and password provided by your ownCloud admin.
++To remain logged into ownCloud under the same credentials, select the checkbox next to Remember.</p>
++<p>Upon initial login, the user will most likely see the “Welcome to ownCloud” banner as below.</p>
++<p><img alt="1000000000000479000002887E7F48EA_png" src="../_images/1000000000000479000002887E7F48EA.png" style="width: 6.5in; height: 3.6783in;" /></p>
++<p>This banner provides links to download the desktop sync app (see Desktop Client document), as well as the mobile apps.
++This banner will appear upon the first login only, provided the admin has not disabled it.
++To close the banner and start using ownCloud, select the ‘x’ in the upper right corner of the banner.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/web_guide/Introduction.html
index 0c88c56,0000000..1aeea43
mode 100644,000000..100644
--- a/core/doc/admin/web_guide/Introduction.html
+++ b/core/doc/admin/web_guide/Introduction.html
@@@ -1,172 -1,0 +1,147 @@@
 +
 +<!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>
++    <title>Introduction — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="introduction">
++<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
++<p>This document will discuss the ownCloud web interface from a user’s perspective.
++It will detail how to log into ownCloud, upload files, create files and folders, as well as describe the Personal Page settings.
++When possible, it will reference other more detailed documents on specific functionality.</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/web_guide/Main_ownCloud_screen.html
index 0c88c56,0000000..ffa791a
mode 100644,000000..100644
--- a/core/doc/admin/web_guide/Main_ownCloud_screen.html
+++ b/core/doc/admin/web_guide/Main_ownCloud_screen.html
@@@ -1,172 -1,0 +1,156 @@@
 +
 +<!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>
++    <title>Main ownCloud screen — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="main-owncloud-screen">
++<h1>Main ownCloud screen<a class="headerlink" href="#main-owncloud-screen" title="Permalink to this headline">¶</a></h1>
++<p>Once logged into ownCloud, the main screen will be displayed.</p>
++<p><img alt="100000000000047700000219A3013A92_png" src="../_images/100000000000047700000219A3013A92.png" style="width: 6.5in; height: 3.0535in;" /></p>
++<p>There are four sections in the main ownCloud screen</p>
++<ol class="arabic simple">
++<li>This is the apps bar.
++Any user related apps will be displayed here.
++In a default enterprise edition of ownCloud, the Files app and the Activity app are listed.</li>
++<li>This section will display all data loaded into ownCloud.</li>
++<li>The home button brings the user to the home directory.
++The New button allows the user to create a file or folder, or link, and the upload arrow allows the user to upload a file.</li>
++<li>The search box allows the user to search and the user name pull-down can bring the user to the Personal page for personal configurations as well as log the user out.</li>
++</ol>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/web_guide/Navigation.html
index 0c88c56,0000000..ceefbdb
mode 100644,000000..100644
--- a/core/doc/admin/web_guide/Navigation.html
+++ b/core/doc/admin/web_guide/Navigation.html
@@@ -1,172 -1,0 +1,178 @@@
 +
 +<!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>
++    <title>Navigation — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="navigation">
++<h1>Navigation<a class="headerlink" href="#navigation" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="changing-directories">
++<h2>Changing directories<a class="headerlink" href="#changing-directories" title="Permalink to this headline">¶</a></h2>
++<p>To navigate to other folders within ownCloud, simply click on the desired folder.</p>
++<p><img alt="1000000000000470000001B68AE60DD3_png" src="../_images/1000000000000470000001B68AE60DD3.png" style="width: 6.5in; height: 2.5063in;" /></p>
++<p>Notice that Section 3 shows the currently displayed directory “my_folder”.
++To navigate back to the root directly, select the “Home” button.</p>
++</div>
++<div class="section" id="viewing-editing-files">
++<h2>Viewing/Editing files<a class="headerlink" href="#viewing-editing-files" title="Permalink to this headline">¶</a></h2>
++<p>ownCloud has the ability to view text files as well as pictures.
++To view a text file or a picture, click on the file.</p>
++<p><img alt="10000000000004710000014BBC34499D_png" src="../_images/10000000000004710000014BBC34499D.png" style="width: 6.5in; height: 1.8925in;" /></p>
++<p>For text files, a text editor will be brought up allowing the user to modify the file as desired.
++Just type the desired text and select “Save” to commit the changes.
++Once changes have been made to the file, prior to saving, the name of the file will have an “*” next to it indicating it has yet to be saved.</p>
++<p><img alt="100000000000046F000000DEA2BFCD9B_png" src="../_images/100000000000046F000000DEA2BFCD9B.png" style="width: 6.5in; height: 1.2717in;" /></p>
++<p>Once changes have been saved, a thumbnail of the text file will appear in the main data window.</p>
++<p><img alt="100000000000041D0000003D52225C0D_png" src="../_images/100000000000041D0000003D52225C0D.png" style="width: 6.5in; height: 0.3764in;" /></p>
++</div>
++<div class="section" id="downloading-a-file">
++<h2>Downloading a file<a class="headerlink" href="#downloading-a-file" title="Permalink to this headline">¶</a></h2>
++<p>To download a file from ownCloud to your working computer, hover over the file and then select the “Download” button.</p>
++<p><img alt="100000000000047200000129CB014025_png" src="../_images/100000000000047200000129CB014025.png" style="width: 6.5in; height: 1.6965in;" /></p>
++<p>For non-text or picture files, the user may also click on the file name to download it.</p>
++</div>
++<div class="section" id="renaming-files-or-folders">
++<h2>Renaming files or Folders<a class="headerlink" href="#renaming-files-or-folders" title="Permalink to this headline">¶</a></h2>
++<p>To rename a file or folder within ownCloud, hover over the file and select Rename.
++Then type the new name of the file or folder.</p>
 +</div>
++<div class="section" id="sharing-versions-delete-and-activity">
++<h2>Sharing, Versions, Delete, and Activity<a class="headerlink" href="#sharing-versions-delete-and-activity" title="Permalink to this headline">¶</a></h2>
++<p>For more information on the sharing, versions, deletion or Activity features, please see the respective documents.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/web_guide/Personal_Configurations.html
index 0c88c56,0000000..b71ecee
mode 100644,000000..100644
--- a/core/doc/admin/web_guide/Personal_Configurations.html
+++ b/core/doc/admin/web_guide/Personal_Configurations.html
@@@ -1,172 -1,0 +1,193 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
-     <title>Linux Distributions — ownCloud Administrators Manual 6.0 documentation</title>
++    <title>Personal Configurations — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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 class="section" id="personal-configurations">
++<h1>Personal Configurations<a class="headerlink" href="#personal-configurations" title="Permalink to this headline">¶</a></h1>
++<p>Each ownCloud user may configure some personal preferences.
++To make these configurations, navigate to the Personal page.
++Select the user name and the following menu will appear.</p>
++<p><img alt="100000000000047A000000B727198874_png" src="../_images/100000000000047A000000B727198874.png" style="width: 6.5in; height: 1.0382in;" /></p>
++<p>Select Personal to get to the configuration page.</p>
++<p>Configuration options on this page may appear or disappear depending on what the ownCloud admin has configured.
++The basic configuration parameters are as follows.</p>
++<p><img alt="1000000000000467000002B63162E59B_png" src="../_images/1000000000000467000002B63162E59B.png" style="width: 6.5in; height: 4.0028in;" /></p>
++<p><img alt="10000000000004690000026615360BEB_png" src="../_images/10000000000004690000026615360BEB.png" style="width: 6.5in; height: 3.5346in;" /></p>
++<div class="section" id="important-links">
++<h2>Important links<a class="headerlink" href="#important-links" title="Permalink to this headline">¶</a></h2>
++<p>The top section of the Personal page contains the same links as the First Run Wizard described earlier in this document.
++For more information on this, see the document on the First Run Wizard.</p>
++</div>
++<div class="section" id="quota">
++<h2>Quota<a class="headerlink" href="#quota" title="Permalink to this headline">¶</a></h2>
++<p>Below shows the used and remaining space for the user.
++For information as to how this is calculated, refer to the ownCloud Quota Calculations document.</p>
++</div>
++<div class="section" id="password-change">
++<h2>Password Change<a class="headerlink" href="#password-change" title="Permalink to this headline">¶</a></h2>
++<p>If the user desires to change the password, do so in this section.
++Enter the current password followed by the new password and select “Change Password”.
++It should be noted, that when using LDAP authentication, the password is contained within the LDAP and not locally thus this field will not change the password.</p>
++</div>
++<div class="section" id="change-display-name">
++<h2>Change Display Name<a class="headerlink" href="#change-display-name" title="Permalink to this headline">¶</a></h2>
++<p>To change the way your name is displayed within ownCloud, enter the desired name under “Full Name”.</p>
++</div>
++<div class="section" id="add-email-address">
++<h2>Add Email Address<a class="headerlink" href="#add-email-address" title="Permalink to this headline">¶</a></h2>
++<p>For password recovery and share notifications, it is important for ownCloud to have an email on record.
++Enter the desired email address under the EMAIL section.</p>
++</div>
++<div class="section" id="avatar">
++<h2>Avatar<a class="headerlink" href="#avatar" title="Permalink to this headline">¶</a></h2>
++<p>ownCloud allows a user to upload an Avatar for their ownCloud instance.
++This can be done under the “Profile Picture” section of the Personal Page.</p>
++<p>To upload a new Avatar, select the “Upload new” button.
++If the desired avatar exists on the ownCloud file system, select “Select new from Files” and to remove the avatar and return to the default, select “Remove image”</p>
++</div>
++<div class="section" id="language">
++<h2>Language<a class="headerlink" href="#language" title="Permalink to this headline">¶</a></h2>
++<p>If English is not the user’s native language, they may change the language in this section.</p>
 +</div>
++<div class="section" id="webdav">
++<h2>WebDAV<a class="headerlink" href="#webdav" title="Permalink to this headline">¶</a></h2>
++<p>This provides the address to use in order to access a user’s files via WebDav.</p>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/web_guide/Table_of_Contents.html
index 0c88c56,0000000..d8c07b2
mode 100644,000000..100644
--- a/core/doc/admin/web_guide/Table_of_Contents.html
+++ b/core/doc/admin/web_guide/Table_of_Contents.html
@@@ -1,172 -1,0 +1,145 @@@
 +
 +<!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>
++    <title>Table of 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="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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <div class="section" id="table-of-contents">
++<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
++<p>` <#_Toc375905226>`_</p>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/admin/web_guide/index.html
index 0c88c56,0000000..4c956b6
mode 100644,000000..100644
--- a/core/doc/admin/web_guide/index.html
+++ b/core/doc/admin/web_guide/index.html
@@@ -1,172 -1,0 +1,174 @@@
 +
 +<!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>
++    <title><no title> — 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="#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">PageKite Configuration</a></li>
- <li class="toctree-l2"><a class="reference internal" href="installation_others.html#open-wrt">Open Wrt</a></li>
- </ul>
- </li>
++<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="linux-distributions">
- <h1>Linux Distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h1>
- <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>
++  <p><strong>ownCloud Web Interface Users Guide</strong></p>
++<div class="toctree-wrapper compound">
++<ul>
++<li class="toctree-l1"><a class="reference internal" href="Table_of_Contents.html">Table of Contents</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Introduction.html">Introduction</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Initial_Log_In.html">Initial Log In</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Main_ownCloud_screen.html">Main ownCloud screen</a></li>
++<li class="toctree-l1"><a class="reference internal" href="Adding_Data.html">Adding Data</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Adding_Data.html#creation">Creation</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Adding_Data.html#uploading-files">Uploading files</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Navigation.html">Navigation</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Navigation.html#changing-directories">Changing directories</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Navigation.html#viewing-editing-files">Viewing/Editing files</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Navigation.html#downloading-a-file">Downloading a file</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Navigation.html#renaming-files-or-folders">Renaming files or Folders</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Navigation.html#sharing-versions-delete-and-activity">Sharing, Versions, Delete, and Activity</a></li>
++</ul>
++</li>
++<li class="toctree-l1"><a class="reference internal" href="Personal_Configurations.html">Personal Configurations</a><ul>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#important-links">Important links</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#quota">Quota</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#password-change">Password Change</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#change-display-name">Change Display Name</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#add-email-address">Add Email Address</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#avatar">Avatar</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#language">Language</a></li>
++<li class="toctree-l2"><a class="reference internal" href="Personal_Configurations.html#webdav">WebDAV</a></li>
++</ul>
++</li>
++</ul>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/_sources/pim/contacts.txt
index b30aa24,0000000..25fea2e
mode 100644,000000..100644
--- a/core/doc/user/_sources/pim/contacts.txt
+++ b/core/doc/user/_sources/pim/contacts.txt
@@@ -1,146 -1,0 +1,152 @@@
 +Using the Contacts App
 +======================
 +
 +The contacts app of ownCloud is like any other mobile contact app but with more functionality.
 +Just as you open your account you will get the a default addressbook available.
 +We will see later that Of course you can always add and remove addressbooks in here.
 +
 +Adding contacts
 +---------------
 +There are two ways in which you can add contacts
 +
 +1. Add them manually
 +2. Import a VCF file
 +
 +Importing
 +~~~~~~~~~
 +
 +So first we'll check out how to import all the VCF files as they are a lot
 +more faster way of creating contacts.
 +Just below the contact list, click on the gear button:
 +
 +.. image:: ../images/contact_bottombar.png
 +Contact settings icon
 +
 +Once you've clicked it, an up arrow button which lets you upload files will be shown:
 +
 +.. image:: ../images/contact_uploadbutton.png
 +Contact file upload icon
 +
 +After choosing an addressbook to import into, click on the arrow. The upload window will be opened and let you choose your files.
 +You can upload the files one by one or upload all of them at one go.
 +
 +Let us demonstrate.
 +Open the directory in which you store all the files and then do the following
 +Keep pressing CTRL and select the files to upload.
 +After you are done just click on the open button
 +After the upload it should look something like this in which all the names and contacts will be sorted alphabetically
 +
 +.. image:: ../images/contact_vcfpick.jpg
 +Picking VCF files
 +
 +After upload, the interface will automatically place your contacts into ownCloud.
 +
 +
 +Create contacts manually
 +~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +On the left side of contacts app, you could see the new contact button (first one).
 +Click on it. You can now see an empty contact in the main part of the interface.
 +You have the ability to add all your informations about the contact:
 +the name, the address, the e-mail, the telephone nr, etc.
 +
 +Just click on a field and start typing the information.
 +You can use the "Add Field" button to add another types of information for this contact.
 +
 +.. image:: ../images/contact_emptycontact.png
 +Empty contact view
 +
 +When you want to remove an information of your contact, just click on little delete icon
 +at the right of the field you want to remove.
 +
 +Adding picture to the contact
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +There are two methods in which you can give a picture id to the specific contact
 +
 +.. image:: ../images/contact_picture.jpg
 +Contact picture options
 +
 +1) **Direct upload**
 +2) **Select pics already uploaded in ownCloud files.**
 +
 +After you have selected the picture for the contact you get
 +an option to crop the picture to suit your requirements
 +
 +.. image:: ../images/contact_crop.jpg
 +Cropping contact picture
 +
 +You can crop the picture however you wish and then press OK.
 +
 +As you can see it is really easy to set things right in this app.
 +It automatically picks up the First name, Middle name (if any) and the last name
 +You may add or delete any section you want for your own convenience.
 +
 +Creating new addressbooks
 +--------------------------
 +
 +When you click on settings button on bottom bar,
 +you will have access to the application's settings.
 +Then, you will be shown all available addressbooks to access the options.
 +
 +.. image:: ../images/contact_del_ab.png
 +Addressbook options
 +
 +There, you have the ability to add, delete, download or share your addressbooks.
 +Hover your cursor on every icon to see what they mean.
 +
 +
 +Keeping your addressbook in sync
 +---------------------------------
 +
 +One of the most important thing in any contact app is to keep it in Sync.
 +You can sync this contact app to your phone which has the following OS's- Android and iOS
 +
 +
 +Syncing with Android
 +~~~~~~~~~~~~~~~~~~~~
 +
 +1) Install CardDAV- Sync free from Google play store by visiting `this link <https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync>`_.
 +2) This app supports auto- configuration which is a Boon- after installing visit this link - carddavs://example.org/remote.php/carddav/ to auto-configure the app.
 +3) Enter your login details
 +4) After the app has checked your login details you may just select- Sync server to phone option
 +5) That's it there is nothing else to do for Android :)
 +
 +.. image:: ../images/contact_syncopt.jpg
 +
 +Syncing your iOS device
 +~~~~~~~~~~~~~~~~~~~~~~~
 +
 +Synchronizing the Address book
 +
 +1. Open the settings application.
 +2. Select Mail, Contacts, Calendars.
 +3. Select Add Account.
 +4. Select other as account type.
 +5. Select Add CardDAV account.
 +6. For server, type http://example.org/remote.php/carddav/principals/username
 +7. Enter your user name and password.
 +8. Select Next.
 +9. If your server does not support SSL, a warning will be displayed. Select Continue.
 +10. If the iPhone is unable to verify the account information perform the following:
 +
 +* Select OK.
 +* Select advanced settings.
 +* Make sure Use SSL is set to OFF.
 +* Change port to 80.
 +* Go back to account information and hit Save.
 +
 +Now should now find your contacts in the address book of your iPhone.
 +
 +
 +Other Syncing options provided by ownCloud
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +1. For Android you may use official Android app which can be found `here <https://owncloud.org/install/>`_.
 +2. And for iOS (iPhone and iPad) use their app which can be found `here <https://owncloud.org/install/>`_.
++
++It doesn't work!!!
++------------------
++
++Are you having problems using the app? Have a look at the :doc:`troubleshooting` guide.
++
diff --cc core/doc/user/_sources/pim/troubleshooting.txt
index 57ac534,0000000..9a0285c
mode 100644,000000..100644
--- a/core/doc/user/_sources/pim/troubleshooting.txt
+++ b/core/doc/user/_sources/pim/troubleshooting.txt
@@@ -1,36 -1,0 +1,86 @@@
 +Troubleshooting
 +===============
 +
++Debugging the issue
++-------------------
++
++In a standard ownCloud installation the log level is set to "Normal". to find any issues
++you need to raise the log level to "All" from the Admin page.
++Some logging - for example JavaScript console logging - needs manually editing the
++configuration file.
++Edit :file:`config/config.php` and add ``define('DEBUG', true);``::
++
++    <?php
++    define('DEBUG',true);
++    $CONFIG = array (
++        ... configuration goes here ...
++    );
++
++For JavaScript issues you will also need to view the javascript console. All major browsers
++have decent developer tools for viewing the console, and you usually access them by
++pressing F-12. For Firefox it is recommended to install the `Firebug extension <https://getfirebug.com/>`_.
++
 +Service discovery
 +-----------------
 +
 +Some clients - especially iOS - have problems finding the proper sync URL, even when explicitly
 +configured to use it.
 +
 +There are several techniques to remedy this, which are described extensively at the
 +`Sabre DAV website <http://code.google.com/p/sabredav/wiki/ServiceDiscovery>`_.
 +
++Apple iOS
++`````````
++
 +Below is what have proven to work with iOS including iOS 7.
 +
 +If your ownCloud instance is installed in a sub-folder under the web servers document root, and
 +the client has difficulties finding the Cal- or CardDAV end-points, configure your web server to
 +redirect from a "well-know" URL to the one used by ownCloud.
 +When using the Apache web server this is easily achieved using a :file:`.htaccess` file in the document
 +root of your site.
 +
 +Say your instance is located in the ``owncloud`` folder, so the URL to it is ``ADDRESS/owncloud``,
 +create or edit the :file:`.htaccess` file and add the following lines::
 +
 +    Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
 +    Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav
 +
 +If you use Nginx as web server, the setting looks something like::
 +
 +    url.redirect = (
 +        "^/.well-known/carddav" => "/owncloud/remote.php/carddav",
 +        "^/.well-known/caldav" => "/owncloud/remote.php/caldav",
 +    )
 +
 +Now change the URL in the client settings to just use ``ADDRESS`` instead of e.g. ``ADDRESS/remote.php/carddav/principals/username``.
 +
 +This problem is being discussed in the `forum <http://forum.owncloud.org/viewtopic.php?f=3&t=71&p=2211#p2197>`_.
++
++
++BlackBerry OS 10.2
++``````````````````
++
++BlackBerry OS up to 10.2.2102 doesn't accept a URL with protocol ``https://`` in front of the server address.
++It will always tell you, that it cannot login on your server. So instead of writing
++
++    https://address/remote.php/carddav/principals/username
++    
++in the server address field, you have to write
++
++    address/remote.php/carddav/principals/username
++
++
++Unable to update Contacts or Events
++-----------------------------------
++
++If you get an error like ``PATCH https://ADDRESS/some_url HTTP/1.0 501 Not Implemented`` it is
++likely caused by one of the following reasons:
++
++Outdated lighttpd web server
++  lighttpd in debian wheezy (1.4.31) doesn't support the PATCH HTTP verb.
++  Upgrade to lighttpd >= 1.4.33.
++
++Using Pound reverse-proxy/load balancer
++  As of writing this Pound doesn't support the HTTP/1.1 verb.
++  Pound is easily `patched <http://www.apsis.ch/pound/pound_list/archive/2013/2013-08/1377264673000>`_ to support HTTP/1.1.
diff --cc core/doc/user/contents.html
index ce75317,0000000..b3216ea
mode 100644,000000..100644
--- a/core/doc/user/contents.html
+++ b/core/doc/user/contents.html
@@@ -1,263 -1,0 +1,266 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>ownCloud documentation contents — ownCloud User Manual 6.0 documentation</title>
 +    
 +    <link rel="stylesheet" href="_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
 +    <link rel="stylesheet" href="_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
 +    
 +    <script type="text/javascript">
 +      var DOCUMENTATION_OPTIONS = {
 +        URL_ROOT:    '',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="_static/jquery.js"></script>
 +    <script type="text/javascript" src="_static/underscore.js"></script>
 +    <script type="text/javascript" src="_static/doctools.js"></script>
 +    <script type="text/javascript" src="_static/bootstrap.js"></script>
 +    <link rel="top" title="ownCloud User Manual 6.0 documentation" href="index.html" />
 +    <link rel="next" title="User Documentation" href="index.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="#">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="#">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="index.html">User Documentation</a></li>
 +</ul>
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="owncloud-documentation-contents">
 +<span id="contents"></span><h1>ownCloud documentation contents<a class="headerlink" href="#owncloud-documentation-contents" title="Permalink to this headline">¶</a></h1>
 +<div class="toctree-wrapper compound">
 +</div>
 +<div class="toctree-wrapper compound">
 +<ul>
 +<li class="toctree-l1"><a class="reference internal" href="webinterface.html">The ownCloud Web Interface</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="webinterface.html#overview">Overview</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="files/index.html">Files & Synchronization</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="files/filesweb.html">Accessing your Files (Web Interface)</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#navigating-inside-your-owncloud">Navigating inside your ownCloud</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#creating-uploading-files">Creating/uploading files</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#selecting-files">Selecting files</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#viewing-files">Viewing files</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#moving-files">Moving files</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/filesweb.html#sharing-files">Sharing files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="files/files.html">Accessing your Files (WebDAV)</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#linux">Linux</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#macos">MacOS</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#windows">Windows</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#sync-client">Sync Client</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/files.html#mobile">Mobile</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="files/versioncontrol.html">Version Control</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="files/deletedfiles.html">Deleted Files</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="files/sync.html">Desktop Synchronization</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="files/encryption.html">Files Encryption</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="files/encryption.html#what-gets-encrypted">What gets encrypted</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/encryption.html#decrypt-your-data-again">Decrypt your data again</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/encryption.html#settings">Settings</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="files/quota.html">Storage Quota</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="files/quota.html#checking-the-available-space">Checking the available space</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/quota.html#sharing">Sharing</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="files/quota.html#excluded-from-quota">Excluded from quota</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="files/configuring_big_file_upload.html">Big Files</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="pim/index.html">Contacts & Calendar</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="pim/contacts.html">Using the Contacts App</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#adding-contacts">Adding contacts</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#creating-new-addressbooks">Creating new addressbooks</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#keeping-your-addressbook-in-sync">Keeping your addressbook in sync</a></li>
++<li class="toctree-l3"><a class="reference internal" href="pim/contacts.html#it-doesn-t-work">It doesn’t work!!!</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/calendar.html">Using the Calendar App</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#creating-a-calendar">Creating a calendar</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#synchronising-calendars-with-caldav">Synchronising Calendars with CalDAV</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#creating-events">Creating events</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#exporting-importing-events">Exporting / Importing events</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/calendar.html#why-is-the-calendar-app-asking-for-my-current-location">Why is the calendar app asking for my current location?</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/sync_ios.html">iOS - Synchronize iPhone/iPad</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/sync_ios.html#calendar">Calendar</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/sync_ios.html#address-book">Address book</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/sync_osx.html">Synchronizing with OS X</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="pim/sync_thunderbird.html#addressbook">Addressbook</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="pim/troubleshooting.html">Troubleshooting</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="pim/troubleshooting.html#debugging-the-issue">Debugging the issue</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="pim/troubleshooting.html#service-discovery">Service discovery</a></li>
++<li class="toctree-l3"><a class="reference internal" href="pim/troubleshooting.html#unable-to-update-contacts-or-events">Unable to update Contacts or Events</a></li>
 +</ul>
 +</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Using the Bookmarks App</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="bookmarks.html#the-main-interface">The main interface</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="bookmarks.html#add-a-bookmark">Add a bookmark</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="bookmarks.html#edit-delete-a-bookmark">Edit/Delete a bookmark</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="bookmarks.html#search">Search</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="bookmarks.html#the-bookmarklet">The Bookmarklet</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="documents.html#the-main-interface">The main interface</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="documents.html#create-upload-a-document">Create/Upload a Document</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="documents.html#edit-a-document">Edit a Document</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="documents.html#delete-a-document">Delete a Document</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="documents.html#share-a-document">Share a Document</a></li>
 +</ul>
 +</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="migration.html">User Account Migration</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="migration.html#export">Export</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="migration.html#import">Import</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="external_storage/google_drive.html">External storage</a><ul>
 +<li class="toctree-l2"><a class="reference internal" href="external_storage/google_drive.html#google-drive">Google Drive</a></li>
 +</ul>
 +</li>
 +</ul>
 +</div>
 +<div class="section" id="indices-and-tables">
 +<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
 +<ul class="simple">
 +<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
 +</ul>
 +</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/contacts.html
index 503cf70,0000000..7ca7fd0
mode 100644,000000..100644
--- a/core/doc/user/pim/contacts.html
+++ b/core/doc/user/pim/contacts.html
@@@ -1,285 -1,0 +1,290 @@@
 +
 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 +
 +
 +<html xmlns="http://www.w3.org/1999/xhtml">
 +  <head>
 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +    
 +    <title>Using the Contacts App — ownCloud User Manual 6.0 documentation</title>
 +    
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
 +    
 +    <script type="text/javascript">
 +      var DOCUMENTATION_OPTIONS = {
 +        URL_ROOT:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <script type="text/javascript" src="../_static/underscore.js"></script>
 +    <script type="text/javascript" src="../_static/doctools.js"></script>
 +    <script type="text/javascript" src="../_static/bootstrap.js"></script>
 +    <link rel="top" title="ownCloud User Manual 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Contacts & Calendar" href="index.html" />
 +    <link rel="next" title="Using the Calendar App" href="calendar.html" />
 +    <link rel="prev" title="Contacts & Calendar" href="index.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Using the Contacts App</a><ul>
 +<li class="toctree-l3"><a class="reference internal" href="#adding-contacts">Adding contacts</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#creating-new-addressbooks">Creating new addressbooks</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#keeping-your-addressbook-in-sync">Keeping your addressbook in sync</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#it-doesn-t-work">It doesn’t work!!!</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="using-the-contacts-app">
 +<h1>Using the Contacts App<a class="headerlink" href="#using-the-contacts-app" title="Permalink to this headline">¶</a></h1>
 +<p>The contacts app of ownCloud is like any other mobile contact app but with more functionality.
 +Just as you open your account you will get the a default addressbook available.
 +We will see later that Of course you can always add and remove addressbooks in here.</p>
 +<div class="section" id="adding-contacts">
 +<h2>Adding contacts<a class="headerlink" href="#adding-contacts" title="Permalink to this headline">¶</a></h2>
 +<p>There are two ways in which you can add contacts</p>
 +<ol class="arabic simple">
 +<li>Add them manually</li>
 +<li>Import a VCF file</li>
 +</ol>
 +<div class="section" id="importing">
 +<h3>Importing<a class="headerlink" href="#importing" title="Permalink to this headline">¶</a></h3>
 +<p>So first we’ll check out how to import all the VCF files as they are a lot
 +more faster way of creating contacts.
 +Just below the contact list, click on the gear button:</p>
 +<img alt="../_images/contact_bottombar.png" src="../_images/contact_bottombar.png" />
 +<p>Contact settings icon</p>
 +<p>Once you’ve clicked it, an up arrow button which lets you upload files will be shown:</p>
 +<img alt="../_images/contact_uploadbutton.png" src="../_images/contact_uploadbutton.png" />
 +<p>Contact file upload icon</p>
 +<p>After choosing an addressbook to import into, click on the arrow. The upload window will be opened and let you choose your files.
 +You can upload the files one by one or upload all of them at one go.</p>
 +<p>Let us demonstrate.
 +Open the directory in which you store all the files and then do the following
 +Keep pressing CTRL and select the files to upload.
 +After you are done just click on the open button
 +After the upload it should look something like this in which all the names and contacts will be sorted alphabetically</p>
 +<img alt="../_images/contact_vcfpick.jpg" src="../_images/contact_vcfpick.jpg" />
 +<p>Picking VCF files</p>
 +<p>After upload, the interface will automatically place your contacts into ownCloud.</p>
 +</div>
 +<div class="section" id="create-contacts-manually">
 +<h3>Create contacts manually<a class="headerlink" href="#create-contacts-manually" title="Permalink to this headline">¶</a></h3>
 +<p>On the left side of contacts app, you could see the new contact button (first one).
 +Click on it. You can now see an empty contact in the main part of the interface.
 +You have the ability to add all your informations about the contact:
 +the name, the address, the e-mail, the telephone nr, etc.</p>
 +<p>Just click on a field and start typing the information.
 +You can use the “Add Field” button to add another types of information for this contact.</p>
 +<img alt="../_images/contact_emptycontact.png" src="../_images/contact_emptycontact.png" />
 +<p>Empty contact view</p>
 +<p>When you want to remove an information of your contact, just click on little delete icon
 +at the right of the field you want to remove.</p>
 +</div>
 +<div class="section" id="adding-picture-to-the-contact">
 +<h3>Adding picture to the contact<a class="headerlink" href="#adding-picture-to-the-contact" title="Permalink to this headline">¶</a></h3>
 +<p>There are two methods in which you can give a picture id to the specific contact</p>
 +<img alt="../_images/contact_picture.jpg" src="../_images/contact_picture.jpg" />
 +<p>Contact picture options</p>
 +<ol class="arabic simple">
 +<li><strong>Direct upload</strong></li>
 +<li><strong>Select pics already uploaded in ownCloud files.</strong></li>
 +</ol>
 +<p>After you have selected the picture for the contact you get
 +an option to crop the picture to suit your requirements</p>
 +<img alt="../_images/contact_crop.jpg" src="../_images/contact_crop.jpg" />
 +<p>Cropping contact picture</p>
 +<p>You can crop the picture however you wish and then press OK.</p>
 +<p>As you can see it is really easy to set things right in this app.
 +It automatically picks up the First name, Middle name (if any) and the last name
 +You may add or delete any section you want for your own convenience.</p>
 +</div>
 +</div>
 +<div class="section" id="creating-new-addressbooks">
 +<h2>Creating new addressbooks<a class="headerlink" href="#creating-new-addressbooks" title="Permalink to this headline">¶</a></h2>
 +<p>When you click on settings button on bottom bar,
 +you will have access to the application’s settings.
 +Then, you will be shown all available addressbooks to access the options.</p>
 +<img alt="../_images/contact_del_ab.png" src="../_images/contact_del_ab.png" />
 +<p>Addressbook options</p>
 +<p>There, you have the ability to add, delete, download or share your addressbooks.
 +Hover your cursor on every icon to see what they mean.</p>
 +</div>
 +<div class="section" id="keeping-your-addressbook-in-sync">
 +<h2>Keeping your addressbook in sync<a class="headerlink" href="#keeping-your-addressbook-in-sync" title="Permalink to this headline">¶</a></h2>
 +<p>One of the most important thing in any contact app is to keep it in Sync.
 +You can sync this contact app to your phone which has the following OS’s- Android and iOS</p>
 +<div class="section" id="syncing-with-android">
 +<h3>Syncing with Android<a class="headerlink" href="#syncing-with-android" title="Permalink to this headline">¶</a></h3>
 +<ol class="arabic simple">
 +<li>Install CardDAV- Sync free from Google play store by visiting <a class="reference external" href="https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync">this link</a>.</li>
 +<li>This app supports auto- configuration which is a Boon- after installing visit this link - carddavs://example.org/remote.php/carddav/ to auto-configure the app.</li>
 +<li>Enter your login details</li>
 +<li>After the app has checked your login details you may just select- Sync server to phone option</li>
 +<li>That’s it there is nothing else to do for Android :)</li>
 +</ol>
 +<img alt="../_images/contact_syncopt.jpg" src="../_images/contact_syncopt.jpg" />
 +</div>
 +<div class="section" id="syncing-your-ios-device">
 +<h3>Syncing your iOS device<a class="headerlink" href="#syncing-your-ios-device" title="Permalink to this headline">¶</a></h3>
 +<p>Synchronizing the Address book</p>
 +<ol class="arabic simple">
 +<li>Open the settings application.</li>
 +<li>Select Mail, Contacts, Calendars.</li>
 +<li>Select Add Account.</li>
 +<li>Select other as account type.</li>
 +<li>Select Add CardDAV account.</li>
 +<li>For server, type <a class="reference external" href="http://example.org/remote.php/carddav/principals/username">http://example.org/remote.php/carddav/principals/username</a></li>
 +<li>Enter your user name and password.</li>
 +<li>Select Next.</li>
 +<li>If your server does not support SSL, a warning will be displayed. Select Continue.</li>
 +<li>If the iPhone is unable to verify the account information perform the following:</li>
 +</ol>
 +<ul class="simple">
 +<li>Select OK.</li>
 +<li>Select advanced settings.</li>
 +<li>Make sure Use SSL is set to OFF.</li>
 +<li>Change port to 80.</li>
 +<li>Go back to account information and hit Save.</li>
 +</ul>
 +<p>Now should now find your contacts in the address book of your iPhone.</p>
 +</div>
 +<div class="section" id="other-syncing-options-provided-by-owncloud">
 +<h3>Other Syncing options provided by ownCloud<a class="headerlink" href="#other-syncing-options-provided-by-owncloud" title="Permalink to this headline">¶</a></h3>
 +<ol class="arabic simple">
 +<li>For Android you may use official Android app which can be found <a class="reference external" href="https://owncloud.org/install/">here</a>.</li>
 +<li>And for iOS (iPhone and iPad) use their app which can be found <a class="reference external" href="https://owncloud.org/install/">here</a>.</li>
 +</ol>
 +</div>
 +</div>
++<div class="section" id="it-doesn-t-work">
++<h2>It doesn’t work!!!<a class="headerlink" href="#it-doesn-t-work" title="Permalink to this headline">¶</a></h2>
++<p>Are you having problems using the app? Have a look at the <a class="reference internal" href="troubleshooting.html"><em>Troubleshooting</em></a> guide.</p>
++</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/doc/user/pim/troubleshooting.html
index c42075e,0000000..6d3400f
mode 100644,000000..100644
--- a/core/doc/user/pim/troubleshooting.html
+++ b/core/doc/user/pim/troubleshooting.html
@@@ -1,189 -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>Troubleshooting — ownCloud User Manual 6.0 documentation</title>
 +    
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
 +    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
 +    
 +    <script type="text/javascript">
 +      var DOCUMENTATION_OPTIONS = {
 +        URL_ROOT:    '../',
 +        VERSION:     '6.0',
 +        COLLAPSE_INDEX: false,
 +        FILE_SUFFIX: '.html',
 +        HAS_SOURCE:  true
 +      };
 +    </script>
 +    <script type="text/javascript" src="../_static/jquery.js"></script>
 +    <script type="text/javascript" src="../_static/underscore.js"></script>
 +    <script type="text/javascript" src="../_static/doctools.js"></script>
 +    <script type="text/javascript" src="../_static/bootstrap.js"></script>
 +    <link rel="top" title="ownCloud User Manual 6.0 documentation" href="../index.html" />
 +    <link rel="up" title="Contacts & Calendar" href="index.html" />
 +    <link rel="next" title="Using the Bookmarks App" href="../bookmarks.html" />
 +    <link rel="prev" title="Synchronizing with KDE SC" href="sync_kde.html" />
 +<script type="text/javascript">
 +(function () {
 +  /**
 +   * Patch TOC list.
 +   *
 +   * Will mutate the underlying span to have a correct ul for nav.
 +   *
 +   * @param $span: Span containing nested UL's to mutate.
 +   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
 +   */
 +  var patchToc = function ($ul, minLevel) {
 +    var findA;
 +
 +    // Find all a "internal" tags, traversing recursively.
 +    findA = function ($elem, level) {
 +      var level = level || 0,
 +        $items = $elem.find("> li > a.internal, > ul, > li > ul");
 +
 +      // Iterate everything in order.
 +      $items.each(function (index, item) {
 +        var $item = $(item),
 +          tag = item.tagName.toLowerCase(),
 +          pad = 15 + ((level - minLevel) * 10);
 +
 +        if (tag === 'a' && level >= minLevel) {
 +          // Add to existing padding.
 +          $item.css('padding-left', pad + "px");
 +          console.log(level, $item, 'padding-left', pad + "px");
 +        } else if (tag === 'ul') {
 +          // Recurse.
 +          findA($item, level + 1);
 +        }
 +      });
 +    };
 +
 +    console.log("HERE");
 +    findA($ul);
 +  };
 +
 +  $(document).ready(function () {
 +    // Add styling, structure to TOC's.
 +    $(".dropdown-menu").each(function () {
 +      $(this).find("ul").each(function (index, item){
 +        var $item = $(item);
 +        $item.addClass('unstyled');
 +      });
 +      $(this).find("li").each(function () {
 +        $(this).parent().append(this);
 +      });
 +    });
 +
 +    // Patch in level.
 +    patchToc($("ul.globaltoc"), 2);
 +    patchToc($("ul.localtoc"), 2);
 +
 +    // Enable dropdown.
 +    $('.dropdown-toggle').dropdown();
 +  });
 +}());
 +</script>
 +
 +  </head>
 +  <body>
 +  
 +
 +<div class="container">
 +  <div class="content">
 +    <div class="page-header">
 +      <h1><a href="../contents.html">ownCloud User Manual</a></h1>
 +
 +    </div>
 +    
 +			<div class="row">
 +				<div class="span3">
 +					<div class="sidebar">
 +						<div class="well">
 +							<div class="menu-support-container">
 +								<ul id="menu-support" class="menu">
 +									<ul>
 +										<li><a href="../contents.html">Overview</a></li>
 +									</ul>
 +                  <ul>
 +<li class="toctree-l1"><a class="reference internal" href="../index.html">User Documentation</a></li>
 +</ul>
 +<ul class="current">
 +<li class="toctree-l1"><a class="reference internal" href="../webinterface.html">The ownCloud Web Interface</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../files/index.html">Files & Synchronization</a></li>
 +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contacts & Calendar</a><ul class="current">
 +<li class="toctree-l2"><a class="reference internal" href="contacts.html">Using the Contacts App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="calendar.html">Using the Calendar App</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_ios.html">iOS - Synchronize iPhone/iPad</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_osx.html">Synchronizing with OS X</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_thunderbird.html">Thunderbird - Synchronize Addressbook</a></li>
 +<li class="toctree-l2"><a class="reference internal" href="sync_kde.html">Synchronizing with KDE SC</a></li>
 +<li class="toctree-l2 current"><a class="current reference internal" href="">Troubleshooting</a><ul>
++<li class="toctree-l3"><a class="reference internal" href="#debugging-the-issue">Debugging the issue</a></li>
 +<li class="toctree-l3"><a class="reference internal" href="#service-discovery">Service discovery</a></li>
++<li class="toctree-l3"><a class="reference internal" href="#unable-to-update-contacts-or-events">Unable to update Contacts or Events</a></li>
 +</ul>
 +</li>
 +</ul>
 +</li>
 +<li class="toctree-l1"><a class="reference internal" href="../bookmarks.html">Using the Bookmarks App</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../documents.html">Documents</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../migration.html">User Account Migration</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../userpreferences.html">Changing Preferences</a></li>
 +<li class="toctree-l1"><a class="reference internal" href="../external_storage/google_drive.html">External storage</a></li>
 +</ul>
 +
 +								</ul>
 +							</div>
 +						</div>
 +					</div>
 +				</div>
 +        
 +
 +				<div class="span9">
 +					<div class="page-content">
 +						
 +  <div class="section" id="troubleshooting">
 +<h1>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permalink to this headline">¶</a></h1>
++<div class="section" id="debugging-the-issue">
++<h2>Debugging the issue<a class="headerlink" href="#debugging-the-issue" title="Permalink to this headline">¶</a></h2>
++<p>In a standard ownCloud installation the log level is set to “Normal”. to find any issues
++you need to raise the log level to “All” from the Admin page.
++Some logging - for example JavaScript console logging - needs manually editing the
++configuration file.
++Edit <tt class="file docutils literal"><span class="pre">config/config.php</span></tt> and add <tt class="docutils literal"><span class="pre">define('DEBUG',</span> <span class="pre">true);</span></tt>:</p>
++<div class="highlight-python"><pre><?php
++define('DEBUG',true);
++$CONFIG = array (
++    ... configuration goes here ...
++);</pre>
++</div>
++<p>For JavaScript issues you will also need to view the javascript console. All major browsers
++have decent developer tools for viewing the console, and you usually access them by
++pressing F-12. For Firefox it is recommended to install the <a class="reference external" href="https://getfirebug.com/">Firebug extension</a>.</p>
++</div>
 +<div class="section" id="service-discovery">
 +<h2>Service discovery<a class="headerlink" href="#service-discovery" title="Permalink to this headline">¶</a></h2>
 +<p>Some clients - especially iOS - have problems finding the proper sync URL, even when explicitly
 +configured to use it.</p>
 +<p>There are several techniques to remedy this, which are described extensively at the
 +<a class="reference external" href="http://code.google.com/p/sabredav/wiki/ServiceDiscovery">Sabre DAV website</a>.</p>
++<div class="section" id="apple-ios">
++<h3>Apple iOS<a class="headerlink" href="#apple-ios" title="Permalink to this headline">¶</a></h3>
 +<p>Below is what have proven to work with iOS including iOS 7.</p>
 +<p>If your ownCloud instance is installed in a sub-folder under the web servers document root, and
 +the client has difficulties finding the Cal- or CardDAV end-points, configure your web server to
 +redirect from a “well-know” URL to the one used by ownCloud.
 +When using the Apache web server this is easily achieved using a <tt class="file docutils literal"><span class="pre">.htaccess</span></tt> file in the document
 +root of your site.</p>
 +<p>Say your instance is located in the <tt class="docutils literal"><span class="pre">owncloud</span></tt> folder, so the URL to it is <tt class="docutils literal"><span class="pre">ADDRESS/owncloud</span></tt>,
 +create or edit the <tt class="file docutils literal"><span class="pre">.htaccess</span></tt> file and add the following lines:</p>
 +<div class="highlight-python"><pre>Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
 +Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav</pre>
 +</div>
 +<p>If you use Nginx as web server, the setting looks something like:</p>
 +<div class="highlight-python"><pre>url.redirect = (
 +    "^/.well-known/carddav" => "/owncloud/remote.php/carddav",
 +    "^/.well-known/caldav" => "/owncloud/remote.php/caldav",
 +)</pre>
 +</div>
 +<p>Now change the URL in the client settings to just use <tt class="docutils literal"><span class="pre">ADDRESS</span></tt> instead of e.g. <tt class="docutils literal"><span class="pre">ADDRESS/remote.php/carddav/principals/username</span></tt>.</p>
 +<p>This problem is being discussed in the <a class="reference external" href="http://forum.owncloud.org/viewtopic.php?f=3&t=71&p=2211#p2197">forum</a>.</p>
 +</div>
++<div class="section" id="blackberry-os-10-2">
++<h3>BlackBerry OS 10.2<a class="headerlink" href="#blackberry-os-10-2" title="Permalink to this headline">¶</a></h3>
++<p>BlackBerry OS up to 10.2.2102 doesn’t accept a URL with protocol <tt class="docutils literal"><span class="pre">https://</span></tt> in front of the server address.
++It will always tell you, that it cannot login on your server. So instead of writing</p>
++<blockquote>
++<div><a class="reference external" href="https://address/remote.php/carddav/principals/username">https://address/remote.php/carddav/principals/username</a></div></blockquote>
++<p>in the server address field, you have to write</p>
++<blockquote>
++<div>address/remote.php/carddav/principals/username</div></blockquote>
++</div>
++</div>
++<div class="section" id="unable-to-update-contacts-or-events">
++<h2>Unable to update Contacts or Events<a class="headerlink" href="#unable-to-update-contacts-or-events" title="Permalink to this headline">¶</a></h2>
++<p>If you get an error like <tt class="docutils literal"><span class="pre">PATCH</span> <span class="pre">https://ADDRESS/some_url</span> <span class="pre">HTTP/1.0</span> <span class="pre">501</span> <span class="pre">Not</span> <span class="pre">Implemented</span></tt> it is
++likely caused by one of the following reasons:</p>
++<dl class="docutils">
++<dt>Outdated lighttpd web server</dt>
++<dd>lighttpd in debian wheezy (1.4.31) doesn’t support the PATCH HTTP verb.
++Upgrade to lighttpd >= 1.4.33.</dd>
++<dt>Using Pound reverse-proxy/load balancer</dt>
++<dd>As of writing this Pound doesn’t support the HTTP/1.1 verb.
++Pound is easily <a class="reference external" href="http://www.apsis.ch/pound/pound_list/archive/2013/2013-08/1377264673000">patched</a> to support HTTP/1.1.</dd>
++</dl>
++</div>
 +</div>
 +
 +
 +					</div>
 +				</div>
 +			</div>
 +    
 +  </div>
 +</div>
 +  </body>
 +</html>
diff --cc core/skeleton/ownCloudUserManual.pdf
index f2a58e8,0000000..858b710
mode 100644,000000..100644
Binary files differ
diff --cc lib/private/files/view.php
index 8893911,a7e3f53..3b89cd0
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@@ -410,7 -410,7 +410,7 @@@ class View 
  						$result = $this->copy($path1, $path2);
  						if ($result === true) {
  							list($storage1, $internalPath1) = Filesystem::resolvePath($absolutePath1 . $postFix1);
--							$result = $storage1->deleteAll($internalPath1);
++							$result = $storage1->unlink($internalPath1);
  						}
  					} else {
  						$source = $this->fopen($path1 . $postFix1, 'r');
diff --cc lib/private/request.php
index d9d5ae0,f5b5aa0..f5b5aa0
mode 100644,100755..100644
--- a/lib/private/request.php
+++ b/lib/private/request.php
diff --cc lib/private/user.php
index 98ebebb,992e4a2..992e4a2
mode 100644,100755..100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
diff --cc version.php
index b36b317,f5bba71..106f1fa
--- 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, 0, 2, 0);
 -
 -// The human readable string
 -$OC_VersionString='6.0.2 RC1';
 -
 -// The ownCloud edition
 -$OC_Edition='';
 -
 -// The ownCloud channel
 -$OC_Channel='git';
 -
 -// The build number
 -$OC_Build='';
 -
 +<?php 
- $OC_Version = array(6,0,0,16);
- $OC_VersionString = '6.0.1';
++$OC_Version = array(6,0,2,0);
++$OC_VersionString = '6.0.2 RC1';
 +$OC_Edition = '';
- $OC_Channel = 'stable';
- $OC_Build = '2014-01-22T11:26:13+00:00';
++$OC_Channel = 'testing';
++$OC_Build = '2014-02-25T14:53:49+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