summaryrefslogtreecommitdiffstats
path: root/lib/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/template.php')
-rw-r--r--lib/template.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/template.php b/lib/template.php
index fb9f7ad62d9..0230d2f9343 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -192,7 +192,13 @@ class OC_Template{
// Content Security Policy
// If you change the standard policy, please also change it in config.sample.php
- $policy = OC_Config::getValue('custom_csp_policy', 'default-src \'self\'; script-src \'self\' \'unsafe-eval\'; style-src \'self\' \'unsafe-inline\'; frame-src *; img-src *; font-src \'self\' data:');
+ $policy = OC_Config::getValue('custom_csp_policy',
+ 'default-src \'self\'; '
+ .'script-src \'self\' \'unsafe-eval\'; '
+ .'style-src \'self\' \'unsafe-inline\'; '
+ .'frame-src *; '
+ .'img-src *; '
+ .'font-src \'self\' data:');
header('Content-Security-Policy:'.$policy); // Standard
header('X-WebKit-CSP:'.$policy); // Older webkit browsers
@@ -215,7 +221,8 @@ class OC_Template{
$mode='tablet';
}elseif(stripos($_SERVER['HTTP_USER_AGENT'], 'iphone')>0) {
$mode='mobile';
- }elseif((stripos($_SERVER['HTTP_USER_AGENT'], 'N9')>0) and (stripos($_SERVER['HTTP_USER_AGENT'], 'nokia')>0)) {
+ }elseif((stripos($_SERVER['HTTP_USER_AGENT'], 'N9')>0)
+ and (stripos($_SERVER['HTTP_USER_AGENT'], 'nokia')>0)) {
$mode='mobile';
}else{
$mode='default';
@@ -285,7 +292,8 @@ class OC_Template{
if ($this->checkPathForTemplate(OC::$SERVERROOT."/themes/$theme/$app/templates/", $name, $fext)) {
}elseif ($this->checkPathForTemplate(OC::$SERVERROOT."/$app/templates/", $name, $fext)) {
}else{
- echo('template not found: template:'.$name.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);
+ echo('template not found: template:'.$name.' formfactor:'.$fext
+ .' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);
die();
}
@@ -295,7 +303,8 @@ class OC_Template{
if ($this->checkPathForTemplate(OC::$SERVERROOT."/themes/$theme/core/templates/", $name, $fext)) {
} elseif ($this->checkPathForTemplate(OC::$SERVERROOT."/core/templates/", $name, $fext)) {
}else{
- echo('template not found: template:'.$name.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);
+ echo('template not found: template:'.$name.' formfactor:'.$fext
+ .' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);
die();
}
}