From ec7daae3936149904ac566d2c9f0f64d4cdd9fd8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Wed, 10 Aug 2016 16:06:52 +0200
Subject: [PATCH] =?UTF-8?q?Fixes=20#5058=20Fixed=20PHP=C2=A0errors=20in=20?=
 =?UTF-8?q?recovery?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 html/class_passwordRecovery.inc | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/html/class_passwordRecovery.inc b/html/class_passwordRecovery.inc
index c91698810..99b1fa03e 100644
--- a/html/class_passwordRecovery.inc
+++ b/html/class_passwordRecovery.inc
@@ -248,14 +248,10 @@ class passwordRecovery extends standAlonePage {
   {
     parent::__construct();
 
-    $smarty = get_smarty();
-
     if (isset($_GET['email_address']) && $_GET['email_address'] != "") {
       $this->email_address = validate($_GET['email_address']);
-      $smarty->assign('email_address', $this->email_address);
     } elseif (isset($_POST['email_address'])) {
       $this->email_address = validate($_POST['email_address']);
-      $smarty->assign('email_address', $this->email_address);
     }
 
     /* Check for selected user... */
@@ -264,7 +260,7 @@ class passwordRecovery extends standAlonePage {
     } elseif (isset($_POST['uid'])) {
       $this->uid = validate($_POST['uid']);
     } else {
-      $this->uid = "";
+      $this->uid = '';
     }
   }
 
@@ -322,13 +318,16 @@ class passwordRecovery extends standAlonePage {
     $smarty->assign('usePrototype', 'FALSE');
     $smarty->append('js_files',     'include/pwdStrength.js');
     $smarty->append('css_files',    get_template_path('login.css'));
+    $lang = session::global_get('lang');
+    $smarty->assign('lang', preg_replace('/_.*$/', '', $lang));
+    $smarty->assign('rtl', language_is_rtl($lang));
     $smarty->display(get_template_path('headers.tpl'));
 
     $smarty->assign('version',        FD_VERSION);
     $smarty->assign('step',           $this->step);
     $smarty->assign('delay_allowed',  $this->delay_allowed);
     $smarty->assign('activated',      $this->activated);
-
+    $smarty->assign('email_address',  $this->email_address);
     $smarty->display(get_template_path('recovery.tpl'));
     exit();
   }
-- 
GitLab