Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/modules/cms/element/Map.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                 $api = $this->get('api_key');
36 36
             }
37 37
 
38
-                $this->value['map']  = '<script type="text/javascript" src="http://api.maps.yahoo.com/ajaxymap?'.htmlentities('v=2.0&appid=' . $api) .'"></script>';
38
+                $this->value['map'] = '<script type="text/javascript" src="http://api.maps.yahoo.com/ajaxymap?'.htmlentities('v=2.0&appid='.$api).'"></script>';
39 39
                 /* flash version
40 40
                 $this->value['map'] .= '<script type="text/javascript">';
41 41
                 $this->value['map'] .= '    var latlon = new LatLon(' .$a['ResultSet']['Result']['Latitude'] . ', '. $a['ResultSet']['Result']['Longitude'].');';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 $this->value['map'] .= '		var words = "title";';
52 52
                 $this->value['map'] .= '		marker.openSmartWindow(words);';
53 53
                 $this->value['map'] .= '	} ';
54
-                $this->value['map'] .= '	var latlon = new YGeoPoint(' .$this->get('latitude') . ', '. $this->get('longitude').');';
54
+                $this->value['map'] .= '	var latlon = new YGeoPoint('.$this->get('latitude').', '.$this->get('longitude').');';
55 55
                 $this->value['map'] .= '	var mymap = new  YMap(document.getElementById("mapContainer"));';
56 56
                 $this->value['map'] .= '	var marker = new YMarker(latlon);';
57 57
                 $this->value['map'] .= '	marker.addLabel("<b>A</b>"); ';
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                 $this->value['map'] .= '    }';
85 85
                 $this->value['map'] .= '}';
86 86
                 $this->value['map'] .= 'load();';
87
-                $this->value['map'] .= '    var latlon = new YGeoPoint(' .$this->get('latitude') . ', '. $this->get('longitude').');';
87
+                $this->value['map'] .= '    var latlon = new YGeoPoint('.$this->get('latitude').', '.$this->get('longitude').');';
88 88
                 $this->value['map'] .= '    var mymap = new  YMap(document.getElementById("mapContainer"));';
89 89
                 $this->value['map'] .= '    var marker = new YMarker(latlon);';
90 90
                 $this->value['map'] .= '    marker.addLabel("<b>A</b>"); ';
Please login to merge, or discard this patch.
src/Intraface/modules/cms/element/Delicious.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $url = parse_url($var['url']);
61 61
 
62 62
         // cleans up url
63
-        $var['url'] = $url['scheme'] . '://' . $url['host'] . $url['path'];
63
+        $var['url'] = $url['scheme'].'://'.$url['host'].$url['path'];
64 64
 
65 65
         $this->parameter->save('url', $var['url']);
66 66
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/section/Mixed.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@
 block discarded – undo
52 52
         $db = new DB_Sql;
53 53
         $db->query("SELECT id FROM cms_element
54 54
             WHERE intranet_id = ".$this->kernel->intranet->get('id')."
55
-                AND section_id = " . $this->id . "
56
-                AND active = 1 " . $sql_expire . $sql_publish . "
55
+                AND section_id = " . $this->id."
56
+                AND active = 1 " . $sql_expire.$sql_publish."
57 57
             ORDER BY position ASC");
58 58
         $i = 0;
59 59
 
Please login to merge, or discard this patch.
src/Intraface/modules/invoice/Payment.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function load()
50 50
     {
51
-        $result = $this->db->query('SELECT id, amount, type, description, payment_date, payment_for_id, DATE_FORMAT(payment_date, "%d-%m-%Y") AS dk_payment_date, date_stated, voucher_id FROM invoice_payment ' .
52
-            'WHERE intranet_id = '.$this->kernel->intranet->get('id').' ' .
53
-                'AND payment_for = '.$this->payment_for_type_id.' ' .
54
-                'AND payment_for_id = '.$this->payment_for_id.' ' .
55
-                'AND type IN ('.implode(',', array_keys($this->getTypes())).')' .
51
+        $result = $this->db->query('SELECT id, amount, type, description, payment_date, payment_for_id, DATE_FORMAT(payment_date, "%d-%m-%Y") AS dk_payment_date, date_stated, voucher_id FROM invoice_payment '.
52
+            'WHERE intranet_id = '.$this->kernel->intranet->get('id').' '.
53
+                'AND payment_for = '.$this->payment_for_type_id.' '.
54
+                'AND payment_for_id = '.$this->payment_for_id.' '.
55
+                'AND type IN ('.implode(',', array_keys($this->getTypes())).')'.
56 56
                 'AND id = '.$this->id);
57 57
 
58 58
         if (PEAR::isError($result)) {
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
         $types = $this->getPaymentForTypes();
430 430
         // translation is needed!
431
-        $text = $translation->get('Payment') . ' ' . $this->get('description') . ' ('.$translation->get($types[$this->payment_for_type_id]).' #'.$this->payment_for->get('number') . ')';
431
+        $text = $translation->get('Payment').' '.$this->get('description').' ('.$translation->get($types[$this->payment_for_type_id]).' #'.$this->payment_for->get('number').')';
432 432
 
433 433
         $input_values = array(
434 434
             'voucher_number' => $voucher_number,
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         }
446 446
 
447 447
         $db = new DB_sql;
448
-        $db->query("UPDATE invoice_payment SET date_stated = NOW(), voucher_id = ".$voucher->get('id') . " WHERE intranet_id = " . $this->kernel->intranet->getId() . ' AND id = ' . $this->id);
448
+        $db->query("UPDATE invoice_payment SET date_stated = NOW(), voucher_id = ".$voucher->get('id')." WHERE intranet_id = ".$this->kernel->intranet->getId().' AND id = '.$this->id);
449 449
 
450 450
         $this->load();
451 451
         return true;
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,10 +39,11 @@  discard block
 block discarded – undo
39 39
     /**
40 40
      * States the payment i the given year
41 41
      *
42
-     * @param object $year Accounting Year object
42
+     * @param Year $year Accounting Year object
43 43
      * @param integer $voucher_number
44 44
      * @param string $voucher_date
45 45
      * @param integer $state_account_number
46
+     * @param Stub_Translation $translation
46 47
      *
47 48
      * @return boolean true on succes or false.
48 49
      */
