Revision: 1354
http://mrbs.svn.sourceforge.net/mrbs/?rev=1354&view=rev
Author: cimorrison
Date: 2010-06-08 10:28:09 +0000 (Tue, 08 Jun 2010)
Log Message:
-----------
- fixed a bug whereby the $mail_vocab would not be set if the only person set
to receive emails was $mail_settings['book_admin_on_provisional']
- tidied up the tests for whether an email is necessary
Modified Paths:
--------------
mrbs/trunk/web/confirm_entry_handler.php
mrbs/trunk/web/edit_entry_handler.php
mrbs/trunk/web/language.inc
Modified: mrbs/trunk/web/confirm_entry_handler.php
===================================================================
--- mrbs/trunk/web/confirm_entry_handler.php 2010-06-02 20:42:01 UTC (rev
1353)
+++ mrbs/trunk/web/confirm_entry_handler.php 2010-06-08 10:28:09 UTC (rev
1354)
@@ -43,11 +43,7 @@
if (isset($action))
-{
- $need_to_send_mail = ($mail_settings['admin_on_bookings'] or
$mail_settings['area_admin_on_bookings'] or
- $mail_settings['room_admin_on_bookings'] or
$mail_settings['booker'] or
- $mail_settings['book_admin_on_provisional']);
-
+{
if ($need_to_send_mail)
{
// Retrieve the booking details which we will need for the email
Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php 2010-06-02 20:42:01 UTC (rev
1353)
+++ mrbs/trunk/web/edit_entry_handler.php 2010-06-08 10:28:09 UTC (rev
1354)
@@ -488,9 +488,7 @@
$new_id = $booking['id'];
// Send a mail to the Administrator
- if ($mail_settings['admin_on_bookings'] or
$mail_settings['area_admin_on_bookings'] or
- $mail_settings['room_admin_on_bookings'] or $mail_settings['booker']
or
- $mail_settings['book_admin_on_provisional'])
+ if ($need_to_send_mail)
{
require_once "functions_mail.inc";
// Send a mail only if this a new entry, or if this is an
@@ -548,9 +546,7 @@
$status);
// Send a mail to the Administrator
- if ($mail_settings['admin_on_bookings'] or
$mail_settings['area_admin_on_bookings'] or
- $mail_settings['room_admin_on_bookings'] or $mail_settings['booker']
or
- $mail_settings['book_admin_on_provisional'])
+ if ($need_to_send_mail)
{
require_once "functions_mail.inc";
// Send a mail only if this a new entry, or if this is an
Modified: mrbs/trunk/web/language.inc
===================================================================
--- mrbs/trunk/web/language.inc 2010-06-02 20:42:01 UTC (rev 1353)
+++ mrbs/trunk/web/language.inc 2010-06-08 10:28:09 UTC (rev 1354)
@@ -332,8 +332,10 @@
// Language token handling
// Get first default set of language tokens for emails.
-if ($mail_settings['admin_on_bookings'] or
$mail_settings['area_admin_on_bookings'] or
- $mail_settings['room_admin_on_bookings'] or $mail_settings['booker'])
+$need_to_send_mail = ($mail_settings['admin_on_bookings'] or
$mail_settings['area_admin_on_bookings'] or
+
$mail_settings['room_admin_on_bookings'] or $mail_settings['booker'] or
+
$mail_settings['book_admin_on_provisional']);
+if ($need_to_send_mail)
{
include "lang." . $default_language_tokens;
include "lang." . $mail_settings['admin_lang'];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits