@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * Construktor |
55 | 55 | * |
56 | - * @param object $kernel Kernel object |
|
56 | + * @param Intraface_Kernel $kernel Kernel object |
|
57 | 57 | * @param string $session_id Unikt session id |
58 | 58 | * |
59 | 59 | * @return void |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | /** |
80 | 80 | * Convenience method to create the basket |
81 | 81 | * |
82 | - * @return object |
|
82 | + * @return Basket |
|
83 | 83 | */ |
84 | 84 | private function createBasket() |
85 | 85 | { |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | * @param integer $order_id |
326 | 326 | * @param integer $transaction_number |
327 | 327 | * @param integer $transaction_status |
328 | - * @param float $transaction_amount |
|
328 | + * @param integer $amount |
|
329 | 329 | * |
330 | - * @return boolean |
|
330 | + * @return integer |
|
331 | 331 | */ |
332 | 332 | public function addOnlinePayment($order_id, $transaction_number, $transaction_status, $amount) |
333 | 333 | { |
@@ -186,14 +186,14 @@ discard block |
||
186 | 186 | if ($value['message'] != '') { |
187 | 187 | $value['message'] .= "\n\n"; |
188 | 188 | } |
189 | - $value['message'] .= "Kundekupon:". $input['customer_coupon']; |
|
189 | + $value['message'] .= "Kundekupon:".$input['customer_coupon']; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | if (isset($input['customer_comment']) && $input['customer_comment'] != '') { |
193 | 193 | if ($value['message'] != '') { |
194 | 194 | $value['message'] .= "\n\n"; |
195 | 195 | } |
196 | - $value['message'] .= "Kommentar:\n". $input['customer_comment']; |
|
196 | + $value['message'] .= "Kommentar:\n".$input['customer_comment']; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | |
@@ -301,8 +301,8 @@ discard block |
||
301 | 301 | $email = new Email($this->kernel); |
302 | 302 | |
303 | 303 | if (!$email->save(array('contact_id' => $this->contact->get('id'), |
304 | - 'subject' => 'Bekræftelse på bestilling #' . $order_id, |
|
305 | - 'body' => $this->kernel->setting->get('intranet', 'webshop.confirmation_text') . "\n" . $this->contact->getLoginUrl() . "\n\nVenlig hilsen\n" . $this->kernel->intranet->address->get('name'), |
|
304 | + 'subject' => 'Bekræftelse på bestilling #'.$order_id, |
|
305 | + 'body' => $this->kernel->setting->get('intranet', 'webshop.confirmation_text')."\n".$this->contact->getLoginUrl()."\n\nVenlig hilsen\n".$this->kernel->intranet->address->get('name'), |
|
306 | 306 | 'from_email' => $this->kernel->intranet->address->get('email'), |
307 | 307 | 'from_name' => $this->kernel->intranet->address->get('name'), |
308 | 308 | 'type_id' => 12, // webshop |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * Creates a redirect object on the go page |
144 | 144 | * |
145 | - * @param object $kernel kernel |
|
145 | + * @param FakeRedirectKernel $kernel kernel |
|
146 | 146 | * @param string $query_variable the variable used in the querystring for going to the redirect page |
147 | 147 | * @param string $query_return_variable the variable used in the querystring when returning from the redirect page. |
148 | 148 | * |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * @param string $query_variable the variable used in the querystring for going to the redirect page |
192 | 192 | * @param string $query_return_variable the variable used in the querystring when returning from the redirect page. |
193 | 193 | * |
194 | - * @return object |
|
194 | + * @return string |
|
195 | 195 | */ |
196 | 196 | static function factory($kernel, $type, $query_variable = 'redirect_id', $query_return_variable = 'return_redirect_id') |
197 | 197 | { |
@@ -131,7 +131,7 @@ |
||
131 | 131 | public function __construct($kernel, $id = 0) |
132 | 132 | { |
133 | 133 | $options = array( |
134 | - 'extra_db_condition' => array('intranet_id = '.$kernel->intranet->get('id')) |
|
134 | + 'extra_db_condition' => array('intranet_id = '.$kernel->intranet->get('id')) |
|
135 | 135 | ); |
136 | 136 | |
137 | 137 | $db = MDB2::singleton(DB_DSN); |
@@ -115,6 +115,7 @@ |
||
115 | 115 | * @param string $type Can be either system, intranet, user |
116 | 116 | * @param string $setting The actual setting |
117 | 117 | * @param integer $sub_id @todo What is this exactly |
118 | + * @param integer $value |
|
118 | 119 | * |
119 | 120 | * @return boolean |
120 | 121 | */ |
@@ -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 | } |
@@ -272,7 +272,7 @@ |
||
272 | 272 | /** |
273 | 273 | * Adds keyword to object |
274 | 274 | * |
275 | - * @param integer $keyword_id |
|
275 | + * @param integer $keyword |
|
276 | 276 | * |
277 | 277 | * @return boolean |
278 | 278 | */ |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $condition['keyword.type'] = $this->type; |
64 | 64 | |
65 | 65 | foreach ($condition as $column => $value) { |
66 | - $c[] = $column . " = '" . $value . "'"; |
|
66 | + $c[] = $column." = '".$value."'"; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | $db = new DB_Sql; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $condition['active'] = 1; |
128 | 128 | |
129 | 129 | foreach ($condition as $column => $value) { |
130 | - $c[] = $column . " = '" . $value . "'"; |
|
130 | + $c[] = $column." = '".$value."'"; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | $db = new DB_Sql; |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | $condition['type'] = $this->type; |
149 | 149 | |
150 | 150 | foreach ($condition as $column => $value) { |
151 | - $c[] = $column . " = '" . $value . "'"; |
|
151 | + $c[] = $column." = '".$value."'"; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | $sql_type = 'UPDATE '; |
155 | - $sql_end = ' WHERE ' . implode(' AND ', $c); |
|
155 | + $sql_end = ' WHERE '.implode(' AND ', $c); |
|
156 | 156 | } else { |
157 | 157 | $c = array(); |
158 | 158 | $condition = array(); |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | $condition['type'] = $this->type; |
161 | 161 | |
162 | 162 | foreach ($condition as $column => $value) { |
163 | - $c[] = $column . " = '" . $value . "'"; |
|
163 | + $c[] = $column." = '".$value."'"; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | $sql_type = "INSERT INTO "; |
167 | - $sql_end = ", " . implode(', ', $c); |
|
167 | + $sql_end = ", ".implode(', ', $c); |
|
168 | 168 | } |
169 | 169 | |
170 | - $sql = $sql_type . "keyword SET keyword = '".$var['keyword']."'" . $sql_end; |
|
170 | + $sql = $sql_type."keyword SET keyword = '".$var['keyword']."'".$sql_end; |
|
171 | 171 | $db->query($sql); |
172 | 172 | |
173 | 173 | if ($this->id == 0) { |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $condition['id'] = $this->id; |
193 | 193 | $condition['type'] = $this->type; |
194 | 194 | foreach ($condition as $column => $value) { |
195 | - $c[] = $column . " = '" . $value . "'"; |
|
195 | + $c[] = $column." = '".$value."'"; |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | $db = new DB_Sql; |
@@ -215,11 +215,11 @@ discard block |
||
215 | 215 | $condition['keyword.type'] = $this->type; |
216 | 216 | $condition['keyword.active'] = 1; |
217 | 217 | foreach ($condition as $column => $value) { |
218 | - $c[] = $column . " = '" . $value . "'"; |
|
218 | + $c[] = $column." = '".$value."'"; |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | $sql = "SELECT * FROM keyword |
222 | - WHERE " . implode(' AND ', $c) . " |
|
222 | + WHERE " . implode(' AND ', $c)." |
|
223 | 223 | ORDER BY keyword ASC"; |
224 | 224 | $db = new DB_Sql; |
225 | 225 | $db->query($sql); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $condition['keyword_x_object.belong_to'] = $this->getBelongToId(); |
284 | 284 | |
285 | 285 | foreach ($condition as $column => $value) { |
286 | - $c[] = $column . " = '" . $value . "'"; |
|
286 | + $c[] = $column." = '".$value."'"; |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | $sql = "SELECT * FROM keyword_x_object |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | $condition['keyword.active'] = 1; |
334 | 334 | |
335 | 335 | foreach ($condition as $column => $value) { |
336 | - $c[] = $column . " = '" . $value . "'"; |
|
336 | + $c[] = $column." = '".$value."'"; |
|
337 | 337 | } |
338 | 338 | |
339 | 339 | $db = new DB_Sql; |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | FROM keyword_x_object x |
342 | 342 | INNER JOIN keyword keyword |
343 | 343 | ON x.keyword_id = keyword.id |
344 | - WHERE " . implode(' AND ', $c) . " |
|
344 | + WHERE " . implode(' AND ', $c)." |
|
345 | 345 | ORDER BY keyword ASC"); |
346 | 346 | |
347 | 347 | $i = 0; |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | $condition['keyword_x_object.belong_to'] = $this->getBelongToId(); |
375 | 375 | |
376 | 376 | foreach ($condition as $column => $value) { |
377 | - $c[] = $column . " = '" . $value . "'"; |
|
377 | + $c[] = $column." = '".$value."'"; |
|
378 | 378 | } |
379 | 379 | |
380 | 380 | $db = new DB_Sql; |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | FROM keyword_x_object |
383 | 383 | INNER JOIN keyword |
384 | 384 | ON keyword_x_object.keyword_id = keyword.id |
385 | - WHERE " . implode(' AND ', $c) . " AND keyword.keyword != '' |
|
385 | + WHERE " . implode(' AND ', $c)." AND keyword.keyword != '' |
|
386 | 386 | ORDER BY keyword.keyword"; |
387 | 387 | $db->query($sql); |
388 | 388 | |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $condition['keyword_x_object.belong_to'] = $this->getBelongToId(); |
415 | 415 | |
416 | 416 | foreach ($condition as $column => $value) { |
417 | - $c[] = $column . " = '" . $value . "'"; |
|
417 | + $c[] = $column." = '".$value."'"; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | $result = array(); |
503 | 503 | |
504 | 504 | while (list($arg, $val) = each($getstrings)) { |
505 | - if ($instring==1) { |
|
505 | + if ($instring == 1) { |
|
506 | 506 | //Add the whole string, untouched to the result array. |
507 | 507 | if (!empty($val)) { |
508 | 508 | $result[] = $val; |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | } else { |
512 | 512 | //Break up the string according to the delimiter character |
513 | 513 | //Each string has extraneous delimiters around it (inc the ones we added above), so they need to be stripped off |
514 | - $temparray = explode($splitter, substr($val, $delimlen, strlen($val)-$delimlen-$delimlen)); |
|
514 | + $temparray = explode($splitter, substr($val, $delimlen, strlen($val) - $delimlen - $delimlen)); |
|
515 | 515 | |
516 | 516 | while (list($iarg, $ival) = each($temparray)) { |
517 | 517 | if (!empty($ival)) { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * Load |
106 | 106 | * |
107 | - * @return void |
|
107 | + * @return integer |
|
108 | 108 | */ |
109 | 109 | protected function load() |
110 | 110 | { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | * @param integer $module |
257 | 257 | * @param integer $intranet_id |
258 | 258 | * |
259 | - * @return integer |
|
259 | + * @return boolean |
|
260 | 260 | */ |
261 | 261 | public function hasModuleAccess($module, $intranet_id = 0) |
262 | 262 | { |
@@ -459,6 +459,7 @@ discard block |
||
459 | 459 | /** |
460 | 460 | * Sets active intranet_id |
461 | 461 | * |
462 | + * @param integer $id |
|
462 | 463 | * @return boolean |
463 | 464 | */ |
464 | 465 | public function setActiveIntranetId($id) |
@@ -500,7 +501,7 @@ discard block |
||
500 | 501 | * |
501 | 502 | * @param array $input |
502 | 503 | * |
503 | - * @return boolean |
|
504 | + * @return boolean|null |
|
504 | 505 | */ |
505 | 506 | protected function validate(&$input) |
506 | 507 | { |
@@ -553,6 +554,9 @@ discard block |
||
553 | 554 | return true; |
554 | 555 | } |
555 | 556 | |
557 | + /** |
|
558 | + * @param string $email |
|
559 | + */ |
|
556 | 560 | function generateNewPassword($email) |
557 | 561 | { |
558 | 562 | if (!Validate::email($email)) { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $this->error = $this->getError(); |
86 | 86 | |
87 | 87 | if (PEAR::isError($this->db)) { |
88 | - throw new Exception($this->db->getMessage() . $this->db->getUserInfo()); |
|
88 | + throw new Exception($this->db->getMessage().$this->db->getUserInfo()); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | if ($this->id > 0) { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | protected function load() |
110 | 110 | { |
111 | - $result = $this->db->query("SELECT id, email, disabled FROM user WHERE id = " . $this->db->quote($this->id, 'integer')); |
|
111 | + $result = $this->db->query("SELECT id, email, disabled FROM user WHERE id = ".$this->db->quote($this->id, 'integer')); |
|
112 | 112 | |
113 | 113 | if (PEAR::isError($result)) { |
114 | 114 | throw new Exception($result->getUserInfo()); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | if (!empty($this->modules[$module])) { |
201 | 201 | return $module_id = $this->modules[$module]; |
202 | 202 | } else { |
203 | - throw new Exception('user says unknown module ' . $module); |
|
203 | + throw new Exception('user says unknown module '.$module); |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | */ |
261 | 261 | public function hasModuleAccess($module, $intranet_id = 0) |
262 | 262 | { |
263 | - $filename = PATH_INCLUDE_MODULE . $module . '/Main' . ucfirst($module) . '.php'; |
|
263 | + $filename = PATH_INCLUDE_MODULE.$module.'/Main'.ucfirst($module).'.php'; |
|
264 | 264 | if (file_exists($filename)) { |
265 | 265 | require_once $filename; |
266 | 266 | $module_class = 'Main'.ucfirst($module); |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | { |
466 | 466 | $id = intval($id); |
467 | 467 | if ($this->hasIntranetAccess($id)) { |
468 | - $this->db->exec("UPDATE user SET active_intranet_id = ". $this->db->quote($id, 'integer')." WHERE id = ". $this->db->quote($this->get('id'), 'integer')); |
|
468 | + $this->db->exec("UPDATE user SET active_intranet_id = ".$this->db->quote($id, 'integer')." WHERE id = ".$this->db->quote($this->get('id'), 'integer')); |
|
469 | 469 | return $id; |
470 | 470 | } |
471 | 471 | return false; |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | $row = $result->fetchRow(MDB2_FETCHMODE_ASSOC); |
569 | 569 | $new_password = Intraface_Kernel::randomKey(8); |
570 | 570 | |
571 | - $db->exec("UPDATE user SET password = '".md5($new_password)."' WHERE id =" . $row['id']); |
|
571 | + $db->exec("UPDATE user SET password = '".md5($new_password)."' WHERE id =".$row['id']); |
|
572 | 572 | |
573 | 573 | return $new_password; |
574 | 574 | } |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | return false; |
580 | 580 | } |
581 | 581 | |
582 | - $result = $this->db->query("SELECT * FROM user WHERE password = '".safeToDb(md5($old_password))."' AND id = " . $this->get('id')); |
|
582 | + $result = $this->db->query("SELECT * FROM user WHERE password = '".safeToDb(md5($old_password))."' AND id = ".$this->get('id')); |
|
583 | 583 | if ($result->numRows() < 1) { |
584 | 584 | $this->error->set('error in old password'); |
585 | 585 | } |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | return false; |
596 | 596 | } |
597 | 597 | |
598 | - $this->db->query("UPDATE user SET password = '".safeToDb(md5($new_password))."' WHERE id = " . $this->get('id')); |
|
598 | + $this->db->query("UPDATE user SET password = '".safeToDb(md5($new_password))."' WHERE id = ".$this->get('id')); |
|
599 | 599 | |
600 | 600 | return true; |
601 | 601 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * Constructor |
27 | 27 | * |
28 | - * @param $session_id Session id |
|
28 | + * @param string $session_id Session id |
|
29 | 29 | * @param $intranet Intranet |
30 | 30 | * |
31 | 31 | * @return void |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | * @param string $text Extra text to the itemline |
261 | 261 | * @param integer $product_detail_id Product detail id |
262 | 262 | * |
263 | - * @return mixed |
|
263 | + * @return boolean |
|
264 | 264 | */ |
265 | 265 | public function changeProductInBasket($credentials, $product_id, $quantity, $text = '', $product_detail_id = 0) |
266 | 266 | { |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | * |
608 | 608 | * @param struct $credentials Credentials to use the server |
609 | 609 | * |
610 | - * @return array |
|
610 | + * @return boolean |
|
611 | 611 | */ |
612 | 612 | private function checkCredentials($credentials) |
613 | 613 | { |
@@ -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'; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | return $product->getRelatedProducts(); |
155 | 155 | } |
156 | 156 | |
157 | - /** |
|
157 | + /** |
|
158 | 158 | * Gets featured products |
159 | 159 | * |
160 | 160 | * Method is experimental and only used by discimport.dk. If you need to use it |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | return $related_products; |
199 | 199 | } |
200 | 200 | |
201 | - /** |
|
201 | + /** |
|
202 | 202 | * Gets product keywords which can be used to sort ones webshop |
203 | 203 | * |
204 | 204 | * Method is experimental and only used by nylivsstil.dk. If you need to use it |
@@ -399,7 +399,6 @@ discard block |
||
399 | 399 | * |
400 | 400 | * @param struct $credentials Credentials to use the server |
401 | 401 | * @param integer $shop_id Id for the shop |
402 | - * @param integer $id Product id |
|
403 | 402 | * |
404 | 403 | * @return array |
405 | 404 | */ |
@@ -578,7 +577,7 @@ discard block |
||
578 | 577 | * |
579 | 578 | * @param struct $credentials Credentials to use the server |
580 | 579 | * @param integer $shop_id Id for the shop |
581 | - * @param integer $produt_id Product id to add |
|
580 | + * @param integer $product_id Product id to add |
|
582 | 581 | * @param integer $product_variation_id Product variation id to change |
583 | 582 | * @param integer $quantity Optional quantity |
584 | 583 | * @param string $text Extra text to the itemline |
@@ -621,7 +620,7 @@ discard block |
||
621 | 620 | * @param string $text Extra text to the itemline |
622 | 621 | * @param integer $product_detail_id Product detail id |
623 | 622 | * |
624 | - * @return mixed |
|
623 | + * @return boolean |
|
625 | 624 | */ |
626 | 625 | public function changeProductInBasket($credentials, $shop_id, $product_id, $product_variation_id, $quantity, $text = '', $product_detail_id = 0) |
627 | 626 | { |
@@ -1077,6 +1076,7 @@ discard block |
||
1077 | 1076 | /** |
1078 | 1077 | * Initialize the webshop |
1079 | 1078 | * |
1079 | + * @param integer $shop_id |
|
1080 | 1080 | * @return void |
1081 | 1081 | */ |
1082 | 1082 | private function _factoryWebshop($shop_id) |
@@ -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); |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | return $this->prepareResponseData($this->cleanUpProductList($product->getRelatedProducts($currencies, 'webshop'))); |
591 | 591 | } |
592 | 592 | |
593 | - /** |
|
593 | + /** |
|
594 | 594 | * Gets featured products |
595 | 595 | * |
596 | 596 | * Method is experimental and only used by discimport.dk. If you need to use it |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | return $this->prepareResponseData($related_products); |
641 | 641 | } |
642 | 642 | |
643 | - /** |
|
643 | + /** |
|
644 | 644 | * Gets product keywords which can be used to sort ones webshop |
645 | 645 | * |
646 | 646 | * |
@@ -250,6 +250,7 @@ discard block |
||
250 | 250 | * Formats array to return from product list from Doctrine |
251 | 251 | * |
252 | 252 | * @param object $doctrine_products Doctrine_Collection |
253 | + * @param integer $attribute_id |
|
253 | 254 | * @return array with products |
254 | 255 | */ |
255 | 256 | private function createDoctrineProductsListArray($doctrine_products, $attribute_id = null) |
@@ -563,7 +564,6 @@ discard block |
||
563 | 564 | * |
564 | 565 | * @param struct $credentials Credentials to use the server |
565 | 566 | * @param integer $shop_id Id for the shop |
566 | - * @param integer $id Product id |
|
567 | 567 | * |
568 | 568 | * @return array |
569 | 569 | */ |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | * |
742 | 742 | * @param struct $credentials Credentials to use the server |
743 | 743 | * @param integer $shop_id Id for the shop |
744 | - * @param integer $produt_id Product id to add |
|
744 | + * @param integer $product_id Product id to add |
|
745 | 745 | * @param integer $product_variation_id Product variation id to change |
746 | 746 | * @param integer $quantity Optional quantity |
747 | 747 | * @param string $text Extra text to the itemline |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | * @param string $text Extra text to the itemline |
785 | 785 | * @param integer $product_detail_id Product detail id |
786 | 786 | * |
787 | - * @return mixed |
|
787 | + * @return boolean |
|
788 | 788 | */ |
789 | 789 | public function changeProductInBasket($credentials, $shop_id, $product_id, $product_variation_id, $quantity, $text = '', $product_detail_id = 0) |
790 | 790 | { |
@@ -1238,6 +1238,7 @@ discard block |
||
1238 | 1238 | /** |
1239 | 1239 | * Initialize the webshop |
1240 | 1240 | * |
1241 | + * @param integer $shop_id |
|
1241 | 1242 | * @return void |
1242 | 1243 | */ |
1243 | 1244 | private function _factoryWebshop($shop_id) |
@@ -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); |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | return $this->prepareResponseData($this->cleanUpProductList($product->getRelatedProducts($currencies, 'webshop'))); |
591 | 591 | } |
592 | 592 | |
593 | - /** |
|
593 | + /** |
|
594 | 594 | * Gets featured products |
595 | 595 | * |
596 | 596 | * Method is experimental and only used by discimport.dk. If you need to use it |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | return $this->prepareResponseData($related_products); |
641 | 641 | } |
642 | 642 | |
643 | - /** |
|
643 | + /** |
|
644 | 644 | * Gets product keywords which can be used to sort ones webshop |
645 | 645 | * |
646 | 646 | * |