Changeset:
98759bf7a7da
https://sourceforge.net/p/mrbs/hg-code/ci/98759bf7a7da07376100c79bce277012f94ddef5
Author:
Campbell Morrison <[email protected]>
Date:
Tue Sep 27 16:04:57 2016 +0100
Log message:
Merged with latest changes from default branch
diffstat:
web/del.php | 23 ++++++++++++++++++-----
web/del_entry.php | 4 ++--
2 files changed, 20 insertions(+), 7 deletions(-)
diffs (49 lines):
diff -r 83a401042f02 -r 98759bf7a7da web/del.php
--- a/web/del.php Mon Sep 26 23:10:07 2016 +0100
+++ b/web/del.php Tue Sep 27 16:04:57 2016 +0100
@@ -24,12 +24,25 @@
// They have confirmed it already, so go blast!
sql_begin();
// First take out all appointments for this room
- sql_command("DELETE FROM $tbl_entry WHERE room_id=?", array($room));
- sql_command("DELETE FROM $tbl_repeat WHERE room_id=?", array($room));
+ $result = sql_command("delete from $tbl_entry where room_id=$room");
+ if ($result >= 0)
+ {
+ $result = sql_command("delete from $tbl_repeat where room_id=$room");
+ // Now take out the room itself
+ if ($result >= 0)
+ {
+ sql_command("delete from $tbl_room where id=$room");
+ }
+ }
- // Now take out the room itself
- sql_command("DELETE FROM $tbl_room WHERE id=?",array($room));
- sql_commit();
+ if ($result >= 0)
+ {
+ sql_commit();
+ }
+ else
+ {
+ sql_rollback();
+ }
// Go back to the admin page
Header("Location: admin.php?area=$area");
diff -r 83a401042f02 -r 98759bf7a7da web/del_entry.php
--- a/web/del_entry.php Mon Sep 26 23:10:07 2016 +0100
+++ b/web/del_entry.php Tue Sep 27 16:04:57 2016 +0100
@@ -75,9 +75,9 @@
$mail_previous['entry_type'] = ENTRY_RPT_CHANGED;
}
}
- sql_begin();
+
$start_times = mrbsDelEntry(getUserName(), $id, $series, 1);
- sql_commit();
+
// [At the moment MRBS does not inform the user if it was not able to
delete
// an entry, or, for a series, some entries in a series. This could
happen for
// example if a booking policy is in force that prevents the deletion of
entries
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits