]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge sharing backend JS 4042/head
authorLukas Reschke <lukas@statuscode.ch>
Fri, 24 Mar 2017 19:17:38 +0000 (20:17 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Fri, 24 Mar 2017 19:17:38 +0000 (20:17 +0100)
Removes 8 requests.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
core/js/merged-share-backend.json [new file with mode: 0644]
lib/private/Share/Share.php

diff --git a/core/js/merged-share-backend.json b/core/js/merged-share-backend.json
new file mode 100644 (file)
index 0000000..d39945b
--- /dev/null
@@ -0,0 +1,11 @@
+[
+  "shareconfigmodel.js",
+  "shareitemmodel.js",
+  "sharesocialmanager.js",
+  "sharedialogresharerinfoview.js",
+  "sharedialoglinkshareview.js",
+  "sharedialogexpirationview.js",
+  "sharedialogshareelistview.js",
+  "sharedialogview.js",
+  "share.js"
+]
index 51da2cae82f5d7d297260965e5080c95fd4c123e..924e2f68396e695f0dfee3c04cfeb2471fd9c898 100644 (file)
@@ -50,6 +50,7 @@ use OCP\IUserManager;
 use OCP\IUserSession;
 use OCP\IDBConnection;
 use OCP\IConfig;
+use OCP\Util;
 
 /**
  * This class provides the ability for apps to share their content between users.
@@ -92,15 +93,7 @@ class Share extends Constants {
                                        'supportedFileExtensions' => $supportedFileExtensions
                                );
                                if(count(self::$backendTypes) === 1) {
-                                       \OC_Util::addScript('core', 'shareconfigmodel');
-                                       \OC_Util::addScript('core', 'shareitemmodel');
-                                       \OC_Util::addScript('core', 'sharesocialmanager');
-                                       \OC_Util::addScript('core', 'sharedialogresharerinfoview');
-                                       \OC_Util::addScript('core', 'sharedialoglinkshareview');
-                                       \OC_Util::addScript('core', 'sharedialogexpirationview');
-                                       \OC_Util::addScript('core', 'sharedialogshareelistview');
-                                       \OC_Util::addScript('core', 'sharedialogview');
-                                       \OC_Util::addScript('core', 'share');
+                                       Util::addScript('core', 'merged-share-backend');
                                        \OC_Util::addStyle('core', 'share');
                                }
                                return true;