Skip to content

Commit

Permalink
"MDL-15251, see tracker"
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Jun 16, 2008
1 parent 86f9dc2 commit 2c33f28
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions user/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,13 @@

echo '<table class="list">';

if (($user->city or $user->country) and (!isset($hiddenfields['city']) or !isset($hiddenfields['country']))) {
$location = '';
if ($user->city && !isset($hiddenfields['city'])) {
$location .= $user->city;
}
if (! isset($hiddenfields['country']) && $user->country) {
$countries = get_list_of_countries();
if (!empty($countries[$user->country]) && !isset($hiddenfields['country'])) {
if ($user->city && !isset($hiddenfields['city']) && !isset($hiddenfields['country'])) {
$location .= ', ';
}
$location .= $countries[$user->country];
}
print_row(get_string("city").":", $location);
print_row(get_string('country') . ':', $countries[$user->country]);
}

if (! isset($hiddenfields['city']) && $user->city) {
print_row(get_string('city') . ':', $user->city);
}

if (has_capability('moodle/user:viewhiddendetails', $coursecontext)) {
Expand Down Expand Up @@ -534,3 +528,4 @@ function print_row($left, $right) {
}

?>

0 comments on commit 2c33f28

Please sign in to comment.