@@ -449,12 +449,12 @@ |
||
449 | 449 | } |
450 | 450 | // because array_rand will change numerical (string) values to integer, we have to do this awkward dance |
451 | 451 | foreach ($keysAddSuggsTMP as $key => $item) { |
452 | - $keysAddSuggs[] = (string)$item; |
|
452 | + $keysAddSuggs[] = (string) $item; |
|
453 | 453 | } |
454 | 454 | |
455 | 455 | // iterate suggestions and remove those that which will not be kept |
456 | 456 | foreach ($suggestions['additional'] as $addSuggsKey => $addSuggsVal) { |
457 | - if (!in_array((string)$addSuggsKey, $keysAddSuggs, true)) { |
|
457 | + if (!in_array((string) $addSuggsKey, $keysAddSuggs, true)) { |
|
458 | 458 | unset($suggestions['additional'][$addSuggsKey]); |
459 | 459 | } |
460 | 460 | } |
@@ -103,8 +103,8 @@ |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * @param string|array $mItemIndex |
|
107 | - * @param string|array $mItemno |
|
106 | + * @param string $mItemIndex |
|
107 | + * @param string $mItemno |
|
108 | 108 | * @return string |
109 | 109 | */ |
110 | 110 | public function queryItemWhereClause($mItemIndex = '', $mItemno = '') |
@@ -207,9 +207,9 @@ |
||
207 | 207 | public function getGroupdata($sGroup) |
208 | 208 | { |
209 | 209 | $sql = 'SELECT '.DB_ITEMGROUPFIELDS.' FROM itemgroups_base' |
210 | - .' LEFT OUTER JOIN itemgroups_text ON itemgroups_base.itmg_id = itemgroups_text.itmgt_pid' |
|
211 | - .' AND itmgt_lang = :lang' |
|
212 | - .' WHERE itmg_id = :group'; |
|
210 | + .' LEFT OUTER JOIN itemgroups_text ON itemgroups_base.itmg_id = itemgroups_text.itmgt_pid' |
|
211 | + .' AND itmgt_lang = :lang' |
|
212 | + .' WHERE itmg_id = :group'; |
|
213 | 213 | |
214 | 214 | $hResult = $this->db->prepare($sql); |
215 | 215 | $hResult->bindValue(':lang', $this->config->getLang(), \PDO::PARAM_STR); |
@@ -182,12 +182,12 @@ discard block |
||
182 | 182 | if (!$bEnableItemGroups || \trim($aRow['itm_group']) == 0) { |
183 | 183 | $aAssembly['item'][$aRow['itm_no']] = $aRow; |
184 | 184 | } else { |
185 | - if (isset($aAssembly['groups']['ITEMGROUP-' .$aRow['itm_group']])) { |
|
186 | - $aAssembly['groups']['ITEMGROUP-' .$aRow['itm_group']][$aRow['itm_no']] = $aRow; |
|
185 | + if (isset($aAssembly['groups']['ITEMGROUP-'.$aRow['itm_group']])) { |
|
186 | + $aAssembly['groups']['ITEMGROUP-'.$aRow['itm_group']][$aRow['itm_no']] = $aRow; |
|
187 | 187 | } else { |
188 | - $aAssembly['item']['ITEMGROUP-' .$aRow['itm_group']]['group'] = 'ITEMGROUP-' .$aRow['itm_group']; |
|
189 | - $aAssembly['groups']['ITEMGROUP-' .$aRow['itm_group']]['ITEMGROUP-DATA'] = $this->getGroupdata($aRow['itm_group']); |
|
190 | - $aAssembly['groups']['ITEMGROUP-' .$aRow['itm_group']][$aRow['itm_no']] = $aRow; |
|
188 | + $aAssembly['item']['ITEMGROUP-'.$aRow['itm_group']]['group'] = 'ITEMGROUP-'.$aRow['itm_group']; |
|
189 | + $aAssembly['groups']['ITEMGROUP-'.$aRow['itm_group']]['ITEMGROUP-DATA'] = $this->getGroupdata($aRow['itm_group']); |
|
190 | + $aAssembly['groups']['ITEMGROUP-'.$aRow['itm_group']][$aRow['itm_no']] = $aRow; |
|
191 | 191 | } |
192 | 192 | } |
193 | 193 | } |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $aData['itm_vatid'] = 'full'; |
229 | 229 | } |
230 | 230 | |
231 | - if(is_numeric($aData['itm_price']) && (float) $aData['itm_price'] > 0) { |
|
231 | + if (is_numeric($aData['itm_price']) && (float) $aData['itm_price'] > 0) { |
|
232 | 232 | $aPrice['netto_list'] = $aData['itm_price']; |
233 | 233 | $aPrice['brutto_list'] = $this->addVat($aPrice['netto_list'], $this->config->getShop('vat')[$aData['itm_vatid']]); |
234 | 234 | if ( |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | bcdiv( |
251 | 251 | bcsub( |
252 | 252 | '100', |
253 | - (string)$this->config->getShop('rebate_groups')[$aData['itm_rg']][$this->helperCustomer->getUserData('cust_group')] |
|
253 | + (string) $this->config->getShop('rebate_groups')[$aData['itm_rg']][$this->helperCustomer->getUserData('cust_group')] |
|
254 | 254 | ), |
255 | 255 | '100' |
256 | 256 | ) |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | bcdiv( |
283 | 283 | bcmul( |
284 | 284 | $price, |
285 | - (string)$vat |
|
285 | + (string) $vat |
|
286 | 286 | ), |
287 | 287 | '100' |
288 | 288 | ), |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | $this->P->cb_subnav = 'admin'; |
63 | 63 | |
64 | 64 | $CUA = [ |
65 | - ['title' => $this->hardcodedtextcats->get('customeradmin_list_no'), 'key' => 'cust_no', 'width' => '16%', 'linked' => false,'stylehead' => 'text-align: left;',], |
|
66 | - ['title' => $this->hardcodedtextcats->get('customeradmin_list_company'), 'key' => 'cust_corp', 'width' => '16%', 'linked' => false,'stylehead' => 'text-align: left;',], |
|
67 | - ['title' => $this->hardcodedtextcats->get('customeradmin_list_name'), 'key' => 'cust_name', 'width' => '16%', 'linked' => false,'stylehead' => 'text-align: left;',], |
|
68 | - ['title' => $this->hardcodedtextcats->get('customeradmin_list_town'), 'key' => 'cust_town', 'width' => '16%', 'linked' => false,'stylehead' => 'text-align: left;',], |
|
69 | - ['title' => $this->hardcodedtextcats->get('customeradmin_list_active'), 'key' => 'cust_active', 'width' => '16%', 'linked' => false,'stylehead' => 'text-align: left;',], |
|
65 | + ['title' => $this->hardcodedtextcats->get('customeradmin_list_no'), 'key' => 'cust_no', 'width' => '16%', 'linked' => false, 'stylehead' => 'text-align: left;', ], |
|
66 | + ['title' => $this->hardcodedtextcats->get('customeradmin_list_company'), 'key' => 'cust_corp', 'width' => '16%', 'linked' => false, 'stylehead' => 'text-align: left;', ], |
|
67 | + ['title' => $this->hardcodedtextcats->get('customeradmin_list_name'), 'key' => 'cust_name', 'width' => '16%', 'linked' => false, 'stylehead' => 'text-align: left;', ], |
|
68 | + ['title' => $this->hardcodedtextcats->get('customeradmin_list_town'), 'key' => 'cust_town', 'width' => '16%', 'linked' => false, 'stylehead' => 'text-align: left;', ], |
|
69 | + ['title' => $this->hardcodedtextcats->get('customeradmin_list_active'), 'key' => 'cust_active', 'width' => '16%', 'linked' => false, 'stylehead' => 'text-align: left;', ], |
|
70 | 70 | [ |
71 | 71 | 'title' => $this->hardcodedtextcats->get('customeradmin_list_edit'), |
72 | 72 | 'key' => 'cust_id', |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | 'linked' => true, |
75 | 75 | 'ltarget' => '/_admin/customeradmin.html', |
76 | 76 | 'lkeyname' => 'id', |
77 | - 'lgetvars' => ['action' => 'edit',], |
|
77 | + 'lgetvars' => ['action' => 'edit', ], |
|
78 | 78 | ], |
79 | 79 | ]; |
80 | 80 | $aPData = $this->handleCustomerAdmin($CUA, $this->serviceManager->get('twig')); |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | $CSA = [ |
107 | 107 | 'list_orders' => [ |
108 | 108 | ['title' => '', 'key' => 'o_id', 'width' => 30, 'linked' => false, 'callback' => 'shopadminMakeCheckbox'], |
109 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_orderid'), 'key' => 'o_id', 'width' => 30, 'linked' => false,], |
|
110 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_customer'), 'key' => 'o_cust', 'width' => 280, 'linked' => false,], |
|
111 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_sumnettoall'), 'key' => 'o_sumnettoall', 'width' => 75, 'linked' => false,], |
|
112 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_orderstatus'), 'key' => 'o_order_status', 'width' => 80, 'linked' => false,], |
|
113 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_ordertimenumber'), 'key' => 'o_ordertime_number', 'width' => 100, 'linked' => false,], |
|
114 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_hostpayment'), 'key' => 'o_order_host_payment', 'width' => 140, 'linked' => false,], |
|
109 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_orderid'), 'key' => 'o_id', 'width' => 30, 'linked' => false, ], |
|
110 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_customer'), 'key' => 'o_cust', 'width' => 280, 'linked' => false, ], |
|
111 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_sumnettoall'), 'key' => 'o_sumnettoall', 'width' => 75, 'linked' => false, ], |
|
112 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_orderstatus'), 'key' => 'o_order_status', 'width' => 80, 'linked' => false, ], |
|
113 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_ordertimenumber'), 'key' => 'o_ordertime_number', 'width' => 100, 'linked' => false, ], |
|
114 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_hostpayment'), 'key' => 'o_order_host_payment', 'width' => 140, 'linked' => false, ], |
|
115 | 115 | [ |
116 | 116 | 'title' => $this->hardcodedtextcats->get('shopadmin_list_edit'), |
117 | 117 | 'key' => 'o_id', |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | ], |
126 | 126 | ], |
127 | 127 | 'list_orderitems' => [ |
128 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemno'), 'key' => 'oi_itemno', 'width' => 95, 'linked' => false,], |
|
129 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemname'), 'key' => 'oi_itemname', 'width' => 350, 'linked' => false,], |
|
130 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemamount'), 'key' => 'oi_amount', 'width' => 50, 'linked' => false, 'style-data' => 'text-align: center;',], |
|
131 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemnetto'), 'key' => 'oi_price_netto', 'width' => 70, 'linked' => false,], |
|
132 | - ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemsumnetto'), 'key' => 'ges_netto', 'width' => 75, 'linked' => false,], |
|
128 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemno'), 'key' => 'oi_itemno', 'width' => 95, 'linked' => false, ], |
|
129 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemname'), 'key' => 'oi_itemname', 'width' => 350, 'linked' => false, ], |
|
130 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemamount'), 'key' => 'oi_amount', 'width' => 50, 'linked' => false, 'style-data' => 'text-align: center;', ], |
|
131 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemnetto'), 'key' => 'oi_price_netto', 'width' => 70, 'linked' => false, ], |
|
132 | + ['title' => $this->hardcodedtextcats->get('shopadmin_list_itemsumnetto'), 'key' => 'ges_netto', 'width' => 75, 'linked' => false, ], |
|
133 | 133 | ], |
134 | 134 | ]; |
135 | 135 | |
@@ -249,8 +249,8 @@ discard block |
||
249 | 249 | } else { |
250 | 250 | $sZahlungsmethode = '<span style="color: red;">'; |
251 | 251 | } |
252 | - $mZahlungsmethode = $this->serviceManager->get('textcats')->T('order_paymentmethod_' .$aRow['o_paymentmethod'], true); |
|
253 | - if ($mZahlungsmethode ) { |
|
252 | + $mZahlungsmethode = $this->serviceManager->get('textcats')->T('order_paymentmethod_'.$aRow['o_paymentmethod'], true); |
|
253 | + if ($mZahlungsmethode) { |
|
254 | 254 | $sZahlungsmethode .= $mZahlungsmethode; |
255 | 255 | } else { |
256 | 256 | $sZahlungsmethode .= ucwords($aRow['o_paymentmethod']); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | ]; |
295 | 295 | if (!($bIgnoreStorno && $aRow['o_ordercompleted'] === 's')) { |
296 | 296 | $fGesamtnetto += $aRow['o_sumnettoall']; |
297 | - $j ++; |
|
297 | + $j++; |
|
298 | 298 | } else { |
299 | 299 | $k++; |
300 | 300 | } |
@@ -246,10 +246,10 @@ discard block |
||
246 | 246 | private function prepareItemlist($aItemlist) |
247 | 247 | { |
248 | 248 | $aList = [ |
249 | - ['title' => $this->hardcodedtextcats->get('itemadmin_list_active'), 'key' => 'itemindex', 'width' => 30, 'linked' => false, 'callback' => 'renderItemStatusIcon',], |
|
250 | - ['title' => $this->hardcodedtextcats->get('itemadmin_list_itemno'), 'key' => 'itemno', 'width' => 100, 'linked' => false,], |
|
251 | - ['title' => $this->hardcodedtextcats->get('itemadmin_list_name'), 'key' => 'name', 'width' => 350, 'linked' => false,], |
|
252 | - ['title' => $this->hardcodedtextcats->get('itemadmin_list_edit'), 'key' => 'itemno', 'width' => 30, 'linked' => true, 'ltarget' => '/_admin/itemadmin.html', 'lkeyname' => 'itemno', 'lgetvars' => ['action' => 'showitem'],], |
|
249 | + ['title' => $this->hardcodedtextcats->get('itemadmin_list_active'), 'key' => 'itemindex', 'width' => 30, 'linked' => false, 'callback' => 'renderItemStatusIcon', ], |
|
250 | + ['title' => $this->hardcodedtextcats->get('itemadmin_list_itemno'), 'key' => 'itemno', 'width' => 100, 'linked' => false, ], |
|
251 | + ['title' => $this->hardcodedtextcats->get('itemadmin_list_name'), 'key' => 'name', 'width' => 350, 'linked' => false, ], |
|
252 | + ['title' => $this->hardcodedtextcats->get('itemadmin_list_edit'), 'key' => 'itemno', 'width' => 30, 'linked' => true, 'ltarget' => '/_admin/itemadmin.html', 'lkeyname' => 'itemno', 'lgetvars' => ['action' => 'showitem'], ], |
|
253 | 253 | ]; |
254 | 254 | $aData = []; |
255 | 255 | foreach ($aItemlist['data'] as $aValue) { |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | private function prepareItem($aItemdata) |
315 | 315 | { |
316 | 316 | $aData = [ |
317 | - 'form' => ['action' => Tools::makeLinkHRefWithAddedGetVars('/_admin/itemadmin.html', ['action' => 'showitem', 'itemno' => $aItemdata['base']['itm_no']]),], |
|
317 | + 'form' => ['action' => Tools::makeLinkHRefWithAddedGetVars('/_admin/itemadmin.html', ['action' => 'showitem', 'itemno' => $aItemdata['base']['itm_no']]), ], |
|
318 | 318 | 'id' => $aItemdata['base']['itm_id'], |
319 | 319 | 'itemno' => $aItemdata['base']['itm_no'], |
320 | 320 | 'name' => $aItemdata['base']['itm_name'], |
@@ -21,7 +21,6 @@ |
||
21 | 21 | namespace HaaseIT\HCSF\Controller\Admin\Shop; |
22 | 22 | |
23 | 23 | |
24 | -use HaaseIT\HCSF\HelperConfig; |
|
25 | 24 | use HaaseIT\Toolbox\Tools; |
26 | 25 | use Zend\ServiceManager\ServiceManager; |
27 | 26 |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | $aData = $this->textcats->getCompleteTextcatForCurrentLang(); |
59 | 59 | |
60 | 60 | $aListSetting = [ |
61 | - ['title' => $this->hardcodedtextcats->get('textcatadmin_list_title_key'), 'key' => 'tc_key', 'width' => '20%', 'linked' => false,], |
|
62 | - ['title' => $this->hardcodedtextcats->get('textcatadmin_list_title_text'), 'key' => 'tcl_text', 'width' => '80%', 'linked' => false, 'escapehtmlspecialchars' => true,], |
|
61 | + ['title' => $this->hardcodedtextcats->get('textcatadmin_list_title_key'), 'key' => 'tc_key', 'width' => '20%', 'linked' => false, ], |
|
62 | + ['title' => $this->hardcodedtextcats->get('textcatadmin_list_title_text'), 'key' => 'tcl_text', 'width' => '80%', 'linked' => false, 'escapehtmlspecialchars' => true, ], |
|
63 | 63 | [ |
64 | 64 | 'title' => $this->hardcodedtextcats->get('textcatadmin_list_title_edit'), |
65 | 65 | 'key' => 'tc_id', |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | |
125 | 125 | if ($iArchivedRows > 0) { |
126 | 126 | $aListSetting = [ |
127 | - ['title' => 'tcla_timestamp', 'key' => 'tcla_timestamp', 'width' => '15%', 'linked' => false,], |
|
128 | - ['title' => 'tcl_text', 'key' => 'tcl_text', 'width' => '85%', 'linked' => false, 'escapehtmlspecialchars' => true,], |
|
127 | + ['title' => 'tcla_timestamp', 'key' => 'tcla_timestamp', 'width' => '15%', 'linked' => false, ], |
|
128 | + ['title' => 'tcl_text', 'key' => 'tcl_text', 'width' => '85%', 'linked' => false, 'escapehtmlspecialchars' => true, ], |
|
129 | 129 | ]; |
130 | 130 | $aData = $statement->fetchAll(); |
131 | 131 | $this->P->cb_customdata['archived_list'] = Tools::makeListtable($aListSetting, |
@@ -158,7 +158,7 @@ |
||
158 | 158 | /** |
159 | 159 | * @param string $sKeyConfig |
160 | 160 | * @param string $sKeyForm |
161 | - * @param array|bool $aUserData |
|
161 | + * @param boolean $aUserData |
|
162 | 162 | * @return bool |
163 | 163 | */ |
164 | 164 | public function getCustomerFormDefaultValue($sKeyConfig, $sKeyForm, $aUserData) { |
@@ -118,7 +118,7 @@ |
||
118 | 118 | $aErr['fax'] = true; |
119 | 119 | } |
120 | 120 | $postcountry = filter_input(INPUT_POST, 'country', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); |
121 | - if ($this->customer['validate_country'] && (empty($postcountry) || !isset($this->countries['countries_' .$sLang][$postcountry]))) { |
|
121 | + if ($this->customer['validate_country'] && (empty($postcountry) || !isset($this->countries['countries_'.$sLang][$postcountry]))) { |
|
122 | 122 | $aErr['country'] = true; |
123 | 123 | } |
124 | 124 | $posttos = filter_input(INPUT_POST, 'tos'); |
@@ -65,25 +65,25 @@ discard block |
||
65 | 65 | $this->setupRequest(); |
66 | 66 | } |
67 | 67 | |
68 | - $this->serviceManager->setFactory('config', function () { |
|
68 | + $this->serviceManager->setFactory('config', function() { |
|
69 | 69 | return new HelperConfig(); |
70 | 70 | }); |
71 | 71 | $this->config = $this->serviceManager->get('config'); |
72 | 72 | |
73 | - $this->serviceManager->setFactory('helper', function (ServiceManager $serviceManager) { |
|
73 | + $this->serviceManager->setFactory('helper', function(ServiceManager $serviceManager) { |
|
74 | 74 | return new \HaaseIT\HCSF\Helper($serviceManager); |
75 | 75 | }); |
76 | 76 | $this->helper = $this->serviceManager->get('helper'); |
77 | 77 | |
78 | 78 | if ($this->config->getCore('enable_module_customer')) { |
79 | - $this->serviceManager->setFactory('helpercustomer', function (ServiceManager $serviceManager) { |
|
79 | + $this->serviceManager->setFactory('helpercustomer', function(ServiceManager $serviceManager) { |
|
80 | 80 | return new \HaaseIT\HCSF\Customer\Helper($serviceManager); |
81 | 81 | }); |
82 | 82 | $this->helperCustomer = $this->serviceManager->get('helpercustomer'); |
83 | 83 | } |
84 | 84 | |
85 | 85 | if ($this->config->getCore('enable_module_shop')) { |
86 | - $this->serviceManager->setFactory('helpershop', function (ServiceManager $serviceManager) { |
|
86 | + $this->serviceManager->setFactory('helpershop', function(ServiceManager $serviceManager) { |
|
87 | 87 | return new \HaaseIT\HCSF\Shop\Helper($serviceManager); |
88 | 88 | }); |
89 | 89 | $this->helperShop = $this->serviceManager->get('helpershop'); |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | |
101 | 101 | date_default_timezone_set($this->config->getCore('defaulttimezone')); |
102 | 102 | |
103 | - $this->serviceManager->setFactory('hardcodedtextcats', function () { |
|
103 | + $this->serviceManager->setFactory('hardcodedtextcats', function() { |
|
104 | 104 | return $this->setupHardcodedTextcats(); |
105 | 105 | }); |
106 | 106 | |
107 | - $this->serviceManager->setFactory('db', function () { |
|
107 | + $this->serviceManager->setFactory('db', function() { |
|
108 | 108 | return null; |
109 | 109 | }); |
110 | 110 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | if ($this->config->getCore('enable_module_shop')) { |
122 | - $this->serviceManager->setFactory('oItem', function (ServiceManager $serviceManager) { |
|
122 | + $this->serviceManager->setFactory('oItem', function(ServiceManager $serviceManager) { |
|
123 | 123 | return new \HaaseIT\HCSF\Shop\Items($serviceManager); |
124 | 124 | }); |
125 | 125 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | { |
137 | 137 | // PSR-7 Stuff |
138 | 138 | // Init request object |
139 | - $this->serviceManager->setFactory('request', function () { |
|
139 | + $this->serviceManager->setFactory('request', function() { |
|
140 | 140 | $request = \Zend\Diactoros\ServerRequestFactory::fromGlobals(); |
141 | 141 | |
142 | 142 | // cleanup request |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | protected function setupDB() |
202 | 202 | { |
203 | - $this->serviceManager->setFactory('dbal', function () { |
|
203 | + $this->serviceManager->setFactory('dbal', function() { |
|
204 | 204 | $config = new \Doctrine\DBAL\Configuration(); |
205 | 205 | |
206 | 206 | $connectionParams = [ |
@@ -221,14 +221,14 @@ discard block |
||
221 | 221 | return \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
222 | 222 | }); |
223 | 223 | |
224 | - $this->serviceManager->setFactory('db', function (ServiceManager $serviceManager) { |
|
224 | + $this->serviceManager->setFactory('db', function(ServiceManager $serviceManager) { |
|
225 | 225 | return $serviceManager->get('dbal')->getWrappedConnection(); |
226 | 226 | }); |
227 | 227 | } |
228 | 228 | |
229 | 229 | protected function setupTextcats() |
230 | 230 | { |
231 | - $this->serviceManager->setFactory('textcats', function (ServiceManager $serviceManager) { |
|
231 | + $this->serviceManager->setFactory('textcats', function(ServiceManager $serviceManager) { |
|
232 | 232 | $langavailable = $this->config->getCore('lang_available'); |
233 | 233 | $textcats = new \HaaseIT\Toolbox\Textcat( |
234 | 234 | $this->config->getLang(), |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | |
246 | 246 | protected function setupTwig() |
247 | 247 | { |
248 | - $this->serviceManager->setFactory('twig', function (ServiceManager $serviceManager) { |
|
248 | + $this->serviceManager->setFactory('twig', function(ServiceManager $serviceManager) { |
|
249 | 249 | $loader = new \Twig_Loader_Filesystem([PATH_BASEDIR.'customviews', HCSF_BASEDIR.'src/views/']); |
250 | 250 | |
251 | 251 | $twig_options = [ |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | } |
369 | 369 | |
370 | 370 | $aP['countrylist'][] = ' | '; |
371 | - $configcountries = $this->config->getCountries('countries_' .$this->config->getLang()); |
|
371 | + $configcountries = $this->config->getCountries('countries_'.$this->config->getLang()); |
|
372 | 372 | foreach ($configcountries as $sKey => $sValue) { |
373 | 373 | $aP['countrylist'][] = $sKey.'|'.$sValue; |
374 | 374 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $postdata = ''; |
75 | 75 | |
76 | 76 | foreach ($_POST as $i => $v) { |
77 | - $postdata .= $i . '=' . urlencode($v) . '&'; |
|
77 | + $postdata .= $i.'='.urlencode($v).'&'; |
|
78 | 78 | } |
79 | 79 | $postdata .= 'cmd=_notify-validate'; |
80 | 80 | $web = parse_url($this->config->getShop('paypal')['url']); |
@@ -86,15 +86,15 @@ discard block |
||
86 | 86 | $web['port'] = 80; |
87 | 87 | $ssl = ''; |
88 | 88 | } |
89 | - $fp = @fsockopen($ssl . $web['host'], $web['port'], $errnum, $errstr, 30); |
|
89 | + $fp = @fsockopen($ssl.$web['host'], $web['port'], $errnum, $errstr, 30); |
|
90 | 90 | |
91 | 91 | if ($fp) { |
92 | - fwrite($fp, 'POST ' . $web['path'] . " HTTP/1.1\r\n"); |
|
93 | - fwrite($fp, 'Host: ' . $web['host'] . "\r\n"); |
|
92 | + fwrite($fp, 'POST '.$web['path']." HTTP/1.1\r\n"); |
|
93 | + fwrite($fp, 'Host: '.$web['host']."\r\n"); |
|
94 | 94 | fwrite($fp, "Content-type: application/x-www-form-urlencoded\r\n"); |
95 | - fwrite($fp, 'Content-length: ' . strlen($postdata) . "\r\n"); |
|
95 | + fwrite($fp, 'Content-length: '.strlen($postdata)."\r\n"); |
|
96 | 96 | fwrite($fp, "Connection: close\r\n\r\n"); |
97 | - fwrite($fp, $postdata . "\r\n\r\n"); |
|
97 | + fwrite($fp, $postdata."\r\n\r\n"); |
|
98 | 98 | |
99 | 99 | $info = []; |
100 | 100 | while (!feof($fp)) { |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | $info = implode(',', $info); |
105 | 105 | if (!(strpos($info, 'VERIFIED') === false)) { |
106 | 106 | |
107 | - $sLogData .= '-- new entry - '.date($this->config->getCore('locale_format_date_time')) . " --\n\n"; |
|
107 | + $sLogData .= '-- new entry - '.date($this->config->getCore('locale_format_date_time'))." --\n\n"; |
|
108 | 108 | $sLogData .= "W00T!\n\n"; |
109 | - $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true) . "\n\n"; |
|
109 | + $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true)."\n\n"; |
|
110 | 110 | |
111 | 111 | // Check if the transaction id has been used before |
112 | 112 | $queryBuilder = $this->dbal->createQueryBuilder(); |
@@ -135,27 +135,27 @@ discard block |
||
135 | 135 | ->setParameter(1, $iId); |
136 | 136 | $queryBuilder->execute(); |
137 | 137 | |
138 | - $sLogData .= '-- Alles ok. Zahlung erfolgreich. TXNID: ' . $_REQUEST['txn_id'] . " --\n\n"; |
|
138 | + $sLogData .= '-- Alles ok. Zahlung erfolgreich. TXNID: '.$_REQUEST['txn_id']." --\n\n"; |
|
139 | 139 | } else { |
140 | 140 | $sLogData .= "-- In my country we have problem; Problem is evaluation. Throw the data down the log!\n"; |
141 | - $sLogData .= 'mc_gross: ' . $_REQUEST['mc_gross'] . ' - number_format($fGesamtbrutto, 2, \'.\', \'\'): ' . number_format($fGesamtbrutto, |
|
142 | - 2, '.', '') . "\n"; |
|
143 | - $sLogData .= 'custom: ' . $_REQUEST['custom'] . ' - $aOrder[\'o_id\']: ' . $aOrder['o_id'] . "\n"; |
|
144 | - $sLogData .= 'payment_status: ' . $_REQUEST['payment_status'] . "\n"; |
|
145 | - $sLogData .= 'mc_currency: ' . $_REQUEST['mc_currency'] . ' - HelperConfig::$shop["paypal"]["currency_id"]: ' . $this->config->getShop('paypal')['currency_id'] . "\n"; |
|
146 | - $sLogData .= 'business: ' . $_REQUEST['receiver_email'] . ' - HelperConfig::$shop["paypal"]["business"]: ' . $this->config->getShop('paypal')['business'] . "\n\n"; |
|
141 | + $sLogData .= 'mc_gross: '.$_REQUEST['mc_gross'].' - number_format($fGesamtbrutto, 2, \'.\', \'\'): '.number_format($fGesamtbrutto, |
|
142 | + 2, '.', '')."\n"; |
|
143 | + $sLogData .= 'custom: '.$_REQUEST['custom'].' - $aOrder[\'o_id\']: '.$aOrder['o_id']."\n"; |
|
144 | + $sLogData .= 'payment_status: '.$_REQUEST['payment_status']."\n"; |
|
145 | + $sLogData .= 'mc_currency: '.$_REQUEST['mc_currency'].' - HelperConfig::$shop["paypal"]["currency_id"]: '.$this->config->getShop('paypal')['currency_id']."\n"; |
|
146 | + $sLogData .= 'business: '.$_REQUEST['receiver_email'].' - HelperConfig::$shop["paypal"]["business"]: '.$this->config->getShop('paypal')['business']."\n\n"; |
|
147 | 147 | } |
148 | 148 | } else { |
149 | 149 | // INVALID LOGGING ERROR |
150 | - $sLogData .= '-- new entry - ' . date($this->config->getCore('locale_format_date_time')) . " --\n\nPHAIL\n\n"; |
|
151 | - $sLogData .= '!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: ' . $_REQUEST['txn_id'] . " !!!\n\n"; |
|
150 | + $sLogData .= '-- new entry - '.date($this->config->getCore('locale_format_date_time'))." --\n\nPHAIL\n\n"; |
|
151 | + $sLogData .= '!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: '.$_REQUEST['txn_id']." !!!\n\n"; |
|
152 | 152 | $sLogData .= "!!! INVALID !!!\n\n"; |
153 | 153 | } |
154 | 154 | } else { |
155 | - $sLogData .= '-- new entry - ' . date($this->config->getCore('locale_format_date_time')) . " --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: " . $_REQUEST['txn_id'] . "\n" . $info . "\n\n"; |
|
155 | + $sLogData .= '-- new entry - '.date($this->config->getCore('locale_format_date_time'))." --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: ".$_REQUEST['txn_id']."\n".$info."\n\n"; |
|
156 | 156 | } |
157 | 157 | |
158 | - file_put_contents(PATH_LOGS . FILE_PAYPALLOG, $sLogData, FILE_APPEND); |
|
158 | + file_put_contents(PATH_LOGS.FILE_PAYPALLOG, $sLogData, FILE_APPEND); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 |