@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | foreach ($frontpage_files as $file) { |
76 | - $file = PATH_INCLUDE_MODULE . $module->getName() . '/' .$file; |
|
76 | + $file = PATH_INCLUDE_MODULE.$module->getName().'/'.$file; |
|
77 | 77 | if (file_exists($file)) { |
78 | 78 | include($file); |
79 | 79 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | '_advice' => $_advice |
96 | 96 | ); |
97 | 97 | |
98 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/restricted'); |
|
98 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/restricted'); |
|
99 | 99 | return $smarty->render($this, $data); |
100 | 100 | } |
101 | 101 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $this->document->setTitle('Intraface.dk'); |
106 | 106 | } |
107 | 107 | |
108 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/main'); |
|
108 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/main'); |
|
109 | 109 | $content = $tpl->render($this, array('content' => $content)); |
110 | 110 | return new k_HttpResponse(200, $content); |
111 | 111 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | while ($this->db->nextRecord()) { |
183 | 183 | if ($this->getKernel()->user->hasModuleAccess($this->db->f('name'))) { |
184 | 184 | $this->menu[$i]['name'] = $this->t($this->db->f('name')); |
185 | - $this->menu[$i]['url'] = $this->url('/restricted/module/' . $this->db->f("name")); |
|
185 | + $this->menu[$i]['url'] = $this->url('/restricted/module/'.$this->db->f("name")); |
|
186 | 186 | $i++; |
187 | 187 | } |
188 | 188 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | if ($access) { |
225 | 225 | $this->submenu[$j]['name'] = $this->t($all_submenu[$i]['label']); |
226 | - $this->submenu[$j]['url'] = $this->primary_module->getPath(). $all_submenu[$i]['url']; |
|
226 | + $this->submenu[$j]['url'] = $this->primary_module->getPath().$all_submenu[$i]['url']; |
|
227 | 227 | $j++; |
228 | 228 | } |
229 | 229 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | function renderHtml() |
32 | 32 | { |
33 | 33 | $this->document->setTitle('Login'); |
34 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/login'); |
|
34 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/login'); |
|
35 | 35 | return $smarty->render($this); |
36 | 36 | } |
37 | 37 |
@@ -25,9 +25,8 @@ |
||
25 | 25 | foreach ($errorstack['errorstack'] as $field_name => $error_codes) { |
26 | 26 | $display .= '<li>'; |
27 | 27 | $display .= $this->translate('There was an error in', 'common').' '; |
28 | - $display .= ( isset($errorstack['field_alias'][$field_name]) ? |
|
29 | - $errorstack['field_alias'][$field_name] : |
|
30 | - $field_name); |
|
28 | + $display .= (isset($errorstack['field_alias'][$field_name]) ? |
|
29 | + $errorstack['field_alias'][$field_name] : $field_name); |
|
31 | 30 | |
32 | 31 | foreach ($error_codes as $error_code) { |
33 | 32 | $description = $this->getErrorDescription($error_code); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | global $_setting; |
55 | 55 | |
56 | - require_once dirname(__FILE__) . '/config/setting_kernel.php'; |
|
56 | + require_once dirname(__FILE__).'/config/setting_kernel.php'; |
|
57 | 57 | |
58 | 58 | $this->db = new DB_Sql; |
59 | 59 | $this->system = &$_setting; // don't remove the & - otherwise it will not work |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | private function loadSettings() |
171 | 171 | { |
172 | 172 | $this->settings = array(); |
173 | - $this->db->query("SELECT setting, value, sub_id, user_id FROM setting WHERE intranet_id = " . $this->db->quote($this->intranet_id, 'integer')." AND (user_id = ".$this->db->quote($this->user_id, 'integer')." OR user_id = 0)"); |
|
173 | + $this->db->query("SELECT setting, value, sub_id, user_id FROM setting WHERE intranet_id = ".$this->db->quote($this->intranet_id, 'integer')." AND (user_id = ".$this->db->quote($this->user_id, 'integer')." OR user_id = 0)"); |
|
174 | 174 | while ($this->db->nextRecord()) { |
175 | 175 | $this->settings[$this->intranet_id][$this->db->f('user_id')][$this->db->f('setting')][$this->db->f('sub_id')] = $this->db->f('value'); |
176 | 176 | } |
@@ -72,40 +72,40 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // sublevel has to be used so other searches are not overwritten |
75 | - $product->getDBQuery()->storeResult('use_stored', 'webshop_' . $area . '_' . md5($this->credentials['session_id']), 'sublevel'); |
|
75 | + $product->getDBQuery()->storeResult('use_stored', 'webshop_'.$area.'_'.md5($this->credentials['session_id']), 'sublevel'); |
|
76 | 76 | $debug2 = serialize($mixed); |
77 | 77 | if (isset($mixed['offset']) and is_numeric($mixed['offset']) and $mixed['offset'] > 0) { |
78 | 78 | $product->getDBQuery()->useStored(true); |
79 | 79 | $product->getDBQuery()->setPagingOffset((int)$mixed['offset']); |
80 | - $debug2 .= 'offset ' . $mixed['offset']; |
|
80 | + $debug2 .= 'offset '.$mixed['offset']; |
|
81 | 81 | } elseif (isset($mixed['use_stored']) and array_key_exists('use_stored', $mixed) and $mixed['use_stored'] == 'true') { |
82 | 82 | $product->getDBQuery()->useStored(true); |
83 | 83 | $debug2 .= 'use_stored true'; |
84 | 84 | } else { |
85 | 85 | if (array_key_exists('search', $mixed) and !empty($mixed['search'])) { |
86 | 86 | $product->getDBQuery()->setFilter('search', $mixed['search']); |
87 | - $debug2 .= 'search ' . $mixed['search']; |
|
87 | + $debug2 .= 'search '.$mixed['search']; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | if (array_key_exists('keywords', $mixed) and !empty($mixed['keywords'])) { |
91 | 91 | $product->getDBQuery()->setFilter('keywords', $mixed['keywords']); |
92 | - $debug2 .= 'keyword ' . $mixed['keywords']; |
|
92 | + $debug2 .= 'keyword '.$mixed['keywords']; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | if (array_key_exists('category', $mixed) and !empty($mixed['category'])) { |
96 | 96 | $product->getDBQuery()->setFilter('shop_id', $shop_id); |
97 | 97 | $product->getDBQuery()->setFilter('category', $mixed['category']); |
98 | - $debug2 .= 'category ' . $mixed['category']; |
|
98 | + $debug2 .= 'category '.$mixed['category']; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | if (isset($mixed['ids']) and array_key_exists('ids', $mixed) and is_array($mixed['ids'])) { |
102 | 102 | $product->getDBQuery()->setFilter('ids', $mixed['ids']); |
103 | - $debug2 .= 'ids ' . implode(', ', $mixed['ids']); |
|
103 | + $debug2 .= 'ids '.implode(', ', $mixed['ids']); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | if (array_key_exists('sorting', $mixed) and !empty($mixed['sorting'])) { |
107 | 107 | $product->getDBQuery()->setFilter('sorting', $mixed['sorting']); |
108 | - $debug2 .= 'sorting ' . $mixed['sorting']; |
|
108 | + $debug2 .= 'sorting '.$mixed['sorting']; |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | |
450 | 450 | if (PEAR::isError($db)) { |
451 | 451 | require_once 'XML/RPC2/Exception.php'; |
452 | - throw new XML_RPC2_FaultException($db->getMessage() . $db->getUserInfo(), -1); |
|
452 | + throw new XML_RPC2_FaultException($db->getMessage().$db->getUserInfo(), -1); |
|
453 | 453 | } |
454 | 454 | |
455 | 455 | $featured = new Intraface_modules_shop_FeaturedProducts($this->kernel->intranet, $this->webshop->getShop(), $db); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | |
717 | 717 | if (!$order_id = $this->webshop->placeOrder($values)) { |
718 | 718 | require_once 'XML/RPC2/Exception.php'; |
719 | - throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
719 | + throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
720 | 720 | } |
721 | 721 | |
722 | 722 | return $this->prepareResponseData($this->webshop->getOrderIdentifierKey()); |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | |
747 | 747 | if (!$this->webshop->getBasket()->saveAddress($values)) { |
748 | 748 | require_once 'XML/RPC2/Exception.php'; |
749 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
749 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
750 | 750 | } |
751 | 751 | |
752 | 752 | return $this->prepareResponseData(true); |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | $customer_coupon = $this->processRequestData($customer_coupon); |
788 | 788 | if (!$this->webshop->getBasket()->saveCustomerCoupon($customer_coupon)) { |
789 | 789 | require_once 'XML/RPC2/Exception.php'; |
790 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
790 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
791 | 791 | } |
792 | 792 | |
793 | 793 | return $this->prepareResponseData(true); |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | $customer_ean = $this->processRequestData($customer_ean); |
829 | 829 | if (!$this->webshop->getBasket()->saveCustomerEan($customer_ean)) { |
830 | 830 | require_once 'XML/RPC2/Exception.php'; |
831 | - throw new XML_RPC2_FaultException('ean could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
831 | + throw new XML_RPC2_FaultException('ean could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
832 | 832 | } |
833 | 833 | |
834 | 834 | return $this->prepareResponseData(true); |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $customer_comment = $this->processRequestData($customer_comment); |
871 | 871 | if (!$this->webshop->getBasket()->saveCustomerComment($customer_comment)) { |
872 | 872 | require_once 'XML/RPC2/Exception.php'; |
873 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
873 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
874 | 874 | } |
875 | 875 | |
876 | 876 | return $this->prepareResponseData(true); |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | $payment_method = $this->processRequestData($payment_method); |
930 | 930 | if (!$this->webshop->getBasket()->savePaymentMethod($payment_method)) { |
931 | 931 | require_once 'XML/RPC2/Exception.php'; |
932 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
932 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
933 | 933 | } |
934 | 934 | |
935 | 935 | return $this->prepareResponseData(true); |
@@ -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); |