Completed
Branch master (6ed6e7)
by Lars
07:57
created
src/Intraface/modules/cms/HTML/Editor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     function setEditor($editor)
25 25
     {
26 26
         if (!in_array($editor, $this->implemented_editors)) {
27
-            throw new Exception($editor . 'editor not implemented');
27
+            throw new Exception($editor.'editor not implemented');
28 28
         }
29 29
 
30 30
         $this->editor = $editor;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     function get($textarea_attributes, $initial_value = '', $editor_attributes = array())
34 34
     {
35 35
         $output = '';
36
-        switch($this->editor) {
36
+        switch ($this->editor) {
37 37
             case 'tinymce':
38 38
                 // return tinymce textarea
39 39
 
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
                     }
89 89
 
90 90
                     if (in_array('a', $this->allowed_tags)) {
91
-                        $button[]= 'link';
92
-                        $button[]= 'unlink';
91
+                        $button[] = 'link';
92
+                        $button[] = 'unlink';
93 93
                     }
94 94
 
95 95
                     if (in_array('ul', $this->allowed_tags)) {
Please login to merge, or discard this patch.
src/Intraface/modules/cms/HTML/Parser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 $element['extra_style'] = ' style="'.$element['extra_style'].'"';
40 40
             }
41 41
 
42
-            $function =  'parse'.$element['type'] . 'Element';
42
+            $function = 'parse'.$element['type'].'Element';
43 43
             $output = $this->$function($element);
44 44
 
45 45
             $display .= '<div id="element-'.$element['id'].'"'.$element['extra_class'].$element['extra_style'].'>';
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
             } else {
58 58
                 $display .= '       <li><a href="'.$_SERVER['PHP_SELF'].'?action=move&amp;element_id='.$element['id'].'&amp;id='.$element['section_id'].'">'.$this->translation->get('move').'</a></li>';
59 59
             }
60
-            $display .= '       <li><a class="confirm" href="' . $_SERVER['PHP_SELF'] . '?delete='.$element['id'].'">'.$this->translation->get('delete').'</a></li>';
60
+            $display .= '       <li><a class="confirm" href="'.$_SERVER['PHP_SELF'].'?delete='.$element['id'].'">'.$this->translation->get('delete').'</a></li>';
61 61
             $display .= '   </ul>';
62
-            $display .= '<div>' .           $output . '</div>';
62
+            $display .= '<div>'.$output.'</div>';
63 63
             $display .= '</div>';
64 64
         }
65 65
         return $display;
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/ListGateway.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
     function findByContactId($contact_id)
17 17
     {
18 18
         $db = new DB_Sql;
19
-        $db->query('SELECT * FROM newsletter_subscriber WHERE contact_id = ' . $contact_id);
19
+        $db->query('SELECT * FROM newsletter_subscriber WHERE contact_id = '.$contact_id);
20 20
         $lists = array();
21 21
         while ($db->nextRecord()) {
22 22
             $lists[$db->f('list_id')]['list'] = $this->findById($db->f('list_id'));
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/BounceAnalyzer.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
     function isSoftBounce($body)
10 10
     {
11 11
         if (stripos($body,'mailbox full') !== false) {
12
-          return true;
12
+            return true;
13 13
         }
14 14
         if (stripos($body,'quota exeeded') !== false) {
15
-          return true;
15
+            return true;
16 16
         }
17 17
     }
18 18
 
19 19
     function isHardBounce($body)
20 20
     {
21 21
         if (stripos($body,'unknown user') !== false) {
22
-          return true;
22
+            return true;
23 23
         }
24 24
 
25 25
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
 
9 9
     function isSoftBounce($body)
10 10
     {
11
-        if (stripos($body,'mailbox full') !== false) {
11
+        if (stripos($body, 'mailbox full') !== false) {
12 12
           return true;
13 13
         }
14
-        if (stripos($body,'quota exeeded') !== false) {
14
+        if (stripos($body, 'quota exeeded') !== false) {
15 15
           return true;
16 16
         }
17 17
     }
18 18
 
19 19
     function isHardBounce($body)
20 20
     {
21
-        if (stripos($body,'unknown user') !== false) {
21
+        if (stripos($body, 'unknown user') !== false) {
22 22
           return true;
23 23
         }
24 24
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Observer/OptinMail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $data = array(
72 72
             'subject' => 'Bekræft tilmelding',
73 73
             'body' =>
74
-                $this->list->get('subscribe_message') . "\n\n" .
74
+                $this->list->get('subscribe_message')."\n\n".
75 75
                 "\n\nMed venlig hilsen\n".$this->list->get('sender_name'),
76 76
             'contact_id' => $subscriber->get('contact_id'),
77 77
             'from_email' => $this->list->get('reply_email'),
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         if ($email->queue()) {
88 88
             $db = new DB_Sql;
89
-            $db->query("UPDATE newsletter_subscriber SET date_optin_email_sent = NOW() WHERE id = " . $subscriber->get('id'));
89
+            $db->query("UPDATE newsletter_subscriber SET date_optin_email_sent = NOW() WHERE id = ".$subscriber->get('id'));
90 90
             return true;
91 91
         }
92 92
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/NewsletterList.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $db  = new DB_Sql;
53 53
         $db2 = new DB_Sql;
54
-        $db->query("SELECT * FROM newsletter_list WHERE active = 1 AND id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'));
54
+        $db->query("SELECT * FROM newsletter_list WHERE active = 1 AND id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id'));
55 55
         if (!$db->nextRecord()) {
56 56
             return false;
57 57
         }
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
         $db2->query("SELECT *
76 76
             FROM newsletter_subscriber
77 77
             INNER JOIN contact ON newsletter_subscriber.contact_id = contact.id
78
-            WHERE list_id = " . $db->f('id') . "
79
-                AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id') . "
78
+            WHERE list_id = " . $db->f('id')."
79
+                AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id')."
80 80
                 AND optin = 1
81 81
                 AND contact.active = 1
82 82
                 AND newsletter_subscriber.active = 1");
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
             // subscribe_option_key = ".$var['subscribe_option_key'].",
167 167
 
168 168
         if ($this->id > 0) {
169
-            $db->query("UPDATE newsletter_list SET ".$sql.", date_changed = NOW() WHERE id = " . $this->id);
169
+            $db->query("UPDATE newsletter_list SET ".$sql.", date_changed = NOW() WHERE id = ".$this->id);
170 170
         } else {
171
-            $db->query("INSERT INTO newsletter_list SET ".$sql.", intranet_id = " . $this->kernel->intranet->get('id').", date_created = NOW(), date_changed = NOW()");
171
+            $db->query("INSERT INTO newsletter_list SET ".$sql.", intranet_id = ".$this->kernel->intranet->get('id').", date_created = NOW(), date_changed = NOW()");
172 172
             $this->id = $db->insertedId();
173 173
         }
174 174
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     function delete()
186 186
     {
187 187
         $db = new DB_Sql;
188
-        $db->query("UPDATE newsletter_list SET active = 0 WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'));
188
+        $db->query("UPDATE newsletter_list SET active = 0 WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id'));
189 189
         return true;
190 190
     }
191 191
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     function doesListExist()
198 198
     {
199 199
         $db = new DB_Sql;
200
-        $db->query("SELECT id FROM newsletter_list WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'));
200
+        $db->query("SELECT id FROM newsletter_list WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id'));
201 201
         return ($db->numRows() > 0);
202 202
     }
203 203
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $db    = new DB_Sql;
213 213
         $db2   = new DB_Sql;
214 214
         $i     = 0;
215
-        $db->query("SELECT * FROM newsletter_list WHERE intranet_id = " . $this->kernel->intranet->get('id')." AND active = 1");
215
+        $db->query("SELECT * FROM newsletter_list WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND active = 1");
216 216
         while ($db->nextRecord()) {
217 217
             $list                     = new Newsletterlist($this->kernel, $db->f('id'));
218 218
             $lists[$i]['id']          = $db->f('id');
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Letter.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,14 +72,14 @@
 block discarded – undo
72 72
 
73 73
     function postForm()
74 74
     {
75
-    	$module = $this->getKernel()->module("newsletter");
75
+        $module = $this->getKernel()->module("newsletter");
76 76
         $letter = new Newsletter($this->getList(), $this->name());
77 77
 
78
-    	if ($id = $letter->save($_POST)) {
79
-    		return new k_SeeOther($this->url(null));
80
-    	} else {
81
-    		$value = $_POST;
82
-    	}
83
-    	return $this->render();
78
+        if ($id = $letter->save($_POST)) {
79
+            return new k_SeeOther($this->url(null));
80
+        } else {
81
+            $value = $_POST;
82
+        }
83
+        return $this->render();
84 84
     }
85 85
 }
86 86
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $module = $this->getKernel()->module("newsletter");
23 23
 
24
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/letter');
24
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/letter');
25 25
         return $smarty->render($this);
26 26
     }
27 27
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $module = $this->getKernel()->module("newsletter");
68 68
 
69
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/letter-edit');
69
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/letter-edit');
70 70
         return $smarty->render($this);
71 71
     }
72 72
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Lists.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
     {
20 20
         $module = $this->getKernel()->module("newsletter");
21 21
 
22
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/lists');
22
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/lists');
23 23
         return $smarty->render($this);
24 24
     }
25 25
 
26 26
     function renderHtmlCreate()
27 27
     {
28
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/list-edit');
28
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/list-edit');
29 29
         return $smarty->render($this);
30 30
     }
31 31
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Send.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $module = $this->getKernel()->module("newsletter");
14 14
 
15
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/send');
15
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/send');
16 16
         return $smarty->render($this);
17 17
     }
18 18
 
Please login to merge, or discard this patch.