Changeset:
        19b125d31c5e
        
https://sourceforge.net/p/mrbs/hg-code/ci/19b125d31c5ea17c23196f84c5487fd9d936f089
Author:
        Campbell Morrison <[email protected]>
Date:
        Mon Feb 13 13:25:12 2017 +0000
Log message:

Merge

diffstat:

 web/add.php      |  3 ++-
 web/admin.php    |  5 +++++
 web/mrbs_sql.inc |  8 ++++----
 3 files changed, 11 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r 57d1e460b0b8 -r 19b125d31c5e web/add.php
--- a/web/add.php       Mon Feb 13 13:22:18 2017 +0000
+++ b/web/add.php       Mon Feb 13 13:25:12 2017 +0000
@@ -8,6 +8,7 @@
 $name = get_form_var('name', 'string');
 $description = get_form_var('description', 'string');
 $capacity = get_form_var('capacity', 'int');
+$room_admin_email = get_form_var('room_admin_email', 'string');
 $type = get_form_var('type', 'string');
 
 // Check the user is authorised for this page
@@ -32,7 +33,7 @@
 
 elseif ($type == "room")
 {
-  $room = mrbsAddRoom($name, $area, $error, $description, $capacity);
+  $room = mrbsAddRoom($name, $area, $error, $description, $capacity, 
$room_admin_email);
 }
 
 $returl = "admin.php?area=$area" . (!empty($error) ? "&error=$error" : "");
diff -r 57d1e460b0b8 -r 19b125d31c5e web/admin.php
--- a/web/admin.php     Mon Feb 13 13:22:18 2017 +0000
+++ b/web/admin.php     Mon Feb 13 13:25:12 2017 +0000
@@ -409,6 +409,11 @@
           <label for="room_capacity"><?php echo get_vocab("capacity") 
?>:</label>
           <input type="text" id="room_capacity" name="capacity">
         </div>
+
+        <div>
+          <label for="room_admin_email"><?php echo 
get_vocab("room_admin_email") ?>:</label>
+          <input type="text" id="room_admin_email" name="room_admin_email">
+        </div>
        
         <div>
           <input type="submit" class="submit" value="<?php echo 
get_vocab("addroom") ?>">
diff -r 57d1e460b0b8 -r 19b125d31c5e web/mrbs_sql.inc
--- a/web/mrbs_sql.inc  Mon Feb 13 13:22:18 2017 +0000
+++ b/web/mrbs_sql.inc  Mon Feb 13 13:25:12 2017 +0000
@@ -1710,7 +1710,7 @@
 
 // Adds a room, returning the new id, or FALSE on failure with the
 // error in $error
-function mrbsAddRoom($name, $area, &$error, $description='', $capacity='')
+function mrbsAddRoom($name, $area, &$error, $description='', $capacity='', 
$room_admin_email='')
 {
   global $maxlength, $tbl_room;
   
@@ -1743,9 +1743,9 @@
     return FALSE;
   }
   // If so, insert the room into the database
-  $sql = "INSERT INTO $tbl_room (room_name, sort_key, area_id, description, 
capacity)
-          VALUES (?, ?, ?, ?, ?)";
-  db()->command($sql, array($name,$name,$area,$description,$capacity));
+  $sql = "INSERT INTO $tbl_room (room_name, sort_key, area_id, description, 
capacity, room_admin_email)
+          VALUES (?, ?, ?, ?, ?, ?)";
+  db()->command($sql, 
array($name,$name,$area,$description,$capacity,$room_admin_email));
   $room = db()->insert_id($tbl_room, 'id');
   
   // Release the mutex

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to