X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Freset%2Freset_holiday.php;h=8afdbb80b5302552ed3c35bcedaef43a6a02e802;hb=6c0abc9f643c69610fe87be0ddb1a5dab95c6d39;hp=c8397325c613ee3716e7896af4cb2fb542cc254e;hpb=592d88e7f9bb873aacb9a9dda7457eb0c00566b2;p=mailer.git diff --git a/inc/reset/reset_holiday.php b/inc/reset/reset_holiday.php index c8397325c6..8afdbb80b5 100644 --- a/inc/reset/reset_holiday.php +++ b/inc/reset/reset_holiday.php @@ -1,7 +1,7 @@ "); - // Check for holidays we need to enable and send email to user $result_main = SQL_QUERY("SELECT `userid`, `holiday_activated` @@ -62,7 +62,7 @@ ORDER BY __FILE__, __LINE__); // Entries found? -if (SQL_NUMROWS($result_main) > 0) { +if (!SQL_HASZERONUMS($result_main)) { // Init SQLs initSqls(); @@ -78,7 +78,9 @@ WHERE `holiday_start` <= UNIX_TIMESTAMP() AND `holiday_end` > UNIX_TIMESTAMP() LIMIT 1", - array(bigintval($content['userid'])), __FILE__, __LINE__); + array(bigintval($content['userid'])), __FILE__, __LINE__); + + // Do we have an entry? if (SQL_NUMROWS($result_holiday) == 1) { // Okay, this user can be send away to holiday... $content = merge_array($content, SQL_FETCHARRAY($result_holiday)); @@ -92,7 +94,7 @@ LIMIT 1", // Send email to user $message = loadEmailTemplate('member_holiday_activated', $content, $content['userid']); - sendEmail($content['userid'], getMessage('HOLIDAY_MEMBER_ACTIVATED_SUBJ'), $message); + sendEmail($content['userid'], '{--MEMBER_HOLIDAY_ACTIVATED_SUBJECT--}', $message); // Update account addSql(SQL_QUERY_ESC("UPDATE