]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-15251, see tracker, merged from MOODLE_19_STABLE"
authordongsheng <dongsheng>
Mon, 16 Jun 2008 12:29:56 +0000 (12:29 +0000)
committerdongsheng <dongsheng>
Mon, 16 Jun 2008 12:29:56 +0000 (12:29 +0000)
user/view.php

index ba0935db7811cc6197936a4d9767da31a830c6a9..a5956504fa5f5ac186d6e950dbed42584da573c6 100644 (file)
 
     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)) {
@@ -524,3 +518,4 @@ function print_row($left, $right) {
 }
 
 ?>
+