From ad81212ec3194d767913baf7a0b80b6a9720ba3a Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 11 Nov 2002 07:58:11 +0000 Subject: [PATCH] Rearranged code so some output is printed before tackling the big table --- admin/user.php | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/admin/user.php b/admin/user.php index d8c1459967..9036940136 100644 --- a/admin/user.php +++ b/admin/user.php @@ -156,21 +156,8 @@ if ($users = get_records_sql("SELECT id, username, email, firstname, lastname, city, country, lastaccess from user WHERE username <> 'guest' AND deleted <> '1' ORDER BY $sort $dir LIMIT $page,$recordsperpage")) { - foreach ($users as $key => $user) { - $users[$key]->country = $COUNTRIES[$user->country]; - } - if ($sort == "country") { // Need to resort by full country name, not code - foreach ($users as $user) { - $susers[$user->id] = $user->country; - } - asort($susers); - foreach ($susers as $key => $value) { - $nusers[] = $users[$key]; - } - $users = $nusers; - } - print_heading("$usercount ".get_string("users")); + $a->start = $page; $a->end = $page + $recordsperpage; if ($a->end > $usercount) { @@ -206,6 +193,22 @@ } echo ""; + flush(); + + foreach ($users as $key => $user) { + $users[$key]->country = $COUNTRIES[$user->country]; + } + if ($sort == "country") { // Need to resort by full country name, not code + foreach ($users as $user) { + $susers[$user->id] = $user->country; + } + asort($susers); + foreach ($susers as $key => $value) { + $nusers[] = $users[$key]; + } + $users = $nusers; + } + $table->head = array ($name, $email, $city, $country, $lastaccess, "", ""); $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER"); $table->width = "95%"; -- 2.39.5