Completed
Pull Request — master (#26)
by Lars
14:13
created
src/Intraface/modules/contact/PdfLabel.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,18 +57,18 @@  discard block
 block discarded – undo
57 57
         }
58 58
         
59 59
         if (is_array($keywords) && count($keywords) > 0) {
60
-            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), "Nøgleord: ".implode(", ", $keywords));
60
+            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), "Nøgleord: ".implode(", ", $keywords));
61 61
             $line++;
62 62
         }
63 63
         
64
-        $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), "Antal labels i søgning: ".count($contacts));
64
+        $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), "Antal labels i søgning: ".count($contacts));
65 65
         
66 66
         // The contacts on labels
67 67
         
68 68
         for ($i = 0, $max = count($contacts); $i < $max; $i++) {
69 69
             // TODO -- hvorfor bruger vi ikke antallet af labels til at vide, hvorn�r
70 70
             // vi skifter linje? Vi kender faktisk ikke antallet af labels i en r�kke. Det kunne vi selvf�lgelig komme til
71
-            if ($this->get('x') + $this->label_width  > $this->get('right_margin_position')) {
71
+            if ($this->get('x') + $this->label_width > $this->get('right_margin_position')) {
72 72
                 // For enden af linjen, ny linje
73 73
                 $this->setY("-".$this->label_height);
74 74
                 $this->setX(0);
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
             $address_lines = explode("\n", $contacts[$i]['address']['address']);
92 92
             foreach ($address_lines as $l) {
93 93
                 if (trim($l) != "") {
94
-                    $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), $l);
94
+                    $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), $l);
95 95
                     $line++;
96 96
                 }
97 97
             }
98
-            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), $contacts[$i]['address']['postcode']." ".$contacts[$i]['address']['city']);
98
+            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), $contacts[$i]['address']['postcode']." ".$contacts[$i]['address']['city']);
99 99
             $line++;
100
-            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), $contacts[$i]['address']['country']);
100
+            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), $contacts[$i]['address']['country']);
101 101
         }
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
src/Intraface/modules/contact/Controller/templates/memos.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     <tr>
12 12
         <td><?php e($memo['dk_reminder_date']); ?></td>
13 13
         <td><a href="<?php e(url($memo['id'])); ?>"><?php e($memo['subject']); ?></a></td>
14
-        <td><a href="<?php e(url('../../' . $memo['contact_id'])); ?>"><?php e(t('Contact')); ?> <?php e($memo['contact_id']); ?></a></td>
14
+        <td><a href="<?php e(url('../../'.$memo['contact_id'])); ?>"><?php e(t('Contact')); ?> <?php e($memo['contact_id']); ?></a></td>
15 15
     </tr>
16 16
 <?php endforeach; ?>
17 17
 </table>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
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/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.