Test Failed
Push — master ( 398493...d4ef72 )
by Michael
11:04
created
htdocs/class/downloader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@
 block discarded – undo
55 55
         if (function_exists('mb_http_output')) {
56 56
             mb_http_output('pass');
57 57
         }
58
-        header('Content-Type: ' . $this->mimetype);
58
+        header('Content-Type: '.$this->mimetype);
59 59
         if (preg_match("/MSIE (\d\.\d{1,2})/", $_SERVER['HTTP_USER_AGENT'])) {
60
-            header('Content-Disposition: attachment; filename="' . $filename . '"');
60
+            header('Content-Disposition: attachment; filename="'.$filename.'"');
61 61
             header('Expires: 0');
62 62
             header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
63 63
             header('Pragma: public');
64 64
         } else {
65
-            header('Content-Disposition: attachment; filename="' . $filename . '"');
65
+            header('Content-Disposition: attachment; filename="'.$filename.'"');
66 66
             header('Expires: 0');
67 67
             header('Pragma: no-cache');
68 68
         }
Please login to merge, or discard this patch.
htdocs/class/preload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         if ($modules_list = XoopsCache::read('system_modules_active')) {
85 85
             $i = 0;
86 86
             foreach ($modules_list as $module) {
87
-                if (is_dir($dir = XOOPS_ROOT_PATH . "/modules/{$module}/preloads/")) {
87
+                if (is_dir($dir = XOOPS_ROOT_PATH."/modules/{$module}/preloads/")) {
88 88
                     $file_list = XoopsLists::getFileListAsArray($dir);
89 89
                     foreach ($file_list as $file) {
90 90
                         if (preg_match('/(\.php)$/i', $file)) {
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
     public function setEvents()
108 108
     {
109 109
         foreach ($this->_preloads as $preload) {
110
-            include_once XOOPS_ROOT_PATH . '/modules/' . $preload['module'] . '/preloads/' . $preload['file'] . '.php';
111
-            $class_name = ucfirst($preload['module']) . ucfirst($preload['file']) . 'Preload';
110
+            include_once XOOPS_ROOT_PATH.'/modules/'.$preload['module'].'/preloads/'.$preload['file'].'.php';
111
+            $class_name = ucfirst($preload['module']).ucfirst($preload['file']).'Preload';
112 112
             if (!class_exists($class_name)) {
113 113
                 continue;
114 114
             }
Please login to merge, or discard this patch.
htdocs/class/mimetypes.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,4 +19,4 @@
 block discarded – undo
19 19
 
20 20
 $GLOBALS['xoopsLogger']->addDeprecated("'/class/mimetypes.inc.php' is deprecated, use '/include/mimetypes.inc.php' directly.");
21 21
 
22
-return include XOOPS_ROOT_PATH . '/include/mimetypes.inc.php';
22
+return include XOOPS_ROOT_PATH.'/include/mimetypes.inc.php';
Please login to merge, or discard this patch.
htdocs/class/xoopsload.php 1 patch
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
             }
109 109
 
110 110
             return true;
111
-        } elseif (file_exists($file = XOOPS_ROOT_PATH . '/class/' . $name . '.php')) {
111
+        } elseif (file_exists($file = XOOPS_ROOT_PATH.'/class/'.$name.'.php')) {
112 112
             include_once $file;
113
-            $class = 'Xoops' . ucfirst($name);
113
+            $class = 'Xoops'.ucfirst($name);
114 114
             if (class_exists($class)) {
115 115
                 return $class;
116 116
             } else {
117
-                trigger_error('Class ' . $name . ' not found in file ' . __FILE__ . ' at line ' . __LINE__, E_USER_WARNING);
117
+                trigger_error('Class '.$name.' not found in file '.__FILE__.' at line '.__LINE__, E_USER_WARNING);
118 118
             }
119 119
         }
120 120
 
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public static function loadFramework($name)
132 132
     {
133
-        if (!file_exists($file = XOOPS_ROOT_PATH . '/Frameworks/' . $name . '/xoops' . $name . '.php')) {
134
-            trigger_error('File ' . str_replace(XOOPS_ROOT_PATH, '', $file) . ' not found in file ' . __FILE__ . ' at line ' . __LINE__, E_USER_WARNING);
133
+        if (!file_exists($file = XOOPS_ROOT_PATH.'/Frameworks/'.$name.'/xoops'.$name.'.php')) {
134
+            trigger_error('File '.str_replace(XOOPS_ROOT_PATH, '', $file).' not found in file '.__FILE__.' at line '.__LINE__, E_USER_WARNING);
135 135
 
136 136
             return false;
137 137
         }
138 138
         include_once $file;
139
-        $class = 'Xoops' . ucfirst($name);
139
+        $class = 'Xoops'.ucfirst($name);
140 140
         if (class_exists($class)) {
141 141
             return $class;
142 142
         }
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
         if (empty($dirname)) {
157 157
             return false;
158 158
         }
159
-        if (file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/class/' . $name . '.php')) {
159
+        if (file_exists($file = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/class/'.$name.'.php')) {
160 160
             include_once $file;
161
-            if (class_exists(ucfirst($dirname) . ucfirst($name))) {
161
+            if (class_exists(ucfirst($dirname).ucfirst($name))) {
162 162
                 return true;
163 163
             }
164 164
         }
@@ -174,64 +174,64 @@  discard block
 block discarded – undo
174 174
     public static function loadCoreConfig()
175 175
     {
176 176
         return $configs = array(
177
-            'xoopsuserutility'           => XOOPS_ROOT_PATH . '/class/userutility.php',
178
-            'xoopsmediauploader'         => XOOPS_ROOT_PATH . '/class/uploader.php',
179
-            'xoopsutility'               => XOOPS_ROOT_PATH . '/class/utility/xoopsutility.php',
180
-            'xoopscaptcha'               => XOOPS_ROOT_PATH . '/class/captcha/xoopscaptcha.php',
181
-            'xoopscache'                 => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php',
182
-            'xoopsfile'                  => XOOPS_ROOT_PATH . '/class/file/xoopsfile.php',
183
-            'xoopsmodelfactory'          => XOOPS_ROOT_PATH . '/class/model/xoopsmodel.php',
184
-            'xoopscalendar'              => XOOPS_ROOT_PATH . '/class/calendar/xoopscalendar.php',
185
-            'xoopskernel'                => XOOPS_ROOT_PATH . '/class/xoopskernel.php',
186
-            'xoopssecurity'              => XOOPS_ROOT_PATH . '/class/xoopssecurity.php',
187
-            'xoopslogger'                => XOOPS_ROOT_PATH . '/class/logger/xoopslogger.php',
188
-            'xoopspagenav'               => XOOPS_ROOT_PATH . '/class/pagenav.php',
189
-            'xoopslists'                 => XOOPS_ROOT_PATH . '/class/xoopslists.php',
190
-            'xoopslocal'                 => XOOPS_ROOT_PATH . '/include/xoopslocal.php',
191
-            'xoopslocalabstract'         => XOOPS_ROOT_PATH . '/class/xoopslocal.php',
192
-            'xoopseditor'                => XOOPS_ROOT_PATH . '/class/xoopseditor/xoopseditor.php',
193
-            'xoopseditorhandler'         => XOOPS_ROOT_PATH . '/class/xoopseditor/xoopseditor.php',
194
-            'xoopsformloader'            => XOOPS_ROOT_PATH . '/class/xoopsformloader.php',
195
-            'xoopsformelement'           => XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php',
196
-            'xoopsform'                  => XOOPS_ROOT_PATH . '/class/xoopsform/form.php',
197
-            'xoopsformlabel'             => XOOPS_ROOT_PATH . '/class/xoopsform/formlabel.php',
198
-            'xoopsformselect'            => XOOPS_ROOT_PATH . '/class/xoopsform/formselect.php',
199
-            'xoopsformpassword'          => XOOPS_ROOT_PATH . '/class/xoopsform/formpassword.php',
200
-            'xoopsformbutton'            => XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php',
201
-            'xoopsformbuttontray'        => XOOPS_ROOT_PATH . '/class/xoopsform/formbuttontray.php',
202
-            'xoopsformcheckbox'          => XOOPS_ROOT_PATH . '/class/xoopsform/formcheckbox.php',
203
-            'xoopsformselectcheckgroup'  => XOOPS_ROOT_PATH . '/class/xoopsform/formselectcheckgroup.php',
204
-            'xoopsformhidden'            => XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php',
205
-            'xoopsformfile'              => XOOPS_ROOT_PATH . '/class/xoopsform/formfile.php',
206
-            'xoopsformradio'             => XOOPS_ROOT_PATH . '/class/xoopsform/formradio.php',
207
-            'xoopsformradioyn'           => XOOPS_ROOT_PATH . '/class/xoopsform/formradioyn.php',
208
-            'xoopsformselectcountry'     => XOOPS_ROOT_PATH . '/class/xoopsform/formselectcountry.php',
209
-            'xoopsformselecttimezone'    => XOOPS_ROOT_PATH . '/class/xoopsform/formselecttimezone.php',
210
-            'xoopsformselectlang'        => XOOPS_ROOT_PATH . '/class/xoopsform/formselectlang.php',
211
-            'xoopsformselectgroup'       => XOOPS_ROOT_PATH . '/class/xoopsform/formselectgroup.php',
212
-            'xoopsformselectuser'        => XOOPS_ROOT_PATH . '/class/xoopsform/formselectuser.php',
213
-            'xoopsformselecttheme'       => XOOPS_ROOT_PATH . '/class/xoopsform/formselecttheme.php',
214
-            'xoopsformselectmatchoption' => XOOPS_ROOT_PATH . '/class/xoopsform/formselectmatchoption.php',
215
-            'xoopsformtext'              => XOOPS_ROOT_PATH . '/class/xoopsform/formtext.php',
216
-            'xoopsformtextarea'          => XOOPS_ROOT_PATH . '/class/xoopsform/formtextarea.php',
217
-            'xoopsformdhtmltextarea'     => XOOPS_ROOT_PATH . '/class/xoopsform/formdhtmltextarea.php',
218
-            'xoopsformelementtray'       => XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php',
219
-            'xoopsthemeform'             => XOOPS_ROOT_PATH . '/class/xoopsform/themeform.php',
220
-            'xoopssimpleform'            => XOOPS_ROOT_PATH . '/class/xoopsform/simpleform.php',
221
-            'xoopsformtextdateselect'    => XOOPS_ROOT_PATH . '/class/xoopsform/formtextdateselect.php',
222
-            'xoopsformdatetime'          => XOOPS_ROOT_PATH . '/class/xoopsform/formdatetime.php',
223
-            'xoopsformhiddentoken'       => XOOPS_ROOT_PATH . '/class/xoopsform/formhiddentoken.php',
224
-            'xoopsformcolorpicker'       => XOOPS_ROOT_PATH . '/class/xoopsform/formcolorpicker.php',
225
-            'xoopsformcaptcha'           => XOOPS_ROOT_PATH . '/class/xoopsform/formcaptcha.php',
226
-            'xoopsformeditor'            => XOOPS_ROOT_PATH . '/class/xoopsform/formeditor.php',
227
-            'xoopsformselecteditor'      => XOOPS_ROOT_PATH . '/class/xoopsform/formselecteditor.php',
228
-            'xoopsformcalendar'          => XOOPS_ROOT_PATH . '/class/xoopsform/formcalendar.php',
229
-            'xoopsformrenderer'          => XOOPS_ROOT_PATH . '/class/xoopsform/renderer/XoopsFormRenderer.php',
230
-            'xoopsformrendererinterface' => XOOPS_ROOT_PATH . '/class/xoopsform/renderer/XoopsFormRendererInterface.php',
231
-            'xoopsformrendererlegacy'    => XOOPS_ROOT_PATH . '/class/xoopsform/renderer/XoopsFormRendererLegacy.php',
232
-            'xoopsformrendererbootstrap3'=> XOOPS_ROOT_PATH . '/class/xoopsform/renderer/XoopsFormRendererBootstrap3.php',
233
-            'xoopsfilterinput'           => XOOPS_ROOT_PATH . '/class/xoopsfilterinput.php',
234
-            'xoopsrequest'               => XOOPS_ROOT_PATH . '/class/xoopsrequest.php');
177
+            'xoopsuserutility'           => XOOPS_ROOT_PATH.'/class/userutility.php',
178
+            'xoopsmediauploader'         => XOOPS_ROOT_PATH.'/class/uploader.php',
179
+            'xoopsutility'               => XOOPS_ROOT_PATH.'/class/utility/xoopsutility.php',
180
+            'xoopscaptcha'               => XOOPS_ROOT_PATH.'/class/captcha/xoopscaptcha.php',
181
+            'xoopscache'                 => XOOPS_ROOT_PATH.'/class/cache/xoopscache.php',
182
+            'xoopsfile'                  => XOOPS_ROOT_PATH.'/class/file/xoopsfile.php',
183
+            'xoopsmodelfactory'          => XOOPS_ROOT_PATH.'/class/model/xoopsmodel.php',
184
+            'xoopscalendar'              => XOOPS_ROOT_PATH.'/class/calendar/xoopscalendar.php',
185
+            'xoopskernel'                => XOOPS_ROOT_PATH.'/class/xoopskernel.php',
186
+            'xoopssecurity'              => XOOPS_ROOT_PATH.'/class/xoopssecurity.php',
187
+            'xoopslogger'                => XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php',
188
+            'xoopspagenav'               => XOOPS_ROOT_PATH.'/class/pagenav.php',
189
+            'xoopslists'                 => XOOPS_ROOT_PATH.'/class/xoopslists.php',
190
+            'xoopslocal'                 => XOOPS_ROOT_PATH.'/include/xoopslocal.php',
191
+            'xoopslocalabstract'         => XOOPS_ROOT_PATH.'/class/xoopslocal.php',
192
+            'xoopseditor'                => XOOPS_ROOT_PATH.'/class/xoopseditor/xoopseditor.php',
193
+            'xoopseditorhandler'         => XOOPS_ROOT_PATH.'/class/xoopseditor/xoopseditor.php',
194
+            'xoopsformloader'            => XOOPS_ROOT_PATH.'/class/xoopsformloader.php',
195
+            'xoopsformelement'           => XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php',
196
+            'xoopsform'                  => XOOPS_ROOT_PATH.'/class/xoopsform/form.php',
197
+            'xoopsformlabel'             => XOOPS_ROOT_PATH.'/class/xoopsform/formlabel.php',
198
+            'xoopsformselect'            => XOOPS_ROOT_PATH.'/class/xoopsform/formselect.php',
199
+            'xoopsformpassword'          => XOOPS_ROOT_PATH.'/class/xoopsform/formpassword.php',
200
+            'xoopsformbutton'            => XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php',
201
+            'xoopsformbuttontray'        => XOOPS_ROOT_PATH.'/class/xoopsform/formbuttontray.php',
202
+            'xoopsformcheckbox'          => XOOPS_ROOT_PATH.'/class/xoopsform/formcheckbox.php',
203
+            'xoopsformselectcheckgroup'  => XOOPS_ROOT_PATH.'/class/xoopsform/formselectcheckgroup.php',
204
+            'xoopsformhidden'            => XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php',
205
+            'xoopsformfile'              => XOOPS_ROOT_PATH.'/class/xoopsform/formfile.php',
206
+            'xoopsformradio'             => XOOPS_ROOT_PATH.'/class/xoopsform/formradio.php',
207
+            'xoopsformradioyn'           => XOOPS_ROOT_PATH.'/class/xoopsform/formradioyn.php',
208
+            'xoopsformselectcountry'     => XOOPS_ROOT_PATH.'/class/xoopsform/formselectcountry.php',
209
+            'xoopsformselecttimezone'    => XOOPS_ROOT_PATH.'/class/xoopsform/formselecttimezone.php',
210
+            'xoopsformselectlang'        => XOOPS_ROOT_PATH.'/class/xoopsform/formselectlang.php',
211
+            'xoopsformselectgroup'       => XOOPS_ROOT_PATH.'/class/xoopsform/formselectgroup.php',
212
+            'xoopsformselectuser'        => XOOPS_ROOT_PATH.'/class/xoopsform/formselectuser.php',
213
+            'xoopsformselecttheme'       => XOOPS_ROOT_PATH.'/class/xoopsform/formselecttheme.php',
214
+            'xoopsformselectmatchoption' => XOOPS_ROOT_PATH.'/class/xoopsform/formselectmatchoption.php',
215
+            'xoopsformtext'              => XOOPS_ROOT_PATH.'/class/xoopsform/formtext.php',
216
+            'xoopsformtextarea'          => XOOPS_ROOT_PATH.'/class/xoopsform/formtextarea.php',
217
+            'xoopsformdhtmltextarea'     => XOOPS_ROOT_PATH.'/class/xoopsform/formdhtmltextarea.php',
218
+            'xoopsformelementtray'       => XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php',
219
+            'xoopsthemeform'             => XOOPS_ROOT_PATH.'/class/xoopsform/themeform.php',
220
+            'xoopssimpleform'            => XOOPS_ROOT_PATH.'/class/xoopsform/simpleform.php',
221
+            'xoopsformtextdateselect'    => XOOPS_ROOT_PATH.'/class/xoopsform/formtextdateselect.php',
222
+            'xoopsformdatetime'          => XOOPS_ROOT_PATH.'/class/xoopsform/formdatetime.php',
223
+            'xoopsformhiddentoken'       => XOOPS_ROOT_PATH.'/class/xoopsform/formhiddentoken.php',
224
+            'xoopsformcolorpicker'       => XOOPS_ROOT_PATH.'/class/xoopsform/formcolorpicker.php',
225
+            'xoopsformcaptcha'           => XOOPS_ROOT_PATH.'/class/xoopsform/formcaptcha.php',
226
+            'xoopsformeditor'            => XOOPS_ROOT_PATH.'/class/xoopsform/formeditor.php',
227
+            'xoopsformselecteditor'      => XOOPS_ROOT_PATH.'/class/xoopsform/formselecteditor.php',
228
+            'xoopsformcalendar'          => XOOPS_ROOT_PATH.'/class/xoopsform/formcalendar.php',
229
+            'xoopsformrenderer'          => XOOPS_ROOT_PATH.'/class/xoopsform/renderer/XoopsFormRenderer.php',
230
+            'xoopsformrendererinterface' => XOOPS_ROOT_PATH.'/class/xoopsform/renderer/XoopsFormRendererInterface.php',
231
+            'xoopsformrendererlegacy'    => XOOPS_ROOT_PATH.'/class/xoopsform/renderer/XoopsFormRendererLegacy.php',
232
+            'xoopsformrendererbootstrap3'=> XOOPS_ROOT_PATH.'/class/xoopsform/renderer/XoopsFormRendererBootstrap3.php',
233
+            'xoopsfilterinput'           => XOOPS_ROOT_PATH.'/class/xoopsfilterinput.php',
234
+            'xoopsrequest'               => XOOPS_ROOT_PATH.'/class/xoopsrequest.php');
235 235
     }
236 236
 
237 237
     /**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
             } else {
254 254
                 return false;
255 255
             }
256
-            if (file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/include/autoload.php')) {
256
+            if (file_exists($file = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/include/autoload.php')) {
257 257
                 if (!$configs = include $file) {
258 258
                     return false;
259 259
                 }
@@ -269,4 +269,4 @@  discard block
 block discarded – undo
269 269
 /**
270 270
  * XMF libraries
271 271
  */
272
-include_once XOOPS_ROOT_PATH . '/class/libraries/vendor/autoload.php';
272
+include_once XOOPS_ROOT_PATH.'/class/libraries/vendor/autoload.php';
Please login to merge, or discard this patch.
htdocs/class/xoopstree.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function __construct($table_name, $id_name, $pid_name)
48 48
     {
49
-        $GLOBALS['xoopsLogger']->addDeprecated("Class '" . __CLASS__ . "' is deprecated, check 'XoopsObjectTree' in tree.php");
49
+        $GLOBALS['xoopsLogger']->addDeprecated("Class '".__CLASS__."' is deprecated, check 'XoopsObjectTree' in tree.php");
50 50
         $this->db = XoopsDatabaseFactory::getDatabaseConnection();
51 51
         $this->table = $table_name;
52 52
         $this->id    = $id_name;
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $sel_id = (int)$sel_id;
66 66
         $arr    = array();
67
-        $sql    = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $sel_id . '';
67
+        $sql    = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$sel_id.'';
68 68
         if ($order != '') {
69 69
             $sql .= " ORDER BY $order";
70 70
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $sel_id  = (int)$sel_id;
92 92
         $idarray = array();
93
-        $result  = $this->db->query('SELECT ' . $this->id . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $sel_id . '');
93
+        $result  = $this->db->query('SELECT '.$this->id.' FROM '.$this->table.' WHERE '.$this->pid.'='.$sel_id.'');
94 94
         $count   = $this->db->getRowsNum($result);
95 95
         if ($count == 0) {
96 96
             return $idarray;
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function getAllChildId($sel_id, $order = '', $idarray = array())
114 114
     {
115 115
         $sel_id = (int)$sel_id;
116
-        $sql    = 'SELECT ' . $this->id . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $sel_id . '';
116
+        $sql    = 'SELECT '.$this->id.' FROM '.$this->table.' WHERE '.$this->pid.'='.$sel_id.'';
117 117
         if ($order != '') {
118 118
             $sql .= " ORDER BY $order";
119 119
         }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     public function getAllParentId($sel_id, $order = '', $idarray = array())
142 142
     {
143 143
         $sel_id = (int)$sel_id;
144
-        $sql    = 'SELECT ' . $this->pid . ' FROM ' . $this->table . ' WHERE ' . $this->id . '=' . $sel_id . '';
144
+        $sql    = 'SELECT '.$this->pid.' FROM '.$this->table.' WHERE '.$this->id.'='.$sel_id.'';
145 145
         if ($order != '') {
146 146
             $sql .= " ORDER BY $order";
147 147
         }
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
     public function getPathFromId($sel_id, $title, $path = '')
169 169
     {
170 170
         $sel_id = (int)$sel_id;
171
-        $result = $this->db->query('SELECT ' . $this->pid . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$sel_id");
171
+        $result = $this->db->query('SELECT '.$this->pid.', '.$title.' FROM '.$this->table.' WHERE '.$this->id."=$sel_id");
172 172
         if ($this->db->getRowsNum($result) == 0) {
173 173
             return $path;
174 174
         }
175 175
         list($parentid, $name) = $this->db->fetchRow($result);
176 176
         $myts = MyTextSanitizer::getInstance();
177 177
         $name = $myts->htmlspecialchars($name);
178
-        $path = '/' . $name . $path . '';
178
+        $path = '/'.$name.$path.'';
179 179
         if ($parentid == 0) {
180 180
             return $path;
181 181
         }
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
             $sel_name = $this->id;
202 202
         }
203 203
         $myts = MyTextSanitizer::getInstance();
204
-        echo "<select name='" . $sel_name . "'";
204
+        echo "<select name='".$sel_name."'";
205 205
         if ($onchange != '') {
206
-            echo " onchange='" . $onchange . "'";
206
+            echo " onchange='".$onchange."'";
207 207
         }
208 208
         echo ">\n";
209
-        $sql = 'SELECT ' . $this->id . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=0';
209
+        $sql = 'SELECT '.$this->id.', '.$title.' FROM '.$this->table.' WHERE '.$this->pid.'=0';
210 210
         if ($order != '') {
211 211
             $sql .= " ORDER BY $order";
212 212
         }
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
             $arr = $this->getChildTreeArray($catid, $order);
225 225
             foreach ($arr as $option) {
226 226
                 $option['prefix'] = str_replace('.', '--', $option['prefix']);
227
-                $catpath          = $option['prefix'] . '&nbsp;' . $myts->htmlspecialchars($option[$title]);
227
+                $catpath          = $option['prefix'].'&nbsp;'.$myts->htmlspecialchars($option[$title]);
228 228
                 if ($option[$this->id] == $preset_id) {
229 229
                     $sel = " selected";
230 230
                 }
231
-                echo "<option value='" . $option[$this->id] . "'$sel>$catpath</option>\n";
231
+                echo "<option value='".$option[$this->id]."'$sel>$catpath</option>\n";
232 232
                 $sel = '';
233 233
             }
234 234
         }
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
      */
247 247
     public function getNicePathFromId($sel_id, $title, $funcURL, $path = '')
248 248
     {
249
-        $path   = !empty($path) ? '&nbsp;:&nbsp;' . $path : $path;
249
+        $path   = !empty($path) ? '&nbsp;:&nbsp;'.$path : $path;
250 250
         $sel_id = (int)$sel_id;
251
-        $sql    = 'SELECT ' . $this->pid . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$sel_id";
251
+        $sql    = 'SELECT '.$this->pid.', '.$title.' FROM '.$this->table.' WHERE '.$this->id."=$sel_id";
252 252
         $result = $this->db->query($sql);
253 253
         if ($this->db->getRowsNum($result) == 0) {
254 254
             return $path;
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         list($parentid, $name) = $this->db->fetchRow($result);
257 257
         $myts = MyTextSanitizer::getInstance();
258 258
         $name = $myts->htmlspecialchars($name);
259
-        $path = "<a href='" . $funcURL . '&amp;' . $this->id . '=' . $sel_id . "'>" . $name . '</a>' . $path . '';
259
+        $path = "<a href='".$funcURL.'&amp;'.$this->id.'='.$sel_id."'>".$name.'</a>'.$path.'';
260 260
         if ($parentid == 0) {
261 261
             return $path;
262 262
         }
@@ -276,12 +276,12 @@  discard block
 block discarded – undo
276 276
     public function getIdPathFromId($sel_id, $path = '')
277 277
     {
278 278
         $sel_id = (int)$sel_id;
279
-        $result = $this->db->query('SELECT ' . $this->pid . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$sel_id");
279
+        $result = $this->db->query('SELECT '.$this->pid.' FROM '.$this->table.' WHERE '.$this->id."=$sel_id");
280 280
         if ($this->db->getRowsNum($result) == 0) {
281 281
             return $path;
282 282
         }
283 283
         list($parentid) = $this->db->fetchRow($result);
284
-        $path = '/' . $sel_id . $path . '';
284
+        $path = '/'.$sel_id.$path.'';
285 285
         if ($parentid == 0) {
286 286
             return $path;
287 287
         }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     public function getAllChild($sel_id = 0, $order = '', $parray = array())
303 303
     {
304 304
         $sel_id = (int)$sel_id;
305
-        $sql    = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $sel_id . '';
305
+        $sql    = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$sel_id.'';
306 306
         if ($order != '') {
307 307
             $sql .= " ORDER BY $order";
308 308
         }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     public function getChildTreeArray($sel_id = 0, $order = '', $parray = array(), $r_prefix = '')
332 332
     {
333 333
         $sel_id = (int)$sel_id;
334
-        $sql    = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $sel_id . '';
334
+        $sql    = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$sel_id.'';
335 335
         if ($order != '') {
336 336
             $sql .= " ORDER BY $order";
337 337
         }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
             return $parray;
342 342
         }
343 343
         while (false !== ($row = $this->db->fetchArray($result))) {
344
-            $row['prefix'] = $r_prefix . '.';
344
+            $row['prefix'] = $r_prefix.'.';
345 345
             $parray[]      = $row;
346 346
             $parray        = $this->getChildTreeArray($row[$this->id], $order, $parray, $row['prefix']);
347 347
         }
Please login to merge, or discard this patch.
htdocs/class/xoopsblock.php 1 patch
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function load($id)
83 83
     {
84 84
         $id  = (int)$id;
85
-        $sql = 'SELECT * FROM ' . $this->db->prefix('newblocks') . ' WHERE bid = ' . $id;
85
+        $sql = 'SELECT * FROM '.$this->db->prefix('newblocks').' WHERE bid = '.$id;
86 86
         $arr = $this->db->fetchArray($this->db->query($sql));
87 87
         $this->assignVars($arr);
88 88
     }
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
             ${$k} = $v;
102 102
         }
103 103
         if (empty($bid)) {
104
-            $bid = $this->db->genId($this->db->prefix('newblocks') . '_bid_seq');
104
+            $bid = $this->db->genId($this->db->prefix('newblocks').'_bid_seq');
105 105
             $sql = sprintf('INSERT INTO %s (bid, mid, func_num, options, name, title, content, side, weight, visible, block_type, c_type, isactive, dirname, func_file, show_func, edit_func, template, bcachetime, last_modified) VALUES (%u, %u, %u, %s, %s, %s, %s, %u, %u, %u, %s, %s, %u, %s, %s, %s, %s, %s, %u, %u)', $this->db->prefix('newblocks'), $bid, $mid, $func_num, $this->db->quoteString($options), $this->db->quoteString($name), $this->db->quoteString($title), $this->db->quoteString($content), $side, $weight, $visible, $this->db->quoteString($block_type), $this->db->quoteString($c_type), 1, $this->db->quoteString($dirname), $this->db->quoteString($func_file), $this->db->quoteString($show_func), $this->db->quoteString($edit_func), $this->db->quoteString($template), $bcachetime, time());
106 106
         } else {
107
-            $sql = 'UPDATE ' . $this->db->prefix('newblocks') . ' SET options=' . $this->db->quoteString($options);
107
+            $sql = 'UPDATE '.$this->db->prefix('newblocks').' SET options='.$this->db->quoteString($options);
108 108
             // a custom block needs its own name
109 109
             if ($this->isCustom() /* in_array( $block_type , array( 'C' , 'E' ) ) */) {
110
-                $sql .= ', name=' . $this->db->quoteString($name);
110
+                $sql .= ', name='.$this->db->quoteString($name);
111 111
             }
112
-            $sql .= ', isactive=' . $isactive . ', title=' . $this->db->quoteString($title) . ', content=' . $this->db->quoteString($content) . ', side=' . $side . ', weight=' . $weight . ', visible=' . $visible . ', c_type=' . $this->db->quoteString($c_type) . ', template=' . $this->db->quoteString($template) . ', bcachetime=' . $bcachetime . ', last_modified=' . time() . ' WHERE bid=' . $bid;
112
+            $sql .= ', isactive='.$isactive.', title='.$this->db->quoteString($title).', content='.$this->db->quoteString($content).', side='.$side.', weight='.$weight.', visible='.$visible.', c_type='.$this->db->quoteString($c_type).', template='.$this->db->quoteString($template).', bcachetime='.$bcachetime.', last_modified='.time().' WHERE bid='.$bid;
113 113
         }
114 114
         if (!$this->db->query($sql)) {
115 115
             $this->setErrors('Could not save block data into database');
@@ -160,22 +160,22 @@  discard block
 block discarded – undo
160 160
                 // S : use text sanitizater (smilies enabled)
161 161
                 // T : use text sanitizater (smilies disabled)
162 162
                 if ($c_type === 'H') {
163
-                    return str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'n'));
163
+                    return str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'n'));
164 164
                 } elseif ($c_type === 'P') {
165 165
                     ob_start();
166 166
                     echo eval($this->getVar('content', 'n'));
167 167
                     $content = ob_get_contents();
168 168
                     ob_end_clean();
169 169
 
170
-                    return str_replace('{X_SITEURL}', XOOPS_URL . '/', $content);
170
+                    return str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
171 171
                 } elseif ($c_type === 'S') {
172 172
                     $myts    = MyTextSanitizer::getInstance();
173
-                    $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'n'));
173
+                    $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'n'));
174 174
 
175 175
                     return $myts->displayTarea($content, 1, 1);
176 176
                 } else {
177 177
                     $myts    = MyTextSanitizer::getInstance();
178
-                    $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'n'));
178
+                    $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'n'));
179 179
 
180 180
                     return $myts->displayTarea($content, 1, 0);
181 181
                 }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             if (!$show_func) {
205 205
                 return false;
206 206
             }
207
-            if (!file_exists($func_file = $GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file')))) {
207
+            if (!file_exists($func_file = $GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file')))) {
208 208
                 return false;
209 209
             }
210 210
             // must get lang files b4 including the file
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
     public function buildContent($position, $content = '', $contentdb = '')
251 251
     {
252 252
         if ($position == 0) {
253
-            $ret = $contentdb . $content;
253
+            $ret = $contentdb.$content;
254 254
         } elseif ($position == 1) {
255
-            $ret = $content . $contentdb;
255
+            $ret = $content.$contentdb;
256 256
         }
257 257
 
258 258
         return $ret;
@@ -300,13 +300,13 @@  discard block
 block discarded – undo
300 300
             if (!$edit_func) {
301 301
                 return false;
302 302
             }
303
-            if (file_exists($GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file')))) {
304
-                if (file_exists($file = $GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/blocks.php'))) {
303
+            if (file_exists($GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file')))) {
304
+                if (file_exists($file = $GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/language/'.$xoopsConfig['language'].'/blocks.php'))) {
305 305
                     include_once $file;
306
-                } elseif (file_exists($file = $GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/language/english/blocks.php'))) {
306
+                } elseif (file_exists($file = $GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/language/english/blocks.php'))) {
307 307
                     include_once $file;
308 308
                 }
309
-                include_once $GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file'));
309
+                include_once $GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file'));
310 310
                 $options   = explode('|', $this->getVar('options'));
311 311
                 $edit_form = $edit_func($options);
312 312
                 if (!$edit_form) {
@@ -346,20 +346,20 @@  discard block
 block discarded – undo
346 346
         if (!$asobject) {
347 347
             $sql = 'SELECT b.bid ';
348 348
         }
349
-        $sql .= 'FROM ' . $db->prefix('newblocks') . ' b LEFT JOIN ' . $db->prefix('group_permission') . " l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1";
349
+        $sql .= 'FROM '.$db->prefix('newblocks').' b LEFT JOIN '.$db->prefix('group_permission')." l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1";
350 350
         if (is_array($groupid)) {
351
-            $sql .= ' AND (l.gperm_groupid=' . $groupid[0] . '';
351
+            $sql .= ' AND (l.gperm_groupid='.$groupid[0].'';
352 352
             $size = count($groupid);
353 353
             if ($size > 1) {
354 354
                 for ($i = 1; $i < $size; ++$i) {
355
-                    $sql .= ' OR l.gperm_groupid=' . $groupid[$i] . '';
355
+                    $sql .= ' OR l.gperm_groupid='.$groupid[$i].'';
356 356
                 }
357 357
             }
358 358
             $sql .= ')';
359 359
         } else {
360
-            $sql .= ' AND l.gperm_groupid=' . $groupid . '';
360
+            $sql .= ' AND l.gperm_groupid='.$groupid.'';
361 361
         }
362
-        $sql .= ' AND b.isactive=' . $isactive;
362
+        $sql .= ' AND b.isactive='.$isactive;
363 363
         if (isset($side)) {
364 364
             // get both sides in sidebox? (some themes need this)
365 365
             if ($side == XOOPS_SIDEBLOCK_BOTH) {
@@ -369,9 +369,9 @@  discard block
 block discarded – undo
369 369
             } elseif ($side == XOOPS_FOOTERBLOCK_ALL) {
370 370
                 $side = '(b.side=10 OR b.side=11 OR b.side=12 )';
371 371
             } else {
372
-                $side = 'b.side=' . $side;
372
+                $side = 'b.side='.$side;
373 373
             }
374
-            $sql .= ' AND ' . $side;
374
+            $sql .= ' AND '.$side;
375 375
         }
376 376
         if (isset($visible)) {
377 377
             $sql .= " AND b.visible=$visible";
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     {
408 408
         $db          = XoopsDatabaseFactory::getDatabaseConnection();
409 409
         $ret         = array();
410
-        $where_query = ' WHERE isactive=' . $isactive;
410
+        $where_query = ' WHERE isactive='.$isactive;
411 411
         if (isset($side)) {
412 412
             // get both sides in sidebox? (some themes need this)
413 413
             if ($side == XOOPS_SIDEBLOCK_BOTH) {
@@ -417,24 +417,24 @@  discard block
 block discarded – undo
417 417
             } elseif ($side == XOOPS_FOOTERBLOCK_ALL) {
418 418
                 $side = '(side=10 OR side=11 OR side=12)';
419 419
             } else {
420
-                $side = 'side=' . $side;
420
+                $side = 'side='.$side;
421 421
             }
422
-            $where_query .= ' AND ' . $side;
422
+            $where_query .= ' AND '.$side;
423 423
         }
424 424
         if (isset($visible)) {
425
-            $where_query .= ' AND visible=.' . $visible;
425
+            $where_query .= ' AND visible=.'.$visible;
426 426
         }
427
-        $where_query .= ' ORDER BY ' . $orderby;
427
+        $where_query .= ' ORDER BY '.$orderby;
428 428
         switch ($rettype) {
429 429
             case 'object':
430
-                $sql    = 'SELECT * FROM ' . $db->prefix('newblocks') . '' . $where_query;
430
+                $sql    = 'SELECT * FROM '.$db->prefix('newblocks').''.$where_query;
431 431
                 $result = $db->query($sql);
432 432
                 while (false !== ($myrow = $db->fetchArray($result))) {
433 433
                     $ret[] = new XoopsBlock($myrow);
434 434
                 }
435 435
                 break;
436 436
             case 'list':
437
-                $sql    = 'SELECT * FROM ' . $db->prefix('newblocks') . '' . $where_query;
437
+                $sql    = 'SELECT * FROM '.$db->prefix('newblocks').''.$where_query;
438 438
                 $result = $db->query($sql);
439 439
                 while (false !== ($myrow = $db->fetchArray($result))) {
440 440
                     $block                      = new XoopsBlock($myrow);
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
                 }
445 445
                 break;
446 446
             case 'id':
447
-                $sql    = 'SELECT bid FROM ' . $db->prefix('newblocks') . '' . $where_query;
447
+                $sql    = 'SELECT bid FROM '.$db->prefix('newblocks').''.$where_query;
448 448
                 $result = $db->query($sql);
449 449
                 while (false !== ($myrow = $db->fetchArray($result))) {
450 450
                     $ret[] = $myrow['bid'];
@@ -468,9 +468,9 @@  discard block
 block discarded – undo
468 468
         $moduleid = (int)$moduleid;
469 469
         $db       = XoopsDatabaseFactory::getDatabaseConnection();
470 470
         if ($asobject == true) {
471
-            $sql = $sql = 'SELECT * FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $moduleid;
471
+            $sql = $sql = 'SELECT * FROM '.$db->prefix('newblocks').' WHERE mid='.$moduleid;
472 472
         } else {
473
-            $sql = 'SELECT bid FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $moduleid;
473
+            $sql = 'SELECT bid FROM '.$db->prefix('newblocks').' WHERE mid='.$moduleid;
474 474
         }
475 475
         $result = $db->query($sql);
476 476
         $ret    = array();
@@ -502,12 +502,12 @@  discard block
 block discarded – undo
502 502
         $db       = XoopsDatabaseFactory::getDatabaseConnection();
503 503
         $ret      = array();
504 504
         if (isset($groupid)) {
505
-            $sql = 'SELECT DISTINCT gperm_itemid FROM ' . $db->prefix('group_permission') . " WHERE gperm_name = 'block_read' AND gperm_modid = 1";
505
+            $sql = 'SELECT DISTINCT gperm_itemid FROM '.$db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
506 506
             if (is_array($groupid)) {
507
-                $sql .= ' AND gperm_groupid IN (' . implode(',', $groupid) . ')';
507
+                $sql .= ' AND gperm_groupid IN ('.implode(',', $groupid).')';
508 508
             } else {
509 509
                 if ((int)$groupid > 0) {
510
-                    $sql .= ' AND gperm_groupid=' . (int)$groupid;
510
+                    $sql .= ' AND gperm_groupid='.(int)$groupid;
511 511
                 }
512 512
             }
513 513
             $result   = $db->query($sql);
@@ -519,14 +519,14 @@  discard block
 block discarded – undo
519 519
                 return $blockids;
520 520
             }
521 521
         }
522
-        $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid';
523
-        $sql .= ' AND b.isactive=' . $isactive;
522
+        $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
523
+        $sql .= ' AND b.isactive='.$isactive;
524 524
         if (isset($visible)) {
525
-            $sql .= ' AND b.visible=' . (int)$visible;
525
+            $sql .= ' AND b.visible='.(int)$visible;
526 526
         }
527 527
         if (!isset($module_id)) {
528 528
         } elseif (!empty($module_id)) {
529
-            $sql .= ' AND m.module_id IN (0,' . (int)$module_id;
529
+            $sql .= ' AND m.module_id IN (0,'.(int)$module_id;
530 530
             if ($toponlyblock) {
531 531
                 $sql .= ',-1';
532 532
             }
@@ -539,9 +539,9 @@  discard block
 block discarded – undo
539 539
             }
540 540
         }
541 541
         if (!empty($blockids)) {
542
-            $sql .= ' AND b.bid IN (' . implode(',', $blockids) . ')';
542
+            $sql .= ' AND b.bid IN ('.implode(',', $blockids).')';
543 543
         }
544
-        $sql .= ' ORDER BY ' . $orderby;
544
+        $sql .= ' ORDER BY '.$orderby;
545 545
         $result = $db->query($sql);
546 546
         while (false !== ($myrow = $db->fetchArray($result))) {
547 547
             $block              = new XoopsBlock($myrow);
@@ -567,13 +567,13 @@  discard block
 block discarded – undo
567 567
         $db   = XoopsDatabaseFactory::getDatabaseConnection();
568 568
         $ret  = array();
569 569
         $bids = array();
570
-        $sql  = 'SELECT DISTINCT(bid) from ' . $db->prefix('newblocks');
570
+        $sql  = 'SELECT DISTINCT(bid) from '.$db->prefix('newblocks');
571 571
         if ($result = $db->query($sql)) {
572 572
             while (false !== ($myrow = $db->fetchArray($result))) {
573 573
                 $bids[] = $myrow['bid'];
574 574
             }
575 575
         }
576
-        $sql     = 'SELECT DISTINCT(p.gperm_itemid) from ' . $db->prefix('group_permission') . ' p, ' . $db->prefix('groups') . " g WHERE g.groupid=p.gperm_groupid AND p.gperm_name='block_read'";
576
+        $sql     = 'SELECT DISTINCT(p.gperm_itemid) from '.$db->prefix('group_permission').' p, '.$db->prefix('groups')." g WHERE g.groupid=p.gperm_groupid AND p.gperm_name='block_read'";
577 577
         $grouped = array();
578 578
         if ($result = $db->query($sql)) {
579 579
             while (false !== ($myrow = $db->fetchArray($result))) {
@@ -582,14 +582,14 @@  discard block
 block discarded – undo
582 582
         }
583 583
         $non_grouped = array_diff($bids, $grouped);
584 584
         if (!empty($non_grouped)) {
585
-            $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid';
586
-            $sql .= ' AND b.isactive=' . (int)$isactive;
585
+            $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
586
+            $sql .= ' AND b.isactive='.(int)$isactive;
587 587
             if (isset($visible)) {
588
-                $sql .= ' AND b.visible=' . (int)$visible;
588
+                $sql .= ' AND b.visible='.(int)$visible;
589 589
             }
590 590
             if (!isset($module_id)) {
591 591
             } elseif (!empty($module_id)) {
592
-                $sql .= ' AND m.module_id IN (0,' . (int)$module_id;
592
+                $sql .= ' AND m.module_id IN (0,'.(int)$module_id;
593 593
                 if ($toponlyblock) {
594 594
                     $sql .= ',-1';
595 595
                 }
@@ -601,12 +601,12 @@  discard block
 block discarded – undo
601 601
                     $sql .= ' AND m.module_id=0';
602 602
                 }
603 603
             }
604
-            $sql .= ' AND b.bid IN (' . implode(',', $non_grouped) . ')';
605
-            $sql .= ' ORDER BY ' . $orderby;
604
+            $sql .= ' AND b.bid IN ('.implode(',', $non_grouped).')';
605
+            $sql .= ' ORDER BY '.$orderby;
606 606
             $result = $db->query($sql);
607 607
             while (false !== ($myrow = $db->fetchArray($result))) {
608 608
                 $block              = new XoopsBlock($myrow);
609
-                $ret[$myrow['bid']] =& $block;
609
+                $ret[$myrow['bid']] = & $block;
610 610
                 unset($block);
611 611
             }
612 612
         }
Please login to merge, or discard this patch.
htdocs/class/logger_render.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,4 +29,4 @@
 block discarded – undo
29 29
  * Load the new XoopsLogger class
30 30
  **/
31 31
 include_once $GLOBALS['xoops']->path('class/logger/render.php');
32
-trigger_error('Instance of ' . __FILE__ . ' file is deprecated, check in class/logger/render.php');
32
+trigger_error('Instance of '.__FILE__.' file is deprecated, check in class/logger/render.php');
Please login to merge, or discard this patch.
htdocs/class/xoopstopic.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 $GLOBALS['xoopsLogger']->addDeprecated("'/class/xoopstopic.php' is deprecated since XOOPS 2.5.4, please create your own class instead.");
23 23
 
24
-include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
24
+include_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
25 25
 
26 26
 /**
27 27
  * Class XoopsTopic
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function getTopic($topicid)
85 85
     {
86 86
         $topicid = (int)$topicid;
87
-        $sql     = 'SELECT * FROM ' . $this->table . ' WHERE topic_id=' . $topicid . '';
87
+        $sql     = 'SELECT * FROM '.$this->table.' WHERE topic_id='.$topicid.'';
88 88
         $array   = $this->db->fetchArray($this->db->query($sql));
89 89
         $this->makeTopic($array);
90 90
     }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $this->topic_pid = 0;
127 127
         }
128 128
         if (empty($this->topic_id)) {
129
-            $this->topic_id = $this->db->genId($this->table . '_topic_id_seq');
129
+            $this->topic_id = $this->db->genId($this->table.'_topic_id_seq');
130 130
             $sql            = sprintf("INSERT INTO %s (topic_id, topic_pid, topic_imgurl, topic_title) VALUES (%u, %u, '%s', '%s')", $this->table, $this->topic_id, $this->topic_pid, $imgurl, $title);
131 131
         } else {
132 132
             $sql = sprintf("UPDATE %s SET topic_pid = %u, topic_imgurl = '%s', topic_title = '%s' WHERE topic_id = %u", $this->table, $this->topic_pid, $imgurl, $title, $this->topic_id);
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
      */
377 377
     public function getTopicsList()
378 378
     {
379
-        $result = $this->db->query('SELECT topic_id, topic_pid, topic_title FROM ' . $this->table);
379
+        $result = $this->db->query('SELECT topic_id, topic_pid, topic_title FROM '.$this->table);
380 380
         $ret    = array();
381 381
         $myts   = MyTextSanitizer::getInstance();
382 382
         while (false !== ($myrow = $this->db->fetchArray($result))) {
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      */
395 395
     public function topicExists($pid, $title)
396 396
     {
397
-        $sql = 'SELECT COUNT(*) from ' . $this->table . ' WHERE topic_pid = ' . (int)$pid . " AND topic_title = '" . trim($title) . "'";
397
+        $sql = 'SELECT COUNT(*) from '.$this->table.' WHERE topic_pid = '.(int)$pid." AND topic_title = '".trim($title)."'";
398 398
         $rs  = $this->db->query($sql);
399 399
         list($count) = $this->db->fetchRow($rs);
400 400
         if ($count > 0) {
Please login to merge, or discard this patch.
htdocs/class/module.errorhandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,14 +96,14 @@
 block discarded – undo
96 96
         if (!in_array($e_code, $errorno)) {
97 97
             $e_code = '9999';
98 98
         }
99
-        include_once XOOPS_ROOT_PATH . '/header.php';
100
-        echo '<div><strong>' . $xoopsConfig['sitename'] . ' Error</strong><br><br>';
99
+        include_once XOOPS_ROOT_PATH.'/header.php';
100
+        echo '<div><strong>'.$xoopsConfig['sitename'].' Error</strong><br><br>';
101 101
 
102 102
         echo "Error Code: $e_code<br><br><br>";
103 103
         echo "<strong>ERROR:</strong> $errmsg[$e_code]<br><br><br>";
104
-        echo '[ <a href=\'javascript:history.go(-' . $pages . ')\'>Go Back</a> ]</div>';
104
+        echo '[ <a href=\'javascript:history.go(-'.$pages.')\'>Go Back</a> ]</div>';
105 105
 
106
-        include_once XOOPS_ROOT_PATH . '/footer.php';
106
+        include_once XOOPS_ROOT_PATH.'/footer.php';
107 107
         exit();
108 108
     }
109 109
 }
Please login to merge, or discard this patch.