summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-03-24 20:17:38 +0100
committerLukas Reschke <lukas@statuscode.ch>2017-03-24 20:17:38 +0100
commit4d68324ba61ed4bb7f6add67187bf3542e147614 (patch)
treecccfd427c996ed5ffecd0dd277f03e82d3917d09
parent2cd79a8d3d6c160b9458327b1429eed9ec1a25a2 (diff)
downloadnextcloud-server-4d68324ba61ed4bb7f6add67187bf3542e147614.tar.gz
nextcloud-server-4d68324ba61ed4bb7f6add67187bf3542e147614.zip
Merge sharing backend JS
Removes 8 requests. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
-rw-r--r--core/js/merged-share-backend.json11
-rw-r--r--lib/private/Share/Share.php11
2 files changed, 13 insertions, 9 deletions
diff --git a/core/js/merged-share-backend.json b/core/js/merged-share-backend.json
new file mode 100644
index 00000000000..d39945b8f79
--- /dev/null
+++ b/core/js/merged-share-backend.json
@@ -0,0 +1,11 @@
+[
+ "shareconfigmodel.js",
+ "shareitemmodel.js",
+ "sharesocialmanager.js",
+ "sharedialogresharerinfoview.js",
+ "sharedialoglinkshareview.js",
+ "sharedialogexpirationview.js",
+ "sharedialogshareelistview.js",
+ "sharedialogview.js",
+ "share.js"
+]
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 51da2cae82f..924e2f68396 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -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;