summaryrefslogtreecommitdiffstats
path: root/lib/template.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-11-05 12:06:59 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-11-05 12:06:59 +0100
commit1147dc977422e827a201fa081abd07721231d072 (patch)
tree203d47297c49545a67bbdd98cbe137b255a5d6d8 /lib/template.php
parent88b91a7304f2de998f71a674f4f62e85f5b83e54 (diff)
parent135680e50bf760d55a1bcaaaa02f959bde396c52 (diff)
downloadnextcloud-server-1147dc977422e827a201fa081abd07721231d072.tar.gz
nextcloud-server-1147dc977422e827a201fa081abd07721231d072.zip
Merge branch 'master' of github.com:owncloud/core into vcategories_db
Conflicts: lib/vcategories.php
Diffstat (limited to 'lib/template.php')
-rw-r--r--lib/template.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/template.php b/lib/template.php
index ed2481afba2..3d3589abd1e 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -25,7 +25,7 @@
* Prints an XSS escaped string
* @param string $string the string which will be escaped and printed
*/
-function p($string){
+function p($string) {
print(OC_Util::sanitizeHTML($string));
}
@@ -33,7 +33,7 @@ function p($string){
* Prints an unescaped string
* @param string $string the string which will be printed as it is
*/
-function print_unescaped($string){
+function print_unescaped($string) {
print($string);
}
@@ -172,7 +172,6 @@ class OC_Template{
$this->application = $app;
$this->vars = array();
$this->vars['requesttoken'] = OC_Util::callRegister();
- $this->vars['requestlifespan'] = OC_Util::$callLifespan;
$parts = explode('/', $app); // fix translation when app is something like core/lostpassword
$this->l10n = OC_L10N::get($parts[0]);
@@ -196,11 +195,11 @@ class OC_Template{
public static function detectFormfactor() {
// please add more useragent strings for other devices
if(isset($_SERVER['HTTP_USER_AGENT'])) {
- if(stripos($_SERVER['HTTP_USER_AGENT'],'ipad')>0) {
+ if(stripos($_SERVER['HTTP_USER_AGENT'], 'ipad')>0) {
$mode='tablet';
- }elseif(stripos($_SERVER['HTTP_USER_AGENT'],'iphone')>0) {
+ }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';
@@ -357,7 +356,7 @@ class OC_Template{
* @param string $text the text content for the element
*/
public function addHeader( $tag, $attributes, $text='') {
- $this->headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text);
+ $this->headers[]=array('tag'=>$tag,'attributes'=>$attributes, 'text'=>$text);
}
/**
@@ -391,7 +390,6 @@ class OC_Template{
$page = new OC_TemplateLayout($this->renderas);
if($this->renderas == 'user') {
$page->assign('requesttoken', $this->vars['requesttoken']);
- $page->assign('requestlifespan', $this->vars['requestlifespan']);
}
// Add custom headers