summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorIndividual IT Services <info@individual-it.net>2015-09-17 12:59:04 +0545
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-23 11:57:10 +0200
commitbf1cb20e908d6cc6d84be733f7137a6edf92697b (patch)
treeab92da0889ed2cf76909954a619db59f76ac2fbc /lib/base.php
parentd0b17ec8d68396268d880b8e2d163f65da447c77 (diff)
downloadnextcloud-server-bf1cb20e908d6cc6d84be733f7137a6edf92697b.tar.gz
nextcloud-server-bf1cb20e908d6cc6d84be733f7137a6edf92697b.zip
do not load unnecessary code in case of webdav
changing from "protected static" to "protected" as suggested by @nickvergessen https://github.com/owncloud/core/pull/19114#discussion_r39719851 moving initTemplate() into template constr. reduce to move initTemplate only cleanup spaces
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php66
1 files changed, 1 insertions, 65 deletions
diff --git a/lib/base.php b/lib/base.php
index 3624a3fbaf9..a607be87b59 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -376,63 +376,6 @@ class OC {
$tmpl->printPage();
}
- public static function initTemplateEngine() {
- // 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($coreDependencies['vendor'] as $vendorLibrary) {
- // remove trailing ".js" as addVendorScript will append it
- OC_Util::addVendorScript(
- substr($vendorLibrary, 0, strlen($vendorLibrary) - 3));
- }
- } else {
- throw new \Exception('Cannot read core/js/core.json');
- }
-
- OC_Util::addScript("placeholders");
- OC_Util::addScript("compatibility");
- OC_Util::addScript("jquery.ocdialog");
- OC_Util::addScript("oc-dialogs");
- OC_Util::addScript("js");
- OC_Util::addScript("l10n");
- OC_Util::addTranslations("core");
- OC_Util::addScript("octemplate");
- OC_Util::addScript("eventsource");
- OC_Util::addScript("config");
- OC_Util::addScript('search', 'search');
- OC_Util::addScript("oc-requesttoken");
- OC_Util::addScript("apps");
- OC_Util::addScript('mimetype');
- OC_Util::addScript('mimetypelist');
- OC_Util::addVendorScript('snapjs/dist/latest/snap');
- OC_Util::addVendorScript('core', 'backbone/backbone');
- OC_Util::addScript('oc-backbone');
-
- // avatars
- if (\OC::$server->getSystemConfig()->getValue('enable_avatars', true) === true) {
- \OC_Util::addScript('placeholder');
- \OC_Util::addVendorScript('blueimp-md5/js/md5');
- \OC_Util::addScript('jquery.avatar');
- \OC_Util::addScript('avatar');
- }
-
- OC_Util::addStyle("styles");
- OC_Util::addStyle("header");
- OC_Util::addStyle("mobile");
- OC_Util::addStyle("icons");
- OC_Util::addStyle("fonts");
- OC_Util::addStyle("apps");
- OC_Util::addStyle("fixes");
- OC_Util::addStyle("multiselect");
- OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui');
- OC_Util::addStyle('jquery-ui-fixes');
- OC_Util::addStyle("tooltip");
- OC_Util::addStyle("jquery.ocdialog");
- }
-
public static function initSession() {
// prevents javascript from accessing php session cookies
ini_set('session.cookie_httponly', true);
@@ -611,7 +554,6 @@ class OC {
self::initSession();
}
\OC::$server->getEventLogger()->end('init_session');
- self::initTemplateEngine();
self::checkConfig();
self::checkInstalled();
@@ -673,7 +615,7 @@ class OC {
self::registerFilesystemHooks();
if ($systemConfig->getValue('enable_previews', true)) {
self::registerPreviewHooks();
- }
+ }
self::registerShareHooks();
self::registerLogRotate();
self::registerLocalAddressBook();
@@ -686,12 +628,6 @@ class OC {
$lockProvider = \OC::$server->getLockingProvider();
register_shutdown_function(array($lockProvider, 'releaseAll'));
- if ($systemConfig->getValue('installed', false) && !self::checkUpgrade(false)) {
- if (\OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') {
- OC_Util::addScript('backgroundjobs');
- }
- }
-
// Check whether the sample configuration has been copied
if($systemConfig->getValue('copied_sample_config', false)) {
$l = \OC::$server->getL10N('lib');