summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-03-10 09:34:29 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-03-22 08:48:10 +0100
commit7195a9323d37111f74d848caafd84058c9865aa6 (patch)
tree69fb881c127f73808dcf89f87af358304e9397b4 /lib/private
parentd2b1b0224437e521094dd251bc84bc93d1e338b1 (diff)
downloadnextcloud-server-7195a9323d37111f74d848caafd84058c9865aa6.tar.gz
nextcloud-server-7195a9323d37111f74d848caafd84058c9865aa6.zip
Merge vendor js
There is a bunch of javascript we always load from vendors. This combines this into 1 javascript file. Which reduces the number of request by ~10. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/legacy/template.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index 8535e018879..aff42808621 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -140,20 +140,8 @@ class OC_Template extends \OC\Template\Base {
OC_Util::addScript('files/fileinfo');
OC_Util::addScript('files/client');
- // Add the stuff we need always
- // following logic will import all vendor libraries that are
- // specified in core/js/core.json
- $fileContent = file_get_contents(OC::$SERVERROOT . '/core/js/core.json');
- if($fileContent !== false) {
- $coreDependencies = json_decode($fileContent, true);
- foreach(array_reverse($coreDependencies['vendor']) as $vendorLibrary) {
- // remove trailing ".js" as addVendorScript will append it
- OC_Util::addVendorScript(
- substr($vendorLibrary, 0, strlen($vendorLibrary) - 3),null,true);
- }
- } else {
- throw new \Exception('Cannot read core/js/core.json');
- }
+ // Import all (combined) default vendor libraries
+ OC_Util::addVendorScript('core', null, true);
if (\OC::$server->getRequest()->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE])) {
// polyfill for btoa/atob for IE friends