aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/filelist.js8
-rw-r--r--apps/files_encryption/img/app.svg51
-rw-r--r--apps/files_external/img/app.svg212
-rw-r--r--apps/files_external/lib/owncloud.php8
-rw-r--r--apps/files_external/tests/owncloudfunctions.php83
-rw-r--r--apps/files_sharing/img/app.svg54
-rw-r--r--apps/files_trashbin/img/app.svg54
-rw-r--r--apps/files_versions/img/app.svg103
-rw-r--r--apps/user_ldap/img/app.svg61
-rw-r--r--apps/user_webdavauth/img/app.svg61
-rw-r--r--core/img/rating/s0.pngbin0 -> 299 bytes
-rw-r--r--core/img/rating/s1.pngbin299 -> 441 bytes
-rw-r--r--core/img/rating/s10.pngbin557 -> 464 bytes
-rw-r--r--core/img/rating/s11.pngbin464 -> 0 bytes
-rw-r--r--core/img/rating/s2.pngbin441 -> 594 bytes
-rw-r--r--core/img/rating/s3.pngbin594 -> 620 bytes
-rw-r--r--core/img/rating/s4.pngbin620 -> 602 bytes
-rw-r--r--core/img/rating/s5.pngbin602 -> 621 bytes
-rw-r--r--core/img/rating/s6.pngbin621 -> 603 bytes
-rw-r--r--core/img/rating/s7.pngbin603 -> 621 bytes
-rw-r--r--core/img/rating/s8.pngbin621 -> 584 bytes
-rw-r--r--core/img/rating/s9.pngbin584 -> 557 bytes
-rw-r--r--core/templates/layout.user.php2
-rw-r--r--l10n/templates/core.pot2
-rw-r--r--l10n/templates/files.pot2
-rw-r--r--l10n/templates/files_encryption.pot2
-rw-r--r--l10n/templates/files_external.pot2
-rw-r--r--l10n/templates/files_sharing.pot2
-rw-r--r--l10n/templates/files_trashbin.pot2
-rw-r--r--l10n/templates/files_versions.pot2
-rw-r--r--l10n/templates/lib.pot2
-rw-r--r--l10n/templates/private.pot2
-rw-r--r--l10n/templates/settings.pot2
-rw-r--r--l10n/templates/user_ldap.pot2
-rw-r--r--l10n/templates/user_webdavauth.pot2
-rw-r--r--lib/private/app.php118
-rw-r--r--lib/private/connector/sabre/directory.php2
-rw-r--r--lib/private/files/storage/dav.php4
-rw-r--r--lib/private/installer.php3
-rw-r--r--lib/private/largefilehelper.php4
-rw-r--r--lib/private/ocsclient.php2
-rw-r--r--lib/private/user/session.php23
-rwxr-xr-xlib/private/util.php2
-rw-r--r--settings/ajax/apps/categories.php30
-rw-r--r--settings/ajax/apps/index.php65
-rw-r--r--settings/ajax/apps/ocs.php68
-rw-r--r--settings/ajax/updateapp.php21
-rw-r--r--settings/apps.php21
-rw-r--r--settings/css/settings.css61
-rw-r--r--settings/js/apps-custom.php26
-rw-r--r--settings/js/apps.js491
-rw-r--r--settings/js/old-apps.js0
-rw-r--r--settings/routes.php8
-rw-r--r--settings/templates/apps.php127
-rw-r--r--tests/data/strängé filename (duplicate #2).txt4
-rw-r--r--tests/lib/largefilehelpergetfilesize.php4
-rw-r--r--tests/lib/user/session.php96
57 files changed, 1332 insertions, 569 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 86cba29e76c..c70c866c634 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1919,7 +1919,13 @@
// Animation
var _this = this;
- this.$container.animate({
+ var $scrollContainer = this.$container;
+ if ($scrollContainer[0] === window) {
+ // need to use "body" to animate scrolling
+ // when the scroll container is the window
+ $scrollContainer = $('body');
+ }
+ $scrollContainer.animate({
// Scrolling to the top of the new element
scrollTop: currentOffset + $fileRow.offset().top - $fileRow.height() * 2 - additionalOffset
}, {
diff --git a/apps/files_encryption/img/app.svg b/apps/files_encryption/img/app.svg
new file mode 100644
index 00000000000..1157c71c66e
--- /dev/null
+++ b/apps/files_encryption/img/app.svg
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xml:space="preserve"
+ height="16px"
+ width="16px"
+ version="1.1"
+ y="0px"
+ x="0px"
+ viewBox="0 0 71 100"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg"><metadata
+ id="metadata10"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs8" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="14.75"
+ inkscape:cx="-21.423729"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><path
+ d="m8 1c-2.2091 0-4 1.7909-4 4v2h-1v7h10v-7h-1v-2c0-2.2091-1.791-4-4-4zm0 2c1.1046 0 2 0.89543 2 2v2h-4v-2c0-1.1046 0.8954-2 2-2z"
+ transform="matrix(6.25,0,0,6.25,-14.5,0)"
+ id="path4"
+ style="fill:#ffffff;fill-opacity:1" /><path
+ style="fill:none"
+ d="m 3.0644068,10.508475 0,-3.4576275 0.4655371,0 0.465537,0 0.049537,-1.2033899 C 4.1094633,4.2818838 4.1578923,4.0112428 4.4962182,3.3259708 4.7075644,2.8978935 4.9002217,2.6327599 5.2605792,2.2740624 6.7855365,0.75613022 8.9920507,0.69157582 10.623172,2.1171729 c 0.384104,0.3357058 0.882069,1.0763131 1.054177,1.5678422 0.147302,0.4206856 0.262873,1.6086448 0.266436,2.7387137 l 0.002,0.6271187 0.508474,0 0.508475,0 0,3.4576275 0,3.457627 -4.9491527,0 -4.9491525,0 0,-3.457627 z M 10.065882,6.3559322 c -0.02012,-0.3822034 -0.04774,-0.7076271 -0.0614,-0.7231639 -0.013653,-0.015537 -0.024824,0.281921 -0.024824,0.661017 l 0,0.6892655 -1.9630041,0 -1.963004,0 -0.023717,-0.4576271 -0.023717,-0.4576271 -0.013279,0.4915254 -0.013279,0.4915255 2.0613978,0 2.0613972,0 -0.03657,-0.6949153 0,0 z M 6.5396275,3.7118644 C 6.648082,3.5720339 6.7197092,3.4576271 6.6987988,3.4576271 c -0.062956,0 -0.5835446,0.6841947 -0.5835446,0.7669359 0,0.042237 0.051116,0.00136 0.1135916,-0.090834 0.062475,-0.092195 0.2023271,-0.2820343 0.3107817,-0.4218648 z M 9.7498983,4.0169492 C 9.6961899,3.9144068 9.5352369,3.723769 9.392225,3.5933098 L 9.1322034,3.356111 9.3784249,3.6272081 c 0.1354218,0.1491033 0.2814105,0.3397411 0.3244192,0.4236394 0.043009,0.083898 0.093162,0.1525423 0.1114515,0.1525423 0.01829,0 -0.010689,-0.083898 -0.064397,-0.1864406 l 0,0 z M 7.3032896,3.1315382 C 7.2704731,3.0987216 6.877102,3.3089557 6.8306315,3.3841466 6.8091904,3.4188389 6.911918,3.3813452 7.0589148,3.300827 7.2059117,3.2203088 7.3158803,3.1441289 7.3032896,3.1315382 l 0,0 z"
+ id="path3007"
+ inkscape:connector-curvature="0"
+ transform="matrix(6.25,0,0,6.25,-14.5,0)" /></svg> \ No newline at end of file
diff --git a/apps/files_external/img/app.svg b/apps/files_external/img/app.svg
new file mode 100644
index 00000000000..df1bfd163ff
--- /dev/null
+++ b/apps/files_external/img/app.svg
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="32px"
+ width="32px"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg">
+ <metadata
+ id="metadata80">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview78"
+ showgrid="false"
+ inkscape:zoom="7.375"
+ inkscape:cx="-13.559322"
+ inkscape:cy="16"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <linearGradient
+ id="m"
+ y2="21.387"
+ gradientUnits="userSpaceOnUse"
+ x2="27.557"
+ gradientTransform="matrix(.89186 0 0 1.0539 3.1208 3.4122)"
+ y1="7.1627"
+ x1="27.557">
+ <stop
+ stop-color="#fff"
+ offset="0"
+ id="stop7" />
+ <stop
+ stop-color="#fff"
+ stop-opacity=".23529"
+ offset=".0097359"
+ id="stop9" />
+ <stop
+ stop-color="#fff"
+ stop-opacity=".15686"
+ offset=".99001"
+ id="stop11" />
+ <stop
+ stop-color="#fff"
+ stop-opacity=".39216"
+ offset="1"
+ id="stop13" />
+ </linearGradient>
+ <linearGradient
+ id="l"
+ y2="43.761"
+ gradientUnits="userSpaceOnUse"
+ x2="35.793"
+ gradientTransform="matrix(.64444 0 0 .64286 .53352 -1.1074)"
+ y1="17.118"
+ x1="35.793">
+ <stop
+ stop-color="#b4cee1"
+ offset="0"
+ id="stop16" />
+ <stop
+ stop-color="#5d9fcd"
+ offset="1"
+ id="stop18" />
+ </linearGradient>
+ <linearGradient
+ id="k"
+ y2="609.51"
+ gradientUnits="userSpaceOnUse"
+ x2="302.86"
+ gradientTransform="matrix(.051143 0 0 .015916 -2.49 22.299)"
+ y1="366.65"
+ x1="302.86">
+ <stop
+ stop-opacity="0"
+ offset="0"
+ id="stop21" />
+ <stop
+ offset=".5"
+ id="stop23" />
+ <stop
+ stop-opacity="0"
+ offset="1"
+ id="stop25" />
+ </linearGradient>
+ <radialGradient
+ id="n"
+ gradientUnits="userSpaceOnUse"
+ cy="486.65"
+ cx="605.71"
+ gradientTransform="matrix(.019836 0 0 .015916 16.388 22.299)"
+ r="117.14">
+ <stop
+ offset="0"
+ id="stop28" />
+ <stop
+ stop-opacity="0"
+ offset="1"
+ id="stop30" />
+ </radialGradient>
+ <radialGradient
+ id="o"
+ gradientUnits="userSpaceOnUse"
+ cy="486.65"
+ cx="605.71"
+ gradientTransform="matrix(-.019836 0 0 .015916 15.601 22.299)"
+ r="117.14">
+ <stop
+ offset="0"
+ id="stop33" />
+ <stop
+ stop-opacity="0"
+ offset="1"
+ id="stop35" />
+ </radialGradient>
+ <linearGradient
+ id="j"
+ y2="34.143"
+ gradientUnits="userSpaceOnUse"
+ x2="21.37"
+ gradientTransform="matrix(.54384 0 0 .61466 3.2689 3.0908)"
+ y1="4.7324"
+ x1="21.37">
+ <stop
+ stop-color="#fff"
+ offset="0"
+ id="stop38" />
+ <stop
+ stop-color="#fff"
+ stop-opacity=".23529"
+ offset=".11063"
+ id="stop40" />
+ <stop
+ stop-color="#fff"
+ stop-opacity=".15686"
+ offset=".99001"
+ id="stop42" />
+ <stop
+ stop-color="#fff"
+ stop-opacity=".39216"
+ offset="1"
+ id="stop44" />
+ </linearGradient>
+ <linearGradient
+ id="i"
+ y2="16"
+ gradientUnits="userSpaceOnUse"
+ x2="62.989"
+ gradientTransform="matrix(.61905 0 0 .61905 -30.392 -.57170)"
+ y1="13"
+ x1="62.989">
+ <stop
+ stop-color="#f9f9f9"
+ offset="0"
+ id="stop47" />
+ <stop
+ stop-color="#d8d8d8"
+ offset="1"
+ id="stop49" />
+ </linearGradient>
+ <linearGradient
+ id="d"
+ y2="3.6337"
+ gradientUnits="userSpaceOnUse"
+ y1="53.514"
+ gradientTransform="matrix(.50703 0 0 .503 68.029 -.67050)"
+ x2="-51.786"
+ x1="-51.786">
+ <stop
+ stop-opacity=".32174"
+ offset="0"
+ id="stop52" />
+ <stop
+ stop-opacity=".27826"
+ offset="1"
+ id="stop54" />
+ </linearGradient>
+ </defs>
+ <path
+ d="m 14.902928,3.2372882 4.76117,4.5146377 -7.141758,6.7719561 4.761174,4.514639 7.141756,-6.771956 4.761171,4.514636 V 3.2372882 H 14.902928 z M 5.3805857,5.4946057 C 4.0617412,5.4946057 3,6.501372 3,7.7519259 V 25.810477 c 0,1.250555 1.0617412,2.257319 2.3805857,2.257319 H 24.42527 c 1.318844,0 2.380584,-1.006764 2.380584,-2.257319 v -6.771956 l -2.380584,-2.25732 v 9.029276 H 5.3805857 V 7.7519259 H 14.902928 L 12.52234,5.4946057 H 5.3805857 z"
+ id="path76"
+ inkscape:connector-curvature="0"
+ style="opacity:0.7;fill:#ffffff;fill-opacity:1" />
+</svg>
diff --git a/apps/files_external/lib/owncloud.php b/apps/files_external/lib/owncloud.php
index 98314102a64..04a1e959eb0 100644
--- a/apps/files_external/lib/owncloud.php
+++ b/apps/files_external/lib/owncloud.php
@@ -22,6 +22,14 @@ class OwnCloud extends \OC\Files\Storage\DAV{
// extract context path from host if specified
// (owncloud install path on host)
$host = $params['host'];
+ // strip protocol
+ if (substr($host, 0, 8) == "https://") {
+ $host = substr($host, 8);
+ $params['secure'] = true;
+ } else if (substr($host, 0, 7) == "http://") {
+ $host = substr($host, 7);
+ $params['secure'] = false;
+ }
$contextPath = '';
$hostSlashPos = strpos($host, '/');
if ($hostSlashPos !== false){
diff --git a/apps/files_external/tests/owncloudfunctions.php b/apps/files_external/tests/owncloudfunctions.php
new file mode 100644
index 00000000000..57608fff0cf
--- /dev/null
+++ b/apps/files_external/tests/owncloudfunctions.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace Test\Files\Storage;
+
+class OwnCloudFunctions extends \PHPUnit_Framework_TestCase {
+
+ function configUrlProvider() {
+ return array(
+ array(
+ array(
+ 'host' => 'testhost',
+ 'root' => 'testroot',
+ 'secure' => false
+ ),
+ 'http://testhost/remote.php/webdav/testroot/',
+ ),
+ array(
+ array(
+ 'host' => 'testhost',
+ 'root' => 'testroot',
+ 'secure' => true
+ ),
+ 'https://testhost/remote.php/webdav/testroot/',
+ ),
+ array(
+ array(
+ 'host' => 'http://testhost',
+ 'root' => 'testroot',
+ 'secure' => false
+ ),
+ 'http://testhost/remote.php/webdav/testroot/',
+ ),
+ array(
+ array(
+ 'host' => 'https://testhost',
+ 'root' => 'testroot',
+ 'secure' => false
+ ),
+ 'https://testhost/remote.php/webdav/testroot/',
+ ),
+ array(
+ array(
+ 'host' => 'https://testhost/testroot',
+ 'root' => '',
+ 'secure' => false
+ ),
+ 'https://testhost/testroot/remote.php/webdav/',
+ ),
+ array(
+ array(
+ 'host' => 'https://testhost/testroot',
+ 'root' => 'subdir',
+ 'secure' => false
+ ),
+ 'https://testhost/testroot/remote.php/webdav/subdir/',
+ ),
+ array(
+ array(
+ 'host' => 'http://testhost/testroot',
+ 'root' => 'subdir',
+ 'secure' => true
+ ),
+ 'http://testhost/testroot/remote.php/webdav/subdir/',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider configUrlProvider
+ */
+ public function testConfig($config, $expectedUri) {
+ $config['user'] = 'someuser';
+ $config['password'] = 'somepassword';
+ $instance = new \OC\Files\Storage\OwnCloud($config);
+ $this->assertEquals($expectedUri, $instance->createBaseUri());
+ }
+}
diff --git a/apps/files_sharing/img/app.svg b/apps/files_sharing/img/app.svg
new file mode 100644
index 00000000000..d64e44b70b0
--- /dev/null
+++ b/apps/files_sharing/img/app.svg
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="16"
+ width="16"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg">
+ <metadata
+ id="metadata12">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs10" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview8"
+ showgrid="false"
+ inkscape:zoom="14.75"
+ inkscape:cx="-6.6440678"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path6"
+ d="m 12.228,1 c -1.3565,0 -2.4592,1.0977 -2.4592,2.4542 0,0.075 0.0084,0.1504 0.0149,0.2236 L 5.0491,6.0923 C 4.62,5.7256 4.06299,5.506 3.4544,5.506 c -1.3565,0 -2.4542,1.0977 -2.4542,2.4543 0,1.3565 1.0977,2.4542 2.4542,2.4542 0.54607,0 1.0528,-0.1755 1.4606,-0.477 l 4.8637,2.4741 c -0.0024,0.044 -0.0099,0.089 -0.0099,0.1342 0,1.3565 1.1027,2.4542 2.4592,2.4542 1.3565,0 2.4542,-1.0977 2.4542,-2.4542 0,-1.3565 -1.0977,-2.4592 -2.4542,-2.4592 -0.63653,0 -1.218,0.2437 -1.6544,0.6409 l -4.6953,-2.4 C 5.89722,8.2047 5.91308,8.0781 5.91308,7.95 c 0,-0.072 -0.0089,-0.1437 -0.0149,-0.2137 l 4.7395,-2.4145 c 0.42802,0.3627 0.98488,0.5813 1.5898,0.5813 1.3565,0 2.4542,-1.1027 2.4542,-2.4592 0,-1.3565 -1.0977,-2.4542 -2.4542,-2.4542 z"
+ style="fill:#ffffff;fill-opacity:1" />
+</svg>
diff --git a/apps/files_trashbin/img/app.svg b/apps/files_trashbin/img/app.svg
new file mode 100644
index 00000000000..b749f9879e6
--- /dev/null
+++ b/apps/files_trashbin/img/app.svg
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="16"
+ width="16"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="14.75"
+ inkscape:cx="-6.6440678"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <path
+ d="m6.5 1-0.5 1h-3c-0.554 0-1 0.446-1 1v1h12v-1c0-0.554-0.446-1-1-1h-3l-0.5-1zm-3.5 4 0.875 9c0.061 0.549 0.5729 1 1.125 1h6c0.55232 0 1.064-0.45102 1.125-1l0.875-9z"
+ fill-rule="evenodd"
+ id="path4"
+ style="fill:#ffffff;fill-opacity:1" />
+</svg>
diff --git a/apps/files_versions/img/app.svg b/apps/files_versions/img/app.svg
new file mode 100644
index 00000000000..862b0a6885e
--- /dev/null
+++ b/apps/files_versions/img/app.svg
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="16"
+ width="16"
+ version="1.0"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg">
+ <metadata
+ id="metadata20">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs18" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview16"
+ showgrid="false"
+ inkscape:zoom="14.75"
+ inkscape:cx="-6.6440678"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <rect
+ rx=".5"
+ ry=".5"
+ height="4"
+ width="4"
+ y="1"
+ x="1"
+ id="rect4"
+ style="fill:#ffffff;fill-opacity:1" />
+ <rect
+ rx=".5"
+ ry=".5"
+ height="1"
+ width="9"
+ y="2"
+ x="6"
+ id="rect6"
+ style="fill:#ffffff;fill-opacity:1" />
+ <rect
+ rx=".5"
+ ry=".5"
+ height="4"
+ width="4"
+ y="6"
+ x="1"
+ id="rect8"
+ style="fill:#ffffff;fill-opacity:1" />
+ <rect
+ rx=".5"
+ ry=".5"
+ height="1"
+ width="9"
+ y="7"
+ x="6"
+ id="rect10"
+ style="fill:#ffffff;fill-opacity:1" />
+ <rect
+ rx=".5"
+ ry=".5"
+ height="4"
+ width="4"
+ y="11"
+ x="1"
+ id="rect12"
+ style="fill:#ffffff;fill-opacity:1" />
+ <rect
+ rx=".5"
+ ry=".5"
+ height="1"
+ width="9"
+ y="12"
+ x="6"
+ id="rect14"
+ style="fill:#ffffff;fill-opacity:1" />
+</svg>
diff --git a/apps/user_ldap/img/app.svg b/apps/user_ldap/img/app.svg
new file mode 100644
index 00000000000..63a065afdc7
--- /dev/null
+++ b/apps/user_ldap/img/app.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="16"
+ width="16"
+ version="1.0"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg">
+ <metadata
+ id="metadata12">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs10" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview8"
+ showgrid="false"
+ inkscape:zoom="14.75"
+ inkscape:cx="-6.6440678"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <rect
+ style="color:#000000"
+ fill-opacity="0"
+ height="97.986"
+ width="163.31"
+ y="-32.993"
+ x="-62.897"
+ id="rect4" />
+ <path
+ style="block-progression:tb;color:#000000;text-transform:none;text-indent:0;fill:#ffffff;fill-opacity:1"
+ d="m8.4036 1c-1.7312 0-3.1998 1.2661-3.1998 2.9 0.012287 0.51643 0.058473 1.1532 0.36664 2.5v0.033333l0.033328 0.033333c0.098928 0.28338 0.24289 0.44549 0.4333 0.66666s0.41742 0.48149 0.63328 0.69999c0.025397 0.025708 0.041676 0.041633 0.066656 0.066677 0.04281 0.18631 0.094672 0.38681 0.13332 0.56666 0.10284 0.47851 0.092296 0.81737 0.066668 0.93332-0.74389 0.26121-1.6694 0.57228-2.4998 0.93332-0.46622 0.2027-0.8881 0.3837-1.2332 0.59999-0.34513 0.2163-0.68837 0.37971-0.79994 0.86666-0.16004 0.63293-0.19866 0.7539-0.39997 1.5333-0.027212 0.20914 0.083011 0.42961 0.26665 0.53333 1.5078 0.81451 3.824 1.1423 6.1329 1.1333s4.6066-0.35609 6.0662-1.1333c0.11739-0.07353 0.14304-0.10869 0.13332-0.2333-0.04365-0.68908-0.08154-1.3669-0.13332-1.7666-0.01807-0.09908-0.06492-0.19275-0.13332-0.26666-0.46366-0.5537-1.1564-0.89218-1.9665-1.2333-0.7396-0.31144-1.6067-0.63486-2.4665-0.99999-0.048123-0.10721-0.095926-0.41912 0-0.89999 0.025759-0.12912 0.066096-0.26742 0.099994-0.4 0.0808-0.090507 0.14378-0.16447 0.23332-0.26666 0.19096-0.21796 0.39614-0.44661 0.56662-0.66666s0.30996-0.40882 0.39997-0.66666l0.03333-0.033333c0.34839-1.4062 0.34857-1.9929 0.36664-2.5v-0.033333c0-1.6339-1.4686-2.9-3.1998-2.9z"
+ id="path6" />
+</svg>
diff --git a/apps/user_webdavauth/img/app.svg b/apps/user_webdavauth/img/app.svg
new file mode 100644
index 00000000000..63a065afdc7
--- /dev/null
+++ b/apps/user_webdavauth/img/app.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="16"
+ width="16"
+ version="1.0"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg">
+ <metadata
+ id="metadata12">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs10" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview8"
+ showgrid="false"
+ inkscape:zoom="14.75"
+ inkscape:cx="-6.6440678"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <rect
+ style="color:#000000"
+ fill-opacity="0"
+ height="97.986"
+ width="163.31"
+ y="-32.993"
+ x="-62.897"
+ id="rect4" />
+ <path
+ style="block-progression:tb;color:#000000;text-transform:none;text-indent:0;fill:#ffffff;fill-opacity:1"
+ d="m8.4036 1c-1.7312 0-3.1998 1.2661-3.1998 2.9 0.012287 0.51643 0.058473 1.1532 0.36664 2.5v0.033333l0.033328 0.033333c0.098928 0.28338 0.24289 0.44549 0.4333 0.66666s0.41742 0.48149 0.63328 0.69999c0.025397 0.025708 0.041676 0.041633 0.066656 0.066677 0.04281 0.18631 0.094672 0.38681 0.13332 0.56666 0.10284 0.47851 0.092296 0.81737 0.066668 0.93332-0.74389 0.26121-1.6694 0.57228-2.4998 0.93332-0.46622 0.2027-0.8881 0.3837-1.2332 0.59999-0.34513 0.2163-0.68837 0.37971-0.79994 0.86666-0.16004 0.63293-0.19866 0.7539-0.39997 1.5333-0.027212 0.20914 0.083011 0.42961 0.26665 0.53333 1.5078 0.81451 3.824 1.1423 6.1329 1.1333s4.6066-0.35609 6.0662-1.1333c0.11739-0.07353 0.14304-0.10869 0.13332-0.2333-0.04365-0.68908-0.08154-1.3669-0.13332-1.7666-0.01807-0.09908-0.06492-0.19275-0.13332-0.26666-0.46366-0.5537-1.1564-0.89218-1.9665-1.2333-0.7396-0.31144-1.6067-0.63486-2.4665-0.99999-0.048123-0.10721-0.095926-0.41912 0-0.89999 0.025759-0.12912 0.066096-0.26742 0.099994-0.4 0.0808-0.090507 0.14378-0.16447 0.23332-0.26666 0.19096-0.21796 0.39614-0.44661 0.56662-0.66666s0.30996-0.40882 0.39997-0.66666l0.03333-0.033333c0.34839-1.4062 0.34857-1.9929 0.36664-2.5v-0.033333c0-1.6339-1.4686-2.9-3.1998-2.9z"
+ id="path6" />
+</svg>
diff --git a/core/img/rating/s0.png b/core/img/rating/s0.png
new file mode 100644
index 00000000000..9d5014106e5
--- /dev/null
+++ b/core/img/rating/s0.png
Binary files differ
diff --git a/core/img/rating/s1.png b/core/img/rating/s1.png
index 9d5014106e5..6846c8771f5 100644
--- a/core/img/rating/s1.png
+++ b/core/img/rating/s1.png
Binary files differ
diff --git a/core/img/rating/s10.png b/core/img/rating/s10.png
index b9c190f8ce7..c674569c389 100644
--- a/core/img/rating/s10.png
+++ b/core/img/rating/s10.png
Binary files differ
diff --git a/core/img/rating/s11.png b/core/img/rating/s11.png
deleted file mode 100644
index c674569c389..00000000000
--- a/core/img/rating/s11.png
+++ /dev/null
Binary files differ
diff --git a/core/img/rating/s2.png b/core/img/rating/s2.png
index 6846c8771f5..2f132cc5fa1 100644
--- a/core/img/rating/s2.png
+++ b/core/img/rating/s2.png
Binary files differ
diff --git a/core/img/rating/s3.png b/core/img/rating/s3.png
index 2f132cc5fa1..55e917f92e6 100644
--- a/core/img/rating/s3.png
+++ b/core/img/rating/s3.png
Binary files differ
diff --git a/core/img/rating/s4.png b/core/img/rating/s4.png
index 55e917f92e6..fa76c311c69 100644
--- a/core/img/rating/s4.png
+++ b/core/img/rating/s4.png
Binary files differ
diff --git a/core/img/rating/s5.png b/core/img/rating/s5.png
index fa76c311c69..8856309f838 100644
--- a/core/img/rating/s5.png
+++ b/core/img/rating/s5.png
Binary files differ
diff --git a/core/img/rating/s6.png b/core/img/rating/s6.png
index 8856309f838..4112e14fde2 100644
--- a/core/img/rating/s6.png
+++ b/core/img/rating/s6.png
Binary files differ
diff --git a/core/img/rating/s7.png b/core/img/rating/s7.png
index 4112e14fde2..ce25cf58df9 100644
--- a/core/img/rating/s7.png
+++ b/core/img/rating/s7.png
Binary files differ
diff --git a/core/img/rating/s8.png b/core/img/rating/s8.png
index ce25cf58df9..3197f23785f 100644
--- a/core/img/rating/s8.png
+++ b/core/img/rating/s8.png
Binary files differ
diff --git a/core/img/rating/s9.png b/core/img/rating/s9.png
index 3197f23785f..b9c190f8ce7 100644
--- a/core/img/rating/s9.png
+++ b/core/img/rating/s9.png
Binary files differ
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 04cb6eb9def..9445175efcf 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -119,7 +119,7 @@
<!-- show "More apps" link to app administration directly in app navigation, as last entry -->
<?php if(OC_User::isAdminUser(OC_User::getUser())): ?>
<li id="apps-management">
- <a href="<?php print_unescaped(OC_Helper::linkToRoute('settings_apps').'?installed'); ?>" title=""
+ <a href="<?php print_unescaped(OC_Helper::linkToRoute('settings_apps')); ?>" title=""
<?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
<img class="app-icon svg" alt="" src="<?php print_unescaped(OC_Helper::imagePath('settings', 'apps.svg')); ?>"/>
<div class="icon-loading-dark" style="display:none;"></div>
diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot
index 0cac9dd446c..56bd81f5ed0 100644
--- a/l10n/templates/core.pot
+++ b/l10n/templates/core.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files.pot b/l10n/templates/files.pot
index 457a5ca0566..9db13ceae78 100644
--- a/l10n/templates/files.pot
+++ b/l10n/templates/files.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_encryption.pot b/l10n/templates/files_encryption.pot
index 0173a314c02..b1e72576274 100644
--- a/l10n/templates/files_encryption.pot
+++ b/l10n/templates/files_encryption.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_external.pot b/l10n/templates/files_external.pot
index 53441ce6c48..baf301fe311 100644
--- a/l10n/templates/files_external.pot
+++ b/l10n/templates/files_external.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_sharing.pot b/l10n/templates/files_sharing.pot
index 15dceb256e3..c11029d9613 100644
--- a/l10n/templates/files_sharing.pot
+++ b/l10n/templates/files_sharing.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_trashbin.pot b/l10n/templates/files_trashbin.pot
index c9ab8d9785e..98b003aa9cc 100644
--- a/l10n/templates/files_trashbin.pot
+++ b/l10n/templates/files_trashbin.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_versions.pot b/l10n/templates/files_versions.pot
index ac4241695c9..8392ced7028 100644
--- a/l10n/templates/files_versions.pot
+++ b/l10n/templates/files_versions.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/lib.pot b/l10n/templates/lib.pot
index 2079d1a4a6d..93c8a72b0f3 100644
--- a/l10n/templates/lib.pot
+++ b/l10n/templates/lib.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/private.pot b/l10n/templates/private.pot
index a41340342b1..827bb1b738b 100644
--- a/l10n/templates/private.pot
+++ b/l10n/templates/private.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot
index 82ebe7df4fa..c8777ac52ba 100644
--- a/l10n/templates/settings.pot
+++ b/l10n/templates/settings.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/user_ldap.pot b/l10n/templates/user_ldap.pot
index a2483f773c5..e4c0491d364 100644
--- a/l10n/templates/user_ldap.pot
+++ b/l10n/templates/user_ldap.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/user_webdavauth.pot b/l10n/templates/user_webdavauth.pot
index e85687618fb..5d6cccfe60e 100644
--- a/l10n/templates/user_webdavauth.pot
+++ b/l10n/templates/user_webdavauth.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-14 01:54-0400\n"
+"POT-Creation-Date: 2014-10-15 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/lib/private/app.php b/lib/private/app.php
index a356139044c..95a8a7302d9 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -815,7 +815,7 @@ class OC_App {
* Lists all apps, this is used in apps.php
* @return array
*/
- public static function listAllApps() {
+ public static function listAllApps($onlyLocal = false) {
$installedApps = OC_App::getAllApps();
//TODO which apps do we want to blacklist and how do we integrate
@@ -823,6 +823,7 @@ class OC_App {
$blacklist = array('files'); //we don't want to show configuration for these
$appList = array();
+ $l = \OC::$server->getL10N('core');
foreach ($installedApps as $app) {
if (array_search($app, $blacklist) === false) {
@@ -849,24 +850,36 @@ class OC_App {
if(isset($info['shipped']) and ($info['shipped'] == 'true')) {
$info['internal'] = true;
- $info['internallabel'] = 'Internal App';
- $info['internalclass'] = '';
+ $info['internallabel'] = $l->t('Recommended');
+ $info['internalclass'] = 'recommendedapp';
$info['removable'] = false;
} else {
$info['internal'] = false;
- $info['internallabel'] = '3rd Party';
- $info['internalclass'] = 'externalapp';
$info['removable'] = true;
}
$info['update'] = OC_Installer::isUpdateAvailable($app);
- $info['preview'] = OC_Helper::imagePath('settings', 'trans.png');
+ $appIcon = self::getAppPath($app) . '/img/' . $app.'.svg';
+ if (file_exists($appIcon)) {
+ $info['preview'] = OC_Helper::imagePath($app, $app.'.svg');
+ $info['previewAsIcon'] = true;
+ } else {
+ $appIcon = self::getAppPath($app) . '/img/app.svg';
+ if (file_exists($appIcon)) {
+ $info['preview'] = OC_Helper::imagePath($app, 'app.svg');
+ $info['previewAsIcon'] = true;
+ }
+ }
$info['version'] = OC_App::getAppVersion($app);
$appList[] = $info;
}
}
- $remoteApps = OC_App::getAppstoreApps();
+ if ($onlyLocal) {
+ $remoteApps = array();
+ } else {
+ $remoteApps = OC_App::getAppstoreApps();
+ }
if ($remoteApps) {
// Remove duplicates
foreach ($appList as $app) {
@@ -898,9 +911,11 @@ class OC_App {
}
// priority 3: recommended
- if ($a['internalclass'] != $b['internalclass']) {
- $aTemp = ($a['internalclass'] == 'recommendedapp' ? 1 : 0);
- $bTemp = ($b['internalclass'] == 'recommendedapp' ? 1 : 0);
+ $internalClassA = isset($a['internalclass']) ? $a['internalclass'] : '';
+ $internalClassB = isset($b['internalclass']) ? $b['internalclass'] : '';
+ if ($internalClassA != $internalClassB) {
+ $aTemp = ($internalClassA == 'recommendedapp' ? 1 : 0);
+ $bTemp = ($internalClassB == 'recommendedapp' ? 1 : 0);
return ($bTemp - $aTemp);
}
@@ -917,63 +932,40 @@ class OC_App {
* @return array, multi-dimensional array of apps.
* Keys: id, name, type, typename, personid, license, detailpage, preview, changed, description
*/
- public static function getAppstoreApps($filter = 'approved') {
- $categoryNames = OC_OCSClient::getCategories();
- if (is_array($categoryNames)) {
- // Check that categories of apps were retrieved correctly
- if (!$categories = array_keys($categoryNames)) {
+ public static function getAppstoreApps($filter = 'approved', $category = null) {
+ $categories = array($category);
+ if (is_null($category)) {
+ $categoryNames = OC_OCSClient::getCategories();
+ if (is_array($categoryNames)) {
+ // Check that categories of apps were retrieved correctly
+ if (!$categories = array_keys($categoryNames)) {
+ return false;
+ }
+ } else {
return false;
}
+ }
- $page = 0;
- $remoteApps = OC_OCSClient::getApplications($categories, $page, $filter);
- $app1 = array();
- $i = 0;
- foreach ($remoteApps as $app) {
- $app1[$i] = $app;
- $app1[$i]['author'] = $app['personid'];
- $app1[$i]['ocs_id'] = $app['id'];
- $app1[$i]['internal'] = $app1[$i]['active'] = 0;
- $app1[$i]['update'] = false;
- $app1[$i]['groups'] = false;
- $app1[$i]['removable'] = false;
- if ($app['label'] == 'recommended') {
- $app1[$i]['internallabel'] = 'Recommended';
- $app1[$i]['internalclass'] = 'recommendedapp';
- } else {
- $app1[$i]['internallabel'] = '3rd Party';
- $app1[$i]['internalclass'] = 'externalapp';
- }
-
-
- // rating img
- if ($app['score'] < 5) {
- $img = OC_Helper::imagePath( "core", "rating/s1.png" );
- } elseif ($app['score'] < 15) {
- $img = OC_Helper::imagePath( "core", "rating/s2.png" );
- } elseif($app['score'] < 25) {
- $img = OC_Helper::imagePath( "core", "rating/s3.png" );
- } elseif($app['score'] < 35) {
- $img = OC_Helper::imagePath( "core", "rating/s4.png" );
- } elseif($app['score'] < 45) {
- $img = OC_Helper::imagePath( "core", "rating/s5.png" );
- } elseif($app['score'] < 55) {
- $img = OC_Helper::imagePath( "core", "rating/s6.png" );
- } elseif($app['score'] < 65) {
- $img = OC_Helper::imagePath( "core", "rating/s7.png" );
- } elseif($app['score'] < 75) {
- $img = OC_Helper::imagePath( "core", "rating/s8.png" );
- } elseif($app['score'] < 85) {
- $img = OC_Helper::imagePath( "core", "rating/s9.png" );
- } elseif($app['score'] < 95) {
- $img = OC_Helper::imagePath( "core", "rating/s10.png" );
- } elseif($app['score'] < 100) {
- $img = OC_Helper::imagePath( "core", "rating/s11.png" );
- }
-
- $app1[$i]['score'] = '<img src="' . $img . '"> Score: ' . $app['score'] . '%';
- $i++;
+ $page = 0;
+ $remoteApps = OC_OCSClient::getApplications($categories, $page, $filter);
+ $app1 = array();
+ $i = 0;
+ $l = \OC::$server->getL10N('core');
+ foreach ($remoteApps as $app) {
+ $app1[$i] = $app;
+ $app1[$i]['author'] = $app['personid'];
+ $app1[$i]['ocs_id'] = $app['id'];
+ $app1[$i]['internal'] = $app1[$i]['active'] = 0;
+ $app1[$i]['update'] = false;
+ $app1[$i]['groups'] = false;
+ $app1[$i]['score'] = $app['score'];
+ $app1[$i]['removable'] = false;
+ if ($app['label'] == 'recommended') {
+ $app1[$i]['internallabel'] = $l->t('Recommended');
+ $app1[$i]['internalclass'] = 'recommendedapp';
}
+
+ $i++;
}
if (empty($app1)) {
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index 597fbdae0cc..1b6d1f363b8 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -84,7 +84,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
* @return void
*/
public function createDirectory($name) {
- if (!$this->fileView->isCreatable($this->path)) {
+ if (!$this->info->isCreatable()) {
throw new \Sabre\DAV\Exception\Forbidden();
}
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index a0ef79a7b32..7f53704e94f 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -58,7 +58,7 @@ class DAV extends \OC\Files\Storage\Common {
$this->root .= '/';
}
} else {
- throw new \Exception();
+ throw new \Exception('Invalid webdav storage configuration');
}
}
@@ -85,7 +85,7 @@ class DAV extends \OC\Files\Storage\Common {
return 'webdav::' . $this->user . '@' . $this->host . '/' . $this->root;
}
- protected function createBaseUri() {
+ public function createBaseUri() {
$baseUri = 'http';
if ($this->secure) {
$baseUri .= 's';
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 02e2190aaf2..cd1d8ce392f 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -201,11 +201,10 @@ class OC_Installer{
/**
* update an app by it's id
* @param integer $ocsid
- * @param bool $isShipped
* @return bool
* @throws Exception
*/
- public static function updateAppByOCSId($ocsid, $isShipped=false) {
+ public static function updateAppByOCSId($ocsid) {
$appdata = OC_OCSClient::getApplication($ocsid);
$download = OC_OCSClient::getApplicationDownload($ocsid, 1);
diff --git a/lib/private/largefilehelper.php b/lib/private/largefilehelper.php
index d5b7946feff..750ba1d23de 100644
--- a/lib/private/largefilehelper.php
+++ b/lib/private/largefilehelper.php
@@ -101,7 +101,7 @@ class LargeFileHelper {
*/
public function getFileSizeViaCurl($filename) {
if (function_exists('curl_init')) {
- $fencoded = urlencode($filename);
+ $fencoded = rawurlencode($filename);
$ch = curl_init("file://$fencoded");
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@ -151,7 +151,7 @@ class LargeFileHelper {
$result = null;
if (strpos($os, 'linux') !== false) {
$result = $this->exec("stat -c %s $arg");
- } else if (strpos($os, 'bsd') !== false) {
+ } else if (strpos($os, 'bsd') !== false || strpos($os, 'darwin') !== false) {
$result = $this->exec("stat -f %z $arg");
} else if (strpos($os, 'win') !== false) {
$result = $this->exec("for %F in ($arg) do @echo %~zF");
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index dc147dea0c9..8ceb43f4c1f 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -142,9 +142,11 @@ class OC_OCSClient{
$app['license']=(string)$tmp[$i]->license;
$app['detailpage']=(string)$tmp[$i]->detailpage;
$app['preview']=(string)$tmp[$i]->smallpreviewpic1;
+ $app['preview-full']=(string)$tmp[$i]->previewpic1;
$app['changed']=strtotime($tmp[$i]->changed);
$app['description']=(string)$tmp[$i]->description;
$app['score']=(string)$tmp[$i]->score;
+ $app['downloads'] = $tmp[$i]->downloads;
$apps[]=$app;
}
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index 5517e08a25d..b9c341b4ae9 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -91,8 +91,8 @@ class Session implements IUserSession, Emitter {
// fetch the deprecated \OC::$session if it changed for backwards compatibility
if (isset(\OC::$session) && \OC::$session !== $this->session) {
\OC::$server->getLogger()->warning(
- 'One of your installed apps still seems to use the deprecated '.
- '\OC::$session and has replaced it with a new instance. Please file a bug against it.'.
+ 'One of your installed apps still seems to use the deprecated ' .
+ '\OC::$session and has replaced it with a new instance. Please file a bug against it.' .
'Closing and replacing session in UserSession instance.'
);
$this->setSession(\OC::$session);
@@ -110,6 +110,7 @@ class Session implements IUserSession, Emitter {
$this->session->close();
}
$this->session = $session;
+ $this->activeUser = null;
// maintain deprecated \OC::$session
if (\OC::$session !== $this->session) {
@@ -195,7 +196,7 @@ class Session implements IUserSession, Emitter {
public function login($uid, $password) {
$this->manager->emit('\OC\User', 'preLogin', array($uid, $password));
$user = $this->manager->checkPassword($uid, $password);
- if($user !== false) {
+ if ($user !== false) {
if (!is_null($user)) {
if ($user->isEnabled()) {
$this->setUser($user);
@@ -221,7 +222,7 @@ class Session implements IUserSession, Emitter {
public function loginWithCookie($uid, $currentToken) {
$this->manager->emit('\OC\User', 'preRememberedLogin', array($uid));
$user = $this->manager->get($uid);
- if(is_null($user)) {
+ if (is_null($user)) {
// user does not exist
return false;
}
@@ -229,7 +230,7 @@ class Session implements IUserSession, Emitter {
// get stored tokens
$tokens = \OC_Preferences::getKeys($uid, 'login_token');
// test cookies token against stored tokens
- if(!in_array($currentToken, $tokens, true)) {
+ if (!in_array($currentToken, $tokens, true)) {
return false;
}
// replace successfully used token with a new one
@@ -275,13 +276,13 @@ class Session implements IUserSession, Emitter {
unset($_COOKIE["oc_username"]); //TODO: DI
unset($_COOKIE["oc_token"]);
unset($_COOKIE["oc_remember_login"]);
- setcookie('oc_username', '', time()-3600, \OC::$WEBROOT);
- setcookie('oc_token', '', time()-3600, \OC::$WEBROOT);
- setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT);
+ setcookie('oc_username', '', time() - 3600, \OC::$WEBROOT);
+ setcookie('oc_token', '', time() - 3600, \OC::$WEBROOT);
+ setcookie('oc_remember_login', '', time() - 3600, \OC::$WEBROOT);
// old cookies might be stored under /webroot/ instead of /webroot
// and Firefox doesn't like it!
- setcookie('oc_username', '', time()-3600, \OC::$WEBROOT . '/');
- setcookie('oc_token', '', time()-3600, \OC::$WEBROOT . '/');
- setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT . '/');
+ setcookie('oc_username', '', time() - 3600, \OC::$WEBROOT . '/');
+ setcookie('oc_token', '', time() - 3600, \OC::$WEBROOT . '/');
+ setcookie('oc_remember_login', '', time() - 3600, \OC::$WEBROOT . '/');
}
}
diff --git a/lib/private/util.php b/lib/private/util.php
index 304db827a1a..c0a68c56223 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -986,7 +986,7 @@ class OC_Util {
* file in the data directory and trying to access via http
*/
public static function isHtaccessWorking() {
- if (!OC::$server->getConfig()->getSystemValue('check_for_working_htaccess', true)) {
+ if (\OC::$CLI || !OC::$server->getConfig()->getSystemValue('check_for_working_htaccess', true)) {
return true;
}
diff --git a/settings/ajax/apps/categories.php b/settings/ajax/apps/categories.php
new file mode 100644
index 00000000000..3bde28be99b
--- /dev/null
+++ b/settings/ajax/apps/categories.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Copyright (c) 2014 Thomas Müller <deepdiver@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+OC_JSON::checkAdminUser();
+
+$l = OC_L10N::get('settings');
+
+$categories = array(
+ array('id' => 0, 'displayName' => (string)$l->t('Enabled') ),
+ array('id' => 1, 'displayName' => (string)$l->t('Not enabled') ),
+);
+
+if(OC_Config::getValue('appstoreenabled', true)) {
+ $categories[] = array('id' => 2, 'displayName' => (string)$l->t('Recommended') );
+ // apps from external repo via OCS
+ $ocs = OC_OCSClient::getCategories();
+ foreach($ocs as $k => $v) {
+ $categories[] = array(
+ 'id' => $k,
+ 'displayName' => str_replace('ownCloud ', '', $v)
+ );
+ }
+}
+
+OCP\JSON::success($categories);
diff --git a/settings/ajax/apps/index.php b/settings/ajax/apps/index.php
new file mode 100644
index 00000000000..24fba8be312
--- /dev/null
+++ b/settings/ajax/apps/index.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Copyright (c) 2014 Thomas Müller <deepdiver@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+OC_JSON::checkAdminUser();
+
+$l = OC_L10N::get('settings');
+
+$category = intval($_GET['category']);
+$apps = array();
+
+switch($category) {
+ // installed apps
+ case 0:
+ $apps = \OC_App::listAllApps(true);
+ $apps = array_filter($apps, function($app) {
+ return $app['active'];
+ });
+ break;
+ // not-installed apps
+ case 1:
+ $apps = \OC_App::listAllApps(true);
+ $apps = array_filter($apps, function($app) {
+ return !$app['active'];
+ });
+ break;
+ default:
+ if ($category === 2) {
+ $apps = \OC_App::getAppstoreApps('approved');
+ $apps = array_filter($apps, function($app) {
+ return isset($app['internalclass']) && $app['internalclass'] === 'recommendedapp';
+ });
+ } else {
+ $apps = \OC_App::getAppstoreApps('approved', $category);
+ }
+ if (!$apps) {
+ $apps = array();
+ }
+ usort($apps, function ($a, $b) {
+ $a = (int)$a['score'];
+ $b = (int)$b['score'];
+ if ($a === $b) {
+ return 0;
+ }
+ return ($a > $b) ? -1 : 1;
+ });
+ break;
+}
+
+// fix groups to be an array
+$apps = array_map(function($app){
+ $groups = array();
+ if (is_string($app['groups'])) {
+ $groups = json_decode($app['groups']);
+ }
+ $app['groups'] = $groups;
+ $app['canUnInstall'] = !$app['active'] && $app['removable'];
+ return $app;
+}, $apps);
+
+OCP\JSON::success(array("apps" => $apps));
diff --git a/settings/ajax/apps/ocs.php b/settings/ajax/apps/ocs.php
deleted file mode 100644
index aad0690e01c..00000000000
--- a/settings/ajax/apps/ocs.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/**
- * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-OC_JSON::checkAdminUser();
-
-$l = \OC::$server->getL10N('settings');
-
-if(OC_Config::getValue('appstoreenabled', true)==false) {
- OCP\JSON::success(array('type' => 'external', 'data' => array()));
-}
-
-$enabledApps=OC_App::getEnabledApps();
-
-if(is_null($enabledApps)) {
- OCP\JSON::error(array('data' => array('message' => $l->t('Unable to load list from App Store'))));
-}
-
-$apps=array();
-
-// apps from external repo via OCS
-$categoryNames=OC_OCSClient::getCategories();
-if(is_array($categoryNames)) {
- $categories=array_keys($categoryNames);
- $page=0;
- $filter='approved';
- $externalApps=OC_OCSClient::getApplications($categories, $page, $filter);
- foreach($externalApps as $app) {
- // show only external apps that aren't enabled yet
- $local=false;
- foreach($enabledApps as $a) {
- if($a === $app['name']) {
- $local=true;
- }
- }
-
- if(!$local) {
- if($app['preview'] === '') {
- $pre=OC_Helper::imagePath('settings', 'trans.png');
- } else {
- $pre=$app['preview'];
- }
- if($app['label'] === 'recommended') {
- $label='3rd Party';
- } else {
- $label='Recommended';
- }
- $apps[]=array(
- 'name'=>$app['name'],
- 'id'=>$app['id'],
- 'active'=>false,
- 'description'=>$app['description'],
- 'author'=>$app['personid'],
- 'license'=>$app['license'],
- 'preview'=>$pre,
- 'internal'=>false,
- 'internallabel'=>$label,
- 'update'=>false,
- );
- }
- }
-}
-
-OCP\JSON::success(array('type' => 'external', 'data' => $apps));
diff --git a/settings/ajax/updateapp.php b/settings/ajax/updateapp.php
index 6375a41024a..3e28c65285d 100644
--- a/settings/ajax/updateapp.php
+++ b/settings/ajax/updateapp.php
@@ -12,30 +12,33 @@ if (!array_key_exists('appid', $_POST)) {
OCP\JSON::error(array(
'message' => 'No AppId given!'
));
- exit;
+ return;
}
$appId = $_POST['appid'];
if (!is_numeric($appId)) {
- $appId = OC_Appconfig::getValue($appId, 'ocsid', null);
- $isShipped = OC_App::isShipped($appId);
-
+ $appId = \OC::$server->getAppConfig()->getValue($appId, 'ocsid', null);
if ($appId === null) {
OCP\JSON::error(array(
'message' => 'No OCS-ID found for app!'
));
exit;
}
-} else {
- $isShipped = false;
}
$appId = OC_App::cleanAppId($appId);
-\OC_Config::setValue('maintenance', true);
-$result = OC_Installer::updateAppByOCSId($appId, $isShipped);
-\OC_Config::setValue('maintenance', false);
+$config = \OC::$server->getConfig();
+$config->setSystemValue('maintenance', true);
+try {
+ $result = OC_Installer::updateAppByOCSId($appId);
+ $config->setSystemValue('maintenance', false);
+} catch(Exception $ex) {
+ $config->setSystemValue('maintenance', false);
+ OC_JSON::error(array("data" => array( "message" => $ex->getMessage() )));
+ return;
+}
if($result !== false) {
OC_JSON::success(array('data' => array('appid' => $appId)));
diff --git a/settings/apps.php b/settings/apps.php
index b725c87b0ab..2d6f3c4c697 100644
--- a/settings/apps.php
+++ b/settings/apps.php
@@ -25,21 +25,14 @@ OC_Util::checkAdminUser();
\OC::$server->getSession()->close();
// Load the files we need
-OCP\Util::addStyle('settings', 'settings' );
-OCP\Util::addScript('settings', 'settings');
-OCP\Util::addScript('core', 'select2/select2');
-OCP\Util::addStyle('core', 'select2/select2');
-OC_App::setActiveNavigationEntry( "core_apps" );
-
-$combinedApps = OC_App::listAllApps();
+\OCP\Util::addScript('handlebars-v1.3.0');
+\OCP\Util::addScript("settings", "settings");
+\OCP\Util::addStyle("settings", "settings");
+\OCP\Util::addScript('core', 'select2/select2');
+\OCP\Util::addStyle('core', 'select2/select2');
+\OCP\Util::addScript("settings", "apps");
+\OC_App::setActiveNavigationEntry( "core_apps" );
$tmpl = new OC_Template( "settings", "apps", "user" );
-
-$tmpl->assign('apps', $combinedApps);
-
-$appid = (isset($_GET['appid'])?strip_tags($_GET['appid']):'');
-
-$tmpl->assign('appid', $appid);
-
$tmpl->printPage();
diff --git a/settings/css/settings.css b/settings/css/settings.css
index d89c50e4114..c18d5913b6f 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -128,7 +128,11 @@ input.userFilter {width: 200px;}
.ie8 table.hascontrols{border-collapse:collapse;width: 100%;}
.ie8 table.hascontrols tbody tr{border-collapse:collapse;border: 1px solid #ddd !important;}
+
+
+
/* APPS */
+
.appinfo { margin: 1em 40px; }
#app-navigation {
padding-bottom: 0px;
@@ -139,11 +143,62 @@ input.userFilter {width: 200px;}
#app-navigation.appwarning:hover {
background: #fbb;
}
-small.externalapp { color:#FFF; background-color:#BBB; font-weight:bold; font-size: 0.6em; margin: 0; padding: 0.1em 0.2em; border-radius: 3px;}
-small.recommendedapp { color:#FFF; background-color:#888; font-weight:bold; font-size: 0.6em; margin: 0; padding: 0.1em 0.2em; border-radius: 3px;}
-small.externalapp.list, small.recommendedapp.list { position: absolute; right: 10px; top: 12px; }
+
+.recommendedapp {
+ font-size: 11px;
+ background-position: left center;
+ padding-left: 18px;
+ vertical-align: top;
+}
span.version { margin-left:1em; margin-right:1em; color:#555; }
+#app-navigation .app-external,
+.app-version,
+.recommendedapp {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+
+#apps-list {
+ position: relative;
+ height: 100%;
+}
+.section {
+ position: relative;
+}
+.app-image {
+ float: left;
+ padding-right: 10px;
+ width: 80px;
+ height: 80px;
+}
+.app-image img {
+ max-width: 80px;
+ max-height: 80px;
+}
+.app-image-icon img {
+ background-color: #ccc;
+ width: 60px;
+ padding: 10px;
+ border-radius: 3px;
+}
+.app-name,
+.app-version,
+.app-score,
+.recommendedapp {
+ display: inline-block;
+}
+.app-description {
+ clear: both;
+}
+.app-description pre {
+ white-space: pre-line;
+}
+
+#app-category-2 {
+ border-bottom: 1px solid #e8e8e8;
+}
/* Transition to complete width! */
.app:hover, .app:active { max-width: inherit; }
diff --git a/settings/js/apps-custom.php b/settings/js/apps-custom.php
deleted file mode 100644
index 2b2f256b39f..00000000000
--- a/settings/js/apps-custom.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Copyright (c) 2013 Lukas Reschke <lukas@statuscode.ch>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-// Check if admin user
-OC_Util::checkAdminUser();
-
-// Set the content type to JS
-header('Content-type: application/javascript');
-
-// Disallow caching
-header("Cache-Control: no-cache, must-revalidate");
-header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
-
-$combinedApps = OC_App::listAllApps();
-
-foreach($combinedApps as $app) {
- echo("appData_".$app['id']."=".json_encode($app));
- echo("\n");
-}
-
-echo ("var appid =".json_encode($_GET['appid']).";");
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 22bac1eaf3e..328c57db8ed 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -1,225 +1,235 @@
-/**
- * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
- * Copyright (c) 2012, Thomas Tanghus <thomas@tanghus.net>
- * This file is licensed under the Affero General Public License version 3 or later.
- * See the COPYING-README file.
- */
+/* global Handlebars */
+
+Handlebars.registerHelper('score', function() {
+ if(this.score) {
+ var score = Math.round( this.score / 10 );
+ var imageName = 'rating/s' + score + '.png';
+
+ return new Handlebars.SafeString('<img src="' + OC.imagePath('core', imageName) + '">');
+ }
+ return new Handlebars.SafeString('');
+});
OC.Settings = OC.Settings || {};
OC.Settings.Apps = OC.Settings.Apps || {
- setupGroupsSelect: function() {
- OC.Settings.setupGroupsSelect($('#group_select'), {
+ setupGroupsSelect: function($elements) {
+ OC.Settings.setupGroupsSelect($elements, {
placeholder: t('core', 'All')
});
},
- loadApp:function(app) {
- var page = $('#app-content');
- page.find('p.license').show();
- page.find('span.name').text(app.name);
- page.find('small.externalapp').text(app.internallabel);
- if (app.version) {
- page.find('span.version').text(app.version);
- } else {
- page.find('span.version').text('');
- }
- page.find('span.score').html(app.score);
- page.find('p.description').text(app.description);
- page.find('img.preview').attr('src', app.preview);
- if (app.preview && app.preview.length) {
- page.find('img.preview').show();
- } else {
- page.find('img.preview').hide();
- }
- page.find('small.externalapp').attr('style', 'visibility:visible');
- page.find('span.author').text(app.author);
-
- // FIXME licenses of downloaded apps go into app.licence, licenses of not-downloaded apps into app.license
- var appLicense = '';
- if (typeof(app.licence) !== 'undefined') {
- appLicense = app.licence;
- } else if (typeof(app.license) !== 'undefined') {
- appLicense = app.license;
- }
- page.find('span.licence').text(appLicense);
-
- var userDocumentation = false;
- var adminDocumentation = false;
- if (typeof(app.documentation) !== 'undefined') {
- if (typeof(app.documentation.user) !== 'undefined') {
- userDocumentation = true;
- page.find('span.userDocumentation').html("<a id='userDocumentation' href='" + app.documentation.user + "'>" + t('settings', 'User Documentation') + "</a>");
- page.find('p.documentation').show();
- }
- else {
- page.find('span.userDocumentation').empty();
- userDocumentation = false;
- }
- if (typeof(app.documentation.admin) !== 'undefined') {
- adminDocumentation = true;
- page.find('span.adminDocumentation').html("<a id='adminDocumentation' href='" + app.documentation.admin + "'>" + t('settings', 'Admin Documentation') + "</a>");
- page.find('p.documentation').show();
- }
- else {
- page.find('span.adminDocumentation').empty();
- adminDocumentation = false;
- }
- if(userDocumentation && adminDocumentation) {
- page.find('span.comma').remove();
- page.find('span.userDocumentation').after('<span class="comma">, </span>');
- }
- else {
- page.find('span.comma').remove();
+ State: {
+ currentCategory: null,
+ apps: null
+ },
+
+ loadCategories: function() {
+ var categories = [
+ {displayName: 'Enabled', id: '0'}
+ ];
+
+ var source = $("#categories-template").html();
+ var template = Handlebars.compile(source);
+ var html = template(categories);
+ $('#apps-categories').html(html);
+
+ OC.Settings.Apps.loadCategory(0);
+
+ $.ajax(OC.generateUrl('settings/apps/categories'), {
+ data:{},
+ type:'GET',
+ success:function (jsondata) {
+ var html = template(jsondata);
+ $('#apps-categories').html(html);
+ $('#app-category-' + OC.Settings.Apps.State.currentCategory).addClass('active');
+ },
+ complete: function() {
+ $('#app-navigation').removeClass('icon-loading');
}
- }
- else {
- page.find('p.documentation').hide();
- }
+ });
- if (typeof(app.website) !== 'undefined') {
- page.find('p.website').show();
- page.find('a#websitelink').attr('href', app.website);
- }
+ },
- if (app.update !== false) {
- page.find('input.update').show();
- page.find('input.update').data('appid', app.id);
- page.find('input.update').attr('value',t('settings', 'Update to {appversion}', {appversion:app.update}));
- } else {
- page.find('input.update').hide();
+ loadCategory: function(categoryId) {
+ if (OC.Settings.Apps.State.currentCategory === categoryId) {
+ return;
}
+ $('#apps-list')
+ .addClass('icon-loading')
+ .html('');
+ $('#app-category-' + OC.Settings.Apps.State.currentCategory).removeClass('active');
+ $('#app-category-' + categoryId).addClass('active');
+ OC.Settings.Apps.State.currentCategory = categoryId;
- if (app.removable !== false && app.active === false) {
- page.find('a.uninstall').show();
- page.find('a.uninstall').data('appid', app.id);
- page.find('a.uninstall').attr('value', t('settings', 'Uninstall App'));
- } else {
- page.find('a.uninstall').hide();
+ $.ajax(OC.generateUrl('settings/apps/list?category={categoryId}', {
+ categoryId: categoryId
+ }), {
+ data:{},
+ type:'GET',
+ success:function (apps) {
+ OC.Settings.Apps.State.apps = _.indexBy(apps.apps, 'id');
+ var source = $("#app-template").html();
+ var template = Handlebars.compile(source);
+
+ _.each(apps.apps, function(app) {
+ OC.Settings.Apps.renderApp(app, template, null);
+ });
+ },
+ complete: function() {
+ $('#apps-list').removeClass('icon-loading');
+ }
+ });
+ },
+
+ renderApp: function(app, template, selector) {
+ if (!template) {
+ var source = $("#app-template").html();
+ template = Handlebars.compile(source);
+ }
+ if (typeof app === 'string') {
+ app = OC.Settings.Apps.State.apps[app];
}
- page.find('input.enable').show();
- page.find('input.enable').val((app.active) ? t('settings', 'Disable') : t('settings', 'Enable'));
- page.find('input.enable').data('appid', app.id);
- page.find('input.enable').data('active', app.active);
- if (app.internal === false) {
- page.find('span.score').show();
- page.find('p.appstore').show();
- page.find('a#appstorelink').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id);
- page.find('small.externalapp').hide();
+ var html = template(app);
+ if (selector) {
+ selector.html(html);
} else {
- page.find('p.appslink').hide();
- page.find('span.score').hide();
+ $('#apps-list').append(html);
}
- if (typeof($('#app-navigation ul li[data-id="'+app.id+'"]').data('errormsg')) !== "undefined") {
- page.find(".warning").show();
- page.find(".warning").text($('#app-navigation ul li[data-id="'+app.id+'"]').data('errormsg'));
- } else {
- page.find(".warning").hide();
+
+ var page = $('#app-' + app.id);
+
+ // image loading kung-fu
+ if (app.preview) {
+ var currentImage = new Image();
+ currentImage.src = app.preview;
+
+ currentImage.onload = function() {
+ page.find('.app-image')
+ .append(this)
+ .fadeIn();
+ };
}
+ // set group select properly
if(OC.Settings.Apps.isType(app, 'filesystem') || OC.Settings.Apps.isType(app, 'prelogin') ||
OC.Settings.Apps.isType(app, 'authentication') || OC.Settings.Apps.isType(app, 'logging')) {
- page.find("#groups_enable").hide();
- page.find("label[for='groups_enable']").hide();
- page.find("#groups_enable").attr('checked', null);
+ page.find(".groups-enable").hide();
+ page.find("label[for='groups_enable-"+app.id+"']").hide();
+ page.find(".groups-enable").attr('checked', null);
} else {
+ page.find('#group_select').val((app.groups || []).join(','));
if (app.active) {
if (app.groups.length) {
- OC.Settings.Apps.setupGroupsSelect();
- $('#group_select').select2('val', app.groups || []);
- page.find("#groups_enable").attr('checked','checked');
+ OC.Settings.Apps.setupGroupsSelect(page.find('#group_select'));
+ page.find(".groups-enable").attr('checked','checked');
} else {
- page.find("#groups_enable").attr('checked', null);
+ page.find(".groups-enable").attr('checked', null);
}
- page.find("#groups_enable").show();
- page.find("label[for='groups_enable']").show();
+ page.find(".groups-enable").show();
+ page.find("label[for='groups_enable-"+app.id+"']").show();
} else {
- page.find("#groups_enable").hide();
- page.find("label[for='groups_enable']").hide();
+ page.find(".groups-enable").hide();
+ page.find("label[for='groups_enable-"+app.id+"']").hide();
}
}
},
- enableApp:function(appid, active, element, groups) {
+
+ isType: function(app, type){
+ return app.types && app.types.indexOf(type) !== -1;
+ },
+
+ enableApp:function(appId, active, element, groups) {
+ OC.Settings.Apps.hideErrorMessage(appId);
groups = groups || [];
- var appitem=$('#app-navigation ul li[data-id="'+appid+'"]');
+ var appItem = $('div#app-'+appId+'');
element.val(t('settings','Please wait....'));
if(active && !groups.length) {
- $.post(OC.filePath('settings','ajax','disableapp.php'),{appid:appid},function(result) {
+ $.post(OC.filePath('settings','ajax','disableapp.php'),{appid:appId},function(result) {
if(!result || result.status !== 'success') {
if (result.data && result.data.message) {
- OC.Settings.Apps.showErrorMessage(result.data.message);
- appitem.data('errormsg', result.data.message);
+ OC.Settings.Apps.showErrorMessage(appId, result.data.message);
+ appItem.data('errormsg', result.data.message);
} else {
- OC.Settings.Apps.showErrorMessage(t('settings', 'Error while disabling app'));
- appitem.data('errormsg', t('settings', 'Error while disabling app'));
+ OC.Settings.Apps.showErrorMessage(appId, t('settings', 'Error while disabling app'));
+ appItem.data('errormsg', t('settings', 'Error while disabling app'));
}
element.val(t('settings','Disable'));
- appitem.addClass('appwarning');
- }
- else {
- appitem.data('active',false);
- appitem.data('groups', '');
+ appItem.addClass('appwarning');
+ } else {
+ appItem.data('active',false);
+ appItem.data('groups', '');
element.data('active',false);
- OC.Settings.Apps.removeNavigation(appid);
- appitem.removeClass('active');
+ OC.Settings.Apps.removeNavigation(appId);
+ appItem.removeClass('active');
element.val(t('settings','Enable'));
- element.parent().find("#groups_enable").hide();
- element.parent().find("label[for='groups_enable']").hide();
- var app = OC.get('appData_' + appid);
- app.active = false;
+ element.parent().find(".groups-enable").hide();
+ element.parent().find("#groups_enable-"+appId).hide();
+ element.parent().find("label[for='groups_enable-"+appId+"']").hide();
+ element.parent().find('#group_select').hide().val(null);
+ OC.Settings.Apps.State.apps[appId].active = false;
}
},'json');
} else {
- $.post(OC.filePath('settings','ajax','enableapp.php'),{appid: appid, groups: groups},function(result) {
+ $.post(OC.filePath('settings','ajax','enableapp.php'),{appid: appId, groups: groups},function(result) {
if(!result || result.status !== 'success') {
if (result.data && result.data.message) {
- OC.Settings.Apps.showErrorMessage(result.data.message);
- appitem.data('errormsg', result.data.message);
+ OC.Settings.Apps.showErrorMessage(appId, result.data.message);
+ appItem.data('errormsg', result.data.message);
} else {
- OC.Settings.Apps.showErrorMessage(t('settings', 'Error while enabling app'));
- appitem.data('errormsg', t('settings', 'Error while disabling app'));
+ OC.Settings.Apps.showErrorMessage(appId, t('settings', 'Error while enabling app'));
+ appItem.data('errormsg', t('settings', 'Error while disabling app'));
}
element.val(t('settings','Enable'));
- appitem.addClass('appwarning');
+ appItem.addClass('appwarning');
} else {
- OC.Settings.Apps.addNavigation(appid);
- appitem.data('active',true);
+ OC.Settings.Apps.addNavigation(appId);
+ appItem.data('active',true);
element.data('active',true);
- appitem.addClass('active');
+ appItem.addClass('active');
element.val(t('settings','Disable'));
- var app = OC.get('appData_' + appid);
+ var app = OC.Settings.Apps.State.apps[appId];
app.active = true;
+
if (OC.Settings.Apps.isType(app, 'filesystem') || OC.Settings.Apps.isType(app, 'prelogin') ||
OC.Settings.Apps.isType(app, 'authentication') || OC.Settings.Apps.isType(app, 'logging')) {
- element.parent().find("#groups_enable").hide();
- element.parent().find("label[for='groups_enable']").hide();
+ element.parent().find(".groups-enable").attr('checked', null);
+ element.parent().find("#groups_enable-"+appId).hide();
+ element.parent().find("label[for='groups_enable-"+appId+"']").hide();
+ element.parent().find(".groups-enable").hide();
+ element.parent().find("#groups_enable-"+appId).hide();
+ element.parent().find("label[for='groups_enable-"+appId+"']").hide();
+ element.parent().find('#group_select').hide().val(null);
} else {
- element.parent().find("#groups_enable").show();
- element.parent().find("label[for='groups_enable']").show();
+ element.parent().find("#groups_enable-"+appId).show();
+ element.parent().find("label[for='groups_enable-"+appId+"']").show();
if (groups) {
- appitem.data('groups', JSON.stringify(groups));
+ appItem.data('groups', JSON.stringify(groups));
} else {
- appitem.data('groups', '');
+ appItem.data('groups', '');
}
}
}
},'json')
- .fail(function() {
- OC.Settings.Apps.showErrorMessage(t('settings', 'Error while enabling app'));
- appitem.data('errormsg', t('settings', 'Error while enabling app'));
- appitem.data('active',false);
- appitem.addClass('appwarning');
- OC.Settings.Apps.removeNavigation(appid);
- element.val(t('settings','Enable'));
- });
+ .fail(function() {
+ OC.Settings.Apps.showErrorMessage(appId, t('settings', 'Error while enabling app'));
+ appItem.data('errormsg', t('settings', 'Error while enabling app'));
+ appItem.data('active',false);
+ appItem.addClass('appwarning');
+ OC.Settings.Apps.removeNavigation(appId);
+ element.val(t('settings','Enable'));
+ });
}
},
- updateApp:function(appid, element) {
+
+ updateApp:function(appId, element) {
+ var oldButtonText = element.val();
element.val(t('settings','Updating....'));
- $.post(OC.filePath('settings','ajax','updateapp.php'),{appid:appid},function(result) {
+ OC.Settings.Apps.hideErrorMessage(appId);
+ $.post(OC.filePath('settings','ajax','updateapp.php'),{appid:appId},function(result) {
if(!result || result.status !== 'success') {
- OC.Settings.Apps.showErrorMessage(t('settings','Error while updating app'),t('settings','Error'));
- element.val(t('settings','Update'));
+ OC.Settings.Apps.showErrorMessage(appId, t('settings','Error while updating app'));
+ element.val(oldButtonText);
}
else {
element.val(t('settings','Updated'));
@@ -227,42 +237,25 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
},'json');
},
- uninstallApp:function(appid, element) {
+
+ uninstallApp:function(appId, element) {
+ OC.Settings.Apps.hideErrorMessage(appId);
element.val(t('settings','Uninstalling ....'));
- $.post(OC.filePath('settings','ajax','uninstallapp.php'),{appid:appid},function(result) {
+ $.post(OC.filePath('settings','ajax','uninstallapp.php'),{appid:appId},function(result) {
if(!result || result.status !== 'success') {
- OC.Settings.Apps.showErrorMessage(t('settings','Error while uninstalling app'),t('settings','Error'));
+ OC.Settings.Apps.showErrorMessage(appId, t('settings','Error while uninstalling app'));
element.val(t('settings','Uninstall'));
} else {
- OC.Settings.Apps.removeNavigation(appid);
- var appItem = $('#app-navigation li').filterAttr('data-id', appid);
- appItem.removeClass('active');
+ OC.Settings.Apps.removeNavigation(appId);
+ element.parent().fadeOut(function() {
+ element.remove();
+ });
}
},'json');
},
- insertApp:function(appdata) {
- var applist = $('#app-navigation ul li');
- var app =
- $('<li data-id="' + appdata.id + '" data-type="external" data-installed="0">'
- + '<a class="app externalapp" href="' + OC.filePath('settings', 'apps', 'index.php') + '&appid=' + appdata.id+'">'
- + appdata.name+'</a><small class="externalapp list">3rd party</small></li>');
- app.data('app', appdata);
- var added = false;
- applist.each(function() {
- if(!parseInt($(this).data('installed')) && $(this).find('a').text().toLowerCase() > appdata.name.toLowerCase()) {
- $(this).before(app);
- added = true;
- return false; // dang, remember this to get out of loop
- }
- });
- if(!added) {
- applist.last().after(app);
- }
- return app;
- },
- removeNavigation: function(appid){
- $.getJSON(OC.filePath('settings', 'ajax', 'navigationdetect.php'), {app: appid}).done(function(response){
+ removeNavigation: function(appId){
+ $.getJSON(OC.filePath('settings', 'ajax', 'navigationdetect.php'), {app: appId}).done(function(response){
if(response.status === 'success'){
var navIds=response.nav_ids;
for(var i=0; i< navIds.length; i++){
@@ -310,107 +303,87 @@ OC.Settings.Apps = OC.Settings.Apps || {
.animate({opacity: 1})
.animate({opacity: 0.75});
- if (!SVGSupport() && entry.icon.match(/\.svg$/i)) {
+ if (!OC.Util.hasSVGSupport() && entry.icon.match(/\.svg$/i)) {
$(img).addClass('svg');
- replaceSVG();
+ OC.Util.replaceSVG();
}
}
}
}
});
},
- showErrorMessage: function(message) {
- $('.appinfo .warning').show();
- $('.appinfo .warning').text(message);
+
+ showErrorMessage: function(appId, message) {
+ $('div#app-'+appId+' .warning')
+ .show()
+ .text(message);
},
- isType: function(app, type){
- return app.types && app.types.indexOf(type) !== -1;
+
+ hideErrorMessage: function(appId) {
+ $('div#app-'+appId+' .warning')
+ .hide()
+ .text('');
}
+
};
-$(document).ready(function(){
- $('#app-navigation ul li').each(function(index,li){
- var app = OC.get('appData_'+$(li).data('id'));
- if (app) {
- app.groups= $(li).data('groups') || [];
- }
- $(li).data('app',app);
- $(this).find('span.hidden').remove();
- });
- $('#app-navigation ul li').keydown(function(event) {
- if (event.which === 13 || event.which === 32) {
- $(event.target).click();
- }
- return false;
- });
+$(document).ready(function () {
+ OC.Settings.Apps.loadCategories();
- $(document).on('click', '#app-navigation', function(event){
- var tgt = $(event.target);
- if (tgt.is('li') || tgt.is('a')) {
- var item = tgt.is('li') ? $(tgt) : $(tgt).parent();
- var app = item.data('app');
- OC.Settings.Apps.loadApp(app);
- $('#app-navigation .selected').removeClass('selected');
- item.addClass('selected');
- }
- return false;
+ $(document).on('click', 'ul#apps-categories li', function () {
+ var categoryId = $(this).data('categoryId');
+ OC.Settings.Apps.loadCategory(categoryId);
});
- $('#app-content input.enable').click(function(){
+
+ $(document).on('click', '#apps-list input.enable', function () {
+ var appId = $(this).data('appid');
var element = $(this);
- var appid=$(this).data('appid');
- var active=$(this).data('active');
- if(appid) {
- OC.Settings.Apps.enableApp(appid, active, element);
- }
+ var active = $(this).data('active');
+
+ OC.Settings.Apps.enableApp(appId, active, element);
});
- $('#app-content input.update').click(function(){
+
+ $(document).on('click', '#apps-list input.uninstall', function () {
+ var appId = $(this).data('appid');
var element = $(this);
- var appid=$(this).data('appid');
- if(appid) {
- OC.Settings.Apps.updateApp(appid, element);
- }
+
+ OC.Settings.Apps.uninstallApp(appId, element);
});
- $('#app-content a.uninstall').click(function(){
+
+ $(document).on('click', '#apps-list input.update', function () {
+ var appId = $(this).data('appid');
var element = $(this);
- var appid=$(this).data('appid');
- if(appid) {
- OC.Settings.Apps.uninstallApp(appid, element);
- }
+
+ OC.Settings.Apps.updateApp(appId, element);
});
- $('#group_select').change(function(ev) {
- var element = $('#app-content input.enable');
- // getting an array of values from select2
- var groups = ev.val || [];
- var appid = element.data('appid');
- if (appid) {
- OC.Settings.Apps.enableApp(appid, false, element, groups);
- var li = $('[data-id="'+appid+'"]');
- var app = OC.get('appData_' + $(li).data('id'));
- app.groups = groups;
- li.data('groups', groups);
- li.attr('data-groups', JSON.stringify(groups));
+ $(document).on('change', '#group_select', function() {
+ var element = $(this).parent().find('input.enable');
+ var groups = $(this).val();
+ if (groups && groups !== '') {
+ groups = groups.split(',');
+ } else {
+ groups = [];
}
- });
- if(appid) {
- var item = $('#app-navigation ul li[data-id="'+appid+'"]');
- if(item) {
- item.trigger('click');
- item.addClass('active');
- $('#app-navigation').animate({scrollTop: item.offset().top-70}, 'slow','swing');
+ var appId = element.data('appid');
+ if (appId) {
+ OC.Settings.Apps.enableApp(appId, false, element, groups);
+ OC.Settings.Apps.State.apps[appId].groups = groups;
}
- }
+ });
- $("#groups_enable").change(function() {
- var $select = $('#group_select');
+ $(document).on('change', ".groups-enable", function() {
+ var $select = $(this).parent().find('#group_select');
$select.val('');
+
if (this.checked) {
- OC.Settings.Apps.setupGroupsSelect();
- }
- else {
+ OC.Settings.Apps.setupGroupsSelect($select);
+ } else {
$select.select2('destroy');
}
+
$select.change();
});
+
});
diff --git a/settings/js/old-apps.js b/settings/js/old-apps.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/settings/js/old-apps.js
diff --git a/settings/routes.php b/settings/routes.php
index 7068c0df723..b91b085f3a1 100644
--- a/settings/routes.php
+++ b/settings/routes.php
@@ -78,10 +78,12 @@ $this->create('settings_cert_post', '/settings/ajax/addRootCertificate')
$this->create('settings_cert_remove', '/settings/ajax/removeRootCertificate')
->actionInclude('settings/ajax/removeRootCertificate.php');
// apps
-$this->create('settings_ajax_apps_ocs', '/settings/ajax/apps/ocs.php')
- ->actionInclude('settings/ajax/apps/ocs.php');
$this->create('settings_ajax_enableapp', '/settings/ajax/enableapp.php')
->actionInclude('settings/ajax/enableapp.php');
+$this->create('settings_ajax_load_app_categories', '/settings/apps/categories')
+ ->actionInclude('settings/ajax/apps/categories.php');
+$this->create('settings_ajax_load_apps', '/settings/apps/list')
+ ->actionInclude('settings/ajax/apps/index.php');
$this->create('settings_ajax_disableapp', '/settings/ajax/disableapp.php')
->actionInclude('settings/ajax/disableapp.php');
$this->create('settings_ajax_updateapp', '/settings/ajax/updateapp.php')
@@ -90,8 +92,6 @@ $this->create('settings_ajax_uninstallapp', '/settings/ajax/uninstallapp.php')
->actionInclude('settings/ajax/uninstallapp.php');
$this->create('settings_ajax_navigationdetect', '/settings/ajax/navigationdetect.php')
->actionInclude('settings/ajax/navigationdetect.php');
-$this->create('apps_custom', '/settings/js/apps-custom.js')
- ->actionInclude('settings/js/apps-custom.php');
// admin
$this->create('settings_ajax_getlog', '/settings/ajax/getlog.php')
->actionInclude('settings/ajax/getlog.php');
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 5199d3fd7c7..1ad37000f39 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -1,65 +1,82 @@
-<?php /**
- * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
- * This file is licensed under the Affero General Public License version 3 or later.
- * See the COPYING-README file.
- */?>
- <script type="text/javascript"
- src="<?php print_unescaped(OC_Helper::linkToRoute('apps_custom'));?>?appid=<?php p($_['appid']); ?>"></script>
- <script type="text/javascript" src="<?php print_unescaped(OC_Helper::linkTo('settings/js', 'apps.js'));?>"></script>
+<script id="categories-template" type="text/x-handlebars-template">
+{{#each this}}
+ <li id="app-category-{{id}}" data-category-id="{{id}}"><a>{{displayName}}</a></li>
+{{/each}}
-<div id="app-navigation">
- <ul class="applist">
- <?php if(OC_Config::getValue('appstoreenabled', true) === true): ?>
- <li>
- <a class="app-external" target="_blank" href="http://owncloud.org/dev"><?php p($l->t('Add your App'));?> …</a>
- </li>
- <?php endif; ?>
+<?php if(OC_Config::getValue('appstoreenabled', true) === true): ?>
+ <li>
+ <a class="app-external" target="_blank" href="http://apps.owncloud.com/?xsortmode=high"><?php p($l->t('More apps'));?> …</a>
+ </li>
+ <li>
+ <a class="app-external" target="_blank" href="http://owncloud.org/dev"><?php p($l->t('Add your app'));?> …</a>
+ </li>
+<?php endif; ?>
+</script>
- <?php foreach($_['apps'] as $app):?>
- <li <?php if($app['active']) print_unescaped('class="active"')?> data-id="<?php p($app['id']) ?>" data-groups="<?php p($app['groups']) ?>"
- <?php if ( isset( $app['ocs_id'] ) ) { print_unescaped("data-id-ocs=\"{".OC_Util::sanitizeHTML($app['ocs_id'])."}\""); } ?>
- data-type="<?php p($app['internal'] ? 'internal' : 'external') ?>" data-installed="1">
- <a class="app<?php if(!$app['internal']) p(' externalapp') ?>"
- href="?appid=<?php p($app['id']) ?>"><?php p($app['name']) ?></a>
- <?php if(!$app['internal'])
- print_unescaped('<small class="'.OC_Util::sanitizeHTML($app['internalclass']).' list">'.OC_Util::sanitizeHTML($app['internallabel']).'</small>') ?>
- </li>
- <?php endforeach;?>
-
- <?php if(OC_Config::getValue('appstoreenabled', true) === true): ?>
- <li>
- <a class="app-external" target="_blank" href="http://apps.owncloud.com"><?php p($l->t('More Apps'));?> …</a>
- </li>
- <?php endif; ?>
- </ul>
-</div>
-<div id="app-content">
- <div class="appinfo">
- <h3><strong><span class="name"><?php p($l->t('Select an App'));?></span></strong><span
- class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3>
- <span class="score"></span>
- <p class="description"></p>
- <p class="documentation hidden">
+<script id="app-template" type="text/x-handlebars">
+ <div class="section" id="app-{{id}}">
+ {{#if preview}}
+ <div class="app-image{{#if previewAsIcon}} app-image-icon{{/if}} hidden">
+ </div>
+ {{/if}}
+ <h2 class="app-name"><a href="{{detailpage}}" target="_blank">{{name}}</a></h2>
+ <div class="app-version"> {{version}}</div>
+ <div class="app-author"><?php p($l->t('by')); ?> {{author}}
+ {{#if license}}
+ ({{license}}-<?php p($l->t('licensed')); ?>)
+ {{/if}}
+ </div>
+ {{#if score}}
+ <div class="app-score">{{{score}}}</div>
+ {{/if}}
+ {{#if internalclass}}
+ <div class="{{internalclass}} icon-checkmark">{{internallabel}}</div>
+ {{/if}}
+ <div class="app-detailpage"></div>
+ <div class="app-description"><pre>{{description}}</pre></div>
+ <!--<div class="app-changed">{{changed}}</div>-->
+ {{#if documentation}}
+ <p class="documentation">
<?php p($l->t("Documentation:"));?>
- <span class="userDocumentation appslink"></span>
- <span class="adminDocumentation appslink"></span>
+ {{#if documentation.user}}
+ <span class="userDocumentation appslink">
+ <a id='userDocumentation' href='{{documentation.user}}' target="_blank"><?php p($l->t("User Documentation"));?></a>
+ </span>
+ {{/if}}
+
+ {{#if documentation.admin}}
+ <span class="adminDocumentation appslink">
+ <a id='adminDocumentation' href='{{documentation.admin}}' target="_blank"><?php p($l->t("Admin Documentation"));?></a>
+ </span>
+ {{/if}}
</p>
- <img src="" class="preview hidden" />
- <p class="appslink appstore hidden"><a id="appstorelink" href="#" target="_blank"><?php
- p($l->t('See application page at apps.owncloud.com'));?></a></p>
- <p class="appslink website hidden"><a id="websitelink" href="#" target="_blank"><?php
- p($l->t('See application website'));?></a></p>
- <p class="license hidden"><?php
- print_unescaped($l->t('<span class="licence"></span>-licensed by <span class="author"></span>'));?></p>
- <input class="enable hidden" type="submit" />
- <input class="update hidden" type="submit" value="<?php p($l->t('Update')); ?>" />
- <a class="uninstall hidden" href="#"><?php p($l->t('Uninstall')); ?></a>
- <br />
- <input class="hidden" type="checkbox" id="groups_enable"/>
- <label class="hidden" for="groups_enable"><?php p($l->t('Enable only for specific groups')); ?></label>
+ {{/if}}
+ {{#if update}}
+ <input class="update" type="submit" value="<?php p($l->t('Update to %s', array('{{update}}'))); ?>" data-appid="{{id}}" />
+ {{/if}}
+ {{#if active}}
+ <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable"));?>"/>
+ <input type="checkbox" class="groups-enable" id="groups_enable-{{id}}"/>
+ <label for="groups_enable-{{id}}"><?php p($l->t('Enable only for specific groups')); ?></label>
<br />
<input type="hidden" id="group_select" title="<?php p($l->t('All')); ?>" style="width: 200px">
+ {{else}}
+ <input class="enable" type="submit" data-appid="{{id}}" data-active="false" value="<?php p($l->t("Enable"));?>"/>
+ {{/if}}
+ {{#if canUnInstall}}
+ <input class="uninstall" type="submit" value="<?php p($l->t('Uninstall App')); ?>" data-appid="{{id}}" />
+ {{/if}}
<div class="warning hidden"></div>
+
</div>
+</script>
+
+<div id="app-navigation" class="icon-loading">
+ <ul id="apps-categories">
+
+ </ul>
+</div>
+<div id="app-content">
+ <div id="apps-list" class="icon-loading"></div>
</div>
diff --git a/tests/data/strängé filename (duplicate #2).txt b/tests/data/strängé filename (duplicate #2).txt
new file mode 100644
index 00000000000..b62c3fb2ffd
--- /dev/null
+++ b/tests/data/strängé filename (duplicate #2).txt
@@ -0,0 +1,4 @@
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
+Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file
diff --git a/tests/lib/largefilehelpergetfilesize.php b/tests/lib/largefilehelpergetfilesize.php
index 21a0aa9a233..58571d641e0 100644
--- a/tests/lib/largefilehelpergetfilesize.php
+++ b/tests/lib/largefilehelpergetfilesize.php
@@ -20,8 +20,8 @@ class LargeFileHelperGetFileSize extends \PHPUnit_Framework_TestCase {
public function setUp() {
parent::setUp();
$ds = DIRECTORY_SEPARATOR;
- $this->filename = dirname(__DIR__) . "{$ds}data{$ds}data.tar.gz";
- $this->fileSize = 4195;
+ $this->filename = dirname(__DIR__) . "{$ds}data{$ds}strängé filename (duplicate #2).txt";
+ $this->fileSize = 446;
$this->helper = new \OC\LargeFileHelper;
}
diff --git a/tests/lib/user/session.php b/tests/lib/user/session.php
index 2845a9c964a..5126049d77f 100644
--- a/tests/lib/user/session.php
+++ b/tests/lib/user/session.php
@@ -9,6 +9,9 @@
namespace Test\User;
+use OC\Session\Memory;
+use OC\User\User;
+
class Session extends \PHPUnit_Framework_TestCase {
public function testGetUser() {
$session = $this->getMock('\OC\Session\Memory', array(), array(''));
@@ -54,26 +57,26 @@ class Session extends \PHPUnit_Framework_TestCase {
$session = $this->getMock('\OC\Session\Memory', array(), array(''));
$session->expects($this->exactly(2))
->method('set')
- ->with($this->callback(function($key) {
- switch($key) {
- case 'user_id':
- case 'loginname':
- return true;
- break;
- default:
- return false;
- break;
- }
- },
- 'foo'));
+ ->with($this->callback(function ($key) {
+ switch ($key) {
+ case 'user_id':
+ case 'loginname':
+ return true;
+ break;
+ default:
+ return false;
+ break;
+ }
+ },
+ 'foo'));
$managerMethods = get_class_methods('\OC\User\Manager');
//keep following methods intact in order to ensure hooks are
//working
$doNotMock = array('__construct', 'emit', 'listen');
- foreach($doNotMock as $methodName) {
+ foreach ($doNotMock as $methodName) {
$i = array_search($methodName, $managerMethods, true);
- if($i !== false) {
+ if ($i !== false) {
unset($managerMethods[$i]);
}
}
@@ -110,9 +113,9 @@ class Session extends \PHPUnit_Framework_TestCase {
//keep following methods intact in order to ensure hooks are
//working
$doNotMock = array('__construct', 'emit', 'listen');
- foreach($doNotMock as $methodName) {
+ foreach ($doNotMock as $methodName) {
$i = array_search($methodName, $managerMethods, true);
- if($i !== false) {
+ if ($i !== false) {
unset($managerMethods[$i]);
}
}
@@ -145,9 +148,9 @@ class Session extends \PHPUnit_Framework_TestCase {
//keep following methods intact in order to ensure hooks are
//working
$doNotMock = array('__construct', 'emit', 'listen');
- foreach($doNotMock as $methodName) {
+ foreach ($doNotMock as $methodName) {
$i = array_search($methodName, $managerMethods, true);
- if($i !== false) {
+ if ($i !== false) {
unset($managerMethods[$i]);
}
}
@@ -192,23 +195,23 @@ class Session extends \PHPUnit_Framework_TestCase {
$session = $this->getMock('\OC\Session\Memory', array(), array(''));
$session->expects($this->exactly(1))
->method('set')
- ->with($this->callback(function($key) {
- switch($key) {
- case 'user_id':
- return true;
- default:
- return false;
- }
- },
- 'foo'));
+ ->with($this->callback(function ($key) {
+ switch ($key) {
+ case 'user_id':
+ return true;
+ default:
+ return false;
+ }
+ },
+ 'foo'));
$managerMethods = get_class_methods('\OC\User\Manager');
//keep following methods intact in order to ensure hooks are
//working
$doNotMock = array('__construct', 'emit', 'listen');
- foreach($doNotMock as $methodName) {
+ foreach ($doNotMock as $methodName) {
$i = array_search($methodName, $managerMethods, true);
- if($i !== false) {
+ if ($i !== false) {
unset($managerMethods[$i]);
}
}
@@ -254,9 +257,9 @@ class Session extends \PHPUnit_Framework_TestCase {
//keep following methods intact in order to ensure hooks are
//working
$doNotMock = array('__construct', 'emit', 'listen');
- foreach($doNotMock as $methodName) {
+ foreach ($doNotMock as $methodName) {
$i = array_search($methodName, $managerMethods, true);
- if($i !== false) {
+ if ($i !== false) {
unset($managerMethods[$i]);
}
}
@@ -296,9 +299,9 @@ class Session extends \PHPUnit_Framework_TestCase {
//keep following methods intact in order to ensure hooks are
//working
$doNotMock = array('__construct', 'emit', 'listen');
- foreach($doNotMock as $methodName) {
+ foreach ($doNotMock as $methodName) {
$i = array_search($methodName, $managerMethods, true);
- if($i !== false) {
+ if ($i !== false) {
unset($managerMethods[$i]);
}
}
@@ -327,4 +330,31 @@ class Session extends \PHPUnit_Framework_TestCase {
$this->assertSame($granted, false);
}
+
+ public function testActiveUserAfterSetSession() {
+ $users = array(
+ 'foo' => new User('foo', null),
+ 'bar' => new User('bar', null)
+ );
+
+ $manager = $this->getMockBuilder('\OC\User\Manager')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $manager->expects($this->any())
+ ->method('get')
+ ->will($this->returnCallback(function ($uid) use ($users) {
+ return $users[$uid];
+ }));
+
+ $session = new Memory('');
+ $session->set('user_id', 'foo');
+ $userSession = new \OC\User\Session($manager, $session);
+ $this->assertEquals($users['foo'], $userSession->getUser());
+
+ $session2 = new Memory('');
+ $session2->set('user_id', 'bar');
+ $userSession->setSession($session2);
+ $this->assertEquals($users['bar'], $userSession->getUser());
+ }
}