Completed
Pull Request — master (#27)
by Lars
11:57
created
src/Intraface/modules/contact/Controller/templates/merge.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@
 block discarded – undo
58 58
         <?php foreach ($context->getSimilarContacts() as $c) { ?>
59 59
             <tr>
60 60
                 <td><input type="checkbox" value="<?php e($c['id']); ?>" name="contact[]" /></td>
61
-                <td><a href="<?php e(url('../../' . $c['id'])); ?>"><?php e($c['number']); ?></a></td>
61
+                <td><a href="<?php e(url('../../'.$c['id'])); ?>"><?php e($c['number']); ?></a></td>
62 62
                 <td><?php e($c['name']); ?></td>
63 63
                 <td><?php e($c['address']); ?></td>
64 64
                 <td><?php e($c['postcode']); ?> <?php e($c['city']); ?></td>
65 65
                 <td><?php e($c['phone']); ?></td>
66 66
                 <td><?php e($c['email']); ?></td>
67
-                <td><a href="<?php e(url('../../' . $c['id'] . '/merge')); ?>"><?php e(t('Switch to')); ?></a></td>
67
+                <td><a href="<?php e(url('../../'.$c['id'].'/merge')); ?>"><?php e(t('Switch to')); ?></a></td>
68 68
             </tr>
69 69
         <?php } ?>
70 70
         </tbody>
Please login to merge, or discard this patch.
src/Intraface/modules/contact/Controller/templates/edit.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             <tr>
49 49
                 <td><?php e($c['name']); ?></td>
50 50
                 <td><?php e($c['address']); ?></td>
51
-                <td><?php e($c['postcode'] . ' ' . $c['city']); ?></td>
51
+                <td><?php e($c['postcode'].' '.$c['city']); ?></td>
52 52
                 <td><?php e($c['phone']); ?></td>
53 53
                 <td><?php e($c['email']); ?></td>
54 54
                 <td><a href="<?php e(url($c['id'])); ?>"><?php e(t('Choose')); ?></a></td>
Please login to merge, or discard this patch.
src/Intraface/modules/contact/Controller/Sendemail.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             'contact' => $contact
28 28
         );
29 29
 
30
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/sendemail');
30
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/sendemail');
31 31
         return $smarty->render($this, $data);
32 32
     }
33 33
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 $email = new Email($this->getKernel());
59 59
                 $input = array(
60 60
                     'subject' => $_POST['subject'],
61
-                    'body' => $_POST['text'] . "\n\nLogin: " . $contact->get('login_url'),
61
+                    'body' => $_POST['text']."\n\nLogin: ".$contact->get('login_url'),
62 62
                     'from_email' => $this->getKernel()->user->get('email'),
63 63
                     'from_name' => $this->getKernel()->user->get('name'),
64 64
                     'contact_id' => $contact->get('id'),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 $email->queue();
71 71
                 $j++;
72 72
             }
73
-            $this->msg = 'Emailen blev i alt sendt til ' . $j . ' kontakter. <a href="'.$this->url('../').'">Tilbage til kontakter</a>.';
73
+            $this->msg = 'Emailen blev i alt sendt til '.$j.' kontakter. <a href="'.$this->url('../').'">Tilbage til kontakter</a>.';
74 74
         } else {
75 75
             $value = $_POST;
76 76
         }
Please login to merge, or discard this patch.
src/Intraface/modules/contact/Controller/BatchNewsletter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             'contact' => $contact
32 32
         );
33 33
 
34
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/batchnewsletter');
34
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/batchnewsletter');
35 35
         return $smarty->render($this, $data);
36 36
     }
37 37
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
                 $j++;
68 68
             }
69
-            $this->msg = 'I alt blev ' . $j . ' kontakter tilmeldt nyhedsbrevet. <a href="'.$this->url('../', array('use_stored' => 'true')).'">Tilbage til kontakter</a>.';
69
+            $this->msg = 'I alt blev '.$j.' kontakter tilmeldt nyhedsbrevet. <a href="'.$this->url('../', array('use_stored' => 'true')).'">Tilbage til kontakter</a>.';
70 70
         } else {
71 71
             $value = $_POST;
72 72
         }
