From e3b9ae8e011dd256cf68ebba3ca69d6817085223 Mon Sep 17 00:00:00 2001 From: scyrma Date: Thu, 10 Jul 2008 03:37:04 +0000 Subject: [PATCH] MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida) (merge from 1.8/1.9) --- admin/user.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/admin/user.php b/admin/user.php index c19b1ae428d3d..71b274824138a 100644 --- a/admin/user.php +++ b/admin/user.php @@ -202,7 +202,17 @@ $mainadmin = get_admin(); - $table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", ""); + $override->firstname = 'firstname'; + $override->lastname = 'lastname'; + $fullnamelanguage = get_string('fullnamedisplay', '', $override); + if (($CFG->fullnamedisplay == 'firstname lastname') or + ($CFG->fullnamedisplay == 'firstname') or + ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'firstname lastname' )) { + $fullnamedisplay = "$firstname / $lastname"; + } else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname') + $fullnamedisplay = "$lastname / $firstname"; + } + $table->head = array ($fullnamedisplay, $email, $city, $country, $lastaccess, "", "", ""); $table->align = array ("left", "left", "left", "left", "left", "center", "center", "center"); $table->width = "95%"; foreach ($users as $user) {