@@ -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; |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | $row = $result->fetchRow(MDB2_FETCHMODE_ASSOC); |
570 | 570 | $new_password = Intraface_Kernel::randomKey(8); |
571 | 571 | |
572 | - $db->exec("UPDATE user SET password = '".md5($new_password)."' WHERE id =" . $row['id']); |
|
572 | + $db->exec("UPDATE user SET password = '".md5($new_password)."' WHERE id =".$row['id']); |
|
573 | 573 | |
574 | 574 | return $new_password; |
575 | 575 | } |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | return false; |
581 | 581 | } |
582 | 582 | |
583 | - $result = $this->db->query("SELECT * FROM user WHERE password = '".safeToDb(md5($old_password))."' AND id = " . $this->get('id')); |
|
583 | + $result = $this->db->query("SELECT * FROM user WHERE password = '".safeToDb(md5($old_password))."' AND id = ".$this->get('id')); |
|
584 | 584 | if ($result->numRows() < 1) { |
585 | 585 | $this->error->set('error in old password'); |
586 | 586 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | return false; |
597 | 597 | } |
598 | 598 | |
599 | - $this->db->query("UPDATE user SET password = '".safeToDb(md5($new_password))."' WHERE id = " . $this->get('id')); |
|
599 | + $this->db->query("UPDATE user SET password = '".safeToDb(md5($new_password))."' WHERE id = ".$this->get('id')); |
|
600 | 600 | |
601 | 601 | return true; |
602 | 602 |
@@ -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 |
@@ -9,6 +9,9 @@ |
||
9 | 9 | */ |
10 | 10 | class Intraface_XMLRPC_CMS_Server0300 extends Intraface_XMLRPC_Server0100 |
11 | 11 | { |
12 | + /** |
|
13 | + * @param integer $site_id |
|
14 | + */ |
|
12 | 15 | private function factory($site_id) |
13 | 16 | { |
14 | 17 | if (!$this->kernel->weblogin->hasModuleAccess('cms')) { // -2 |
@@ -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(); |
@@ -9,6 +9,9 @@ |
||
9 | 9 | */ |
10 | 10 | class Intraface_XMLRPC_CMS_Server0300 extends Intraface_XMLRPC_Server0100 |
11 | 11 | { |
12 | + /** |
|
13 | + * @param integer $site_id |
|
14 | + */ |
|
12 | 15 | private function factory($site_id) |
13 | 16 | { |
14 | 17 | if (!$this->kernel->weblogin->hasModuleAccess('cms')) { // -2 |
@@ -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); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * |
62 | 62 | * @param struct $credentials Credentials to use the server |
63 | 63 | * |
64 | - * @return array |
|
64 | + * @return boolean |
|
65 | 65 | */ |
66 | 66 | protected function checkCredentials($credentials) |
67 | 67 | { |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | if (count($credentials) != 2) { // -4 |
71 | 71 | require_once 'XML/RPC2/Exception.php'; |
72 | - throw new XML_RPC2_FaultException('wrong argument count in $credentials - got ' . count($credentials) . ' arguments - need 2', -4); |
|
72 | + throw new XML_RPC2_FaultException('wrong argument count in $credentials - got '.count($credentials).' arguments - need 2', -4); |
|
73 | 73 | } |
74 | 74 | if (empty($credentials['private_key'])) { // -5 |
75 | 75 | require_once 'XML/RPC2/Exception.php'; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * |
62 | 62 | * @param struct $credentials Credentials to use the server |
63 | 63 | * |
64 | - * @return array |
|
64 | + * @return boolean |
|
65 | 65 | */ |
66 | 66 | protected function checkCredentials($credentials) |
67 | 67 | { |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | if (count($credentials) != 2) { // -4 |
71 | 71 | require_once 'XML/RPC2/Exception.php'; |
72 | - throw new XML_RPC2_FaultException('wrong argument count in $credentials - got ' . count($credentials) . ' arguments - need 2', -4); |
|
72 | + throw new XML_RPC2_FaultException('wrong argument count in $credentials - got '.count($credentials).' arguments - need 2', -4); |
|
73 | 73 | } |
74 | 74 | if (empty($credentials['private_key'])) { // -5 |
75 | 75 | require_once 'XML/RPC2/Exception.php'; |
@@ -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 | { |
@@ -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 |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | } |
201 | 201 | |
202 | - /** |
|
202 | + /** |
|
203 | 203 | * Gets product keywords which can be used to sort ones webshop |
204 | 204 | * |
205 | 205 | * Method is experimental and only used by nylivsstil.dk. If you need to use it |
@@ -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'; |