Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/modules/administration/Controller/Intranet.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
     function renderHtml()
13 13
     {
14
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/intranet');
14
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/intranet');
15 15
         return $smarty->render($this);
16 16
     }
17 17
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                     $values['pdf_header_file_id'] = $filehandler->get('id');
34 34
                     $intranet->update($values);
35 35
                 } else {
36
-                    $filehandler->error->set('Header should be a .jpg image - got '. $filehandler->get('file_type'));
36
+                    $filehandler->error->set('Header should be a .jpg image - got '.$filehandler->get('file_type'));
37 37
                 }
38 38
             }
39 39
         }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $values = $intranet->get();
42 42
         $address = $intranet->address->get();
43 43
 
44
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/intranet-edit');
44
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/intranet-edit');
45 45
         return $smarty->render($this, array('intranet' => $intranet, 'kernel' => $this->getKernel()));
46 46
     }
47 47
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             if ($type['mime_type'] == 'image/jpeg' || $type['mime_type'] == 'image/pjpeg') {
71 71
                 $values['pdf_header_file_id'] = $id;
72 72
             } else {
73
-                $intranet->error->set('Header should be a .jpg image - got ' . $type['mime_type']);
73
+                $intranet->error->set('Header should be a .jpg image - got '.$type['mime_type']);
74 74
                 $filehandler->delete();
75 75
             }
76 76
         }
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/templates/show.tpl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -248,8 +248,8 @@  discard block
 block discarded – undo
248 248
             $total = 0;
249 249
 
250 250
 
251
-            for ($i = 0, $max = count($items); $i<$max; $i++) {
252
-                $total += $items[$i]["quantity"] * $items[$i]["unit_purchase_price"];
251
+            for ($i = 0, $max = count($items); $i < $max; $i++) {
252
+                $total += $items[$i]["quantity"]*$items[$i]["unit_purchase_price"];
253 253
                 ?>
254 254
                 <tr id="i<?php e($items[$i]["id"]); ?>" <?php if (isset($_GET['item_id']) && $_GET['item_id'] == $items[$i]['id']) {
255 255
                     print(' class="fade"');
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                     <td class="amount"><?php e(number_format($items[$i]["calculated_unit_price"], 2, ",", ".")); ?></td>
264 264
                     <td class="buttons">
265 265
                         <?php if ($procurement->get("locked") == false) { ?>
266
-                            <a class="edit" href="<?php e(url('item/' .$items[$i]["id"], array('edit'))); ?>">Ret</a>
266
+                            <a class="edit" href="<?php e(url('item/'.$items[$i]["id"], array('edit'))); ?>">Ret</a>
267 267
                             <a class="delete" href="<?php e(url(null, array('delete_item_id' => $items[$i]["id"]))); ?>">Slet</a>
268 268
                         <?php } ?>&nbsp;
269 269
                     </td>
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/templates/item-edit.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,6 +46,6 @@
 block discarded – undo
46 46
     <input type="hidden" name="product_variation_detail_id" value="<?php e($procurement->item->get('product_variation_detail_id')); ?>" />
47 47
 
48 48
     <input type="submit" name="submit" value="Gem" class="save" />
49
-    <a href="<?php e(url('../'));  ?>">Fortryd</a>
49
+    <a href="<?php e(url('../')); ?>">Fortryd</a>
50 50
 </div>
51 51
 </form>
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/templates/index.tpl.php 1 patch
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,9 +13,12 @@  discard block
 block discarded – undo
13 13
 
14 14
 <?php if (!$gateway->any()) : ?>
15 15
     <p><?php e(t('No procurements has been created')); ?>. <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create procurement')); ?></a>.</p>
16
-<?php else : ?>
16
+<?php else {
17
+    : ?>
17 18
 
18
-    <form method="get" action="<?php e(url()); ?>">
19
+    <form method="get" action="<?php e(url());
20
+}
21
+?>">
19 22
     <fieldset>
20 23
         <legend><?php e(t('Search')); ?></legend>
21 24
         <label><?php e(t('Text')); ?>
@@ -78,8 +81,11 @@  discard block
 block discarded – undo
78 81
                         <?php if ($context->getKernel()->user->hasModuleAccess('contact') && $procurement["contact_id"] != 0) : ?>
79 82
                             <?php $ModuleContact = $context->getKernel()->getModule('contact'); ?>
80 83
                             <a href="<?php e($ModuleContact->getPath().$procurement["contact_id"]); ?>"><?php e($procurement["contact"]); ?></a>
81
-                        <?php else : ?>
82
-                            <?php e($procurement["vendor"]); ?>
84
+                        <?php else {
85
+    : ?>
86
+                            <?php e($procurement["vendor"]);
87
+}
88
+?>
83 89
                         <?php endif; ?>
84 90
                     </td>
85 91
                     <td><?php e($procurement["dk_invoice_date"]); ?></td>
@@ -88,8 +94,11 @@  discard block
 block discarded – undo
88 94
                             <?php e(t(ucfirst($procurement["status"]))); ?> <?php e($procurement["dk_delivery_date"]); ?>
89 95
                         <?php elseif ($procurement["delivery_date"] != "0000-00-00") : ?>
90 96
                             <?php e($procurement["dk_delivery_date"]); ?>
91
-                        <?php else : ?>
92
-                            <?php e(t('Not given')); ?>
97
+                        <?php else {
98
+    : ?>
99
+                            <?php e(t('Not given'));
100
+}
101
+?>
93 102
                         <?php endif; ?>
94 103
                     </td>
95 104
                     <td>
@@ -99,8 +108,11 @@  discard block
 block discarded – undo
99 108
                             <?php e(t('Paid')); ?> <?php e($procurement['dk_paid_date']); ?>
100 109
                         <?php elseif ($procurement["payment_date"] != "0000-00-00") : ?>
101 110
                             <?php e($procurement["dk_payment_date"]); ?>
102
-                        <?php else : ?>
103
-                            <?php e(t('Not given')); ?>
111
+                        <?php else {
112
+    : ?>
113
+                            <?php e(t('Not given'));
114
+}
115
+?>
104 116
                         <?php endif; ?>
105 117
                     </td>
106 118
                     <td>
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/PurchasePrice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             'procurement' => $procurement
21 21
         );
22 22
 
23
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/purchaseprice');
23
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/purchaseprice');
24 24
         return $tpl->render($this, $data);
25 25
     }
26 26
 
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/Show.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 $contact_module = $this->getKernel()->useModule('contact');
56 56
 
57 57
                 $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
58
-                $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('choosecontact'), NET_SCHEME . NET_HOST . $this->url());
58
+                $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('choosecontact'), NET_SCHEME.NET_HOST.$this->url());
59 59
                 $redirect->askParameter('contact_id');
