Completed
Pull Request — master (#27)
by Lars
11:31 queued 01:30
created
src/Intraface/modules/cms/Stylesheet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     function __construct($cmssite)
11 11
     {
12 12
         if (!is_object($cmssite) or strtolower(get_class($cmssite)) != 'cms_site') {
13
-            throw new Exception('CMS_Stylesheet::__construct needs CMS_Site - got ' . get_class($cmssite));
13
+            throw new Exception('CMS_Stylesheet::__construct needs CMS_Site - got '.get_class($cmssite));
14 14
         }
15 15
         $this->cmssite = $cmssite;
16 16
         $this->error = new Intraface_Error;
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Section.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this->db = MDB2::singleton(DB_DSN);
31 31
         $this->cmspage = $cmspage;
32 32
         $this->kernel = $cmspage->kernel;
33
-        $this->id = (int) $id;
33
+        $this->id = (int)$id;
34 34
         //$template_class = 'CMS_Template_' . $this->value['type'];
35 35
 
36 36
         $this->error = new Intraface_Error();
@@ -184,16 +184,16 @@  discard block
 block discarded – undo
184 184
         if ($this->id == 0) {
185 185
             $sql_type = "INSERT INTO ";
186 186
             $sql_end = ", date_created = NOW(),
187
-                type_key = ".$var['type_key'] . ",
187
+                type_key = ".$var['type_key'].",
188 188
                 template_section_id = ".$var['template_section_id'];
189 189
         } else {
190 190
             $sql_type = "UPDATE ";
191
-            $sql_end = " WHERE id = " . $this->id;
191
+            $sql_end = " WHERE id = ".$this->id;
192 192
         }
193
-        $sql = $sql_type . " cms_section SET
193
+        $sql = $sql_type." cms_section SET
194 194
                 intranet_id = ".$this->cmspage->kernel->intranet->get('id').",
195
-                page_id=". (int)$this->cmspage->get('id') . ",
196
-                site_id=". (int)$this->cmspage->cmssite->get('id') . ",
195
+                page_id=". (int)$this->cmspage->get('id').",
196
+                site_id=". (int)$this->cmspage->cmssite->get('id').",
197 197
                 date_updated = NOW()
198 198
             " . $sql_end;
199 199
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Template.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     function getPosition($db)
69 69
     {
70
-        return new Ilib_Position($db, 'cms_template', $this->id, 'site_id = ' . $this->cmssite->get('id'), 'id', 'position');
70
+        return new Ilib_Position($db, 'cms_template', $this->id, 'site_id = '.$this->cmssite->get('id'), 'id', 'position');
71 71
     }
72 72
 
73 73
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         switch ($type) {
79 79
             case 'id':
80 80
                 $db = new DB_Sql;
81
-                $db->query("SELECT site_id, id FROM cms_template WHERE id = " . $id . " AND intranet_id = " . $kernel->intranet->get('id'));
81
+                $db->query("SELECT site_id, id FROM cms_template WHERE id = ".$id." AND intranet_id = ".$kernel->intranet->get('id'));
82 82
                 if (!$db->nextRecord()) {
83 83
                     return false;
84 84
                 }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     function load()
98 98
     {
99 99
         $db = new DB_Sql;
100
-        $db->query("SELECT id, name, site_id, identifier, for_page_type FROM cms_template WHERE intranet_id = " . $this->cmssite->kernel->intranet->get('id') . " AND id = " . $this->id);
100
+        $db->query("SELECT id, name, site_id, identifier, for_page_type FROM cms_template WHERE intranet_id = ".$this->cmssite->kernel->intranet->get('id')." AND id = ".$this->id);
101 101
 
102 102
         if (!$db->nextRecord()) {
103 103
             return 0;
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
         $db = new DB_Sql;
147 147
         if ($this->id > 0) {
148 148
             $sql_type = "UPDATE ";
149
-            $sql_end = " WHERE id = " . $this->id;
149
+            $sql_end = " WHERE id = ".$this->id;
150 150
         } else {
151 151
             $sql_type = "INSERT INTO ";
152 152
             $sql_end = ", date_created = NOW()";
153 153
         }
154
-        $db->query($sql_type . " cms_template SET
154
+        $db->query($sql_type." cms_template SET
155 155
             name = '".safeToDb($var['name'])."',
156 156
             date_updated = NOW(),
157 157
             intranet_id = ".safeToDb($this->cmssite->kernel->intranet->get('id')).",
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             $sql_extra = '';
180 180
         }
181 181
 
182
-        $db->query("SELECT id, name, identifier, for_page_type FROM cms_template WHERE ".$sql_extra." intranet_id = " . $this->cmssite->kernel->intranet->get('id') . " AND site_id = " . $this->cmssite->get('id') . " AND active = 1 ORDER BY name");
182
+        $db->query("SELECT id, name, identifier, for_page_type FROM cms_template WHERE ".$sql_extra." intranet_id = ".$this->cmssite->kernel->intranet->get('id')." AND site_id = ".$this->cmssite->get('id')." AND active = 1 ORDER BY name");
183 183
         $i = 0;
184 184
         $templates = array();
185 185
         while ($db->nextRecord()) {
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
     function delete()
213 213
     {
214 214
         $db = new DB_Sql;
215
-        $db->query("UPDATE cms_template SET active = 0 WHERE id = " . $this->id);
215
+        $db->query("UPDATE cms_template SET active = 0 WHERE id = ".$this->id);
216 216
         return true;
217 217
     }
218 218
 
219 219
     function isIdentifierUnique($identifier)
220 220
     {
221 221
         $db = new DB_Sql;
222
-        $db->query("SELECT id FROM cms_template WHERE site_id = " . $this->cmssite->get('id') . " AND identifier = '".$identifier."' AND active = 1 AND id != " . $this->id);
222
+        $db->query("SELECT id FROM cms_template WHERE site_id = ".$this->cmssite->get('id')." AND identifier = '".$identifier."' AND active = 1 AND id != ".$this->id);
223 223
         if ($db->numRows() == 0) {
224 224
             return true;
225 225
         } else {
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/Element.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
      */
42 42
     function __construct($section, $id = 0)
43 43
     {
44
-        $this->value['identify_as'] = 'cms_element';  // bruges af parameter
44
+        $this->value['identify_as'] = 'cms_element'; // bruges af parameter
45 45
 
46
-        $this->id        = (int) $id;
46
+        $this->id        = (int)$id;
47 47
         $this->kernel    = $section->kernel;
48 48
         $this->section   = $section;
49 49
         $this->error     = new Intraface_Error;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     function getPosition(DB_Sql $db)
65 65
     {
66
-        return new Ilib_Position($db, "cms_element", $this->id, "section_id=".$this->section->get('id')." AND active = 1 AND intranet_id = " . $this->kernel->intranet->get('id'), "position", "id");
66
+        return new Ilib_Position($db, "cms_element", $this->id, "section_id=".$this->section->get('id')." AND active = 1 AND intranet_id = ".$this->kernel->intranet->get('id'), "position", "id");
67 67
     }
68 68
 
69 69
     /**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         }
126 126
 
127 127
         $db = new DB_Sql;
128
-        $db->query("SELECT id, section_id, date_expire, date_publish, type_key, position FROM cms_element WHERE intranet_id = ".$this->section->kernel->intranet->get('id')." AND id = " . $this->id);
128
+        $db->query("SELECT id, section_id, date_expire, date_publish, type_key, position FROM cms_element WHERE intranet_id = ".$this->section->kernel->intranet->get('id')." AND id = ".$this->id);
129 129
         if (!$db->nextRecord()) {
130 130
             return 0;
131 131
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $this->value['extra_class'] = '';
148 148
 
149 149
         if ($this->get('elm_width')) {
150
-            $this->value['extra_style'] .= 'width: ' . $this->get('elm_width') . ';';
150
+            $this->value['extra_style'] .= 'width: '.$this->get('elm_width').';';
151 151
         }
152 152
 
153 153
         if ($this->get('elm_properties') == 'float') {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             $this->value['extra_style'] .= ' clear: both;';
162 162
         }
163 163
         if ($this->get('elm_adjust')) {
164
-            $this->value['extra_class'] .= ' cms-align-' . $this->get('elm_adjust');
164
+            $this->value['extra_class'] .= ' cms-align-'.$this->get('elm_adjust');
165 165
         }
166 166
 
167 167
         if ($this->get('elm_box') == 'box') {
@@ -237,11 +237,11 @@  discard block
 block discarded – undo
237 237
             $sql_end = ", date_created = NOW()";
238 238
         } else {
239 239
             $sql_type = "UPDATE ";
240
-            $sql_end = " WHERE id = " . $this->id;
240
+            $sql_end = " WHERE id = ".$this->id;
241 241
         }
242
-        $sql = $sql_type . " cms_element SET
242
+        $sql = $sql_type." cms_element SET
243 243
                 intranet_id = ".$this->section->kernel->intranet->get('id').",
244
-                section_id=". (int)$this->section->get('id') . ",
244
+                section_id=". (int)$this->section->get('id').",
245 245
                 type_key = ".safeToDb($this->value['type_key']).",
246 246
                 date_changed = NOW(),
247 247
                 date_publish = ".$date_publish.",
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             $this->id = $db->insertedId();
255 255
 
256 256
             $next_pos = $this->getPosition($db)->getMaxPosition() + 1;
257
-            $db->query("UPDATE cms_element SET position = " . $next_pos . " WHERE id = " . $this->id);
257
+            $db->query("UPDATE cms_element SET position = ".$next_pos." WHERE id = ".$this->id);
258 258
         }
259 259
 
260 260
         $this->load();
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     public function delete()
291 291
     {
292 292
         $db = new DB_Sql;
293
-        $db->query("UPDATE cms_element SET active = 0 WHERE id = " . $this->id);
293
+        $db->query("UPDATE cms_element SET active = 0 WHERE id = ".$this->id);
294 294
         return true;
295 295
     }
296 296
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     public function undelete()
303 303
     {
304 304
         $db = new DB_Sql;
305
-        $db->query("UPDATE cms_element SET active = 1 WHERE id = " . $this->id);
305
+        $db->query("UPDATE cms_element SET active = 1 WHERE id = ".$this->id);
306 306
         return true;
307 307
     }
308 308
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/TemplateSection.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
             throw new Exception('TemplateSection::__construct skal bruge CMS_Template');
32 32
         }
33 33
         $this->error    = new Intraface_Error;
34
-        $this->id       = (int) $id;
34
+        $this->id       = (int)$id;
35 35
         $this->template = $template;
36 36
         $this->kernel   = $template->kernel;
37 37
 
38
-        $this->value['identify_as'] = 'cms_template_section';  // bruges af parameter
38
+        $this->value['identify_as'] = 'cms_template_section'; // bruges af parameter
39 39
 
40 40
         $this->parameter = $this->createParameterObject();
41 41
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 // validering p� value
76 76
                 // kun v�re gyldige elementtyper
77 77
                 // object skal vre cmspage
78
-                $class = $class_prefix . ucfirst($value);
78
+                $class = $class_prefix.ucfirst($value);
79 79
                 return new $class($object);
80 80
                 break;
81 81
             case 'id':
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
                 $section_types = $cms_module->getSetting('section_types');
85 85
 
86 86
                 $db = new DB_Sql;
87
-                $db->query("SELECT id, type_key, template_id FROM cms_template_section WHERE id = " . $value . " AND intranet_id = " . $object->intranet->get('id'));
87
+                $db->query("SELECT id, type_key, template_id FROM cms_template_section WHERE id = ".$value." AND intranet_id = ".$object->intranet->get('id'));
88 88
                 if (!$db->nextRecord()) {
89 89
                     return false;
90 90
                 }
91 91
 
92
-                $class = $class_prefix . ucfirst($section_types[$db->f('type_key')]);
92
+                $class = $class_prefix.ucfirst($section_types[$db->f('type_key')]);
93 93
                 return new $class(CMS_Template::factory($object, 'id', $db->f('template_id')), $db->f('id'));
94 94
 
95 95
                 break;
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
                 $section_types = $cms_module->getSetting('section_types');
100 100
 
101 101
                 $db = new DB_Sql;
102
-                $db->query("SELECT id, type_key FROM cms_template_section WHERE id = " . $value . " AND intranet_id = " . $object->kernel->intranet->get('id'));
102
+                $db->query("SELECT id, type_key FROM cms_template_section WHERE id = ".$value." AND intranet_id = ".$object->kernel->intranet->get('id'));
103 103
                 if (!$db->nextRecord()) {
104 104
                     return false;
105 105
                 }
106 106
 
107
-                $class = $class_prefix . ucfirst($section_types[$db->f('type_key')]);
107
+                $class = $class_prefix.ucfirst($section_types[$db->f('type_key')]);
108 108
                 return new $class($object, $db->f('id'));
109 109
 
110 110
                 break;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     function load()
118 118
     {
119 119
         $db = new DB_Sql;
120
-        $db->query("SELECT id, name, identifier, type_key, locked FROM cms_template_section WHERE cms_template_section.intranet_id = ".$this->template->cmssite->kernel->intranet->get('id')." AND cms_template_section.id = " . $this->id);
120
+        $db->query("SELECT id, name, identifier, type_key, locked FROM cms_template_section WHERE cms_template_section.intranet_id = ".$this->template->cmssite->kernel->intranet->get('id')." AND cms_template_section.id = ".$this->id);
121 121
         if (!$db->nextRecord()) {
122 122
             return 0;
123 123
         }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             $this->error->set('error in identifier - cannot be empty');
146 146
         }
147 147
 
148
-        if (!Validate::string($var['identifier'], array('format' => VALIDATE_ALPHA . VALIDATE_NUM . '-_'))) {
148
+        if (!Validate::string($var['identifier'], array('format' => VALIDATE_ALPHA.VALIDATE_NUM.'-_'))) {
149 149
             $this->error->set('error in identfier - allowed characters are a-z and 1-9');
150 150
         }
151 151
         if ($this->isIdentifierUnique($var['identifier'])) {
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
             $sql_end = ", date_created = NOW()";
177 177
         } else {
178 178
             $sql_type = "UPDATE ";
179
-            $sql_end = " WHERE id = " . $this->id;
179
+            $sql_end = " WHERE id = ".$this->id;
180 180
         }
181
-        $sql = $sql_type . " cms_template_section SET
181
+        $sql = $sql_type." cms_template_section SET
182 182
                 name = '".safeToDb($var['name'])."',
183 183
                 identifier = '".safeToDb($var['identifier'])."',
184
-                site_id = " . $this->template->cmssite->get('id') . ",
184
+                site_id = " . $this->template->cmssite->get('id').",
185 185
                 intranet_id = ".$this->template->kernel->intranet->get('id').",
186 186
                 template_id = ".$this->template->get('id').",
187 187
                 type_key = ".$this->value['type_key'].",
@@ -211,14 +211,14 @@  discard block
 block discarded – undo
211 211
     function delete()
212 212
     {
213 213
         $db = new DB_Sql;
214
-        $db->query("UPDATE cms_template_section SET active = 0 WHERE id = " . $this->id);
214
+        $db->query("UPDATE cms_template_section SET active = 0 WHERE id = ".$this->id);
215 215
         return true;
216 216
     }
217 217
 
218 218
     function getList()
219 219
     {
220 220
         $db = new DB_Sql;
221
-        $db->query("SELECT id, name, identifier, type_key FROM cms_template_section WHERE template_id = " . $this->template->get('id') . " AND intranet_id = " . $this->kernel->intranet->get('id') . " AND active = 1 ORDER BY position ASC");
221
+        $db->query("SELECT id, name, identifier, type_key FROM cms_template_section WHERE template_id = ".$this->template->get('id')." AND intranet_id = ".$this->kernel->intranet->get('id')." AND active = 1 ORDER BY position ASC");
222 222
 
223 223
         $i = 0;
224 224
         $sections = array();
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     function isIdentifierUnique($identifier)
238 238
     {
239 239
         $db = new DB_Sql;
240
-        $db->query("SELECT count(*) AS antal FROM cms_template_section WHERE identifier = '".$identifier."' AND intranet_id = " . $this->kernel->intranet->get('id') . " AND template_id = " . $this->template->get('id') . " AND active = 1 AND id != " . $this->id);
240
+        $db->query("SELECT count(*) AS antal FROM cms_template_section WHERE identifier = '".$identifier."' AND intranet_id = ".$this->kernel->intranet->get('id')." AND template_id = ".$this->template->get('id')." AND active = 1 AND id != ".$this->id);
241 241
         if (!$db->nextRecord()) {
242 242
             return 0;
243 243
         }
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 1 patch
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.
src/Intraface/modules/cms/Controller/templates/navigation.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
26 26
             <tr>
27 27
                 <td><input id="category_<?php e($category['id']); ?>" type="checkbox" name="category[]" value="<?php e($category['id']); ?>" /></td>
28 28
                 <td><?php e(str_repeat('- ', $level)); ?><a href="<?php e(url($category['id'])); ?>"><?php e($category['name']); ?></a></td>
29
-                <td><a href="<?php e(url($category['id'] . '/edit')); ?>"><?php e(t('Edit')); ?></a></td>
29
+                <td><a href="<?php e(url($category['id'].'/edit')); ?>"><?php e(t('Edit')); ?></a></td>
30 30
             </tr>
31 31
             <?php
32 32
             # If there is subcategories to the category
33 33
             if (is_array($category['categories']) && count($category['categories']) > 0) {
34 34
                 # We make the items for the next level the sub categories of this category
35
-                $level_categories[$level+1] = $category['categories'];
35
+                $level_categories[$level + 1] = $category['categories'];
36 36
 
37 37
                 # We move to next level
38 38
                 $level++;
Please login to merge, or discard this patch.