From: Andrew Davis <andrew@affinitysoftware.net>
Date: Wed, 25 Nov 2009 06:03:25 +0000 (+0000)
Subject: role administration MDL-20413 up arrow next to top-most role in admin -> users -... 
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=994cc719a658a3cecc3a9ccfa266ee3a7cab4651;p=moodle.git

role administration MDL-20413 up arrow next to top-most role in admin -> users -> permissions -> define roles
---

diff --git a/admin/roles/manage.php b/admin/roles/manage.php
index f321c45835..633c8ae529 100755
--- a/admin/roles/manage.php
+++ b/admin/roles/manage.php
@@ -221,6 +221,7 @@
 
 /// Print a list of roles with edit/copy/delete/reorder icons.
     $table->data = array();
+    $firstrole = reset($roles);
     $lastrole = end($roles);
     foreach ($roles as $role) {
 
@@ -234,7 +235,7 @@
 
     /// Icons:
         // move up
-        if ($role->sortorder != 0) {
+        if ($role->sortorder != $firstrole->sortorder) {
             $row[3] .= get_action_icon($baseurl . '?action=moveup&amp;roleid=' . $role->id . '&amp;sesskey=' . sesskey(), 'up', $strmoveup, $strmoveup);
         } else {
             $row[3] .= get_spacer();