Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/role_weights/README.txt,v
retrieving revision 1.7
diff -u -r1.7 README.txt
--- README.txt	29 Jan 2007 20:44:56 -0000	1.7
+++ README.txt	8 Nov 2007 21:16:26 -0000
@@ -1,15 +1,12 @@
 ========================================
   Role Weights - role_weights
   Paul Byrne  <paul@leafish.co.uk>
-  Last updated 29/01/2007
+  Last updated 08/11/2007
 ========================================
 
 A small utility module to allow site admins to specify certain weights for user roles. Its
 not much use on its own, more of a helper module for other modules which require this
-functionality.
-
-This is an early version: functional, but only briefly tested and with plenty of room for improvement.
-Please post your problems and suggestions at the issue tracker:
+functionality. Please post your problems and suggestions at the issue tracker:
 http://drupal.org/project/issues/role_weights
 
 VIEWS! The first steps have been taken to integrate this module with the increasingly-dominating
@@ -18,6 +15,9 @@
 
 Role Weights project on drupal.org: http://drupal.org/project/role_weights
 
+NOTE: Since version 1.1 (5.x-1.1) the role with the lowest weight is returned from role_weights_get_highest()
+Please see this issue: http://drupal.org/node/75877
+
 
 Installation
 ========================================
Index: role_weights.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/role_weights/role_weights.install,v
retrieving revision 1.4
diff -u -r1.4 role_weights.install
--- role_weights.install	29 Jan 2007 22:59:37 -0000	1.4
+++ role_weights.install	8 Nov 2007 21:14:04 -0000
@@ -13,7 +13,7 @@
         db_query("INSERT INTO {role_weights} (rid, weight)
             VALUES (1, 0)");
         db_query("INSERT INTO {role_weights} (rid, weight)
-            VALUES (2, 1)");
+            VALUES (2, -1)");
         break;
 
       case 'pgsql':
@@ -25,7 +25,7 @@
         db_query("INSERT INTO {role_weights} (rid, weight)
             VALUES (1, 0)");
         db_query("INSERT INTO {role_weights} (rid, weight)
-            VALUES (2, 1)");
+            VALUES (2, -1)");
         break;
     }
   }
@@ -34,4 +34,13 @@
     db_query('DROP TABLE {role_weights}');
   }
 
-?>
+  /* updates */
+  function role_weights_update_1() {
+    // invert the weights of all role_weights set
+    // part of reversing our weights to coincide with Drupal standards: http://drupal.org/node/75877    
+    $items = array();
+    $items[] = update_sql("UPDATE {role_weights} SET weight = 0 - weight");
+    return $items;
+  }
+
+?>
\ No newline at end of file
Index: role_weights.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/role_weights/role_weights.module,v
retrieving revision 1.12
diff -u -r1.12 role_weights.module
--- role_weights.module	16 Mar 2007 13:59:54 -0000	1.12
+++ role_weights.module	8 Nov 2007 21:13:32 -0000
@@ -177,7 +177,7 @@
  */
 function role_weights_get_highest($roles) {
   $role_weights = _role_weights_get_weights();
-  arsort($role_weights);
+  asort($role_weights);
 
   // Run through $roles, returning FIRST role matched
   foreach ($role_weights as $rid => $weight) {
