Revision: 1264
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1264&view=rev
Author:   cimorrison
Date:     2009-11-13 21:09:48 +0000 (Fri, 13 Nov 2009)

Log Message:
-----------
Fixed a bug which prevented users from being edited (unless they happened to be 
the user with id 0)

Modified Paths:
--------------
    mrbs/trunk/web/edit_users.php

Modified: mrbs/trunk/web/edit_users.php
===================================================================
--- mrbs/trunk/web/edit_users.php       2009-11-13 19:02:59 UTC (rev 1263)
+++ mrbs/trunk/web/edit_users.php       2009-11-13 21:09:48 UTC (rev 1264)
@@ -371,7 +371,14 @@
     $q_string = ($Id >= 0) ? "Action=Edit" : "Action=Add";
     foreach ($fields as $fieldname)
     {
-      // first, get all the form variables and put them into an array, 
$values, which 
+      if ($fieldname == 'id')
+      {
+        // id: don't need to do anything except add the id to the query string;
+        // the field itself is auto-incremented
+        $q_string .= "&Id=$Id";
+        continue; 
+      }
+      // first, get all the other form variables and put them into an array, 
$values, which 
       // we will use for entering into the database assuming we pass validation
       $values[$fieldname] = get_form_var("Field_$fieldname", 
$field_props[$fieldname]['type']);
       // Truncate the field to the maximum length as a precaution.
@@ -388,10 +395,6 @@
       switch ($fieldname)
       {
         // some of the fields get special treatment
-        case 'id':
-          // id: don't need to do anything except add the id to the query 
string
-          $q_string .= "&Id=$Id";   
-          break;
         case 'name':
           // name: convert it to lower case
           $q_string .= "&$fieldname=" . urlencode($values[$fieldname]);


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to