Completed
Branch master (5c4e1a)
by Michael
46s
created
xoops_trust_path/libs/altsys/admin_menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
 $adminmenu4altsys = [
44 44
     [
45
-        'title' => 'ALTSYS ' . _PREFERENCES,
45
+        'title' => 'ALTSYS '._PREFERENCES,
46 46
         'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences',
47 47
     ],
48 48
 ];
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -321,18 +321,18 @@
 block discarded – undo
321 321
         }
322 322
 
323 323
         $tpl->assign([
324
-                         'target_dirname' => $this->target_dirname,
325
-                         'target_mname' => $this->target_mname,
326
-                         'language' => $this->lang,
327
-                         'cachetime_options' => $this->cachetime_options,
328
-                         'ctype_options' => $this->ctype_options,
329
-                         'block' => $block4assign,
330
-                         'op' => $next_op,
331
-                         'form_title' => $form_title,
332
-                         'submit_button' => $button_value,
333
-                         'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'),
334
-                         'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'),
335
-                     ]);
324
+                            'target_dirname' => $this->target_dirname,
325
+                            'target_mname' => $this->target_mname,
326
+                            'language' => $this->lang,
327
+                            'cachetime_options' => $this->cachetime_options,
328
+                            'ctype_options' => $this->ctype_options,
329
+                            'block' => $block4assign,
330
+                            'op' => $next_op,
331
+                            'form_title' => $form_title,
332
+                            'submit_button' => $button_value,
333
+                            'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'),
334
+                            'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'),
335
+                        ]);
336 336
 
337 337
         //HACK by domifara
338 338
 
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3
-require_once __DIR__ . '/MyBlocksAdmin.class.php';
3
+require_once __DIR__.'/MyBlocksAdmin.class.php';
4 4
 
5 5
 /**
6 6
  * Class MyBlocksAdminForX25
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         parent::construct();
17 17
 
18
-        @require_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php';
18
+        @require_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php';
19 19
     }
20 20
 
21 21
     //HACK by domifara for php5.3+
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function renderCell4BlockPosition($block_data)
50 50
     {
51
-        $bid = (int) $block_data['bid'];
51
+        $bid = (int)$block_data['bid'];
52 52
 
53
-        $side = (int) $block_data['side'];
53
+        $side = (int)$block_data['side'];
54 54
 
55
-        $visible = (int) $block_data['visible'];
55
+        $visible = (int)$block_data['visible'];
56 56
 
57 57
         $sseln = $ssel0 = $ssel1 = $ssel3 = $ssel4 = $ssel5 = $ssel7 = $ssel8 = $ssel9 = '';
58 58
 
@@ -112,59 +112,59 @@  discard block
 block discarded – undo
112 112
         <tr>
113 113
             <td rowspan='2'>
114 114
                 <div class='blockposition $scol0'>
115
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_LEFT . "' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_LEFT . ";'>
115
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_LEFT.";'>
116 116
                 </div>
117
-                <div style='float:" . _GLOBAL_LEFT . ";'>-</div>
117
+                <div style='float:" . _GLOBAL_LEFT.";'>-</div>
118 118
             </td>
119 119
             <td>
120 120
                 <div class='blockposition $scol3'>
121
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_LEFT . "' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_LEFT . ";'>
121
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_LEFT.";'>
122 122
                 </div>
123 123
             </td>
124 124
             <td>
125 125
                 <div class='blockposition $scol5'>
126
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_CENTER . "' class='blockposition' $ssel5 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_CENTER . ";'>
126
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."' class='blockposition' $ssel5 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_CENTER.";'>
127 127
                 </div>
128 128
             </td>
129 129
             <td>
130 130
                 <div class='blockposition $scol4'>
131
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_RIGHT . "' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_RIGHT . ";'>
131
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_RIGHT.";'>
132 132
                 </div>
133 133
             </td>
134 134
             <td rowspan='2'>
135
-                <div style='float:" . _GLOBAL_LEFT . ";'>-</div>
135
+                <div style='float:" . _GLOBAL_LEFT.";'>-</div>
136 136
                 <div class='blockposition $scol1'>
137
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_RIGHT . "' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_RIGHT . ";'>
137
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_RIGHT.";'>
138 138
                 </div>
139 139
             </td>
140 140
         </tr>
141 141
         <tr>
142 142
             <td>
143 143
                 <div class='blockposition $scol7'>
144
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOMLEFT . "' class='blockposition' $ssel7 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOMLEFT . ";'>
144
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."' class='blockposition' $ssel7 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOMLEFT.";'>
145 145
                 </div>
146 146
             </td>
147 147
             <td>
148 148
                 <div class='blockposition $scol9'>
149
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOM . "' class='blockposition' $ssel9 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOM . ";'>
149
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOM."' class='blockposition' $ssel9 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOM.";'>
150 150
                 </div>
151 151
             </td>
152 152
             <td>
153 153
                 <div class='blockposition $scol8'>
154
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOMRIGHT . "' class='blockposition' $ssel8 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOMRIGHT . ";'>
154
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."' class='blockposition' $ssel8 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOMRIGHT.";'>
155 155
                 </div>
156 156
 
157 157
             </td>
158 158
         </tr>
159 159
         <tr>
160 160
             <td colspan='5'>
161
-                <div style='float:" . _GLOBAL_LEFT . ";width:50px;' class='$stextbox'>
162
-                    <input type='text' name='extra_sides[$bid]' value='" . $value4extra_side . "' style='width:20px;' id='extra_side_$bid'>
161
+                <div style='float:" . _GLOBAL_LEFT.";width:50px;' class='$stextbox'>
162
+                    <input type='text' name='extra_sides[$bid]' value='".$value4extra_side."' style='width:20px;' id='extra_side_$bid'>
163 163
                 </div>
164 164
                 <div class='blockposition $scoln'>
165 165
                     <input type='radio' name='sides[$bid]' value='-1' class='blockposition' $sseln onclick='document.getElementById(\"extra_side_$bid\").value=-1;'>
166 166
                 </div>
167
-                <div style='float:" . _GLOBAL_LEFT . ";'>" . _NONE . '</div>
167
+                <div style='float:"._GLOBAL_LEFT.";'>"._NONE.'</div>
168 168
             </td>
169 169
         </tr>
170 170
     </table>
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      */
178 178
     public function form_edit($bid, $mode = 'edit'): void
