X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmails%2Fdoubler_mails.php;h=91f3988d91f3b71b8da61fc987eb956c184dfda5;hb=e17685c65d1a48c061b7c4f64c7a23c165430460;hp=e914caadfa46ef9e48264897fdffee03535b2a9c;hpb=c3b4eaf29946349ff058691db2dcb615a5379bb2;p=mailer.git diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php index e914caadfa..91f3988d91 100644 --- a/inc/mails/doubler_mails.php +++ b/inc/mails/doubler_mails.php @@ -39,15 +39,21 @@ if (!defined('__SECURITY')) { die(); } elseif (!isExtensionActive('doubler')) { + // Do not execute when extension is absent + return; +} elseif (!isHtmlOutputMode()) { + // Do not execute when script is in CSS mode return; } -// Do not execute when script is in CSS mode -if (!isHtmlOutputMode()) return; - // Initialize variables -$jackpotPoints = '0'; $userPoints = '0'; -if (isExtensionActive('jackpot')) $jackpotPoints = getJackpotPoints(); +$jackpotPoints = '0'; +$userPoints = '0'; + +// @TODO Can this be rewritten to a filter? +if (isExtensionActive('jackpot')) { + $jackpotPoints = getJackpotPoints(); +} // END - if // Get total points of the doubler itself $DOUBLER_POINTS = getDoublerTotalPointsLeft();