Please login to merge, or discard this patch.
src/Intraface/modules/contact/Controller/Index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
         */
56 56
 
57
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/index');
57
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/index');
58 58
         return $smarty->render($this, array('contacts' => $this->getContacts()));
59 59
     }
60 60
 
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
             }
140 140
         }
141 141
 
142
-        $keywords = 'Nøgleord' . implode(' ', $used_keyword);
143
-        $search = 'Søgetekst' . $contact->getDBQuery()->getFilter('search');
144
-        $count = 'Kontakter i søgning' . count($contacts);
142
+        $keywords = 'Nøgleord'.implode(' ', $used_keyword);
143
+        $search = 'Søgetekst'.$contact->getDBQuery()->getFilter('search');
144
+        $count = 'Kontakter i søgning'.count($contacts);
145 145
 
146 146
         $i = 1;
147 147
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $i = $i + 1;
175 175
         $worksheet->write($i, 0, $count, $format_italic);
176 176
 
177
-        $i = $i+2;
177
+        $i = $i + 2;
178 178
         $worksheet->write($i, 0, 'Navn', $format_bold);
179 179
         $worksheet->write($i, 1, 'Adresse', $format_bold);
180 180
         $worksheet->write($i, 2, 'Postnummer', $format_bold);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
         $this->document->addScript('contact/contact_edit.js');
210 210
 
211
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/edit');
211
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/edit');
212 212
         return $smarty->render($this);
213 213
     }
214 214
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         if ($this->body()) {
271 271
             return $value = $_POST;
272 272
         }
273
-        return array('number' => $this->getContact()->getMaxNumber()+1);
273
+        return array('number' => $this->getContact()->getMaxNumber() + 1);
274 274
     }
275 275
 
276 276
     function getAddressValues()
Please login to merge, or discard this patch.
src/Intraface/modules/shop/BasketEvaluation.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $this->shop     = $shop;
48 48
         $this->id       = (int)$id;
49 49
 
