From 83871468baa0b55654f38951e6b79f62b8f573a6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 18 Sep 2018 17:37:08 +0200 Subject: [PATCH] Standardize and update code --- htdocs/user/class/user.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index bc26f3ebc07..b31c52bedce 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2005 Lionel Cousteix * Copyright (C) 2011 Herve Prot - * Copyright (C) 2013-2014 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2015 Marcos GarcĂ­a * Copyright (C) 2018 charlene Benke @@ -1853,7 +1853,7 @@ class User extends CommonObject function send_password($user, $password='', $changelater=0) { // phpcs:enable - global $conf,$langs; + global $conf, $langs; global $dolibarr_main_url_root; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; @@ -1874,10 +1874,8 @@ class User extends CommonObject $outputlangs=$langs; } - $outputlangs->load("main"); - $outputlangs->load("errors"); - $outputlangs->load("users"); - $outputlangs->load("other"); + // Load translation files required by the page + $outputlangs->loadLangs(array("main", "errors", "users", "other")); $appli=constant('DOL_APPLICATION_TITLE'); if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;