From: dongsheng Date: Mon, 16 Jun 2008 12:29:56 +0000 (+0000) Subject: "MDL-15251, see tracker, merged from MOODLE_19_STABLE" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=910bd9e1762ed0c3c7e25676d358ce155244ce9f;p=moodle.git "MDL-15251, see tracker, merged from MOODLE_19_STABLE" --- diff --git a/user/view.php b/user/view.php index ba0935db78..a5956504fa 100644 --- a/user/view.php +++ b/user/view.php @@ -211,19 +211,13 @@ echo ''; - 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)) { @@ -524,3 +518,4 @@ function print_row($left, $right) { } ?> +