50
-        $this->value['settings'] = array (
50
+        $this->value['settings'] = array(
51 51
             'evaluate_target' => array(
52 52
                 0 => 'price',
53 53
                 1 => 'weight',
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
      */
86 86
     private function load()
87 87
     {
88
-        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer') . " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
88
+        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')." AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
89 89
 
90 90
         if (PEAR::isError($result)) {
91
-            throw new Exception($result->getMessage() . $result->getUserInfo());
91
+            throw new Exception($result->getMessage().$result->getUserInfo());
92 92
         }
93 93
 
94 94
         if ($result->numRows() == 0) {
@@ -146,35 +146,35 @@  discard block
 block discarded – undo
146 146
             return false;
147 147
         }
148 148
 
149
-        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
150
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
151
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
152
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
153
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
154
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
155
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
156
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
157
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
149
+        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", ".
150
+                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", ".
151
+                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", ".
152
+                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", ".
153
+                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", ".
154
+                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", ".
155
+                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", ".
156
+                 "action_value = ".$this->db->quote($input['action_value'], 'text').", ".
157
+                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", ".
158 158
                  "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
159 159
 
160 160
         if ($this->id != 0) {
161
-            $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')  . " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
161
+            $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')." AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
162 162
 
163 163
             if (PEAR::isError($result)) {
164
-                throw new Exception($result->getMessage() . $result->getUserInfo());
164
+                throw new Exception($result->getMessage().$result->getUserInfo());
165 165
                 return false;
166 166
             }
167 167
         } else {
168 168
             $result = $this->db->query("INSERT INTO webshop_basket_evaluation SET ".$sql.", intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer').", id = ".$this->db->quote($this->id, 'integer').", shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
169 169
 
170 170
             if (PEAR::isError($result)) {
171
-                throw new Exception($result->getMessage() . $result->getUserInfo());
171
+                throw new Exception($result->getMessage().$result->getUserInfo());
172 172
                 return false;
173 173
             }
174 174
 
175 175
             $this->id = $this->db->lastInsertID();
176 176
             if (PEAR::isError($this->id)) {
177
-                throw new Exception($result->getMessage() . $result->getUserInfo());
177
+                throw new Exception($result->getMessage().$result->getUserInfo());
178 178
             }
179 179
         }
180 180
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     {
191 191
         $result = $this->db->exec("UPDATE webshop_basket_evaluation SET active = 0 WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer'));
192 192
         if (PEAR::isError($result)) {
193
-            throw new Exception($result->getMessage() . $result->getUserInfo());
193
+            throw new Exception($result->getMessage().$result->getUserInfo());
194 194
             return false;
195 195
         }
196 196
         return true;
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function getList()
205 205
     {
206
-        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer'). " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer')." ORDER BY running_index");
206
+        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer')." ORDER BY running_index");
207 207
 
208 208
         if (PEAR::isError($this->id)) {
209
-            throw new Exception($result->getMessage() . $result->getUserInfo());
209
+            throw new Exception($result->getMessage().$result->getUserInfo());
210 210
         }
211 211
 
212 212
         $i = 0;
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Basket.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
         $this->resetItemCache();
70 70
 
71 71
         $this->conditions = array(
72
-            'session_id = ' . $this->db->quote($this->session_id, 'text'),
73
-            'shop_id = ' . $this->db->quote($this->webshop->getId(), 'integer'),
74
-            'intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer'));
72
+            'session_id = '.$this->db->quote($this->session_id, 'text'),
73
+            'shop_id = '.$this->db->quote($this->webshop->getId(), 'integer'),
74
+            'intranet_id = '.$this->db->quote($this->intranet->getId(), 'integer'));
75 75
 
76 76
         $this->cleanUp();
77 77
     }
78 78
 
79 79
     private function cleanUp()
80 80
     {
81
-        return $this->db->query("DELETE FROM basket WHERE DATE_ADD(date_changed, INTERVAL " . $this->db->quote(self::CLEAN_UP_AFTER, 'integer') . " HOUR) < NOW()");
81
+        return $this->db->query("DELETE FROM basket WHERE DATE_ADD(date_changed, INTERVAL ".$this->db->quote(self::CLEAN_UP_AFTER, 'integer')." HOUR) < NOW()");
82 82
     }
83 83
 
84 84
     /**
@@ -165,23 +165,23 @@  discard block
 block discarded – undo
165 165
                 FROM basket
166 166
                 WHERE product_id = ".$product_id."
167 167
                     AND product_variation_id = ".$product_variation_id."
168
-                    AND product_detail_id = " . $product_detail_id . "
169
-                    AND basketevaluation_product = " . $basketevaluation . "
168
+                    AND product_detail_id = " . $product_detail_id."
169
+                    AND basketevaluation_product = " . $basketevaluation."
170 170
                     AND " . $sql_extra);
171 171
 
172 172
         if ($db->nextRecord()) {
173 173
             if ($quantity == 0) {
174 174
                 $db->query("DELETE FROM basket
175
-                    WHERE id = ".$db->f('id') . "
176
-                        AND basketevaluation_product = " . $basketevaluation . "
175
+                    WHERE id = ".$db->f('id')."
176
+                        AND basketevaluation_product = " . $basketevaluation."
177 177
                         AND " . $sql_extra);
178 178
             } else {
179 179
                 $db->query("UPDATE basket SET
180 180
                     quantity = $quantity,
181 181
                     date_changed = NOW(),
182 182
                     text = '".$text."'
183
-                    WHERE id = ".$db->f('id') . "
184
-                        AND basketevaluation_product = " . $basketevaluation . "
183
+                    WHERE id = ".$db->f('id')."
184
+                        AND basketevaluation_product = " . $basketevaluation."
185 185
                         AND " . $sql_extra);
186 186
             }
187 187
             return true;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                         quantity = $quantity,
193 193
                         date_changed = NOW(),
194 194
                         text = '".$text."',
195
-                        basketevaluation_product = " . $basketevaluation . ",
195
+                        basketevaluation_product = " . $basketevaluation.",
196 196
                         product_id = ".$product_id.",
197 197
                         product_variation_id = ".$product_variation_id.",
198 198
                         product_detail_id = ".$product_detail_id.",
@@ -220,10 +220,10 @@  discard block
 block discarded – undo
220 220
         settype($input['email'], 'string');
221 221
         settype($input['phone'], 'string');
222 222
 
223
-        $sql = "name = \"".safeToDb($input['name'])."\"," .
224
-            "contactperson = \"".safeToDb($input['contactperson'])."\", " .
225
-            "address = \"".safeToDb($input['address'])."\", " .
226
-            "postcode = \"".safeToDb($input['postcode'])."\", " .
223
+        $sql = "name = \"".safeToDb($input['name'])."\",".
224
+            "contactperson = \"".safeToDb($input['contactperson'])."\", ".
225
+            "address = \"".safeToDb($input['address'])."\", ".
226
+            "postcode = \"".safeToDb($input['postcode'])."\", ".
227 227
             "city = \"".safeToDb($input['city'])."\", ".
228 228
             "country = \"".safeToDb($input['country'])."\", ".
229 229
             "cvr = \"".safeToDb($input['cvr'])."\", ".
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
         $sql_extra = implode(" AND ", $this->conditions);
306 306
 
307 307
         $db = new DB_Sql;
308
-        $db->query("SELECT id FROM basket_details WHERE " . $sql_extra. "
308
+        $db->query("SELECT id FROM basket_details WHERE ".$sql_extra."
309 309
                 AND intranet_id = " . $this->intranet->getId());
310 310
         if ($db->nextRecord()) {
311 311
             $db->query("UPDATE basket_details SET ".$sql.",
312 312
                 date_changed = NOW()
313
-                WHERE id = ".$db->f('id') . "
314
-                    AND " . $sql_extra . "
313
+                WHERE id = ".$db->f('id')."
314
+                    AND " . $sql_extra."
315 315
                     AND intranet_id = " . $this->intranet->getId());
316 316
             return true;
317 317
         } else {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $db = new DB_Sql;
340 340
         $db->query("SELECT *
341 341
             FROM basket_details
342
-            WHERE " . $sql_extra . "
342
+            WHERE " . $sql_extra."
343 343
                 AND intranet_id = " . $this->intranet->getId());
344 344
         if (!$db->nextRecord()) {
345 345
             return array();
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         $db = new DB_Sql;
370 370
         $db->query("SELECT customer_coupon
371 371
             FROM basket_details
372
-            WHERE " . $sql_extra . "
372
+            WHERE " . $sql_extra."
373 373
                 AND intranet_id = " . $this->intranet->getId());
374 374
         if (!$db->nextRecord()) {
375 375
             return array();
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         $db = new DB_Sql;
392 392
         $db->query("SELECT customer_ean
393 393
             FROM basket_details
394
-            WHERE " . $sql_extra . "
394
+            WHERE " . $sql_extra."
395 395
                 AND intranet_id = " . $this->intranet->getId());
396 396
         if (!$db->nextRecord()) {
397 397
             return array();
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
         $db = new DB_Sql;
414 414
         $db->query("SELECT customer_comment
415 415
             FROM basket_details
416
-            WHERE " . $sql_extra . "
416
+            WHERE " . $sql_extra."
417 417
                 AND intranet_id = " . $this->intranet->getId());
418 418
         if (!$db->nextRecord()) {
419 419
             return array();
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         $db = new DB_Sql;
436 436
         $db->query("SELECT payment_method_key
437 437
             FROM basket_details
438
-            WHERE " . $sql_extra . "
438
+            WHERE " . $sql_extra."
439 439
                 AND intranet_id = " . $this->intranet->getId());
440 440
         if (!$db->nextRecord() || $db->f('payment_method_key') == 0) {
441 441
             return array();
@@ -460,10 +460,10 @@  discard block
 block discarded – undo
460 460
         $db = new DB_Sql;
461 461
         $db->query("SELECT *
462 462
             FROM basket
463
-            WHERE " . $sql_extra . "
464
-                AND product_id = " . $product_id . "
463
+            WHERE " . $sql_extra."
464
+                AND product_id = " . $product_id."
465 465
                 AND product_variation_id = ".$product_variation_id."
466
-                AND intranet_id = " . $this->intranet->getId() . "
466
+                AND intranet_id = " . $this->intranet->getId()."
467 467
       AND quantity > 0 LIMIT 1");
468 468
 
469 469
         if (!$db->nextRecord()) {
@@ -574,9 +574,9 @@  discard block
 block discarded – undo
574 574
                 ON product.id = basket.product_id
575 575
             INNER JOIN product_detail
576 576
                 ON product.id = product_detail.product_id
577
-            WHERE " . $sql_extra . "
577
+            WHERE " . $sql_extra."
578 578
                 AND product_detail.active = 1
579
-                AND basket.intranet_id = " . $this->intranet->getId() . "
579
+                AND basket.intranet_id = " . $this->intranet->getId()."
580 580
             ORDER BY product_detail.vat DESC, basket.basketevaluation_product");
581 581
 
582 582
         $i = 0;
@@ -627,16 +627,16 @@  discard block
 block discarded – undo
627 627
 
628 628
             // basket specific
629 629
             $items[$i]['quantity'] = $db->f('quantity');
630
-            $items[$i]['totalweight'] = $items[$i]['weight'] * $db->f('quantity');
631
-            $items[$i]['totalprice'] = $db->f('quantity') * $items[$i]['price'];
632
-            $items[$i]['totalprice_incl_vat'] = $db->f('quantity') * $items[$i]['price_incl_vat'];
630
+            $items[$i]['totalweight'] = $items[$i]['weight']*$db->f('quantity');
631
+            $items[$i]['totalprice'] = $db->f('quantity')*$items[$i]['price'];
632
+            $items[$i]['totalprice_incl_vat'] = $db->f('quantity')*$items[$i]['price_incl_vat'];
633 633
 
634
-            $items[$i]['currency']['DKK']['totalprice'] = $db->f('quantity') * $items[$i]['currency']['DKK']['price'];
635
-            $items[$i]['currency']['DKK']['totalprice_incl_vat'] = $db->f('quantity') * $items[$i]['currency']['DKK']['price_incl_vat'];
634
+            $items[$i]['currency']['DKK']['totalprice'] = $db->f('quantity')*$items[$i]['currency']['DKK']['price'];
635
+            $items[$i]['currency']['DKK']['totalprice_incl_vat'] = $db->f('quantity')*$items[$i]['currency']['DKK']['price_incl_vat'];
636 636
             if (is_object($currencies) && $currencies->count() > 0) {
637 637
                 foreach ($currencies as $currency) {
638
-                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice'] = $db->f('quantity') * $items[$i]['currency'][$currency->getType()->getIsoCode()]['price'];
639
-                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice_incl_vat'] = $db->f('quantity') * $items[$i]['currency'][$currency->getType()->getIsoCode()]['price_incl_vat'];
638
+                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice'] = $db->f('quantity')*$items[$i]['currency'][$currency->getType()->getIsoCode()]['price'];
639
+                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice_incl_vat'] = $db->f('quantity')*$items[$i]['currency'][$currency->getType()->getIsoCode()]['price_incl_vat'];
640 640
                 }
641 641
             }
642 642
 
@@ -665,10 +665,10 @@  discard block
 block discarded – undo
665 665
     {
666 666
         $sql_extra = implode(" AND ", $this->conditions);
667 667
         $db = new DB_Sql;
668
-        $db->query("DELETE FROM basket " .
669
-                "WHERE basketevaluation_product = 1 " .
670
-                    "AND " . $sql_extra . " " .
671
-                    "AND intranet_id = " . $this->intranet->getId());
668
+        $db->query("DELETE FROM basket ".
669
+                "WHERE basketevaluation_product = 1 ".
670
+                    "AND ".$sql_extra." ".
671
+                    "AND intranet_id = ".$this->intranet->getId());
672 672
 
673 673
         $this->resetItemCache();
674 674
 
@@ -687,8 +687,8 @@  discard block
 block discarded – undo
687 687
 
688 688
         $sql_extra = implode(" AND ", $this->conditions);
689 689
         $db = new DB_Sql;
690
-        $db->query("UPDATE basket SET session_id = '' WHERE " . $sql_extra . " AND intranet_id = " . $this->intranet->getId());
691
-        $db->query("UPDATE basket_details SET session_id = '' WHERE " . $sql_extra . " AND intranet_id = " . $this->intranet->getId());
690
+        $db->query("UPDATE basket SET session_id = '' WHERE ".$sql_extra." AND intranet_id = ".$this->intranet->getId());
691
+        $db->query("UPDATE basket_details SET session_id = '' WHERE ".$sql_extra." AND intranet_id = ".$this->intranet->getId());
692 692
 
693 693
         return true;
694 694
     }
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/tpl/categories.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             # If there is subcategories to the category
33 33
             if (is_array($category['categories']) && count($category['categories']) > 0) {
34 34
                 # We make the items for the next level the sub categories of this category
35
-                $level_categories[$level+1] = $category['categories'];
35
+                $level_categories[$level + 1] = $category['categories'];
36 36
 
37 37
                 # We move to next level
38 38
                 $level++;
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/Index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         if (!is_null($options)) {
28 28
             $config = HTMLPurifier_Config::createDefault();
29 29
             foreach ($options as $option) {
30
-                $config->set($option[0] . '.' . $option[1], $option[2]);
30
+                $config->set($option[0].'.'.$option[1], $option[2]);
31 31
             }
32 32
         }
33 33
         $this->_htmlPurifier = new HTMLPurifier($config);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $options = array(
47 47
             array('Cache', 'SerializerPath',
48
-                PATH_CACHE . '/htmlpurifier'
48
+                PATH_CACHE.'/htmlpurifier'
49 49
             ),
50 50
             //array('HTML', 'Doctype', 'XHTML 1.0 Strict'),
51 51
             array('HTML', 'Allowed',
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
         $shops = Doctrine::getTable('Intraface_modules_shop_Shop')->findByIntranetId($this->getKernel()->intranet->getId());
150 150
 
151 151
         if (count($shops) == 0) {
152
-            $tpl = $this->template->create(dirname(__FILE__) . '/tpl/empty-table');
152
+            $tpl = $this->template->create(dirname(__FILE__).'/tpl/empty-table');
153 153
             return $tpl->render($this, array('message' => 'No shops has been created yet.'));
154 154
         }
155 155
 
156 156
         $data = array('shops' => $shops);
157
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/shops');
157
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/shops');
158 158
         return $tpl->render($this, $data);
159 159
     }
160 160
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             'settings' => $settings,
193 193
             'currencies' => $currencies,
194 194
             'languages' => $langs);
195
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/edit');
195
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/edit');
196 196
         return $tpl->render($this, $data);
197 197
     }
198 198
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 
243 243
     function wrapHtml($content)
244 244
     {
245
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/content');
245
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/content');
246 246
         return $tpl->render($this, array('content' => $content));
247 247
     }
248 248
 
Please login to merge, or discard this patch.