Menu

#123 mail not sent to area/room admins

Major
closed
MRBS-DEV (7)
5
2012-07-20
2006-04-21
karcher
No

I've found that after setting the following TRUE in
config.inc.php:

MAIL_AREA_ADMIN_ON_BOOKINGS
MAIL_ROOM_ADMIN_ON_BOOKINGS

mail is still not sent to the area and room admins
UNLESS an entry was repeating. This is the result of a
query for the email addresses in function
notifyAdminOnBooking (in functions_mail.inc) always
including the repeat table in the FROM clause so when
there's no match in the repeat table, the result is
null. One way to fix this would be to replace the
following line (after the test for
MAIL_AREA_ADMIN_ON_BOOKINGS):

$sql .= "FROM $tbl_room r, $tbl_area a, $tbl_entry e,
$tbl_repeat rep ";

with these two lines:

$sql .= "FROM $tbl_room r, $tbl_area a, $tbl_entry e ";
if ($id_table == 'rep') // is this a repeating entry?
$sql .= ",$tbl_repeat rep "; // yes, use rep tbl

and replace the following line (after the test for
MAIL_ROOM_ADMIN_ON_BOOKINGS):

$sql .= "FROM $tbl_room r, $tbl_entry e, $tbl_repeat rep ";

with these two lines:

$sql .= "FROM $tbl_room r, $tbl_entry e ";
if ($id_table == 'rep') // is this a repeating entry?
$sql .= ",$tbl_repeat rep "; // yes, use rep tbl

Discussion

  • John Beranek

    John Beranek - 2006-04-24

    Logged In: YES
    user_id=71843

    Thanks for this report, I'll look more closely at it and
    look to getting it checked into CVS and into a future MRBS
    release.

    John.

     
  • John Beranek

    John Beranek - 2006-04-26

    Logged In: YES
    user_id=71843

    Now checked into CVS on 1.2 branch (and will get into 1.2.4
    release) and the trunk.

    John.