From 92e754ebd2407ab217981ce96e1ac6645b2d9faa Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Wed, 29 Sep 2004 21:32:53 +0000 Subject: [PATCH] Fixed firstname lastname to call to fullname function --- admin/handlevirus.php | 2 +- course/enrol.html | 4 +--- course/outline_rep.php | 2 +- lib/uploadlib.php | 4 ++-- userpix/index.php | 4 ++-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/admin/handlevirus.php b/admin/handlevirus.php index 0b582b6aaa..5d4b022b5c 100644 --- a/admin/handlevirus.php +++ b/admin/handlevirus.php @@ -45,7 +45,7 @@ while(!feof($fd)) { $a->action = $action; $a->course = $course->fullname; - $a->user = $user->firstname.' '.$user->lastname; + $a->user = fullname($user); notify_user($user,$subject,$a); notify_admins($user,$subject,$a); diff --git a/course/enrol.html b/course/enrol.html index c194bcaac9..41c6eba4de 100644 --- a/course/enrol.html +++ b/course/enrol.html @@ -10,9 +10,7 @@ if ($teacher) { - $teachername = "id&course=$site->id\">". - - "$teacher->firstname $teacher->lastname."; + $teachername = "id&course=$site->id\">".fullname($teacher)."."; } else { diff --git a/course/outline_rep.php b/course/outline_rep.php index 3f0e612a62..4872fc6874 100644 --- a/course/outline_rep.php +++ b/course/outline_rep.php @@ -36,7 +36,7 @@ $stractivityreport"); } else { print_header("$course->shortname: $stractivityreport ($mode)", "$course->fullname", - "id&course=$course->id\">$user->firstname $user->lastname -> + "id&course=$course->id\">".fullname($user)." -> $stractivityreport -> $strmode"); } print_heading("$course->fullname"); diff --git a/lib/uploadlib.php b/lib/uploadlib.php index b9deffb150..1f9352c61f 100644 --- a/lib/uploadlib.php +++ b/lib/uploadlib.php @@ -612,7 +612,7 @@ function clam_scan_file(&$file, $course) { else { $info->course = 'No course'; } - $info->user = $USER->firstname .' '. $USER->lastname; + $info->user = fullname($USER); $notice = get_string('virusfound', 'moodle', $info); $notice .= "\n\n". implode("\n", $output); $notice .= "\n\n". clam_handle_infected_file($fullpath); @@ -730,7 +730,7 @@ function clam_log_infected($oldfilepath='', $newfilepath='', $userid=0) { $user = get_record('user', 'id', $userid); $errorstr = 'Clam AV has found a file that is infected with a virus. It was uploaded by ' - . ((empty($user) ? ' an unknown user ' : $user->firstname . ' '. $user->lastname)) + . ((empty($user) ? ' an unknown user ' : fullname($user))) . ((empty($oldfilepath)) ? '. The infected file was caught on upload ('.$oldfilepath.')' : '. The original file path of the infected file was '. $oldfilepath) . ((empty($newfilepath)) ? '. The file has been deleted ' : '. The file has been moved to a quarantine directory and the new path is '. $newfilepath); diff --git a/userpix/index.php b/userpix/index.php index 900ff6d492..90762aa7da 100644 --- a/userpix/index.php +++ b/userpix/index.php @@ -26,9 +26,9 @@ foreach ($users as $user) { echo "wwwroot/user/view.php?id=$user->id&course=1\"". - "title=\"$user->firstname $user->lastname\">"; + "title=\"".fullname($user)."\">"; echo "wwwroot/user/pix.php/$user->id/f1.jpg\" ". - "width=100 height=100 alt=\"$user->firstname $user->lastname\" />"; + "width=100 height=100 alt=\"".fullname($user)."\" />"; echo " \n"; } -- 2.39.5