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	6 Jun 2007 17:28:42 -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) {
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	6 Jun 2007 16:48:04 -0000
@@ -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,12 @@
     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;
+  }
 ?>
