Old config.php is now automatically updated to new config-local.php format, several...
[mailer.git] / inc / mails / beg_mails.php
index fee209debf188c05173fa2b883eaf4579acba22c..9a9872f746ee695a9967574d7f67cd0016b6ef98 100644 (file)
@@ -55,33 +55,33 @@ $sql = ''; $mode = '';
 $sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify ";
 switch (getConfig('beg_rallye'))
 {
-case 'Y': // Begging rallye is activated
-       if (getConfig('beg_ral_en_notify') == 'Y')
-       {
-               // Okay, let's check for member accounts
-               $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
-               $mode = "en";
-       }
+       case 'Y': // Begging rallye is activated
+               if (getConfig('beg_ral_en_notify') == 'Y')
+               {
+                       // Okay, let's check for member accounts
+                       $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
+                       $mode = "en";
+               }
         else
-       {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
-
-case 'N': // Begging rallye is deactivated
-       if (getConfig('beg_ral_di_notify') == 'Y')
-       {
-               // Okay, let's check for member accounts
-               $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
-               $mode = "di";
-       }
+        {
+               // Do not notify!
+               $sql = '';
+        }
+        break;
+
+       case 'N': // Begging rallye is deactivated
+               if (getConfig('beg_ral_di_notify') == 'Y')
+               {
+                       // Okay, let's check for member accounts
+                       $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
+                       $mode = "di";
+               }
         else
-       {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
+        {
+               // Do not notify!
+               $sql = '';
+        }
+        break;
 }
 
 if (!empty($sql)) {
@@ -97,7 +97,7 @@ if (!empty($sql)) {
                // No IP locking setuped!
                define('__BEG_IP_LOCKER', getMessage('BEG_NO_LIMITATION'));
        }
-        else
+       else
        {
                // Create timemark
                define('__BEG_IP_LOCKER', createFancyTime(getConfig('beg_ip_timeout')));
@@ -123,7 +123,7 @@ if (!empty($sql)) {
 SET beg_ral_notify='%s', beg_ral_%s_notify='%s'
 WHERE userid=%s
 LIMIT 1",
-                               array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+                       array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($sentBonusMails === true) {