Revision: 1141
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1141&view=rev
Author:   cimorrison
Date:     2009-06-29 12:03:30 +0000 (Mon, 29 Jun 2009)

Log Message:
-----------
- Changed the Upgrade 6 procedure so that it populates the users table with 
admins at $max_level instead of 2.

- Moved the definition of $max_level and $min_user_editing_level out of 
auth_db.inc and into config.inc.php

Modified Paths:
--------------
    mrbs/trunk/web/auth_db.inc
    mrbs/trunk/web/config.inc.php
    mrbs/trunk/web/upgrade/6/post.inc

Modified: mrbs/trunk/web/auth_db.inc
===================================================================
--- mrbs/trunk/web/auth_db.inc  2009-06-29 11:39:08 UTC (rev 1140)
+++ mrbs/trunk/web/auth_db.inc  2009-06-29 12:03:30 UTC (rev 1141)
@@ -19,12 +19,6 @@
     in the logon box, if the value $user_list_link is set. */
 $user_list_link = "edit_users.php";
 
-// The highest level of access (0=none; 1=user; 2+=admin).    Used in 
edit_users.php
-// In the future we might want a higher level of granularity, eg to 
distinguish between
-// different levels of admin
-$max_level = 2;
-// The lowest level of admin allowed to edit other users
-$min_user_editing_level = 2;
 
 /* authValidateUser($user, $pass)
  * 

Modified: mrbs/trunk/web/config.inc.php
===================================================================
--- mrbs/trunk/web/config.inc.php       2009-06-29 11:39:08 UTC (rev 1140)
+++ mrbs/trunk/web/config.inc.php       2009-06-29 12:03:30 UTC (rev 1141)
@@ -437,6 +437,14 @@
 $auth["prog"]   = "";
 $auth["params"] = "";
 
+// 'auth_db' configuration settings
+// The highest level of access (0=none; 1=user; 2+=admin).    Used in 
edit_users.php
+// In the future we might want a higher level of granularity, eg to 
distinguish between
+// different levels of admin
+$max_level = 2;
+// The lowest level of admin allowed to edit other users
+$min_user_editing_level = 2;
+
 // 'auth_db_ext' configuration settings
 // The 'db_system' variable is equivalent to the core MRBS $dbsys variable,
 // and allows you to use any of MRBS's database abstraction layers for

Modified: mrbs/trunk/web/upgrade/6/post.inc
===================================================================
--- mrbs/trunk/web/upgrade/6/post.inc   2009-06-29 11:39:08 UTC (rev 1140)
+++ mrbs/trunk/web/upgrade/6/post.inc   2009-06-29 12:03:30 UTC (rev 1141)
@@ -2,9 +2,11 @@
 
 // $Id$
 
+
 global $admin_handle;
 global $tbl_users;
 global $auth;
+global $max_level;
 
 $r = sql_query("SELECT level FROM $tbl_users ".
                sql_syntax_limit(0,1),$admin_handle);
@@ -35,7 +37,7 @@
   // Now populate the table with the existing admins
   foreach ($auth['admin'] as $admin_name)
   {
-    $sql = "UPDATE $tbl_users SET level=2 WHERE 
name='".addslashes($admin_name)."'";
+    $sql = "UPDATE $tbl_users SET level=$max_level WHERE 
name='".addslashes($admin_name)."'";
     if (sql_command($sql) < 0)
     {
       fatal_error(0, "Error adding existing admins. " . sql_error());


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to