Slightly more robust in case it can't find users. See bug 562.
This commit is contained in:
+8
-7
@@ -53,13 +53,6 @@ if (isset($_GET['beep'])) {
|
||||
|
||||
chat_delete_old_users();
|
||||
|
||||
|
||||
/// Get list of users
|
||||
|
||||
if (!$chatusers = chat_get_users($chatuser->chatid)) {
|
||||
error("Could not find any users!");
|
||||
}
|
||||
|
||||
|
||||
/// Print headers
|
||||
|
||||
@@ -85,6 +78,14 @@ $str->mins = get_string("mins");
|
||||
$str->sec = get_string("sec");
|
||||
$str->secs = get_string("secs");
|
||||
|
||||
/// Get list of users
|
||||
|
||||
if (!$chatusers = chat_get_users($chatuser->chatid)) {
|
||||
print_string("errornousers");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
echo "<table width=\"100%\">";
|
||||
foreach ($chatusers as $chatuser) {
|
||||
$lastping = $timenow - $chatuser->lastmessageping;
|
||||
|
||||
Reference in New Issue
Block a user