@@ -57,34 +57,34 @@ discard block |
||
57 | 57 | |
58 | 58 | |
59 | 59 | // sublevel has to be used so other searches are not overwritten |
60 | - $product->getDBQuery()->storeResult('use_stored', 'webshop_' . $area . '_' . md5($this->credentials['session_id']), 'sublevel'); |
|
60 | + $product->getDBQuery()->storeResult('use_stored', 'webshop_'.$area.'_'.md5($this->credentials['session_id']), 'sublevel'); |
|
61 | 61 | $debug2 = serialize($mixed); |
62 | 62 | if (isset($mixed['offset']) and array_key_exists('offset', $mixed) and is_numeric($mixed['offset'])) { |
63 | 63 | $product->getDBQuery()->useStored(true); |
64 | 64 | $product->getDBQuery()->setPagingOffset((int)$mixed['offset']); |
65 | - $debug2 .= 'offset ' . $mixed['offset']; |
|
65 | + $debug2 .= 'offset '.$mixed['offset']; |
|
66 | 66 | } elseif (isset($mixed['use_stored']) and array_key_exists('use_stored', $mixed) and $mixed['use_stored'] == 'true') { |
67 | 67 | $product->getDBQuery()->useStored(true); |
68 | 68 | $debug2 .= 'use_stored true'; |
69 | 69 | } else { |
70 | 70 | if (isset($mixed['search']) and array_key_exists('search', $mixed) and !empty($mixed['search'])) { |
71 | 71 | $product->getDBQuery()->setFilter('search', $mixed['search']); |
72 | - $debug2 .= 'search ' . $mixed['search']; |
|
72 | + $debug2 .= 'search '.$mixed['search']; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | if (isset($mixed['keywords']) and array_key_exists('keywords', $mixed) and !empty($mixed['keywords'])) { |
76 | 76 | $product->getDBQuery()->setFilter('keywords', $mixed['keywords']); |
77 | - $debug2 .= 'keyword ' . $mixed['keywords']; |
|
77 | + $debug2 .= 'keyword '.$mixed['keywords']; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | if (isset($mixed['ids']) and array_key_exists('ids', $mixed) and is_array($mixed['ids'])) { |
81 | 81 | $product->getDBQuery()->setFilter('ids', $mixed['ids']); |
82 | - $debug2 .= 'ids ' . implode(', ', $mixed['ids']); |
|
82 | + $debug2 .= 'ids '.implode(', ', $mixed['ids']); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if (isset($mixed['sorting']) and array_key_exists('sorting', $mixed) and !empty($mixed['sorting'])) { |
86 | 86 | $product->getDBQuery()->setFilter('sorting', $mixed['sorting']); |
87 | - $debug2 .= 'sorting ' . $mixed['sorting']; |
|
87 | + $debug2 .= 'sorting '.$mixed['sorting']; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | if (PEAR::isError($db)) { |
178 | 178 | require_once 'XML/RPC2/Exception.php'; |
179 | - throw new XML_RPC2_FaultException($db->getMessage() . $db->getUserInfo(), -1); |
|
179 | + throw new XML_RPC2_FaultException($db->getMessage().$db->getUserInfo(), -1); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | $featured = new Intraface_Webshop_FeaturedProducts($this->kernel->intranet, $db); |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | |
348 | 348 | if (!$order_id = $this->webshop->placeOrder($values)) { |
349 | 349 | require_once 'XML/RPC2/Exception.php'; |
350 | - throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
350 | + throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | return $order_id; |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | |
385 | 385 | if (!$payment_id = $onlinepayment->save($values)) { |
386 | 386 | require_once 'XML/RPC2/Exception.php'; |
387 | - throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
387 | + throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | return $payment_id; |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | |
416 | 416 | if (!$payment_id = $onlinepayment->create()) { |
417 | 417 | require_once 'XML/RPC2/Exception.php'; |
418 | - throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
418 | + throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | return $payment_id; |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | if (!$this->webshop->basket->saveAddress($values)) { |
446 | 446 | require_once 'XML/RPC2/Exception.php'; |
447 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
447 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | return true; |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | $customer_coupon = $this->utf8Decode($customer_coupon); |
484 | 484 | if (!$this->webshop->basket->saveCustomerCoupon($customer_coupon)) { |
485 | 485 | require_once 'XML/RPC2/Exception.php'; |
486 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
486 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
487 | 487 | } |
488 | 488 | |
489 | 489 | return true; |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | $customer_ean = $this->utf8Decode($customer_ean); |
524 | 524 | if (!$this->webshop->basket->saveCustomerEan($customer_ean)) { |
525 | 525 | require_once 'XML/RPC2/Exception.php'; |
526 | - throw new XML_RPC2_FaultException('ean could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
526 | + throw new XML_RPC2_FaultException('ean could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | return true; |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | $customer_comment = $this->utf8Decode($customer_comment); |
564 | 564 | if (!$this->webshop->basket->saveCustomerComment($customer_comment)) { |
565 | 565 | require_once 'XML/RPC2/Exception.php'; |
566 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
566 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
567 | 567 | } |
568 | 568 | |
569 | 569 | return true; |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | |
616 | 616 | if (count($credentials) != 2) { // -4 |
617 | 617 | require_once 'XML/RPC2/Exception.php'; |
618 | - throw new XML_RPC2_FaultException('wrong argument count in $credentials - got ' . count($credentials) . ' arguments - need 2', -4); |
|
618 | + throw new XML_RPC2_FaultException('wrong argument count in $credentials - got '.count($credentials).' arguments - need 2', -4); |
|
619 | 619 | } |
620 | 620 | if (empty($credentials['private_key'])) { // -5 |
621 | 621 | require_once 'XML/RPC2/Exception.php'; |
@@ -60,40 +60,40 @@ discard block |
||
60 | 60 | |
61 | 61 | |
62 | 62 | // sublevel has to be used so other searches are not overwritten |
63 | - $product->getDBQuery()->storeResult('use_stored', 'webshop_' . $area . '_' . md5($this->credentials['session_id']), 'sublevel'); |
|
63 | + $product->getDBQuery()->storeResult('use_stored', 'webshop_'.$area.'_'.md5($this->credentials['session_id']), 'sublevel'); |
|
64 | 64 | $debug2 = serialize($mixed); |
65 | 65 | if (isset($mixed['offset']) and array_key_exists('offset', $mixed) and is_numeric($mixed['offset'])) { |
66 | 66 | $product->getDBQuery()->useStored(true); |
67 | 67 | $product->getDBQuery()->setPagingOffset((int)$mixed['offset']); |
68 | - $debug2 .= 'offset ' . $mixed['offset']; |
|
68 | + $debug2 .= 'offset '.$mixed['offset']; |
|
69 | 69 | } elseif (isset($mixed['use_stored']) and array_key_exists('use_stored', $mixed) and $mixed['use_stored'] == 'true') { |
70 | 70 | $product->getDBQuery()->useStored(true); |
71 | 71 | $debug2 .= 'use_stored true'; |
72 | 72 | } else { |
73 | 73 | if (array_key_exists('search', $mixed) and !empty($mixed['search'])) { |
74 | 74 | $product->getDBQuery()->setFilter('search', $mixed['search']); |
75 | - $debug2 .= 'search ' . $mixed['search']; |
|
75 | + $debug2 .= 'search '.$mixed['search']; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | if (array_key_exists('keywords', $mixed) and !empty($mixed['keywords'])) { |
79 | 79 | $product->getDBQuery()->setFilter('keywords', $mixed['keywords']); |
80 | - $debug2 .= 'keyword ' . $mixed['keywords']; |
|
80 | + $debug2 .= 'keyword '.$mixed['keywords']; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | if (array_key_exists('category', $mixed) and !empty($mixed['category'])) { |
84 | 84 | $product->getDBQuery()->setFilter('shop_id', $shop_id); |
85 | 85 | $product->getDBQuery()->setFilter('category', $mixed['category']); |
86 | - $debug2 .= 'category ' . $mixed['category']; |
|
86 | + $debug2 .= 'category '.$mixed['category']; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | if (isset($mixed['ids']) and array_key_exists('ids', $mixed) and is_array($mixed['ids'])) { |
90 | 90 | $product->getDBQuery()->setFilter('ids', $mixed['ids']); |
91 | - $debug2 .= 'ids ' . implode(', ', $mixed['ids']); |
|
91 | + $debug2 .= 'ids '.implode(', ', $mixed['ids']); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | if (array_key_exists('sorting', $mixed) and !empty($mixed['sorting'])) { |
95 | 95 | $product->getDBQuery()->setFilter('sorting', $mixed['sorting']); |
96 | - $debug2 .= 'sorting ' . $mixed['sorting']; |
|
96 | + $debug2 .= 'sorting '.$mixed['sorting']; |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | 'name' => $variation->getName(), |
197 | 197 | 'attributes' => $attributes_array, |
198 | 198 | 'identifier' => $attribute_string, |
199 | - 'price_incl_vat' => round(($product->get('price') + $detail->getPriceDifference()) * (1 + $product->get('vat_percent')/100), 2), |
|
199 | + 'price_incl_vat' => round(($product->get('price') + $detail->getPriceDifference())*(1 + $product->get('vat_percent')/100), 2), |
|
200 | 200 | 'weight' => $product->get('weight') + $detail->getWeightDifference() |
201 | 201 | ), |
202 | 202 | 'stock' => $variation->getStock($product)->get() |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | |
257 | 257 | if (PEAR::isError($db)) { |
258 | 258 | require_once 'XML/RPC2/Exception.php'; |
259 | - throw new XML_RPC2_FaultException($db->getMessage() . $db->getUserInfo(), -1); |
|
259 | + throw new XML_RPC2_FaultException($db->getMessage().$db->getUserInfo(), -1); |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | $featured = new Intraface_modules_shop_FeaturedProducts($this->kernel->intranet, $this->webshop->getShop(), $db); |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | |
460 | 460 | if (!$order_id = $this->webshop->placeOrder($values)) { |
461 | 461 | require_once 'XML/RPC2/Exception.php'; |
462 | - throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
462 | + throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | return $this->prepareResponseData($this->webshop->getOrderIdentifierKey()); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | |
490 | 490 | if (!$this->webshop->getBasket()->saveAddress($values)) { |
491 | 491 | require_once 'XML/RPC2/Exception.php'; |
492 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
492 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
493 | 493 | } |
494 | 494 | |
495 | 495 | return $this->prepareResponseData(true); |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | $customer_coupon = $this->processRequestData($customer_coupon); |
531 | 531 | if (!$this->webshop->getBasket()->saveCustomerCoupon($customer_coupon)) { |
532 | 532 | require_once 'XML/RPC2/Exception.php'; |
533 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
533 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
534 | 534 | } |
535 | 535 | |
536 | 536 | return $this->prepareResponseData(true); |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | $customer_ean = $this->processRequestData($customer_ean); |
572 | 572 | if (!$this->webshop->getBasket()->saveCustomerEan($customer_ean)) { |
573 | 573 | require_once 'XML/RPC2/Exception.php'; |
574 | - throw new XML_RPC2_FaultException('ean could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
574 | + throw new XML_RPC2_FaultException('ean could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
575 | 575 | } |
576 | 576 | |
577 | 577 | return $this->prepareResponseData(true); |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | $customer_comment = $this->processRequestData($customer_comment); |
614 | 614 | if (!$this->webshop->getBasket()->saveCustomerComment($customer_comment)) { |
615 | 615 | require_once 'XML/RPC2/Exception.php'; |
616 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
616 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
617 | 617 | } |
618 | 618 | |
619 | 619 | return $this->prepareResponseData(true); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $payment_method = $this->processRequestData($payment_method); |
673 | 673 | if (!$this->webshop->getBasket()->savePaymentMethod($payment_method)) { |
674 | 674 | require_once 'XML/RPC2/Exception.php'; |
675 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
675 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
676 | 676 | } |
677 | 677 | |
678 | 678 | return $this->prepareResponseData(true); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | if (!$payment_id = $onlinepayment->save($values)) { |
133 | 133 | // this is probably a little to hard reaction. |
134 | - throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt ' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
134 | + throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt '.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | if ($onlinepayment->get('status') == 'authorized') { |
@@ -154,19 +154,19 @@ discard block |
||
154 | 154 | |
155 | 155 | $settings = Doctrine::getTable('Intraface_modules_onlinepayment_Language')->findOneByIntranetId($kernel->intranet->getId()); |
156 | 156 | |
157 | - $subject = $settings->getConfirmationEmailSubject($shop->getLanguage()) . ' (#' . $payment_id . ')'; |
|
158 | - $body = $settings->getConfirmationEmailBody($shop->getLanguage()) . "\n\n" . $this->kernel->intranet->address->get('name'); |
|
157 | + $subject = $settings->getConfirmationEmailSubject($shop->getLanguage()).' (#'.$payment_id.')'; |
|
158 | + $body = $settings->getConfirmationEmailBody($shop->getLanguage())."\n\n".$this->kernel->intranet->address->get('name'); |
|
159 | 159 | } catch (Exception $e) { |
160 | 160 | } |
161 | 161 | |
162 | 162 | if (empty($subject)) { |
163 | - $subject = 'Payment confirmation / betalingsbekræftelse (#' . $payment_id . ')'; |
|
163 | + $subject = 'Payment confirmation / betalingsbekræftelse (#'.$payment_id.')'; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | if (empty($body)) { |
167 | - $body = 'We have received your payment for order #' .$debtor->getId(). '.' . "\n\n"; |
|
168 | - $body .= 'Vi har modtaget din betaling for ordre #' .$debtor->getId(). '.'; |
|
169 | - $body .= "\n\nYours sincerely / Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
167 | + $body = 'We have received your payment for order #'.$debtor->getId().'.'."\n\n"; |
|
168 | + $body .= 'Vi har modtaget din betaling for ordre #'.$debtor->getId().'.'; |
|
169 | + $body .= "\n\nYours sincerely / Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | $data = array('contact_id' => $debtor->getContact()->getId(), |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | if (!$email->queue()) { |
185 | 185 | $this->error->merge($email->error->getMessage()); |
186 | - throw new Exception('Could not send email to ' . $debtor->getContact()->getId()); |
|
186 | + throw new Exception('Could not send email to '.$debtor->getContact()->getId()); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | return true; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | if (!$payment_id = $onlinepayment->create()) { |
205 | 205 | // this is probably a little to hard reaction |
206 | - throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
206 | + throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | return $this->prepareResponseData($payment_id); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | if (!$payment_id = $onlinepayment->save($values)) { |
100 | 100 | // this is probably a little to hard reaction. |
101 | - throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt ' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
101 | + throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt '.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | if ($onlinepayment->get('status') == 'authorized') { |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | $this->kernel->useShared('email'); |
114 | 114 | $email = new Email($this->kernel); |
115 | 115 | |
116 | - $subject = 'Payment confirmation / betalingsbekræftelse (#' . $payment_id . ')'; |
|
117 | - $body = 'We have received your payment for order #' .$debtor->getId(). '.' . "\n\n"; |
|
118 | - $body .= 'Vi har modtaget din betaling for ordre #' .$debtor->getId(). '.'; |
|
119 | - $body .= "\n\nYours sincerely / Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
116 | + $subject = 'Payment confirmation / betalingsbekræftelse (#'.$payment_id.')'; |
|
117 | + $body = 'We have received your payment for order #'.$debtor->getId().'.'."\n\n"; |
|
118 | + $body .= 'Vi har modtaget din betaling for ordre #'.$debtor->getId().'.'; |
|
119 | + $body .= "\n\nYours sincerely / Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
120 | 120 | |
121 | 121 | $data = array('contact_id' => $debtor->getContact()->getId(), |
122 | 122 | 'subject' => $subject, |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | if (!$email->queue()) { |
136 | 136 | $this->error->merge($email->error->getMessage()); |
137 | - throw new Exception('Could not send email to ' . $debtor->getContact()->getId()); |
|
137 | + throw new Exception('Could not send email to '.$debtor->getContact()->getId()); |
|
138 | 138 | ; |
139 | 139 | return false; |
140 | 140 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | if (!$payment_id = $onlinepayment->create()) { |
160 | 160 | // this is probably a little to hard reaction |
161 | - throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
161 | + throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | return $this->prepareResponseData($payment_id); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | if (!$payment_id = $onlinepayment->save($values)) { |
97 | 97 | // this is probably a little to hard reaction. |
98 | - throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt ' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
98 | + throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt '.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $this->sendEmailOnOnlinePayment($debtor, $payment_id); |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | $this->kernel->useShared('email'); |
109 | 109 | $email = new Email($this->kernel); |
110 | 110 | |
111 | - $subject = 'Payment confirmation / betalingsbekræftelse (#' . $payment_id . ')'; |
|
112 | - $body = 'We have received your payment for order #' .$debtor->getId(). '.' . "\n\n"; |
|
113 | - $body .= 'Vi har modtaget din betaling for ordre #' .$debtor->getId(). '.'; |
|
114 | - $body .= "\n\nYours sincerely / Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
111 | + $subject = 'Payment confirmation / betalingsbekræftelse (#'.$payment_id.')'; |
|
112 | + $body = 'We have received your payment for order #'.$debtor->getId().'.'."\n\n"; |
|
113 | + $body .= 'Vi har modtaget din betaling for ordre #'.$debtor->getId().'.'; |
|
114 | + $body .= "\n\nYours sincerely / Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
115 | 115 | |
116 | 116 | $data = array('contact_id' => $debtor->getContact()->getId(), |
117 | 117 | 'subject' => $subject, |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | if (!$email->queue()) { |
131 | 131 | $this->error->merge($email->error->getMessage()); |
132 | - throw new Exception('Could not send email to ' . $debtor->getContact()->getId()); |
|
132 | + throw new Exception('Could not send email to '.$debtor->getContact()->getId()); |
|
133 | 133 | ; |
134 | 134 | return false; |
135 | 135 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | if (!$payment_id = $onlinepayment->create()) { |
155 | 155 | // this is probably a little to hard reaction |
156 | - throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
156 | + throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | return $this->prepareResponseData($payment_id); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | if (!$payment_id = $onlinepayment->save($values)) { |
135 | 135 | // this is probably a little to hard reaction. |
136 | - throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt ' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
136 | + throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt '.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | if ($onlinepayment->get('status') == 'authorized') { |
@@ -166,19 +166,19 @@ discard block |
||
166 | 166 | // @todo: Change with gateway. |
167 | 167 | $settings = $doctrine->getTable('Intraface_modules_onlinepayment_Language')->findOneByIntranetId($kernel->intranet->getId()); |
168 | 168 | |
169 | - $subject = $settings->getConfirmationEmailSubject($shop->getLanguage()) . ' (#' . $payment_id . ')'; |
|
170 | - $body = $settings->getConfirmationEmailBody($shop->getLanguage()) . "\n\n" . $this->kernel->intranet->address->get('name'); |
|
169 | + $subject = $settings->getConfirmationEmailSubject($shop->getLanguage()).' (#'.$payment_id.')'; |
|
170 | + $body = $settings->getConfirmationEmailBody($shop->getLanguage())."\n\n".$this->kernel->intranet->address->get('name'); |
|
171 | 171 | } catch (Exception $e) { |
172 | 172 | } |
173 | 173 | |
174 | 174 | if (empty($subject)) { |
175 | - $subject = 'Payment confirmation / betalingsbekræftelse (#' . $payment_id . ')'; |
|
175 | + $subject = 'Payment confirmation / betalingsbekræftelse (#'.$payment_id.')'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | if (empty($body)) { |
179 | - $body = 'We have received your payment for order #' .$debtor->getId(). '.' . "\n\n"; |
|
180 | - $body .= 'Vi har modtaget din betaling for ordre #' .$debtor->getId(). '.'; |
|
181 | - $body .= "\n\nYours sincerely / Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
179 | + $body = 'We have received your payment for order #'.$debtor->getId().'.'."\n\n"; |
|
180 | + $body .= 'Vi har modtaget din betaling for ordre #'.$debtor->getId().'.'; |
|
181 | + $body .= "\n\nYours sincerely / Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | $data = array('contact_id' => $debtor->getContact()->getId(), |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | if (!$email->queue()) { |
197 | 197 | $this->error->merge($email->error->getMessage()); |
198 | - throw new Exception('Could not send email to ' . $debtor->getContact()->getId()); |
|
198 | + throw new Exception('Could not send email to '.$debtor->getContact()->getId()); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | return true; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | if (!$payment_id = $onlinepayment->create()) { |
217 | 217 | // this is probably a little to hard reaction |
218 | - throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
218 | + throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | return $this->prepareResponseData($payment_id); |
@@ -29,14 +29,14 @@ |
||
29 | 29 | $db = MDB2::singleton(DB_DSN); |
30 | 30 | |
31 | 31 | if (PEAR::isError($db)) { |
32 | - throw new XML_RPC2_Exception('error accessing the database ' . $db->getUserInfo()); |
|
32 | + throw new XML_RPC2_Exception('error accessing the database '.$db->getUserInfo()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $db->setFetchMode(MDB2_FETCHMODE_ASSOC); |
36 | 36 | $result = $db->query("SELECT id, name, private_key FROM intranet WHERE identifier = ".$db->quote($intranet_identifier, 'text')." AND identifier <> ''"); |
37 | 37 | |
38 | 38 | if (PEAR::isError($result)) { |
39 | - throw new XML_RPC2_Exception('error querying the database ' . $result->getUserInfo()); |
|
39 | + throw new XML_RPC2_Exception('error querying the database '.$result->getUserInfo()); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if ($result->numRows() <> 1) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // niveau 9999 g�r at den ikke kan genkende den, og tager top_level. |
67 | 67 | // 0 der ellers skulle v�re topmenu virker af en m�rkelig grund ikke. Variablen er ikke registeret som sat! |
68 | 68 | // |
69 | - $cmspage->value['navigation_toplevel'] = $cmspage->navigation->build(9999, 'array'); // 'toplevel' |
|
69 | + $cmspage->value['navigation_toplevel'] = $cmspage->navigation->build(9999, 'array'); // 'toplevel' |
|
70 | 70 | $cmspage->value['navigation_sublevel'] = $cmspage->navigation->build(1, 'array'); // 'sublevel' |
71 | 71 | $cmspage->value['sections'] = $cmspage->collect(); |
72 | 72 | $cmspage->value['comments'] = $cmspage->getComments(); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->factory($site_id); |
150 | 150 | |
151 | 151 | $cmspage = new CMS_Page($this->site); |
152 | - $value['toplevel'] = $cmspage->navigation->build(9999, 'array'); // 'toplevel' |
|
152 | + $value['toplevel'] = $cmspage->navigation->build(9999, 'array'); // 'toplevel' |
|
153 | 153 | $value['sublevel'] = $cmspage->navigation->build(1, 'array'); // 'sublevel' |
154 | 154 | |
155 | 155 | return $this->prepareResponseData($value); |
@@ -67,7 +67,7 @@ |
||
67 | 67 | * niveau 9999 g�r at den ikke kan genkende den, og tager top_level. |
68 | 68 | * 0 der ellers skulle v�re topmenu virker af en m�rkelig grund ikke. Variablen er ikke registeret som sat! |
69 | 69 | */ |
70 | - $cmspage->value['navigation_toplevel'] = $cmspage->navigation->build(9999, 'array'); // 'toplevel' |
|
70 | + $cmspage->value['navigation_toplevel'] = $cmspage->navigation->build(9999, 'array'); // 'toplevel' |
|
71 | 71 | $cmspage->value['navigation_sublevel'] = $cmspage->navigation->build(1, 'array'); // 'sublevel' |
72 | 72 | $cmspage->value['sections'] = $cmspage->collect(); |
73 | 73 | $cmspage->value['comments'] = $cmspage->getComments(); |