Passed
Push — master ( e4006a...0c4633 )
by Lars
21:40 queued 06:51
created
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/Controller/tpl/categories-edit.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             # If there is subcategories to the category
39 39
             if (is_array($category['categories']) && count($category['categories']) > 0) {
40 40
                 # We make the items for the next level the sub categories of this category
41
-                $level_categories[$level+1] = $category['categories'];
41
+                $level_categories[$level + 1] = $category['categories'];
42 42
 
43 43
                 # We move to next level
44 44
                 $level++;
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/BasketEvaluation/Edit.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
         $settings = $this->getBasketEvaluation()->get('settings');
50 50
 
51 51
         $data = array('basketevaluation' => $this->getBasketEvaluation(),
52
-                      'value' => $this->value,
53
-                      'settings' => $settings,
54
-                      'translation' => $this->getKernel()->getTranslation('shop')
52
+                        'value' => $this->value,
53
+                        'settings' => $settings,
54
+                        'translation' => $this->getKernel()->getTranslation('shop')
55 55
         );
56 56
         $tpl = $this->template->create('Intraface/modules/shop/Controller/tpl/evaluation');
57 57
         return $tpl->render($this, $data);
Please login to merge, or discard this patch.
src/Intraface/modules/cms/MainCms.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
         $this->addPreloadFile('Section.php');
45 45
 
46
-         $this->includeSettingFile('settings.php');
46
+            $this->includeSettingFile('settings.php');
47 47
 
48 48
         $this->addSetting('status', array(
49 49
             1 => 'draft',
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Parameter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function save($parameter, $value)
80 80
     {
81 81
         if ($this->object->get('id') == 0) {
82
-            throw new Exception('Parameter::save() object cannot be 0 - problems in ' . get_class($this->object));
82
+            throw new Exception('Parameter::save() object cannot be 0 - problems in '.get_class($this->object));
83 83
         }
84 84
 
85 85
         # mangler noget validering - skal sikkert kunne s�ttes fra elementet?
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
 
92 92
         // hvis parameteren tidligere er oprettet opdateres den!
93 93
         if (!empty($old_parameter)) {
94
-            $db->query("UPDATE cms_parameter SET value='".$value."' WHERE type_key = ".$this->type_key." AND intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id=". $this->object->get('id') . " AND parameter='".$parameter."'");
94
+            $db->query("UPDATE cms_parameter SET value='".$value."' WHERE type_key = ".$this->type_key." AND intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id=".$this->object->get('id')." AND parameter='".$parameter."'");
95 95
         } elseif (!empty($value) and empty($old_parameter)) {
96 96
             // hvis parameteren ikke findes oprettes den
97 97
             $db->query("INSERT INTO cms_parameter SET type_key=".$this->type_key.", belong_to_id = '".$this->object->get('id')."', parameter='".$parameter."', value='".$value."', intranet_id = ".$this->object->kernel->intranet->get('id'));
98 98
         } elseif (empty($value) and !empty($old_parameter)) {
99 99
             // hvis parametervvalue er tom skal den gamle parameter slettes
100
-            $db->query("DELETE FROM cms_parameter WHERE belong_to_id = '".$this->object->get('id')."' AND parameter='".$parameter."' AND intranet_id = ".$this->object->kernel->intranet->get('id') . " AND type_key =" .$this->type_key);
100
+            $db->query("DELETE FROM cms_parameter WHERE belong_to_id = '".$this->object->get('id')."' AND parameter='".$parameter."' AND intranet_id = ".$this->object->kernel->intranet->get('id')." AND type_key =".$this->type_key);
101 101
         }
102 102
 
103 103
         $this->load();
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
     private function load()
115 115
     {
116 116
         if ($this->object->get('id') == 0) {
117
-            throw new Exception('Parameter::save() object cannot be 0 - problems with ' . get_class($this->object));
117
+            throw new Exception('Parameter::save() object cannot be 0 - problems with '.get_class($this->object));
118 118
         }
119 119
 
120 120
         $db = new DB_Sql;
121
-        $sql = "SELECT parameter, value FROM cms_parameter WHERE intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id = " . $this->object->get('id') . " AND type_key = " . $this->type_key; //  . " AND parameter = '"  .$parameter . "'"
121
+        $sql = "SELECT parameter, value FROM cms_parameter WHERE intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id = ".$this->object->get('id')." AND type_key = ".$this->type_key; //  . " AND parameter = '"  .$parameter . "'"
122 122
         $db->query($sql);
123 123
 
124 124
         while ($db->nextRecord()) {
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Site.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
 
72 72
         if ($this->id > 0) {
73 73
             $sql_type = "UPDATE ";
74
-            $sql_end = " WHERE id = " . $this->id;
74
+            $sql_end = " WHERE id = ".$this->id;
75 75
         } else {
76 76
             $sql_type = "INSERT INTO ";
77 77
             $sql_end = " , date_created = NOW()";
78 78
         }
79 79
 
80 80
         $db = new DB_Sql;
81
-        $db->query($sql_type . " cms_site
81
+        $db->query($sql_type." cms_site
82 82
             SET intranet_id = ".$this->kernel->intranet->get('id').",
83 83
             name = '".$var['name']."',
84 84
             url = '".$var['url']."',
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $this->id = $db->insertedId();
89 89
         }
90 90
 
91
-        $this->kernel->setting->set('intranet', 'cc_license', intval($var['cc_license']), 'site_id_' . $this->id);
91
+        $this->kernel->setting->set('intranet', 'cc_license', intval($var['cc_license']), 'site_id_'.$this->id);
92 92
 
93 93
         $this->load();
94 94
 
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
     function load()
99 99
     {
100 100
         $db = new DB_Sql;
101
-        $db->query("SELECT id, name, url FROM cms_site WHERE id = " . $this->id . " AND intranet_id = ".$this->kernel->intranet->get('id')." LIMIT 1");
101
+        $db->query("SELECT id, name, url FROM cms_site WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')." LIMIT 1");
102 102
         if (!$db->nextRecord()) {
103 103
             return 0;
104 104
         }
105 105
         $this->value['id'] = $db->f('id');
106 106
         $this->value['name'] = $db->f('name');
107 107
         $this->value['url'] = $db->f('url');
108
-        $this->value['cc_license'] = $this->kernel->setting->get('intranet', 'cc_license', 'site_id_' . $this->get('id'));
108
+        $this->value['cc_license'] = $this->kernel->setting->get('intranet', 'cc_license', 'site_id_'.$this->get('id'));
109 109
 
110 110
     }
111 111
 
@@ -116,14 +116,14 @@  discard block
 block discarded – undo
116 116
             return 0;
117 117
         }
118 118
         $db = new Db_Sql;
119
-        $db->query("UPDATE cms_site SET active = 0 WHERE intranet_id=".$this->kernel->intranet->get('id')." AND id = " . $this->id);
119
+        $db->query("UPDATE cms_site SET active = 0 WHERE intranet_id=".$this->kernel->intranet->get('id')." AND id = ".$this->id);
120 120
         return 1;
121 121
     }
122 122
 
123 123
     function getList()
124 124
     {
125 125
         $db = new DB_Sql;
126
-        $db->query("SELECT id, name FROM cms_site WHERE intranet_id = " . $this->kernel->intranet->get('id'). " AND active = 1");
126
+        $db->query("SELECT id, name FROM cms_site WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND active = 1");
127 127
         $i = 0;
128 128
         $sites = array();
129 129
         while ($db->nextRecord()) {
Please login to merge, or discard this patch.
Intraface/modules/cms/Controller/templates/template-section-edit.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
     case 'longtext':
45 45
         if (empty($value['html_format'])) {
46
-            $value['html_format'] = array ();
46
+            $value['html_format'] = array();
47 47
         }
48 48
 ?>
49 49
         <fieldset>
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/pages.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 </ul>
27 27
 
28 28
 <ul class="options">
29
-    <li><a class="new" href="<?php e(url(null, array('create' => '', 'type' => $type)));?>"><?php e(t('create '.$type)); ?></a></li>
29
+    <li><a class="new" href="<?php e(url(null, array('create' => '', 'type' => $type))); ?>"><?php e(t('create '.$type)); ?></a></li>
30 30
     <li><a  href="<?php e(url('../')); ?>"><?php e(t('go to site overview')); ?></a></li>
31 31
 </ul>
32 32
 
Please login to merge, or discard this patch.
Braces   +30 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,20 +6,29 @@  discard block
 block discarded – undo
6 6
         <?php e(t('you have to create a template')); ?>
7 7
         <?php if ($kernel->user->hasSubAccess('cms', 'edit_templates')) : ?>
8 8
             <a href="<?php e(url('../template/create')); ?>"><?php e(t('create template')); ?></a>.
9
-        <?php else : ?>
10
-            <strong><?php e(t('you cannot create templates')); ?></strong>
9
+        <?php else {
10
+    : ?>
11
+            <strong><?php e(t('you cannot create templates'));
12
+}
13
+?></strong>
11 14
         <?php endif; ?>
12 15
     </p>
13 16
 
14
-<?php else : ?>
17
+<?php else {
18
+    : ?>
15 19
 
16 20
 <ul class="options">
17 21
     <?php foreach ($cmspage->getTypes() as $page_type) : ?>
18 22
         <li>
19 23
             <?php if ($page_type == $type) : ?>
20
-                <strong><?php e(t($page_types_plural[$page_type])); ?></strong>
21
-            <?php else : ?>
22
-                <a  href="<?php e(url(null, array('type' => $page_type))); ?>"><?php e(t($page_types_plural[$page_type])); ?></a>
24
+                <strong><?php e(t($page_types_plural[$page_type]));
25
+}
26
+?></strong>
27
+            <?php else {
28
+    : ?>
29
+                <a  href="<?php e(url(null, array('type' => $page_type)));
30
+}
31
+?>"><?php e(t($page_types_plural[$page_type])); ?></a>
23 32
             <?php endif; ?>
24 33
         </li>
25 34
     <?php endforeach; ?>
@@ -34,22 +43,31 @@  discard block
 block discarded – undo
34 43
     <?php
35 44
     if (!is_array($pages) or count($pages) == 0) : ?>
36 45
         <p><?php e(t('No pages found')); ?></p>
37
-    <?php                                                                                                         else: ?>
38
-        <?php include 'page/pages.tpl.php'; ?>
46
+    <?php                                                                                                         else {
47
+    : ?>
48
+        <?php include 'page/pages.tpl.php';
49
+}
50
+?>
39 51
     <?php endif; ?>
40 52
 <?php elseif ($type == 'article') : ?>
41 53
     <?php
42 54
     if (!is_array($articles) or count($articles) == 0) : ?>
43 55
         <p><?php e(t('No articles found')); ?></p>
44
-    <?php                                                                                                         else: ?>
45
-        <?php include 'page/articles.tpl.php'; ?>
56
+    <?php                                                                                                         else {
57
+    : ?>
58
+        <?php include 'page/articles.tpl.php';
59
+}
60
+?>
46 61
     <?php endif; ?>
47 62
 <?php elseif ($type == 'news') : ?>
48 63
     <?php
49 64
     if (!is_array($news) or count($news) == 0) : ?>
50 65
         <p><?php e(t('No news found')); ?></p>
51
-    <?php                                                                                                         else: ?>
52
-        <?php include 'page/news.tpl.php'; ?>
66
+    <?php                                                                                                         else {
67
+    : ?>
68
+        <?php include 'page/news.tpl.php';
69
+}
70
+?>
53 71
     <?php endif; ?>
54 72
 <?php endif; ?>
55 73
 
Please login to merge, or discard this patch.