179 179
     {
180
-        $bid = (int) $bid;
180
+        $bid = (int)$bid;
181 181
 
182 182
         //HACK by domifara
183 183
 
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
                 'bid' => $bid,
252 252
                 'name' => $block->getVar('name', 'n'),
253 253
                 'title' => $block->getVar('title', 'n'),
254
-                'weight' => (int) $block->getVar('weight'),
255
-                'bcachetime' => (int) $block->getVar('bcachetime'),
256
-                'side' => (int) $block->getVar('side'),
257
-                'visible' => (int) $block->getVar('visible'),
254
+                'weight' => (int)$block->getVar('weight'),
255
+                'bcachetime' => (int)$block->getVar('bcachetime'),
256
+                'side' => (int)$block->getVar('side'),
257
+                'visible' => (int)$block->getVar('visible'),
258 258
                 'template' => $block_template,
259 259
                 'template_tplset' => $block_template_tplset,
260 260
                 'options' => $block->getVar('options'),
@@ -277,13 +277,13 @@  discard block
 block discarded – undo
277 277
 
278 278
         // display
279 279
 
280
-        require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
280
+        require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
281 281
 
282 282
         $tpl = new D3Tpl();
283 283
 
284 284
         //dhtml
285 285
 
286
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
286
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
287 287
 
288 288
         if ('H' == $block_data['ctype'] || empty($block_data['ctype'])) {
289 289
             $editor_configs = [];
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 
313 313
             $rendered = $form->render();
314 314
 
315
-            $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">' . str_replace(['<textarea', '</textarea><br>'], ['</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'], $rendered) . '</div>';
315
+            $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">'.str_replace(['<textarea', '</textarea><br>'], ['</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'], $rendered).'</div>';
316 316
 
317 317
             $tpl->assign('altsys_x25_dhtmltextarea', $rendered);
318 318
         }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
                          'op' => $next_op,
328 328
                          'form_title' => $form_title,
329 329
                          'submit_button' => $button_value,
330
-                         'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'),
330
+                         'common_fck_installed' => file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'),
331 331
                          'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'),
332 332
                      ]);
333 333
 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function fetchRequest4Block($bid)
