X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffilter%2Fbonus_filter.php;h=63aafff99354db6470c986d60810f664a774cadc;hb=6560179e7c8dc565485503f374d4e31f333ffd0e;hp=bd13b975b6fb681d9daddb36d2499f17879a58c8;hpb=2379934be6a196a54f4155bb8e24c49b20736969;p=mailer.git diff --git a/inc/filter/bonus_filter.php b/inc/filter/bonus_filter.php index bd13b975b6..63aafff993 100644 --- a/inc/filter/bonus_filter.php +++ b/inc/filter/bonus_filter.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -46,7 +46,7 @@ function FILTER_ADD_LOGIN_BONUS ($filterData) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); if (!isMember()) { // Do only run for logged in members - debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); + reportBug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); } // END - if // Bonus is not given by default ;-) @@ -71,7 +71,7 @@ LIMIT 1', $bonus = (!SQL_HASZEROAFFECTED()); } // END - if - if (($bonus === true) && (getRequestElement('mode') == 'bonus')) { + if (($bonus === true) && (getRequestElement('do') == 'bonus')) { // Output message with added points $GLOBALS['message'] .= '
'.print_r($filterData,true).''; + return $filterData; +} + +// Filter for sending out bonus rallye notifications +function FILTER_SEND_BONUS_NOTIFICATIONS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Check for bonus rallye is active and send mails out + if ((isBonusRallyeActive()) && (isBonusNewMemberNotifyEnabled())) { + // Include file for sending out mails + addIncludeToPool('notify', 'inc/mails/bonus_mails.php'); + } // END - if + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).''; + return $filterData; +} + // [EOF] ?>