@@ -136,7 +137,7 @@  discard block
 block discarded – undo
136 137
     /**
137 138
      * returns possible payment types
138 139
      *
139
-     * @return array payment types
140
+     * @return string[] payment types
140 141
      *
141 142
      */
142 143
     public static function getTypes()
@@ -149,7 +150,7 @@  discard block
 block discarded – undo
149 150
     /**
150 151
      * returns the possible types payments can be for.
151 152
      *
152
-     * @return array payment for types
153
+     * @return string[] payment for types
153 154
      */
154 155
     private static function getPaymentForTypes()
155 156
     {
Please login to merge, or discard this patch.
src/Intraface/modules/invoice/Pdf/Reminder.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             if ($line == "") {
62 62
                 $this->doc->setY('-'.$this->doc->get('font_spacing'));
63 63
 
64
-                if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
64
+                if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
65 65
                     $this->doc->nextPage(true);
66 66
                 }
67 67
             } else {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
               
72 72
                     $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
73 73
 
74
-                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
74
+                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
75 75
                         $this->doc->nextPage(true);
76 76
                     }
77 77
                 }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $this->doc->setY('-20'); // space to product list
84 84
 
85
-        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 3) {
85
+        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*3) {
86 86
             $this->doc->nextPage(true);
87 87
         }
88 88
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $this->doc->addText($apointX["text"], $this->doc->get('y'), $this->doc->get("font_size"), "Beskrivelse");
97 97
         $this->doc->addText($apointX["invoice_date"], $this->doc->get('y'), $this->doc->get("font_size"), "Dato");
98 98
         $this->doc->addText($apointX["due_date"], $this->doc->get('y'), $this->doc->get("font_size"), "Forfaldsdato");
99
-        $this->doc->addText($apointX["amount"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") -3, $this->doc->get('y'), $this->doc->get("font_size"), "Bel�b");
99
+        $this->doc->addText($apointX["amount"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") - 3, $this->doc->get('y'), $this->doc->get("font_size"), "Bel�b");
100 100
 
101 101
         $this->doc->setY('-'.($this->doc->get("font_spacing") - $this->doc->get("font_size")));
102 102
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
130 130
             $total += $items[$i]["arrears"];
131 131
 
132
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
132
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
133 133
                 $this->doc->nextPage(true);
134 134
             }
135 135
         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
155 155
             $total += $items[$i]["reminder_fee"];
156 156
 
157
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
157
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
158 158
                 $this->doc->nextPage(true);
159 159
             }
160 160
         }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
176 176
             $total += $reminder->get("reminder_fee");
177 177
 
178
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
178
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
179 179
                 $this->doc->nextPage(true);
180 180
             }
181 181
         }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -13,6 +13,9 @@
 block discarded – undo
13 13
         parent::__construct($translation, $file);
14 14
     }
15 15
 
16
+    /**
17
+     * @param Reminder $reminder
18
+     */
16 19
     function visit($reminder)