344 344
     {
345
-        $bid = (int) $bid;
345
+        $bid = (int)$bid;
346 346
 
347 347
         (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
348 348
 
@@ -360,13 +360,13 @@  discard block
 block discarded – undo
360 360
 
361 361
         return [
362 362
             'bid' => $bid,
363
-            'side' => (int) (@$_POST['sides'][$bid]),
364
-            'weight' => (int) (@$_POST['weights'][$bid]),
363
+            'side' => (int)(@$_POST['sides'][$bid]),
364
+            'weight' => (int)(@$_POST['weights'][$bid]),
365 365
             'visible' => $visible,
366 366
             'title' => (@$_POST['titles'][$bid]),
367 367
             'content' => (@$_POST['textarea_content']),
368 368
             'ctype' => preg_replace('/[^A-Z]/', '', @$_POST['ctypes'][$bid]),
369
-            'bcachetime' => (int) (@$_POST['bcachetimes'][$bid]),
369
+            'bcachetime' => (int)(@$_POST['bcachetimes'][$bid]),
370 370
             'bmodule' => \is_array(@$_POST['bmodules'][$bid]) ? $_POST['bmodules'][$bid] : [0],
371 371
             'bgroup' => \is_array(@$_POST['bgroups'][$bid]) ? $_POST['bgroups'][$bid] : [],
372 372
             'options' => \is_array(@$_POST['options'][$bid]) ? $_POST['options'][$bid] : [],
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
      */
380 380
     public function previewContent($block_data)
381 381
     {
382
-        $bid = (int) $block_data['bid'];
382
+        $bid = (int)$block_data['bid'];
383 383
 
384 384
         if (!$block_data['is_custom']) {
385 385
             return '';
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         $c_type = $block_data['ctype'];
413 413
 
414 414
         if ('H' == $c_type) {
415
-            $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
415
+            $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
416 416
         } elseif ('P' == $c_type) {
417 417
             ob_start();
418 418
 
@@ -422,17 +422,17 @@  discard block
 block discarded – undo
422 422
 
423 423
             ob_end_clean();
424 424
 
425
-            $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $content);
425
+            $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
426 426
         } elseif ('S' == $c_type) {
427 427
             (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
428 428
 
429
-            $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
429
+            $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
430 430
 
431 431
             $ret = $myts->displayTarea($content, 1, 1);
432 432
         } else {
433 433
             (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
434 434
 
435
-            $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
435
+            $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
436 436
 
437 437
             $ret = $myts->displayTarea($content, 1, 0);
438 438
         }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/smarty_plugins/resource.db.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,12 +123,12 @@
 block discarded – undo
123 123
 
124 124
     // First, check for an overloaded version within the theme folder
125 125
 
126
-    $filepath = XOOPS_THEME_PATH . "/$theme/modules/$module/$blockpath$tpl_name";
126
+    $filepath = XOOPS_THEME_PATH."/$theme/modules/$module/$blockpath$tpl_name";
127 127
 
128 128
     if (!file_exists($filepath)) {
129 129
         // If no custom version exists, get the tpl from its default location
130 130
 
131
-        $filepath = XOOPS_ROOT_PATH . "/modules/$module/templates/$blockpath$tpl_name";
131
+        $filepath = XOOPS_ROOT_PATH."/modules/$module/templates/$blockpath$tpl_name";
132 132
 
133 133
         if (!file_exists($filepath)) {
134 134
             return $cache[$tpl_name] = $tplobj;
Please login to merge, or discard this patch.
html/modules/altsys/include/onuninstall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10 10
 $mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/onuninstall.php';
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onuninstall.php';
Please login to merge, or discard this patch.
html/modules/altsys/include/oninstall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10 10
 $mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/oninstall.php';
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/oninstall.php';
Please login to merge, or discard this patch.
html/modules/altsys/include/onupdate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10 10
 $mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/onupdate.php';
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onupdate.php';
Please login to merge, or discard this patch.
html/modules/altsys/include/Legacy_AltsysAdminRenderSystem.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10 10
 $mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/include/Legacy_AltsysAdminRenderSystem.class.php';
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php';
Please login to merge, or discard this patch.
html/modules/altsys/blocks/blocks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10 10
 $mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/blocks.php';
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/blocks.php';
Please login to merge, or discard this patch.
html/modules/altsys/admin/admin_menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10 10
 $mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/admin_menu.php';
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/admin_menu.php';
Please login to merge, or discard this patch.