From a86840ecc974af3784c2f8a63e04351d6c8a92b5 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 9 Oct 2007 13:43:51 +0000 Subject: [PATCH] do not optimise the $USER fetching - it was broken by mnethostid and would be again in future --- mod/chat/gui_header_js/jsupdate.php | 2 +- mod/chat/gui_header_js/jsupdated.php | 2 +- mod/chat/gui_header_js/users.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/chat/gui_header_js/jsupdate.php b/mod/chat/gui_header_js/jsupdate.php index f6825f5fdd..d288f0ed0d 100644 --- a/mod/chat/gui_header_js/jsupdate.php +++ b/mod/chat/gui_header_js/jsupdate.php @@ -19,7 +19,7 @@ } //Get the user theme and enough info to be used in chat_format_message() which passes it along to - if (!$USER = get_record('user','id',$chatuser->userid,'','','','','id, lang, theme, username, timezone')) { + if (!$USER = get_record('user','id',$chatuser->userid)) { // no optimisation here, it would break again in future! error('User does not exist!'); } $USER->description = ''; diff --git a/mod/chat/gui_header_js/jsupdated.php b/mod/chat/gui_header_js/jsupdated.php index 13bc336968..4bee2b32f6 100644 --- a/mod/chat/gui_header_js/jsupdated.php +++ b/mod/chat/gui_header_js/jsupdated.php @@ -42,7 +42,7 @@ //Get the user theme and enough info to be used in chat_format_message() which passes it along to // chat_format_message_manually() -- and only id and timezone are used. - if (!$USER = get_record('user','id',$chatuser->userid,'','','','','id, lang, theme, username, timezone')) { + if (!$USER = get_record('user','id',$chatuser->userid)) { // no optimisation here, it would break again in future! error('User does not exist!'); } $USER->description = ''; diff --git a/mod/chat/gui_header_js/users.php b/mod/chat/gui_header_js/users.php index 35956794a9..8ceca1a30b 100644 --- a/mod/chat/gui_header_js/users.php +++ b/mod/chat/gui_header_js/users.php @@ -18,7 +18,7 @@ } //Get the user theme and enough info to be used in chat_format_message() which passes it along to - if (!$USER = get_record('user','id',$chatuser->userid,'','','','','id, lang, theme, username, timezone')) { + if (!$USER = get_record('user','id',$chatuser->userid)) { // no optimisation here, it would break again in future! error('User does not exist!'); } $USER->description = ''; -- 2.39.5