Completed
Pull Request — master (#22)
by Lars
25:44 queued 10:42
created
src/Intraface/modules/contact/Controller/templates/show.tpl.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@  discard block
 block discarded – undo
6 6
 <div id="colOne">
7 7
 
8 8
 <div class="box">
9
-    <img style="float: right;" src="<?php e('http://www.gravatar.com/avatar/'.md5($address['email']).'?s=60&d='.NET_SCHEME . NET_HOST . url('/images/icons/gravatar.png')); ?>" height="60" width="60" />
9
+    <img style="float: right;" src="<?php e('http://www.gravatar.com/avatar/'.md5($address['email']).'?s=60&d='.NET_SCHEME.NET_HOST.url('/images/icons/gravatar.png')); ?>" height="60" width="60" />
10 10
 
11 11
     <h1>#<?php e($value['number']); ?> <?php e($address['name']); ?></h1>
12 12
 
13 13
     <ul class="options" style="clear: none;">
14 14
         <li><a href="<?php e(url(null, array('edit'))); ?>"><?php e(t('Edit')); ?></a></li>
15 15
         <li><a href="<?php e(url('../', array('use_stored' => 'true'))); ?>"><?php e(t('Close')); ?></a></li>
16
-        <li><a class="vcard" href="<?php e(url(null . '.vcf')); ?>"><?php e(t('Vcard')); ?></a></li>
16
+        <li><a class="vcard" href="<?php e(url(null.'.vcf')); ?>"><?php e(t('Vcard')); ?></a></li>
17 17
     </ul>
18 18
 
19 19
     <ul class="options" style="clear: none;">
20 20
     <?php foreach ($context->getDependencies() as $key => $dependency) : ?>
21 21
             <?php if ($dependency['gateway']->findCountByContactId($context->getContact()->get("id")) > 0) : ?>
22
-            <li><a href="<?php e($dependency['url']); ?>"><?php e(t(ucfirst($dependency['label'] . 's'))); ?></a></li>
22
+            <li><a href="<?php e($dependency['url']); ?>"><?php e(t(ucfirst($dependency['label'].'s'))); ?></a></li>
23 23
             <?php elseif (!empty($dependency['url_create'])) : ?>
24
-            <li class="inactive"><a href="<?php e($dependency['url_create']); ?>"><?php e(t('Create') . ' ' . t($dependency['label'])); ?></a></li>
24
+            <li class="inactive"><a href="<?php e($dependency['url_create']); ?>"><?php e(t('Create').' '.t($dependency['label'])); ?></a></li>
25 25
             <?php endif; ?>
26 26
     <?php endforeach; ?>
27 27
     </ul>
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     <?php
157 157
     foreach ($persons as $person) { ?>
158 158
         <tr class="vcard">
159
-        <td class="fn"><a href="<?php e(url('contactperson/' . $person['id'], array('edit'))); ?>"><?php e($person['name']); ?></a></td>
159
+        <td class="fn"><a href="<?php e(url('contactperson/'.$person['id'], array('edit'))); ?>"><?php e($person['name']); ?></a></td>
160 160
         <td class="email"><?php e($person['email']); ?></td>
161 161
         <td class="tel"><?php e($person['phone']); ?></td>
162 162
         <td class="tel"><?php e($person['mobile']); ?></td>
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
 }
202 202
                     ?>
203 203
                 </td>
204
-                <td><a href="<?php e(url('memo/' . $reminder_item['id'])); ?>"><?php e($reminder_item['subject']); ?></a></td>
205
-                <td class="buttons"><a href="<?php e(url('memo/' .$reminder_item['id'], array('edit'))); ?>" class="edit"><?php e(t('edit')); ?></a></td>
204
+                <td><a href="<?php e(url('memo/'.$reminder_item['id'])); ?>"><?php e($reminder_item['subject']); ?></a></td>
205
+                <td class="buttons"><a href="<?php e(url('memo/'.$reminder_item['id'], array('edit'))); ?>" class="edit"><?php e(t('edit')); ?></a></td>
206 206
             </tr>
207 207
             <?php
208 208
         }
Please login to merge, or discard this patch.
src/Intraface/modules/contact/Controller/templates/index.tpl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
     <?php if ($context->getKernel()->getSetting()->get('user', 'contact.search') == 'hide' and count($context->getContacts()) > 0) : ?>
6 6
     <li><a href="<?php e(url(null, array('search' => 'view'))); ?>"><?php e(t('show search')); ?></a></li>
7 7
     <?php endif; ?>
8
-    <li><a class="pdf" href="<?php e(url(null . '.pdf', array('use_stored' => 'true'))); ?>" target="_blank"><?php e(t('Pdf-labels')); ?></a></li>
9
-    <li><a class="excel" href="<?php e(url(null . '.xls', array('use_stored' => 'true'))); ?>"><?php e(t('Excel')); ?></a></li>
8
+    <li><a class="pdf" href="<?php e(url(null.'.pdf', array('use_stored' => 'true'))); ?>" target="_blank"><?php e(t('Pdf-labels')); ?></a></li>
9
+    <li><a class="excel" href="<?php e(url(null.'.xls', array('use_stored' => 'true'))); ?>"><?php e(t('Excel')); ?></a></li>
10 10
     <li><a href="<?php e(url('sendemail', array('use_stored' => true))); ?>"><?php e(t('Email to contacts in search')); ?></a></li>
11 11
     <li><a href="<?php e(url('import/file')); ?>"><?php e(t('Import contacts')); ?></a></li>
12 12
     <li><a href="<?php e(url('../')); ?>"><?php e(t('Close')); ?></a></li>
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                     <input type="checkbox" value="<?php e($c['id']); ?>" name="selected[]" />
87 87
                 </td>
88 88
                 <td><?php e($c['number']); ?></td>
89
-                <td><img style="border: none; vertical-align:middle" src="<?php e('http://www.gravatar.com/avatar/'.md5($c['email']).'?s=20&d=&d='.NET_SCHEME . NET_HOST . url('/images/icons/gravatar.png')); ?>" height="20" width="20" /> <a class="fn" href="<?php e(url($c['id'])); ?>"><?php e($c['name']); ?></a></td>
89
+                <td><img style="border: none; vertical-align:middle" src="<?php e('http://www.gravatar.com/avatar/'.md5($c['email']).'?s=20&d=&d='.NET_SCHEME.NET_HOST.url('/images/icons/gravatar.png')); ?>" height="20" width="20" /> <a class="fn" href="<?php e(url($c['id'])); ?>"><?php e($c['name']); ?></a></td>
90 90
                 <td class="tel"><?php e($c['phone']); ?></td>
91 91
                 <td class="email"><?php e($c['email']); ?></td>
92 92
                 <td class="options">
Please login to merge, or discard this patch.
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/Contactperson.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $contact = $this->context->getContact();
24 24
     	$person = $contact->loadContactPerson(0);
25 25
 
26
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/contactperson-edit');
26
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/contactperson-edit');
27 27
         return $smarty->render($this, array('person' => $person, 'contact' => $contact));
28 28
     }
29 29
 
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.