17 20
     {
18 21
         if ($reminder->get('id') == 0) {
Please login to merge, or discard this patch.
src/Intraface/modules/email/Controller/templates/show.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
     <?php if ($email->get('status') != 'sent') : ?>
6 6
     <li><a href="<?php e(url(null, array('edit'))); ?>"><?php e(t('Edit')); ?></a></li>
7 7
     <?php endif; ?>
8
-    <li><a class="pdf" href="<?php e(url(null . '.pdf')); ?>"><?php e(t('Pdf')); ?></a></li>
8
+    <li><a class="pdf" href="<?php e(url(null.'.pdf')); ?>"><?php e(t('Pdf')); ?></a></li>
9 9
 </ul>
10 10
 
11 11
 <?php if ($email->get('status') == 'sent') : ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,8 +38,10 @@
 block discarded – undo
38 38
             ?></pre>
39 39
         <pre><?php e(t('From')); ?>: <?php if (isset($value['from_email']) && $value['from_email'] != '') :
40 40
             e($value['from_name']." <".$value['from_email'].">");
41
-else :
41
+else {
42
+    :
42 43
     e($kernel->intranet->address->get('name')." <".$kernel->intranet->address->get('email').">");
44
+}
43 45
 endif; ?></pre>
44 46
 
45 47
         <pre><?php e($value['subject']); ?></pre>
Please login to merge, or discard this patch.
src/Intraface/modules/email/Controller/templates/index.tpl.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,9 +10,12 @@  discard block
 block discarded – undo
10 10
 
11 11
     <p><?php e(t('no e-mails has been sent')); ?></p>
12 12
 
13
-<?php else : ?>
13
+<?php else {
14
+    : ?>
14 15
     <?php if ($queue > 0) : ?>
15
-        <p><?php e(t('E-mails are in queue - the will be sent soon')); ?></p>
16
+        <p><?php e(t('E-mails are in queue - the will be sent soon'));
17
+}
18
+?></p>
16 19
     <?php endif; ?>
17 20
 
18 21
     <?php echo $gateway->getDBQuery()->display('character'); ?>
@@ -37,8 +40,11 @@  discard block
 block discarded – undo
37 40
         <?php if (!empty($email['status']) and $email['status'] != 'sent') : ?>
38 41
             <a class="edit" href="<?php e(url($email['id'], array('edit'))); ?>"><?php e(t('edit')); ?></a>
39 42
             <a class="delete" href="<?php e(url($email['id'], array('delete'))); ?>"><?php e(t('delete')); ?></a>
40
-        <?php else : ?>
41
-            <?php e(t($email['status'])); ?>
43
+        <?php else {
44
+    : ?>
45
+            <?php e(t($email['status']));
46
+}
47
+?>
42 48
         <?php endif; ?>
43 49
         </td>
44 50
     </tr>
Please login to merge, or discard this patch.
src/Intraface/modules/email/Controller/Email.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $value = $email->get();
18 18
         $contact = $email->getContact();
19 19
 
20
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/show');
20
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/show');
21 21
         $data = array(
22 22
             'contact' => $contact,
23 23
             'value' => $value,
@@ -35,18 +35,18 @@  discard block
 block discarded – undo
35 35
         $size = 12; // font size
36 36
 
37 37
         // udskriv adressehoved
38
-        $text = $this->getEmail()->getContact()->address->get('name') .
39
-            "\n" . $this->getEmail()->getContact()->address->get('address') .
40
-            "\n" . $this->getEmail()->getContact()->address->get('postcode') .
41
-            "  " . $this->getEmail()->getContact()->address->get('city') . "\n\n\n";
38
+        $text = $this->getEmail()->getContact()->address->get('name').
39
+            "\n".$this->getEmail()->getContact()->address->get('address').
40
+            "\n".$this->getEmail()->getContact()->address->get('postcode').
41
+            "  ".$this->getEmail()->getContact()->address->get('city')."\n\n\n";
42 42
 
43 43
         $pdf->ezText($text, $size);
44 44
 
45 45
         // uskriv subject
46
-        $pdf->ezText($this->getEmail()->get('subject') . "\n\n", $size);
46
+        $pdf->ezText($this->getEmail()->get('subject')."\n\n", $size);
47 47
 
48 48
         // udskriv body
49
-        $pdf->ezText($this->getEmail()->get('body') . "\n", $size);
49
+        $pdf->ezText($this->getEmail()->get('body')."\n", $size);
50 50
 
51 51
         // udskriv greeting
52 52
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $contact = $email->getContact();
105 105
         $redirect = Intraface_Redirect::factory($this->getKernel(), 'receive');
106 106
 
107
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/edit');
107
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/edit');
108 108
         $data = array(
109 109
             'contact' => $contact,
110 110
             'value' => $value,
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/Controller/Payment.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
         $value['dk_amount'] = $onlinepayment->get('dk_amount');
18 18
 
19
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/payment');
19
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/payment');
20 20
         return $smarty->render($this, array('value' => $value, 'kernel' => $this->context->getKernel(), 'onlinepayment' => $onlinepayment));
21 21
     }
22 22
 
Please login to merge, or discard this patch.