summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Reiner <github@christian-reiner.info>2012-09-28 18:57:20 +0200
committerChristian Reiner <github@christian-reiner.info>2012-09-28 18:57:20 +0200
commit71454b1bca0accd1ab5d7628169d4714bb682030 (patch)
tree3ddb233d79dc14834f467c4990d8b2a031892fa5 /lib
parentcd399f9c771ca730fd01b7fdde7a58ec7f9de46b (diff)
downloadnextcloud-server-71454b1bca0accd1ab5d7628169d4714bb682030.tar.gz
nextcloud-server-71454b1bca0accd1ab5d7628169d4714bb682030.zip
Fix to preserve backward compatibility for apps creating static links containing the request token (currently the contacts app and maybe some 3rd party implementations)
Diffstat (limited to 'lib')
-rw-r--r--lib/template.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/template.php b/lib/template.php
index 0033683b66f..681b3f0b140 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -155,6 +155,10 @@ class OC_Template{
$this->renderas = $renderas;
$this->application = $app;
$this->vars = array();
+ if($renderas == 'user') {
+ $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]);
header('X-Frame-Options: Sameorigin');
@@ -369,6 +373,10 @@ class OC_Template{
if( $this->renderas ) {
$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
$page->assign('headers',$this->headers, false);