Huge rewrite of default parameters, ext-network continued:
[mailer.git] / mailid_top.php
index 080fc732011db534bf73e15de08824a46ce6848b..b31eedf9348888cc34506db1e6e65d2680ca5e89 100644 (file)
@@ -59,10 +59,10 @@ redirectOnUninstalledExtension('mailid');
 redirectOnUninstalledExtension('other');
 
 // Init variables
-$url_userid = 0;
-$url_bid = 0;
-$url_mid = 0;
-$code = 0;
+$url_userid = '0';
+$url_bid = '0';
+$url_mid = '0';
+$code = '0';
 $mode = '';
 
 // Secure all data
@@ -73,7 +73,7 @@ if (isGetRequestElementSet('code'))    $code       = bigintval(getRequestElement
 if (isGetRequestElementSet('mode'))    $mode       = getRequestElement('mode');
 
 // 01           1        12            2    2            21    1                   22     10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
        // No image? Then output header
        if ($mode != 'img') loadIncludeOnce('inc/header.php');
 
@@ -125,7 +125,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                        SQL_FREERESULT($result_mailid);
 
                        // Set sender to 0 when we have a bonus mail
-                       if ($ltype == 'BONUS') $sender = 0;
+                       if ($ltype == 'BONUS') $sender = '0';
 
                        // Is the user id valid?
                        if (fetchUserData($url_userid) === true) {
@@ -171,9 +171,9 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
 
                                        // Is this entry valid?
                                        if ($isValid === true) {
-                                               if (($time == 0) && ($payment > 0)) $time = 1;
+                                               if (($time == '0') && ($payment > 0)) $time = 1;
                                                if (($time > 0) && ($payment > 0)) {
-                                                       $img_code = 0;
+                                                       $img_code = '0';
                                                        if (!empty($code)) {
                                                                // Generate code
                                                                $img_code = generateRandomCode(getConfig('code_length'), $code, $url_userid, $urlId);
@@ -183,7 +183,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                        switch ($mode) {
                                                                case 'add':
                                                                        // Init stats data
-                                                                       $stats_data = 0;
+                                                                       $stats_data = '0';
 
                                                                        // Count clicks
                                                                        // @TODO Rewrite this to a filter