Completed
Push — master ( e95aee...22686e )
by Marcus
05:33 queued 02:38
created
src/Customer/Helper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         if (HelperConfig::$customer["validate_fax"] && (!isset($_POST["fax"]) || strlen(trim($_POST["fax"]))) < 6) $aErr["fax"] = true;
41 41
         if (HelperConfig::$customer["validate_country"] && (!isset($_POST["country"]) || !isset(HelperConfig::$countries["countries_".$sLang][$_POST["country"]]))) $aErr["country"] = true;
42 42
         if (!$bEdit && (!isset($_POST["tos"]) || $_POST["tos"] != 'y')) $aErr["tos"] = true;
43
-        if (!$bEdit && (!isset( $_POST["cancellationdisclaimer"] ) || $_POST["cancellationdisclaimer"] != 'y')) $aErr["cancellationdisclaimer"] = true;
43
+        if (!$bEdit && (!isset($_POST["cancellationdisclaimer"]) || $_POST["cancellationdisclaimer"] != 'y')) $aErr["cancellationdisclaimer"] = true;
44 44
 
45 45
         if (!$bEdit || (isset($_POST["pwd"]) && trim($_POST["pwd"]) != '')) {
46 46
             if (
Please login to merge, or discard this patch.
Braces   +53 added lines, -20 removed lines patch added patch discarded remove patch
@@ -29,18 +29,42 @@  discard block
 block discarded – undo
29 29
 {
30 30
     public static function validateCustomerForm($sLang, $aErr = [], $bEdit = false)
31 31
     {
32
-        if (!isset($_POST["email"]) || !\filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) $aErr["email"] = true;
33
-        if (HelperConfig::$customer["validate_corpname"] && (!isset($_POST["corpname"]) || strlen(trim($_POST["corpname"])) < 3)) $aErr["corpname"] = true;
34
-        if (HelperConfig::$customer["validate_name"] && (!isset($_POST["name"]) || strlen(trim($_POST["name"])) < 3)) $aErr["name"] = true;
35
-        if (HelperConfig::$customer["validate_street"] && (!isset($_POST["street"]) || strlen(trim($_POST["street"])) < 3)) $aErr["street"] = true;
36
-        if (HelperConfig::$customer["validate_zip"] && (!isset($_POST["zip"]) || strlen(trim($_POST["zip"])) < 4)) $aErr["zip"] = true;
37
-        if (HelperConfig::$customer["validate_town"] && (!isset($_POST["town"]) || strlen(trim($_POST["town"])) < 3)) $aErr["town"] = true;
38
-        if (HelperConfig::$customer["validate_phone"] && (!isset($_POST["phone"]) || strlen(trim($_POST["phone"])) < 6)) $aErr["phone"] = true;
39
-        if (HelperConfig::$customer["validate_cellphone"] && (!isset($_POST["cellphone"]) || strlen(trim($_POST["cellphone"])) < 11)) $aErr["cellphone"] = true;
40
-        if (HelperConfig::$customer["validate_fax"] && (!isset($_POST["fax"]) || strlen(trim($_POST["fax"]))) < 6) $aErr["fax"] = true;
41
-        if (HelperConfig::$customer["validate_country"] && (!isset($_POST["country"]) || !isset(HelperConfig::$countries["countries_".$sLang][$_POST["country"]]))) $aErr["country"] = true;
42
-        if (!$bEdit && (!isset($_POST["tos"]) || $_POST["tos"] != 'y')) $aErr["tos"] = true;
43
-        if (!$bEdit && (!isset( $_POST["cancellationdisclaimer"] ) || $_POST["cancellationdisclaimer"] != 'y')) $aErr["cancellationdisclaimer"] = true;
32
+        if (!isset($_POST["email"]) || !\filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {
33
+            $aErr["email"] = true;
34
+        }
35
+        if (HelperConfig::$customer["validate_corpname"] && (!isset($_POST["corpname"]) || strlen(trim($_POST["corpname"])) < 3)) {
36
+            $aErr["corpname"] = true;
37
+        }
38
+        if (HelperConfig::$customer["validate_name"] && (!isset($_POST["name"]) || strlen(trim($_POST["name"])) < 3)) {
39
+            $aErr["name"] = true;
40
+        }
41
+        if (HelperConfig::$customer["validate_street"] && (!isset($_POST["street"]) || strlen(trim($_POST["street"])) < 3)) {
42
+            $aErr["street"] = true;
43
+        }
44
+        if (HelperConfig::$customer["validate_zip"] && (!isset($_POST["zip"]) || strlen(trim($_POST["zip"])) < 4)) {
45
+            $aErr["zip"] = true;
46
+        }
47
+        if (HelperConfig::$customer["validate_town"] && (!isset($_POST["town"]) || strlen(trim($_POST["town"])) < 3)) {
48
+            $aErr["town"] = true;
49
+        }
50
+        if (HelperConfig::$customer["validate_phone"] && (!isset($_POST["phone"]) || strlen(trim($_POST["phone"])) < 6)) {
51
+            $aErr["phone"] = true;
52
+        }
53
+        if (HelperConfig::$customer["validate_cellphone"] && (!isset($_POST["cellphone"]) || strlen(trim($_POST["cellphone"])) < 11)) {
54
+            $aErr["cellphone"] = true;
55
+        }
56
+        if (HelperConfig::$customer["validate_fax"] && (!isset($_POST["fax"]) || strlen(trim($_POST["fax"]))) < 6) {
57
+            $aErr["fax"] = true;
58
+        }
59
+        if (HelperConfig::$customer["validate_country"] && (!isset($_POST["country"]) || !isset(HelperConfig::$countries["countries_".$sLang][$_POST["country"]]))) {
60
+            $aErr["country"] = true;
61
+        }
62
+        if (!$bEdit && (!isset($_POST["tos"]) || $_POST["tos"] != 'y')) {
63
+            $aErr["tos"] = true;
64
+        }
65
+        if (!$bEdit && (!isset( $_POST["cancellationdisclaimer"] ) || $_POST["cancellationdisclaimer"] != 'y')) {
66
+            $aErr["cancellationdisclaimer"] = true;
67
+        }
44 68
 
45 69
         if (!$bEdit || (isset($_POST["pwd"]) && trim($_POST["pwd"]) != '')) {
46 70
             if (
@@ -70,7 +94,9 @@  discard block
 block discarded – undo
70 94
 
71 95
     public static function getCustomerFormDefaultValue($sKeyConfig, $sKeyForm, $aUserData) {
72 96
         $sDefaultValue = self::getUserData($sKeyConfig, $aUserData);
73
-        if (!$sDefaultValue && isset($_SESSION["formsave_addrform"][$sKeyForm])) $sDefaultValue = $_SESSION["formsave_addrform"][$sKeyForm];
97
+        if (!$sDefaultValue && isset($_SESSION["formsave_addrform"][$sKeyForm])) {
98
+            $sDefaultValue = $_SESSION["formsave_addrform"][$sKeyForm];
99
+        }
74 100
 
75 101
         return $sDefaultValue;
76 102
     }
@@ -210,8 +236,7 @@  discard block
 block discarded – undo
210 236
             $aP['link'] .= $_SERVER["SERVER_NAME"].'/_misc/verifyemail.html?key='.$sEmailVerificationcode;
211 237
 
212 238
             $sMessage = $serviceManager->get('twig')->render('customer/sendverificationmail.twig', $aP);
213
-        }
214
-        else {
239
+        } else {
215 240
             $sSubject = HardcodedText::get('newcustomerregistration_mail_subject');
216 241
             $sMessage = HardcodedText::get('newcustomerregistration_mail_text1').' ';
217 242
             $sMessage .= $sTargetAddress.HardcodedText::get(
@@ -226,13 +251,21 @@  discard block
 block discarded – undo
226 251
     public static function getUserData($sField = '', $aUserdata = false)
227 252
     {
228 253
         if (!$aUserdata) {
229
-            if (!isset($_SESSION["user"]) || !is_array($_SESSION["user"])) return false;
230
-            elseif ($sField == '') return true;
254
+            if (!isset($_SESSION["user"]) || !is_array($_SESSION["user"])) {
255
+                return false;
256
+            } elseif ($sField == '') {
257
+                return true;
258
+            }
231 259
 
232
-            if ($sField != '' && isset($_SESSION["user"][$sField]) && $_SESSION["user"][$sField] != '') return $_SESSION["user"][$sField];
260
+            if ($sField != '' && isset($_SESSION["user"][$sField]) && $_SESSION["user"][$sField] != '') {
261
+                return $_SESSION["user"][$sField];
262
+            }
233 263
         } else {
234
-            if (isset($aUserdata[$sField])) return $aUserdata[$sField];
235
-            elseif ($sField = '') return false;
264
+            if (isset($aUserdata[$sField])) {
265
+                return $aUserdata[$sField];
266
+            } elseif ($sField = '') {
267
+                return false;
268
+            }
236 269
         }
237 270
     }
238 271
 }
Please login to merge, or discard this patch.
src/Controller/Customer/Register.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                     $iRows = $hResult->rowCount();
52 52
 
53 53
                     if ($iRows == 0) {
54
-                        $sEmailVerificationcode = md5($_POST["email"] . time());
54
+                        $sEmailVerificationcode = md5($_POST["email"].time());
55 55
                         $aData = [
56 56
                             'cust_email' => $sEmail,
57 57
                             'cust_corp' => filter_var(trim(Tools::getFormfield("corpname")),
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
                         $hResult = $this->serviceManager->get('db')->prepare($sql);
86 86
                         foreach ($aData as $sKey => $sValue) {
87
-                            $hResult->bindValue(':' . $sKey, $sValue, \PDO::PARAM_STR);
87
+                            $hResult->bindValue(':'.$sKey, $sValue, \PDO::PARAM_STR);
88 88
                         }
89 89
                         $hResult->execute();
90 90
 
Please login to merge, or discard this patch.
src/Controller/Customer/Login.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,19 +45,19 @@  discard block
 block discarded – undo
45 45
         } else {
46 46
             $mLogin = $this->getLogin();
47 47
             if (isset($mLogin["status"]) && $mLogin["status"] == 'success') {
48
-                $this->P->oPayload->cl_html = $textcats->T("login_success") . '<br>';
48
+                $this->P->oPayload->cl_html = $textcats->T("login_success").'<br>';
49 49
                 header('Location: /_misc/userhome.html?login=true');
50 50
                 die();
51 51
             } elseif (isset($mLogin["status"]) && $mLogin["status"] == 'tosnotaccepted') {
52
-                $this->P->oPayload->cl_html = $textcats->T("login_fail_tosnotaccepted") . '<br>';
52
+                $this->P->oPayload->cl_html = $textcats->T("login_fail_tosnotaccepted").'<br>';
53 53
                 $this->P->cb_customcontenttemplate = 'customer/login';
54 54
             } elseif (isset($mLogin["status"]) && $mLogin["status"] == 'emailnotverified') {
55
-                $this->P->oPayload->cl_html = $textcats->T("login_fail_emailnotverified") . '<br><br>';
55
+                $this->P->oPayload->cl_html = $textcats->T("login_fail_emailnotverified").'<br><br>';
56 56
                 $this->P->oPayload->cl_html .= '<a href="/_misc/resendverificationmail.html?email='
57
-                    . $mLogin["data"]['cust_email'] . '">' . $textcats->T("login_fail_emailnotverifiedresend") . '</a>';
57
+                    . $mLogin["data"]['cust_email'].'">'.$textcats->T("login_fail_emailnotverifiedresend").'</a>';
58 58
                 $this->P->cb_customcontenttemplate = 'customer/login';
59 59
             } elseif (isset($mLogin["status"]) && $mLogin["status"] == 'accountinactive') {
60
-                $this->P->oPayload->cl_html = $textcats->T("login_fail_accountinactive") . '<br>';
60
+                $this->P->oPayload->cl_html = $textcats->T("login_fail_accountinactive").'<br>';
61 61
                 $this->P->cb_customcontenttemplate = 'customer/login';
62 62
             } else {
63 63
                 $this->P->oPayload->cl_html = $textcats->T("login_fail");
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $hResult->execute();
102 102
 
103 103
         $iRows = $hResult->rowCount();
104
-        if($iRows == 1) {
104
+        if ($iRows == 1) {
105 105
             $aRow = $hResult->fetch();
106 106
 
107 107
             if (password_verify($_POST["password"], $aRow['cust_password'])) {
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
                 } elseif ($aRow['cust_tosaccepted'] == 'n') {
112 112
                     return ['status' => 'tosnotaccepted'];
113 113
                 } elseif ($aRow['cust_emailverified'] == 'n') {
114
-                    return ['status' => 'emailnotverified', 'data' => $aRow,];
114
+                    return ['status' => 'emailnotverified', 'data' => $aRow, ];
115 115
                 } elseif ($aRow['cust_active'] == 'n') {
116
-                    return ['status' => 'accountinactive',];
116
+                    return ['status' => 'accountinactive', ];
117 117
                 }
118 118
             }
119 119
         }
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,21 +76,31 @@
 block discarded – undo
76 76
     private function getLogin()
77 77
     {
78 78
         $bTryEmail = false;
79
-        if ('cust_no' != 'cust_email') $bTryEmail = true;
79
+        if ('cust_no' != 'cust_email') {
80
+            $bTryEmail = true;
81
+        }
80 82
 
81 83
         $sEmail = filter_var(trim(Tools::getFormfield("user")), FILTER_SANITIZE_EMAIL);
82 84
         $sUser = filter_var(trim(Tools::getFormfield("user")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
83 85
 
84 86
         $sql = 'SELECT cust_no, cust_email, cust_password, cust_active, cust_emailverified, cust_tosaccepted'
85 87
             . ' FROM customer WHERE ';
86
-        if ($bTryEmail) $sql .= "(";
88
+        if ($bTryEmail) {
89
+            $sql .= "(";
90
+        }
87 91
         $sql .= 'cust_no = :user';
88
-        if ($bTryEmail) $sql .= ' OR cust_email = :email) ';
92
+        if ($bTryEmail) {
93
+            $sql .= ' OR cust_email = :email) ';
94
+        }
89 95
         $sql .= " AND ";
90
-        if ($bTryEmail) $sql .= "(";
96
+        if ($bTryEmail) {
97
+            $sql .= "(";
98
+        }
91 99
         $sql .= 'cust_no != \'\'';
92 100
 
93
-        if ($bTryEmail) $sql .= ' OR cust_email != \'\')';
101
+        if ($bTryEmail) {
102
+            $sql .= ' OR cust_email != \'\')';
103
+        }
94 104
 
95 105
         /** @var \PDOStatement $hResult */
96 106
         $hResult = $this->serviceManager->get('db')->prepare($sql);
Please login to merge, or discard this patch.
src/Controller/Customer/Verifyemail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
                 /** @var \PDOStatement $hResult */
76 76
                 $hResult = $this->db->prepare($sql);
77 77
                 foreach ($aData as $sKey => $sValue) {
78
-                    $hResult->bindValue(':' . $sKey, $sValue);
78
+                    $hResult->bindValue(':'.$sKey, $sValue);
79 79
                 }
80 80
                 $hResult->execute();
81 81
                 $this->P->oPayload->cl_html = $this->textcats->T("register_emailverificationsuccess");
Please login to merge, or discard this patch.
src/Controller/Customer/Resendverificationmail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         if (CHelper::getUserData()) {
33 33
             $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T("denied_default");
34 34
         } else {
35
-            $sql = 'SELECT ' . DB_ADDRESSFIELDS . ', cust_emailverificationcode FROM customer';
35
+            $sql = 'SELECT '.DB_ADDRESSFIELDS.', cust_emailverificationcode FROM customer';
36 36
             $sql .= ' WHERE cust_email = :email AND cust_emailverified = \'n\'';
37 37
 
38 38
             /** @var \PDOStatement $hResult */
Please login to merge, or discard this patch.
src/Controller/Customer/Forgotpassword.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,9 @@
 block discarded – undo
105 105
                     ];
106 106
                     $sql = \HaaseIT\Toolbox\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id');
107 107
                     $hResult = $this->db->prepare($sql);
108
-                    foreach ($aData as $sKey => $sValue) $hResult->bindValue(':'.$sKey, $sValue);
108
+                    foreach ($aData as $sKey => $sValue) {
109
+                        $hResult->bindValue(':'.$sKey, $sValue);
110
+                    }
109 111
                     $hResult->execute();
110 112
 
111 113
                     $sTargetAddress = $aResult['cust_email'];
Please login to merge, or discard this patch.
src/Controller/Customer/Userhome.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                     $hResult->bindValue(':email', $sEmail, \PDO::PARAM_STR);
83 83
                     $hResult->execute();
84 84
                     $iRows = $hResult->rowCount();
85
-                    if ($iRows == 1) $sErr .= $this->textcats->T("userprofile_emailalreadyinuse") . '<br>';
85
+                    if ($iRows == 1) $sErr .= $this->textcats->T("userprofile_emailalreadyinuse").'<br>';
86 86
                     $sErr = CHelper::validateCustomerForm(HelperConfig::$lang, $sErr, true);
87 87
 
88 88
                     if ($sErr == '') {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                             $sql = \HaaseIT\Toolbox\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id');
111 111
                             $hResult = $this->db->prepare($sql);
112 112
                             foreach ($aData as $sKey => $sValue) {
113
-                                $hResult->bindValue(':' . $sKey, $sValue);
113
+                                $hResult->bindValue(':'.$sKey, $sValue);
114 114
                             }
115 115
                             $hResult->execute();
116 116
                             $aPData["infochangessaved"] = true;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,9 @@
 block discarded – undo
82 82
                     $hResult->bindValue(':email', $sEmail, \PDO::PARAM_STR);
83 83
                     $hResult->execute();
84 84
                     $iRows = $hResult->rowCount();
85
-                    if ($iRows == 1) $sErr .= $this->textcats->T("userprofile_emailalreadyinuse") . '<br>';
85
+                    if ($iRows == 1) {
86
+                        $sErr .= $this->textcats->T("userprofile_emailalreadyinuse") . '<br>';
87
+                    }
86 88
                     $sErr = CHelper::validateCustomerForm(HelperConfig::$lang, $sErr, true);
87 89
 
88 90
                     if ($sErr == '') {
Please login to merge, or discard this patch.
src/Controller/Customer/Resetpassword.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,8 +108,12 @@  discard block
 block discarded – undo
108 108
             if (
109 109
                 strlen($_POST["pwd"]) < HelperConfig::$customer["minimum_length_password"]
110 110
                 || strlen($_POST["pwd"]) > HelperConfig::$customer["maximum_length_password"]
111
-            ) $aErr[] = 'pwlength';
112
-            if ($_POST["pwd"] != $_POST["pwdc"]) $aErr[] = 'pwmatch';
111
+            ) {
112
+                $aErr[] = 'pwlength';
113
+            }
114
+            if ($_POST["pwd"] != $_POST["pwdc"]) {
115
+                $aErr[] = 'pwmatch';
116
+            }
113 117
             if (count($aErr) == 0) {
114 118
                 $sEnc = password_hash($_POST["pwd"], PASSWORD_DEFAULT);
115 119
                 $aData = [
@@ -119,7 +123,9 @@  discard block
 block discarded – undo
119 123
                 ];
120 124
                 $sql = \HaaseIT\Toolbox\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id');
121 125
                 $hResult = $this->db->prepare($sql);
122
-                foreach ($aData as $sKey => $sValue) $hResult->bindValue(':'.$sKey, $sValue);
126
+                foreach ($aData as $sKey => $sValue) {
127
+                    $hResult->bindValue(':'.$sKey, $sValue);
128
+                }
123 129
                 $hResult->execute();
124 130
             }
125 131
         } else {
Please login to merge, or discard this patch.
src/Controller/Shop/Paypalnotify.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $sLogData = '';
57 57
 
58 58
         $iId = \filter_input(INPUT_POST, 'custom', FILTER_SANITIZE_NUMBER_INT);
59
-        $sql = 'SELECT * FROM orders WHERE o_id = ' . $iId . ' AND o_paymentmethod' . " = 'paypal' AND o_paymentcompleted = 'n'";
59
+        $sql = 'SELECT * FROM orders WHERE o_id = '.$iId.' AND o_paymentmethod'." = 'paypal' AND o_paymentcompleted = 'n'";
60 60
 
61 61
         $hResult = $this->db->query($sql);
62 62
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $postdata = '';
68 68
 
69 69
             foreach ($_POST as $i => $v) {
70
-                $postdata .= $i . '=' . urlencode($v) . '&';
70
+                $postdata .= $i.'='.urlencode($v).'&';
71 71
             }
72 72
             $postdata .= 'cmd=_notify-validate';
73 73
             $web = parse_url(HelperConfig::$shop["paypal"]["url"]);
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
                 $web['port'] = 80;
80 80
                 $ssl = '';
81 81
             }
82
-            $fp = @fsockopen($ssl . $web['host'], $web['port'], $errnum, $errstr, 30);
82
+            $fp = @fsockopen($ssl.$web['host'], $web['port'], $errnum, $errstr, 30);
83 83
 
84 84
             if ($fp) {
85
-                fputs($fp, "POST " . $web['path'] . " HTTP/1.1\r\n");
86
-                fputs($fp, "Host: " . $web['host'] . "\r\n");
85
+                fputs($fp, "POST ".$web['path']." HTTP/1.1\r\n");
86
+                fputs($fp, "Host: ".$web['host']."\r\n");
87 87
                 fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
88
-                fputs($fp, "Content-length: " . strlen($postdata) . "\r\n");
88
+                fputs($fp, "Content-length: ".strlen($postdata)."\r\n");
89 89
                 fputs($fp, "Connection: close\r\n\r\n");
90
-                fputs($fp, $postdata . "\r\n\r\n");
90
+                fputs($fp, $postdata."\r\n\r\n");
91 91
 
92 92
                 $info = [];
93 93
                 while (!feof($fp)) {
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
                 $info = implode(',', $info);
98 98
                 if (!(strpos($info, 'VERIFIED') === false)) {
99 99
 
100
-                    $sLogData .= "-- new entry - " . date(HelperConfig::$core['locale_format_date_time']) . " --\n\n";
100
+                    $sLogData .= "-- new entry - ".date(HelperConfig::$core['locale_format_date_time'])." --\n\n";
101 101
                     $sLogData .= "W00T!\n\n";
102
-                    $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true) . "\n\n";
102
+                    $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true)."\n\n";
103 103
 
104 104
                     // Check if the transaction id has been used before
105 105
                     $sTxn_idQ = 'SELECT o_paypal_tx FROM orders WHERE o_paypal_tx = :txn_id';
@@ -123,31 +123,31 @@  discard block
 block discarded – undo
123 123
                             $sql = \HaaseIT\Toolbox\DBTools::buildPSUpdateQuery($aTxnUpdateData, 'orders', 'o_id');
124 124
                             $hResult = $this->db->prepare($sql);
125 125
                             foreach ($aTxnUpdateData as $sKey => $sValue) {
126
-                                $hResult->bindValue(':' . $sKey, $sValue);
126
+                                $hResult->bindValue(':'.$sKey, $sValue);
127 127
                             }
128 128
                             $hResult->execute();
129 129
 
130
-                            $sLogData .= "-- Alles ok. Zahlung erfolgreich. TXNID: " . $_REQUEST["txn_id"] . " --\n\n";
130
+                            $sLogData .= "-- Alles ok. Zahlung erfolgreich. TXNID: ".$_REQUEST["txn_id"]." --\n\n";
131 131
                         } else {
132 132
                             $sLogData .= "-- In my country we have problem; Problem is evaluation. Throw the data down the log!\n";
133
-                            $sLogData .= "mc_gross: " . $_REQUEST["mc_gross"] . ' - number_format($fGesamtbrutto, 2, \'.\', \'\'): ' . number_format($fGesamtbrutto,
134
-                                    2, '.', '') . "\n";
135
-                            $sLogData .= "custom: " . $_REQUEST["custom"] . ' - $aOrder[\'o_id\']: ' . $aOrder['o_id'] . "\n";
136
-                            $sLogData .= "payment_status: " . $_REQUEST["payment_status"] . "\n";
137
-                            $sLogData .= "mc_currency: " . $_REQUEST["mc_currency"] . ' - HelperConfig::$shop["paypal"]["currency_id"]: ' . HelperConfig::$shop["paypal"]["currency_id"] . "\n";
138
-                            $sLogData .= "business: " . $_REQUEST["receiver_email"] . ' - HelperConfig::$shop["paypal"]["business"]: ' . HelperConfig::$shop["paypal"]["business"] . "\n\n";
133
+                            $sLogData .= "mc_gross: ".$_REQUEST["mc_gross"].' - number_format($fGesamtbrutto, 2, \'.\', \'\'): '.number_format($fGesamtbrutto,
134
+                                    2, '.', '')."\n";
135
+                            $sLogData .= "custom: ".$_REQUEST["custom"].' - $aOrder[\'o_id\']: '.$aOrder['o_id']."\n";
136
+                            $sLogData .= "payment_status: ".$_REQUEST["payment_status"]."\n";
137
+                            $sLogData .= "mc_currency: ".$_REQUEST["mc_currency"].' - HelperConfig::$shop["paypal"]["currency_id"]: '.HelperConfig::$shop["paypal"]["currency_id"]."\n";
138
+                            $sLogData .= "business: ".$_REQUEST["receiver_email"].' - HelperConfig::$shop["paypal"]["business"]: '.HelperConfig::$shop["paypal"]["business"]."\n\n";
139 139
                         }
140 140
                     } else {
141 141
                         // INVALID LOGGING ERROR
142
-                        $sLogData .= "-- new entry - " . date(HelperConfig::$core['locale_format_date_time']) . " --\n\nPHAIL\n\n";
143
-                        $sLogData .= "!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: " . $_REQUEST["txn_id"] . " !!!\n\n";
142
+                        $sLogData .= "-- new entry - ".date(HelperConfig::$core['locale_format_date_time'])." --\n\nPHAIL\n\n";
143
+                        $sLogData .= "!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: ".$_REQUEST["txn_id"]." !!!\n\n";
144 144
                         $sLogData .= "!!! INVALID !!!\n\n";
145 145
                     }
146 146
                 } else {
147
-                    $sLogData .= "-- new entry - " . date(HelperConfig::$core['locale_format_date_time']) . " --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: " . $_REQUEST["txn_id"] . "\n" . $info . "\n\n";
147
+                    $sLogData .= "-- new entry - ".date(HelperConfig::$core['locale_format_date_time'])." --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: ".$_REQUEST["txn_id"]."\n".$info."\n\n";
148 148
                 }
149 149
 
150
-                $fp = fopen(PATH_LOGS . FILE_PAYPALLOG, 'a');
150
+                $fp = fopen(PATH_LOGS.FILE_PAYPALLOG, 'a');
151 151
                 // Write $somecontent to our opened file.
152 152
                 fwrite($fp, $sLogData);
153 153
                 fclose($fp);
Please login to merge, or discard this patch.