60 60
                 $redirect->setIdentifier('contact');
61 61
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             'kernel' => $this->getKernel(),
103 103
             'append_file' => $append_file,
104 104
             'filehandler' => $filehandler);
105
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/show');
105
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/show');
106 106
         return $tpl->render($this, $data);
107 107
     }
108 108
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             'title' => $this->t("Edit procurement"),
119 119
             'gateway' => new Intraface_modules_procurement_ProcurementGateway($this->getKernel()),
120 120
             'values' => $this->getValues());
121
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/procurement-edit');
121
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/procurement-edit');
122 122
         return $tpl->render($this, $data);
123 123
     }
124 124
 
Please login to merge, or discard this patch.
src/Intraface/modules/order/include_front.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         );
17 17
     } else {
18 18
         $db = new DB_Sql;
19
-        $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = " . $kernel->intranet->get('id'));
19
+        $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = ".$kernel->intranet->get('id'));
20 20
         $orders = $db->numRows();
21 21
         if ($orders > 0) {
22 22
             $_attention_needed[] = array(
Please login to merge, or discard this patch.
src/Intraface/modules/currency/Controller/tpl/currencies.tpl.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,14 +15,18 @@
 block discarded – undo
15 15
         <td><?php  $rate = $currency->getProductPriceExchangeRate();
16 16
         if ($rate === false) :
17 17
             e(t('Not given'));
18
-        else :
18
+        else {
19
+            :
19 20
             e($rate->getRate()->getAsLocal('da_dk').' ('.$rate->getDateUpdated()->getAsLocal('da_dk').')');
21
+        }
20 22
         endif; ?> <a class="edit" href="<?php e(url($currency->getId().'/exchangerate/productprice/update')) ?>"><?php e(t('Update')); ?></a></td>
21 23
         <td><?php  $rate = $currency->getPaymentExchangeRate();
22 24
         if ($rate === false) :
23 25
             e(t('Not given'));
24
-        else :
26
+        else {
27
+            :
25 28
             e($rate->getRate()->getAsLocal('da_dk').' ('.$rate->getDateUpdated()->getAsLocal('da_dk').')');
29
+        }
26 30
         endif; ?> <a class="edit" href="<?php e(url($currency->getId().'/exchangerate/payment/update')) ?>"><?php e(t('Update')); ?></a></td>
27 31
     </tr>
28 32
     <?php endforeach; ?>
Please login to merge, or discard this patch.
src/Intraface/modules/currency/Controller/tpl/add.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
                 <?php if (!empty($data['selected_type_iso_code']) and $type->getIsoCode() == $data['selected_type_iso_code']) {
9 9
                     echo ' selected="selected"';
10 10
 } ?>
11
-                ><?php e($type->getIsoCode() . ' ' . $type->getDescription()); ?></option>
11
+                ><?php e($type->getIsoCode().' '.$type->getDescription()); ?></option>
12 12
             <?php endforeach; ?>
13 13
             </select>
14 14
         </div>
Please login to merge, or discard this patch.