From 4068bedb838fd392c000fe802118cb2ee3532515 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Tue, 26 Sep 2006 05:03:46 +0000 Subject: [PATCH] Use sql_concat() in course/lib.php --- course/lib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/course/lib.php b/course/lib.php index 6158e76ede..9817747cb8 100644 --- a/course/lib.php +++ b/course/lib.php @@ -402,7 +402,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per } if ($ld && !empty($log->info)) { // ugly hack to make sure fullname is shown correctly - if (($ld->mtable == 'user') and ($ld->field == 'CONCAT(firstname," ",lastname)')) { + if (($ld->mtable == 'user') and ($ld->field == sql_concat('firstname', "' '" , 'lastname'))) { $log->info = fullname(get_record($ld->mtable, 'id', $log->info), true); } else { $log->info = get_field($ld->mtable, $ld->field, 'id', $log->info); @@ -445,7 +445,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per function print_log_csv($course, $user, $date, $order='l.time DESC', $modname, $modid, $modaction, $groupid) { - + $text = get_string('course')."\t".get_string('time')."\t".get_string('ip_address')."\t". get_string('fullname')."\t".get_string('action')."\t".get_string('info'); @@ -490,7 +490,7 @@ function print_log_csv($course, $user, $date, $order='l.time DESC', $modname, } if ($ld && !empty($log->info)) { // ugly hack to make sure fullname is shown correctly - if (($ld->mtable == 'user') and ($ld->field == 'CONCAT(firstname," ",lastname)')) { + if (($ld->mtable == 'user') and ($ld->field == sql_concat('firstname', "' '" , 'lastname'))) { $log->info = fullname(get_record($ld->mtable, 'id', $log->info), true); } else { $log->info = get_field($ld->mtable, $ld->field, 'id', $log->info); @@ -582,7 +582,7 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname, } if ($ld && !empty($log->info)) { // ugly hack to make sure fullname is shown correctly - if (($ld->mtable == 'user') and ($ld->field == 'CONCAT(firstname," ",lastname)')) { + if (($ld->mtable == 'user') and ($ld->field == sql_concat('firstname', "' '" , 'lastname'))) { $log->info = fullname(get_record($ld->mtable, 'id', $log->info), true); } else { $log->info = get_field($ld->mtable, $ld->field, 'id', $log->info); @@ -686,7 +686,7 @@ function print_log_ooo($course, $user, $date, $order='l.time DESC', $modname, } if ($ld && !empty($log->info)) { // ugly hack to make sure fullname is shown correctly - if (($ld->mtable == 'user') and ($ld->field == 'CONCAT(firstname," ",lastname)')) { + if (($ld->mtable == 'user') and ($ld->field == sql_concat('firstname', "' '" , 'lastname'))) { $log->info = fullname(get_record($ld->mtable, 'id', $log->info), true); } else { $log->info = get_field($ld->mtable, $ld->field, 'id', $log->info); -- 2.39.5