Completed
Branch master (5c4e1a)
by Michael
46s
created
xoops_trust_path/libs/altsys/class/MyBlocksAdminForXCL21.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 // $Id: MyBlocksAdminForXCL21.class.php ,ver 0.0.7.1 2011/01/27 16:10:00 domifara Exp $
3 3
 
4
-require_once __DIR__ . '/MyBlocksAdmin.class.php';
4
+require_once __DIR__.'/MyBlocksAdmin.class.php';
5 5
 
6 6
 /**
7 7
  * Class MyBlocksAdminForXCL21
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             $langman->read('admin.php', $this->target_dirname);
49 49
         }
50 50
 
51
-        $bid = (int) $block_data['bid'];
51
+        $bid = (int)$block_data['bid'];
52 52
 
53 53
         //HACK by domifara
54 54
 
@@ -70,6 +70,6 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function checkFck()
72 72
     {
73
-        return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'));
73
+        return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'));
74 74
     }
75 75
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -288,11 +288,11 @@  discard block
 block discarded – undo
288 288
         // get selected targets
289 289
 
290 290
         if (is_array(@$block_data['bmodule'])) {
291
-			// bmodule originated from request (preview etc.)
291
+            // bmodule originated from request (preview etc.)
292 292
 
293 293
             $selected_mids = $block_data['bmodule'];
294 294
         } else {
295
-			// originated from the table of `block_module_link`
295
+            // originated from the table of `block_module_link`
296 296
 
297 297
             $result = $this->db->query('SELECT module_id FROM ' . $this->db->prefix('block_module_link') . " WHERE block_id='$bid'");
298 298
 
@@ -549,12 +549,12 @@  discard block
 block discarded – undo
549 549
             ];
550 550
 
551 551
             $blocks4assign[] = [
552
-                                   'name_raw' => $block_data['name'],
553
-                                   'title_raw' => $block_data['title'],
554
-                                   'cell_position' => $this->renderCell4BlockPosition($block_data),
555
-                                   'cell_module_link' => $this->renderCell4BlockModuleLink($block_data),
556
-                                   'cell_group_perm' => $this->renderCell4BlockReadGroupPerm($block_data),
557
-                               ] + $block_data;
552
+                                    'name_raw' => $block_data['name'],
553
+                                    'title_raw' => $block_data['title'],
554
+                                    'cell_position' => $this->renderCell4BlockPosition($block_data),
555
+                                    'cell_module_link' => $this->renderCell4BlockModuleLink($block_data),
556
+                                    'cell_group_perm' => $this->renderCell4BlockReadGroupPerm($block_data),
557
+                                ] + $block_data;
558 558
         }
559 559
 
560 560
         // display
@@ -564,14 +564,14 @@  discard block
 block discarded – undo
564 564
         $tpl = new D3Tpl();
565 565
 
566 566
         $tpl->assign([
567
-                         'target_mid' => $this->target_mid,
568
-                         'target_dirname' => $this->target_dirname,
569
-                         'target_mname' => $this->target_mname,
570
-                         'language' => $this->lang,
571
-                         'cachetime_options' => $this->cachetime_options,
572
-                         'blocks' => $blocks4assign,
573
-                         'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin'),
574
-                     ]);
567
+                            'target_mid' => $this->target_mid,
568
+                            'target_dirname' => $this->target_dirname,
569
+                            'target_mname' => $this->target_mname,
570
+                            'language' => $this->lang,
571
+                            'cachetime_options' => $this->cachetime_options,
572
+                            'blocks' => $blocks4assign,
573
+                            'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin'),
574
+                        ]);
575 575
 
576 576
         $tpl->display('db:altsys_main_myblocksadmin_list.tpl');
577 577
     }
@@ -1250,18 +1250,18 @@  discard block
 block discarded – undo
1250 1250
         }
1251 1251
 
1252 1252
         $tpl->assign([
1253
-                         'target_dirname' => $this->target_dirname,
1254
-                         'target_mname' => $this->target_mname,
1255
-                         'language' => $this->lang,
1256
-                         'cachetime_options' => $this->cachetime_options,
1257
-                         'ctype_options' => $this->ctype_options,
1258
-                         'block' => $block4assign,
1259
-                         'op' => $next_op,
1260
-                         'form_title' => $form_title,
1261
-                         'submit_button' => $button_value,
1262
-                         'common_fck_installed' => $this->checkFck(),
1263
-                         'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'),
1264
-                     ]);
1253
+                            'target_dirname' => $this->target_dirname,
1254
+                            'target_mname' => $this->target_mname,
1255
+                            'language' => $this->lang,
1256
+                            'cachetime_options' => $this->cachetime_options,
1257
+                            'ctype_options' => $this->ctype_options,
1258
+                            'block' => $block4assign,
1259
+                            'op' => $next_op,
1260
+                            'form_title' => $form_title,
1261
+                            'submit_button' => $button_value,
1262
+                            'common_fck_installed' => $this->checkFck(),
1263
+                            'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'),
1264
+                        ]);
1265 1265
 
1266 1266
         if (defined('XOOPS_CUBE_LEGACY')) {
1267 1267
             $tpl->display('db:altsys_main_myblocksadmin_edit_4legacy.tpl');
Please login to merge, or discard this patch.
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
                 $this->target_mid = $target_module->getVar('mid');
128 128
 
129
-                $this->target_mname = $target_module->getVar('name') . '&nbsp;' . sprintf('(%2.2f)', (int)$target_module->getVar('version') / 100.0);
129
+                $this->target_mname = $target_module->getVar('name').'&nbsp;'.sprintf('(%2.2f)', (int)$target_module->getVar('version') / 100.0);
130 130
 
131 131
                 $this->target_dirname = $target_module->getVar('dirname');
132 132
 
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 
137 137
                 $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
138 138
 
139
-                $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN');
139
+                $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN');
140 140
 
141
-                $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin&amp;dirname=' . $this->target_dirname, $this->target_mname);
141
+                $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin&amp;dirname='.$this->target_dirname, $this->target_mname);
142 142
             } else {
143 143
                 // custom blocks
144 144
 
@@ -152,28 +152,28 @@  discard block
 block discarded – undo
152 152
 
153 153
                 $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
154 154
 
155
-                $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN');
155
+                $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN');
156 156
 
157
-                $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin&amp;dirname=' . $this->target_dirname, '_MI_ALTSYS_MENU_CUSTOMBLOCKS');
157
+                $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin&amp;dirname='.$this->target_dirname, '_MI_ALTSYS_MENU_CUSTOMBLOCKS');
158 158
             }
159 159
         } else {
160 160
             // myblocksadmin as a library
161 161
 
162 162
             $this->target_mid = $xoopsModule->getVar('mid');
163 163
 
164
-            $this->target_mname = $xoopsModule->getVar('name') . '&nbsp;' . sprintf('(%2.2f)', $xoopsModule->getVar('version') / 100.0);
164
+            $this->target_mname = $xoopsModule->getVar('name').'&nbsp;'.sprintf('(%2.2f)', $xoopsModule->getVar('version') / 100.0);
165 165
 
166 166
             $this->target_dirname = $xoopsModule->getVar('dirname');
167 167
 
168
-            $mod_url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname');
168
+            $mod_url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname');
169 169
 
170 170
             $modinfo = $xoopsModule->getInfo();
171 171
 
172 172
             $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
173 173
 
174
-            $breadcrumbsObj->appendPath($mod_url . '/' . @$modinfo['adminindex'], $this->target_mname);
174
+            $breadcrumbsObj->appendPath($mod_url.'/'.@$modinfo['adminindex'], $this->target_mname);
175 175
 
176
-            $breadcrumbsObj->appendPath($mod_url . '/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin', _MD_A_MYBLOCKSADMIN_BLOCKADMIN);
176
+            $breadcrumbsObj->appendPath($mod_url.'/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin', _MD_A_MYBLOCKSADMIN_BLOCKADMIN);
177 177
         }
178 178
 
179 179
         // read xoops_version.php of the target
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      */
257 257
     public function renderCell4BlockOptions($block_data)
258 258
     {
259
-        $bid = (int) $block_data['bid'];
259
+        $bid = (int)$block_data['bid'];
260 260
 
261 261
         //HACK by domifara
262 262
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      */
284 284
     public function renderCell4BlockModuleLink($block_data)
285 285
     {
286
-        $bid = (int) $block_data['bid'];
286
+        $bid = (int)$block_data['bid'];
287 287
 
288 288
         // get selected targets
289 289
 
@@ -294,12 +294,12 @@  discard block
 block discarded – undo
294 294
         } else {
295 295
 			// originated from the table of `block_module_link`
296 296
 
297
-            $result = $this->db->query('SELECT module_id FROM ' . $this->db->prefix('block_module_link') . " WHERE block_id='$bid'");
297
+            $result = $this->db->query('SELECT module_id FROM '.$this->db->prefix('block_module_link')." WHERE block_id='$bid'");
298 298
 
299 299
             $selected_mids = [];
300 300
 
301 301
             while ([$selected_mid] = $this->db->fetchRow($result)) {
302
-                $selected_mids[] = (int) $selected_mid;
302
+                $selected_mids[] = (int)$selected_mid;
303 303
             }
304 304
 
305 305
             if (empty($selected_mids)) {
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public function renderCell4BlockReadGroupPerm($block_data)
353 353
     {
354
-        $bid = (int) $block_data['bid'];
354
+        $bid = (int)$block_data['bid'];
355 355
 
356 356
         // get selected targets
357 357
 
@@ -362,12 +362,12 @@  discard block
 block discarded – undo
362 362
         } else {
363 363
             // origined from the table of `group_perm`
364 364
 
365
-            $result = $this->db->query('SELECT gperm_groupid FROM ' . $this->db->prefix('group_permission') . " WHERE gperm_itemid='$bid' AND gperm_name='block_read'");
365
+            $result = $this->db->query('SELECT gperm_groupid FROM '.$this->db->prefix('group_permission')." WHERE gperm_itemid='$bid' AND gperm_name='block_read'");
366 366
 
367 367
             $selected_gids = [];
368 368
 
369 369
             while ([$selected_gid] = $this->db->fetchRow($result)) {
370
-                $selected_gids[] = (int) $selected_gid;
370
+                $selected_gids[] = (int)$selected_gid;
371 371
             }
372 372
 
373 373
             if (0 == $bid && empty($selected_gids)) {
@@ -415,11 +415,11 @@  discard block
 block discarded – undo
415 415
      */
416 416
     public function renderCell4BlockPosition($block_data)
417 417
     {
418
-        $bid = (int) $block_data['bid'];
418
+        $bid = (int)$block_data['bid'];
419 419
 
420
-        $side = (int) $block_data['side'];
420
+        $side = (int)$block_data['side'];
421 421
 
422
-        $visible = (int) $block_data['visible'];
422
+        $visible = (int)$block_data['visible'];
423 423
 
424 424
         $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = '';
425 425
 
@@ -464,31 +464,31 @@  discard block
 block discarded – undo
464 464
 
465 465
         return "
466 466
                 <div class='blockposition $scol0'>
467
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_LEFT . "' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_LEFT . ";'>
467
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_LEFT.";'>
468 468
                 </div>
469
-                <div style='float:" . _GLOBAL_LEFT . ";'>-</div>
469
+                <div style='float:" . _GLOBAL_LEFT.";'>-</div>
470 470
                 <div class='blockposition $scol2'>
471
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_LEFT . "' class='blockposition' $ssel2 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_LEFT . ";'>
471
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."' class='blockposition' $ssel2 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_LEFT.";'>
472 472
                 </div>
473 473
                 <div class='blockposition $scol3'>
474
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_CENTER . "' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_CENTER . ";'>
474
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_CENTER.";'>
475 475
                 </div>
476 476
                 <div class='blockposition $scol4'>
477
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_RIGHT . "' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_RIGHT . ";'>
477
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_RIGHT.";'>
478 478
                 </div>
479
-                <div style='float:" . _GLOBAL_LEFT . ";'>-</div>
479
+                <div style='float:" . _GLOBAL_LEFT.";'>-</div>
480 480
                 <div class='blockposition $scol1'>
481
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_RIGHT . "' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_RIGHT . ";'>
481
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_RIGHT.";'>
482 482
                 </div>
483 483
                 <br>
484 484
                 <br>
485
-                <div style='float:" . _GLOBAL_LEFT . ";width:50px;' class='$stextbox'>
486
-                    <input type='text' name='extra_sides[$bid]' value='" . $value4extra_side . "' style='width:20px;' id='extra_side_$bid'>
485
+                <div style='float:" . _GLOBAL_LEFT.";width:50px;' class='$stextbox'>
486
+                    <input type='text' name='extra_sides[$bid]' value='".$value4extra_side."' style='width:20px;' id='extra_side_$bid'>
487 487
                 </div>
488 488
                 <div class='blockposition $scoln'>
489 489
                     <input type='radio' name='sides[$bid]' value='-1' class='blockposition' $sseln onclick='document.getElementById(\"extra_side_$bid\").value=-1;'>
490 490
                 </div>
491
-                <div style='float:" . _GLOBAL_LEFT . ";'>" . _NONE . '</div>
491
+                <div style='float:"._GLOBAL_LEFT.";'>"._NONE.'</div>
492 492
     ';
493 493
     }
494 494
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 
501 501
         // main query
502 502
 
503
-        $sql = 'SELECT * FROM ' . $this->db->prefix('newblocks') . " WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight";
503
+        $sql = 'SELECT * FROM '.$this->db->prefix('newblocks')." WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight";
504 504
 
505 505
         $result = $this->db->query($sql);
506 506
 
@@ -536,13 +536,13 @@  discard block
 block discarded – undo
536 536
 
537 537
         foreach ($block_arr as $i => $block) {
538 538
             $block_data = [
539
-                'bid' => (int) $block->getVar('bid'),
539
+                'bid' => (int)$block->getVar('bid'),
540 540
                 'name' => $block->getVar('name', 'n'),
541 541
                 'title' => $block->getVar('title', 'n'),
542
-                'weight' => (int) $block->getVar('weight'),
543
-                'bcachetime' => (int) $block->getVar('bcachetime'),
544
-                'side' => (int) $block->getVar('side'),
545
-                'visible' => (int) $block->getVar('visible'),
542
+                'weight' => (int)$block->getVar('weight'),
543
+                'bcachetime' => (int)$block->getVar('bcachetime'),
544
+                'side' => (int)$block->getVar('side'),
545
+                'visible' => (int)$block->getVar('visible'),
546 546
                 'can_edit' => $this->canEdit($block),
547 547
                 'can_delete' => $this->canDelete($block),
548 548
                 'can_clone' => $this->canClone($block),
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 
560 560
         // display
561 561
 
562
-        require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
562
+        require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
563 563
 
564 564
         $tpl = new D3Tpl();
565 565
 
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
             return [];
586 586
         }
587 587
 
588
-        require XOOPS_ROOT_PATH . '/modules/' . $this->target_dirname . '/xoops_version.php';
588
+        require XOOPS_ROOT_PATH.'/modules/'.$this->target_dirname.'/xoops_version.php';
589 589
 
590 590
         if (empty($modversion['blocks'])) {
591 591
             return [];
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
     {
599 599
         // query for getting blocks
600 600
 
601
-        $sql = 'SELECT * FROM ' . $this->db->prefix('newblocks') . " WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight";
601
+        $sql = 'SELECT * FROM '.$this->db->prefix('newblocks')." WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight";
602 602
 
603 603
         $result = $this->db->query($sql);
604 604
 
@@ -635,9 +635,9 @@  discard block
 block discarded – undo
635 635
         // skip system (TODO)
636 636
 
637 637
         if ($this->target_mid > 1) {
638
-            $form->addAppendix('module_admin', $this->target_mid, $this->target_mname . ' ' . _MD_A_MYBLOCKSADMIN_PERM_MADMIN);
638
+            $form->addAppendix('module_admin', $this->target_mid, $this->target_mname.' '._MD_A_MYBLOCKSADMIN_PERM_MADMIN);
639 639
 
640
-            $form->addAppendix('module_read', $this->target_mid, $this->target_mname . ' ' . _MD_A_MYBLOCKSADMIN_PERM_MREAD);
640
+            $form->addAppendix('module_read', $this->target_mid, $this->target_mname.' '._MD_A_MYBLOCKSADMIN_PERM_MREAD);
641 641
         }
642 642
 
643 643
         foreach ($item_list as $item_id => $item_name) {
@@ -708,25 +708,25 @@  discard block
 block discarded – undo
708 708
         $msg = _MD_A_MYBLOCKSADMIN_DBUPDATED;
709 709
 
710 710
         if (false !== $block->store()) {
711
-            require_once XOOPS_ROOT_PATH . '/class/template.php';
711
+            require_once XOOPS_ROOT_PATH.'/class/template.php';
712 712
 
713 713
             $xoopsTpl = new \XoopsTpl();
714 714
 
715 715
             $xoopsTpl->xoops_setCaching(2);
716 716
 
717 717
             if ('' != $block->getVar('template')) {
718
-                if ($xoopsTpl->isCached('db:' . $block->getVar('template'))) {
719
-                    if (!$xoopsTpl->clearCache('db:' . $block->getVar('template'))) {
720
-                        $msg = 'Unable to clear cache for block ID' . $bid;
718
+                if ($xoopsTpl->isCached('db:'.$block->getVar('template'))) {
719
+                    if (!$xoopsTpl->clearCache('db:'.$block->getVar('template'))) {
720
+                        $msg = 'Unable to clear cache for block ID'.$bid;
721 721
                     }
722 722
                 }
723
-            } elseif ($xoopsTpl->isCached('db:system_dummy.tpl', 'blk_' . $bid)) {
724
-                if (!$xoopsTpl->clearCache('db:system_dummy.tpl', 'blk_' . $bid)) {
725
-                    $msg = 'Unable to clear cache for block ID' . $bid;
723
+            } elseif ($xoopsTpl->isCached('db:system_dummy.tpl', 'blk_'.$bid)) {
724
+                if (!$xoopsTpl->clearCache('db:system_dummy.tpl', 'blk_'.$bid)) {
725
+                    $msg = 'Unable to clear cache for block ID'.$bid;
726 726
                 }
727 727
             }
728 728
         } else {
729
-            $msg = 'Failed update of block. ID:' . $bid;
729
+            $msg = 'Failed update of block. ID:'.$bid;
730 730
         }
731 731
 
732 732
         return $msg;
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
      */
741 741
     public function updateBlockModuleLink($bid, $bmodules): void
742 742
     {
743
-        $bid = (int) $bid;
743
+        $bid = (int)$bid;
744 744
 
745 745
         $table = $this->db->prefix('block_module_link');
746 746
 
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
         $this->db->query($sql);
750 750
 
751 751
         foreach ($bmodules as $mid) {
752
-            $mid = (int) $mid;
752
+            $mid = (int)$mid;
753 753
 
754 754
             $sql = "INSERT INTO `$table` (`block_id`,`module_id`) VALUES ($bid,$mid)";
755 755
 
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
      */
766 766
     public function updateBlockReadGroupPerm($bid, $req_gids): void
767 767
     {
768
-        $bid = (int) $bid;
768
+        $bid = (int)$bid;
769 769
 
770 770
         $table = $this->db->prefix('group_permission');
771 771
 
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
         $this->db->query($sql);
801 801
 
802 802
         foreach ($req_gids as $gid) {
803
-            $gid = (int) $gid;
803
+            $gid = (int)$gid;
804 804
 
805 805
             $sql = "INSERT INTO `$table` (`gperm_groupid`,`gperm_itemid`,`gperm_modid`,`gperm_name`) VALUES ($gid,$bid,1,'block_read')";
806 806
 
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
      */
841 841
     public function fetchRequest4Block($bid)
842 842
     {
843
-        $bid = (int) $bid;
843
+        $bid = (int)$bid;
844 844
 
845 845
         (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
846 846
 
@@ -858,13 +858,13 @@  discard block
 block discarded – undo
858 858
 
859 859
         return [
860 860
             'bid' => $bid,
861
-            'side' => (int) (@$_POST['sides'][$bid]),
862
-            'weight' => (int) (@$_POST['weights'][$bid]),
861
+            'side' => (int)(@$_POST['sides'][$bid]),
862
+            'weight' => (int)(@$_POST['weights'][$bid]),
863 863
             'visible' => $visible,
864 864
             'title' => (@$_POST['titles'][$bid]),
865 865
             'content' => (@$_POST['contents'][$bid]),
866 866
             'ctype' => preg_replace('/[^A-Z]/', '', @$_POST['ctypes'][$bid]),
867
-            'bcachetime' => (int) (@$_POST['bcachetimes'][$bid]),
867
+            'bcachetime' => (int)(@$_POST['bcachetimes'][$bid]),
868 868
             'bmodule' => \is_array(@$_POST['bmodules'][$bid]) ? $_POST['bmodules'][$bid] : [0],
869 869
             'bgroup' => \is_array(@$_POST['bgroups'][$bid]) ? $_POST['bgroups'][$bid] : [],
870 870
             'options' => \is_array(@$_POST['options'][$bid]) ? $_POST['options'][$bid] : [],
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
      */
878 878
     public function do_delete($bid)
879 879
     {
880
-        $bid = (int) $bid;
880
+        $bid = (int)$bid;
881 881
 
882 882
         //HACK by domifara
883 883
 
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
      */
914 914
     public function do_deleteBlockReadGroupPerm($bid): void
915 915
     {
916
-        $bid = (int) $bid;
916
+        $bid = (int)$bid;
917 917
 
918 918
         $table = $this->db->prefix('group_permission');
919 919
 
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
      */
928 928
     public function form_delete($bid): void
929 929
     {
930
-        $bid = (int) $bid;
930
+        $bid = (int)$bid;
931 931
 
932 932
         //HACK by domifara
933 933
 
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
      */
967 967
     public function do_clone($bid)
968 968
     {
969
-        $bid = (int) $bid;
969
+        $bid = (int)$bid;
970 970
 
971 971
         $request = $this->fetchRequest4Block($bid);
972 972
 
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
         do {
1057 1057
             $func_num--;
1058 1058
 
1059
-            [$count] = $this->db->fetchRow($this->db->query('SELECT COUNT(*) FROM ' . $this->db->prefix('newblocks') . ' WHERE mid=' . (int) $mid . ' AND func_num=' . $func_num));
1059
+            [$count] = $this->db->fetchRow($this->db->query('SELECT COUNT(*) FROM '.$this->db->prefix('newblocks').' WHERE mid='.(int)$mid.' AND func_num='.$func_num));
1060 1060
         } while ($count > 0);
1061 1061
 
1062 1062
         return $func_num > 128 ? $func_num : 255;
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
      */
1069 1069
     public function do_edit($bid)
1070 1070
     {
1071
-        $bid = (int) $bid;
1071
+        $bid = (int)$bid;
1072 1072
 
1073 1073
         if ($bid <= 0) {
1074 1074
             // new custom block
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
             // permission copy
1099 1099
 
1100 1100
             foreach ($GLOBALS['xoopsUser']->getGroups() as $gid) {
1101
-                $sql = 'INSERT INTO ' . $this->db->prefix('group_permission') . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES ($gid, $bid, 1, 'block_read')";
1101
+                $sql = 'INSERT INTO '.$this->db->prefix('group_permission')." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES ($gid, $bid, 1, 'block_read')";
1102 1102
 
1103 1103
                 $this->db->query($sql);
1104 1104
             }
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
      */
1128 1128
     public function form_edit($bid, $mode = 'edit'): void
1129 1129
     {
1130
-        $bid = (int) $bid;
1130
+        $bid = (int)$bid;
1131 1131
 
1132 1132
         //HACK by domifara
1133 1133
 
@@ -1209,10 +1209,10 @@  discard block
 block discarded – undo
1209 1209
                 'bid' => $bid,
1210 1210
                 'name' => $block->getVar('name', 'n'),
1211 1211
                 'title' => $block->getVar('title', 'n'),
1212
-                'weight' => (int) $block->getVar('weight'),
1213
-                'bcachetime' => (int) $block->getVar('bcachetime'),
1214
-                'side' => (int) $block->getVar('side'),
1215
-                'visible' => (int) $block->getVar('visible'),
1212
+                'weight' => (int)$block->getVar('weight'),
1213
+                'bcachetime' => (int)$block->getVar('bcachetime'),
1214
+                'side' => (int)$block->getVar('side'),
1215
+                'visible' => (int)$block->getVar('visible'),
1216 1216
                 'template' => $block_template,
1217 1217
                 'template_tplset' => $block_template_tplset,
1218 1218
                 'options' => $block->getVar('options'),
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
 
1236 1236
         // display
1237 1237
 
1238
-        require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
1238
+        require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
1239 1239
 
1240 1240
         $tpl = new D3Tpl();
1241 1241
 
@@ -1244,7 +1244,7 @@  discard block
 block discarded – undo
1244 1244
         if (defined('XOOPS_CUBE_LEGACY')) {
1245 1245
             $tpl->assign('xoops_cube_legacy', true);
1246 1246
 
1247
-            require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
1247
+            require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
1248 1248
         } else {
1249 1249
             $tpl->assign('xoops_cube_legacy', false);
1250 1250
         }
@@ -1275,7 +1275,7 @@  discard block
 block discarded – undo
1275 1275
      */
1276 1276
     public function checkFck()
1277 1277
     {
1278
-        return file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js');
1278
+        return file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js');
1279 1279
     }
1280 1280
 
1281 1281
     /**
@@ -1284,7 +1284,7 @@  discard block
 block discarded – undo
1284 1284
      */
1285 1285
     public function previewContent($block_data)
1286 1286
     {
1287
-        $bid = (int) $block_data['bid'];
1287
+        $bid = (int)$block_data['bid'];
1288 1288
 
1289 1289
         if (!$block_data['is_custom']) {
1290 1290
             return '';
@@ -1346,12 +1346,12 @@  discard block
 block discarded – undo
1346 1346
         // Ticket Check
1347 1347
 
1348 1348
         if (!$GLOBALS['xoopsSecurity']->check(true, 'myblocksadmin')) {
1349
-            redirect_header(XOOPS_URL . '/', 3, $GLOBALS['xoopsSecurity']->getErrors());
1349
+            redirect_header(XOOPS_URL.'/', 3, $GLOBALS['xoopsSecurity']->getErrors());
1350 1350
         }
1351 1351
 
1352 1352
         $msg = '';
1353 1353
 
1354
-        $bid = (int) (@$_GET['bid']);
1354
+        $bid = (int)(@$_GET['bid']);
1355 1355
 
1356 1356
         if (!empty($_POST['preview'])) {
1357 1357
             // preview
@@ -1380,19 +1380,19 @@  discard block
 block discarded – undo
1380 1380
         } elseif (!empty($_POST['submit'])) {
1381 1381
             // update module_admin,module_read,block_read
1382 1382
 
1383
-            include dirname(__DIR__) . '/include/mygroupperm.php';
1383
+            include dirname(__DIR__).'/include/mygroupperm.php';
1384 1384
 
1385 1385
             $msg = _MD_A_MYBLOCKSADMIN_PERMUPDATED;
1386 1386
         }
1387 1387
 
1388
-        redirect_header('?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $this->target_dirname, 1, $msg);
1388
+        redirect_header('?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$this->target_dirname, 1, $msg);
1389 1389
 
1390 1390
         exit;
1391 1391
     }
1392 1392
 
1393 1393
     public function processGet(): void
1394 1394
     {
1395
-        $bid = (int) (@$_GET['bid']);
1395
+        $bid = (int)(@$_GET['bid']);
1396 1396
 
1397 1397
         switch (@$_GET['op']) {
1398 1398
             case 'clone':
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/SetupAltsysLangMgr.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@  discard block
 block discarded – undo
5 5
 }
6 6
 
7 7
 if (!defined('XOOPS_TRUST_PATH') || XOOPS_TRUST_PATH == '') {
8
-    header('Location: ' . XOOPS_URL . '/modules/altsys/setup_xoops_trust_path.php');
8
+    header('Location: '.XOOPS_URL.'/modules/altsys/setup_xoops_trust_path.php');
9 9
 
10 10
     exit;
11 11
 }
12 12
 
13
-define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH . '/my_language');
13
+define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH.'/my_language');
14 14
 
15 15
 /**
16 16
  * Class SetupAltsysLangMgr
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
     }
33 33
 }
34 34
 
35
-require_once XOOPS_ROOT_PATH . '/core/XCube_LanguageManager.class.php';
36
-require_once XOOPS_ROOT_PATH . '/modules/legacy/kernel/Legacy_LanguageManager.class.php';
35
+require_once XOOPS_ROOT_PATH.'/core/XCube_LanguageManager.class.php';
36
+require_once XOOPS_ROOT_PATH.'/modules/legacy/kernel/Legacy_LanguageManager.class.php';
37 37
 
38 38
 /**
39 39
  * Class AltsysLangMgr_LanguageManager
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     public function prepare(): void
48 48
     {
49
-        $langmanpath = XOOPS_TRUST_PATH . '/libs/altsys/class/D3LanguageManager.class.php';
49
+        $langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php';
50 50
 
51 51
         if (!is_file($langmanpath)) {
52 52
             die('install the latest altsys');
@@ -73,12 +73,12 @@  discard block
 block discarded – undo
73 73
             $root = XCube_Root::getSingleton();
74 74
 
75 75
             if (!empty($root->mContext->mXoopsConfig['theme_set'])) {
76
-                $langdir = XOOPS_THEME_PATH . '/' . $root->mContext->mXoopsConfig['theme_set'] . '/language';
76
+                $langdir = XOOPS_THEME_PATH.'/'.$root->mContext->mXoopsConfig['theme_set'].'/language';
77 77
 
78 78
                 if (file_exists($langdir)) {
79
-                    $langfile = $langdir . '/' . $this->mLanguageName . '.php';
79
+                    $langfile = $langdir.'/'.$this->mLanguageName.'.php';
80 80
 
81
-                    $engfile = $langdir . '/english.php';
81
+                    $engfile = $langdir.'/english.php';
82 82
 
83 83
                     if (is_file($langfile)) {
84 84
                         require_once $langfile;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         // read normal
95 95
 
96
-        $this->langman->read($fileBodyName . '.php', $dirname);
96
+        $this->langman->read($fileBodyName.'.php', $dirname);
97 97
     }
98 98
 
99 99
     /**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         // I dare not to use langman...
105 105
 
106 106
         if (false === mb_strpos($type, '.') && $this->langman->my_language) {
107
-            $mylang_file = $this->langman->my_language . '/' . $this->mLanguageName . '/' . $type . '.php';
107
+            $mylang_file = $this->langman->my_language.'/'.$this->mLanguageName.'/'.$type.'.php';
108 108
 
109 109
             if (is_file($mylang_file)) {
110 110
                 require_once $mylang_file;
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3Tpl.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3
-require_once XOOPS_ROOT_PATH . '/class/template.php';
4
-require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php';
3
+require_once XOOPS_ROOT_PATH.'/class/template.php';
4
+require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
5 5
 
6 6
 /**
7 7
  * Class D3Tpl
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         parent::__construct();
21 21
 
22 22
         if (in_array(altsys_get_core_type(), [ALTSYS_CORE_TYPE_X20S, ALTSYS_CORE_TYPE_X23P], true)) {
23
-            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH . '/libs/altsys/smarty_plugins');
23
+            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins');
24 24
         }
25 25
 
26 26
         // for RTL users
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/altsysUtils.class.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
         }
90 90
 
91 91
         if ($phpVersion > 7.4) {
92
-             return htmlspecialchars((string) $str, $flags, $encoding, $double_encode);
92
+                return htmlspecialchars((string) $str, $flags, $encoding, $double_encode);
93 93
         }
94 94
 
95 95
         $ret = htmlspecialchars((string) $str, $flags, $encoding);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,10 +89,10 @@
 block discarded – undo
89 89
         }
90 90
 
91 91
         if ($phpVersion > 7.4) {
92
-             return htmlspecialchars((string) $str, $flags, $encoding, $double_encode);
92
+             return htmlspecialchars((string)$str, $flags, $encoding, $double_encode);
93 93
         }
94 94
 
95
-        $ret = htmlspecialchars((string) $str, $flags, $encoding);
95
+        $ret = htmlspecialchars((string)$str, $flags, $encoding);
96 96
 
97 97
         if (!$double_encode) {
98 98
             $ret = str_replace('&amp;amp;', '&amp;', $ret);
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3LanguageManager.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']);
31 31
 
32
-        $this->salt = mb_substr(md5(XOOPS_ROOT_PATH . XOOPS_DB_USER . XOOPS_DB_PREFIX), 0, 6);
32
+        $this->salt = mb_substr(md5(XOOPS_ROOT_PATH.XOOPS_DB_USER.XOOPS_DB_PREFIX), 0, 6);
33 33
 
34 34
 //        $this->cache_path = XOOPS_TRUST_PATH . '/cache';
35 35
 
36
-        if (\defined('XOOPS_TRUST_PATH') and \file_exists(XOOPS_TRUST_PATH . '/cache')) {
37
-            $this->cache_path = XOOPS_TRUST_PATH . '/cache';
36
+        if (\defined('XOOPS_TRUST_PATH') and \file_exists(XOOPS_TRUST_PATH.'/cache')) {
37
+            $this->cache_path = XOOPS_TRUST_PATH.'/cache';
38 38
         } else {
39 39
 //            $this->cache_path = XOOPS_ROOT_PATH . '/cache';
40
-            $this->cache_path = XOOPS_VAR_PATH  . '/caches/xoops_cache';
40
+            $this->cache_path = XOOPS_VAR_PATH.'/caches/xoops_cache';
41 41
         }
42 42
 
43 43
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function read($resource, $mydirname, $mytrustdirname = null, bool $read_once = true): void
75 75
     {
76
-        $d3file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/mytrustdirname.php';
76
+        $d3file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/mytrustdirname.php';
77 77
 
78 78
         if (empty($mytrustdirname) && is_file($d3file)) {
79 79
             require $d3file;
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
 
86 86
         $cache_file = $this->getCacheFileName($resource, $mydirname);
87 87
 
88
-        $root_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->language . '/' . $resource;
88
+        $root_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->language.'/'.$resource;
89 89
 
90 90
         // language overriding by XOOPS_ROOT_PATH/my_language
91 91
 
92 92
         if ($this->my_language) {
93
-            $mylang_file = $this->my_language . '/modules/' . $mydirname . '/' . $this->language . '/' . $resource;
93
+            $mylang_file = $this->my_language.'/modules/'.$mydirname.'/'.$this->language.'/'.$resource;
94 94
 
95 95
             if (is_file($mylang_file)) {
96 96
                 require_once $mylang_file;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         if (empty($mytrustdirname)) {
105 105
             // conventional module
106 106
 
107
-            $default_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->default_language . '/' . $resource;
107
+            $default_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->default_language.'/'.$resource;
108 108
 
109 109
             if (is_file($cache_file)) {
110 110
                 require_once $cache_file;
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
         } else {
119 119
             // D3 modules
120 120
 
121
-            $trust_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->language . '/' . $resource;
121
+            $trust_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->language.'/'.$resource;
122 122
 
123
-            $default_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->default_language . '/' . $resource;
123
+            $default_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->default_language.'/'.$resource;
124 124
 
125 125
             if (is_file($cache_file)) {
126 126
                 require_once $cache_file;
@@ -160,6 +160,6 @@  discard block
 block discarded – undo
160 160
             $language = $this->language;
161 161
         }
162 162
 
163
-        return $this->cache_path . '/' . $this->cache_prefix . '_' . $this->salt . '_' . $mydirname . '_' . $language . '_' . $resource;
163
+        return $this->cache_path.'/'.$this->cache_prefix.'_'.$this->salt.'_'.$mydirname.'_'.$language.'_'.$resource;
164 164
     }
165 165
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // notification handler for D3 modules
4 4
 
5
-require_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
5
+require_once XOOPS_ROOT_PATH.'/include/notification_functions.php';
6 6
 
7 7
 /**
8 8
  * Class D3NotificationHandler
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
     {
38 38
         global $xoopsConfig;
39 39
 
40
-        $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
40
+        $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname;
41 41
 
42
-        $mytrustdirpath = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname;
42
+        $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname;
43 43
 
44 44
         $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'];
45 45
 
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 
143 143
         $criteria = new \CriteriaCompo();
144 144
 
145
-        $criteria->add(new \Criteria('not_modid', (int) $mid));
145
+        $criteria->add(new \Criteria('not_modid', (int)$mid));
146 146
 
147 147
         $criteria->add(new \Criteria('not_category', $category));
148 148
 
149
-        $criteria->add(new \Criteria('not_itemid', (int) $item_id));
149
+        $criteria->add(new \Criteria('not_itemid', (int)$item_id));
150 150
 
151 151
         $criteria->add(new \Criteria('not_event', $event));
152 152
 
@@ -174,13 +174,13 @@  discard block
 block discarded – undo
174 174
 
175 175
         $tags['X_MODULE'] = $module->getVar('name', 'n');
176 176
 
177
-        $tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/';
177
+        $tags['X_MODULE_URL'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/';
178 178
 
179 179
         $tags['X_NOTIFY_CATEGORY'] = $category;
180 180
 
181 181
         $tags['X_NOTIFY_EVENT'] = $event;
182 182
 
183
-        $template = $event_info['mail_template'] . '.tpl';
183
+        $template = $event_info['mail_template'].'.tpl';
184 184
 
185 185
         $subject = $event_info['mail_subject'];
186 186
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
                 // TODO: don't show unsubscribe link if it is 'one-time' ??
201 201
 
202
-                $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
202
+                $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL.'/notifications.php';
203 203
 
204 204
                 $tags = array_merge($tags, $extra_tags);
205 205
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/d3utilities.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $this->mydirname = $mydirname;
38 38
 
39
-        $this->table = $db->prefix($mydirname ? $mydirname . '_' . $table_body : $table_body);
39
+        $this->table = $db->prefix($mydirname ? $mydirname.'_'.$table_body : $table_body);
40 40
 
41 41
         $this->primary_key = $primary_key;
42 42
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $module = $moduleHandler->getByDirname($this->mydirname);
48 48
 
49 49
         if (!empty($module)) {
50
-            $this->mid = (int) $module->getVar('mid');
50
+            $this->mid = (int)$module->getVar('mid');
51 51
         }
52 52
 
53 53
         $this->page_name = $page_name;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function get_language_constant($name)
63 63
     {
64
-        return constant(mb_strtoupper('_MD_A_' . $this->dirname . '_' . $this->page_name . '_' . $name));
64
+        return constant(mb_strtoupper('_MD_A_'.$this->dirname.'_'.$this->page_name.'_'.$name));
65 65
     }
66 66
 
67 67
     /**
@@ -74,23 +74,23 @@  discard block
 block discarded – undo
74 74
         switch ($col['type']) {
75 75
             case 'text':
76 76
             case 'blob':
77
-                $length = empty($col['length']) ? 65535 : (int) $col['length'];
77
+                $length = empty($col['length']) ? 65535 : (int)$col['length'];
78 78
 
79
-                return "`{$col['name']}`='" . addslashes(xoops_substr($value, 0, $length)) . "'";
79
+                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'";
80 80
             case 'char':
81 81
             case 'varchar':
82 82
             case 'string':
83
-                $length = empty($col['length']) ? 255 : (int) $col['length'];
83
+                $length = empty($col['length']) ? 255 : (int)$col['length'];
84 84
 
85
-                return "`{$col['name']}`='" . addslashes(xoops_substr($value, 0, $length)) . "'";
85
+                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'";
86 86
             case 'int':
87 87
             case 'integer':
88
-                $value = (int) $value;
88
+                $value = (int)$value;
89 89
                 if (!empty($col['max'])) {
90
-                    $value = min($value, (int) $col['max']);
90
+                    $value = min($value, (int)$col['max']);
91 91
                 }
92 92
                 if (!empty($col['min'])) {
93
-                    $value = max($value, (int) $col['min']);
93
+                    $value = max($value, (int)$col['min']);
94 94
                 }
95 95
 
96 96
                 return "`{$col['name']}`=$value";
@@ -119,21 +119,21 @@  discard block
 block discarded – undo
119 119
                 continue;
120 120
             }
121 121
 
122
-            $set4sql .= $this->get_set4sql(@$_POST[$col['name']], $col) . ',';
122
+            $set4sql .= $this->get_set4sql(@$_POST[$col['name']], $col).',';
123 123
         }
124 124
 
125 125
         if (!empty($set4sql)) {
126 126
             if ($id > 0) {
127 127
                 // UPDATE
128 128
 
129
-                $db->queryF("UPDATE $this->table SET " . mb_substr($set4sql, 0, -1) . " WHERE $this->primary_key='" . addslashes($id) . "'");
129
+                $db->queryF("UPDATE $this->table SET ".mb_substr($set4sql, 0, -1)." WHERE $this->primary_key='".addslashes($id)."'");
130 130
 
131 131
                 return [$id, 'update'];
132 132
             }
133 133
 
134 134
             // INSERT
135 135
 
136
-            $db->queryF("INSERT INTO $this->table SET " . mb_substr($set4sql, 0, -1));
136
+            $db->queryF("INSERT INTO $this->table SET ".mb_substr($set4sql, 0, -1));
137 137
 
138 138
             return [$db->getInsertId(), 'insert'];
139 139
         }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         $ret = [];
166 166
 
167 167
         foreach (array_keys($_POST[$column4key]) as $id) {
168
-            $id = (int) $id;    // primary_key should be 'integer'
168
+            $id = (int)$id; // primary_key should be 'integer'
169 169
 
170 170
             $set4sql = '';
171 171
 
@@ -178,14 +178,14 @@  discard block
 block discarded – undo
178 178
                     continue;
179 179
                 }
180 180
 
181
-                $set4sql .= $this->get_set4sql(@$_POST[$col['name']][$id], $col) . ',';
181
+                $set4sql .= $this->get_set4sql(@$_POST[$col['name']][$id], $col).',';
182 182
             }
183 183
 
184 184
             if (!empty($set4sql)) {
185 185
                 $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id");
186 186
 
187 187
                 if (1 == $db->getRowsNum($result)) {
188
-                    $db->queryF("UPDATE $this->table SET " . mb_substr($set4sql, 0, -1) . " WHERE $this->primary_key=$id");
188
+                    $db->queryF("UPDATE $this->table SET ".mb_substr($set4sql, 0, -1)." WHERE $this->primary_key=$id");
189 189
 
190 190
                     if (1 == $db->getAffectedRows()) {
191 191
                         $ret[$id] = $db->fetchArray($result);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $ret = [];
210 210
 
211 211
         foreach (array_keys($_POST['admin_main_checkboxes']) as $id) {
212
-            $id = (int) $id;    // primary_key should be 'integer'
212
+            $id = (int)$id; // primary_key should be 'integer'
213 213
 
214 214
             $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id");
215 215
 
@@ -221,13 +221,13 @@  discard block
 block discarded – undo
221 221
                 if ($delete_comments) {
222 222
                     // remove comments
223 223
 
224
-                    $db->queryF('DELETE FROM ' . $db->prefix('xoopscomments') . " WHERE com_modid=$this->mid AND com_itemid=$id");
224
+                    $db->queryF('DELETE FROM '.$db->prefix('xoopscomments')." WHERE com_modid=$this->mid AND com_itemid=$id");
225 225
                 }
226 226
 
227 227
                 if ($delete_notifications) {
228 228
                     // remove notifications
229 229
 
230
-                    $db->queryF('DELETE FROM ' . $db->prefix('xoopsnotifications') . " WHERE not_modid=$this->mid AND not_itemid=$id");
230
+                    $db->queryF('DELETE FROM '.$db->prefix('xoopsnotifications')." WHERE not_modid=$this->mid AND not_itemid=$id");
231 231
                 }
232 232
             }
233 233
         }
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
                     break;
305 305
                 case 'text':
306 306
                 default:
307
-                    $size = empty($col['edit_size']) ? 32 : (int) $col['edit_size'];
308
-                    $length = empty($col['length']) ? 255 : (int) $col['length'];
309
-                    $lines[$col['name']] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='" . htmlspecialchars($col['default_value'], ENT_QUOTES | ENT_HTML5) . "'>";
307
+                    $size = empty($col['edit_size']) ? 32 : (int)$col['edit_size'];
308
+                    $length = empty($col['length']) ? 255 : (int)$col['length'];
309
+                    $lines[$col['name']] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='".htmlspecialchars($col['default_value'], ENT_QUOTES | ENT_HTML5)."'>";
310 310
                     break;
311 311
                 case false:
312 312
                     $lines[$col['name']] = htmlspecialchars($col['default_value'], ENT_QUOTES | ENT_HTML5);
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             <form action='' method='get' name='admin_control' id='admin_control'>
346 346
                 $hiddens
347 347
                 $controllers_html
348
-                <input type='submit' value='" . _SUBMIT . "'>
348
+                <input type='submit' value='"._SUBMIT."'>
349 349
             </form>\n";
350 350
     }
351 351
 
@@ -357,12 +357,12 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public function get_select($name, $options, $current_value)
359 359
     {
360
-        $ret = "<select name='" . htmlspecialchars($name, ENT_QUOTES | ENT_HTML5) . "'>\n";
360
+        $ret = "<select name='".htmlspecialchars($name, ENT_QUOTES | ENT_HTML5)."'>\n";
361 361
 
362 362
         foreach ($options as $key => $val) {
363 363
             $selected = $val == $current_value ? "selected='selected'" : '';
364 364
 
365
-            $ret .= "<option value='" . htmlspecialchars($key, ENT_QUOTES | ENT_HTML5) . "' $selected>" . htmlspecialchars($val, ENT_QUOTES | ENT_HTML5) . "</option>\n";
365
+            $ret .= "<option value='".htmlspecialchars($key, ENT_QUOTES | ENT_HTML5)."' $selected>".htmlspecialchars($val, ENT_QUOTES | ENT_HTML5)."</option>\n";
366 366
         }
367 367
 
368 368
         $ret .= "</select>\n";
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/get_tplsvarsinfo.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 // this page can be called only from altsys
14 14
 if ('altsys' != $xoopsModule->getVar('dirname')) {
15
-   exit('this page can be called only from altsys');
15
+    exit('this page can be called only from altsys');
16 16
 }
17 17
 
18 18
 // language file
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
         $tplsvarsinfo_total = array_merge($tplsvarsinfo_total, $tplsvarsinfo);
163 163
     }
164 164
 } else {
165
-   exit('XOOPS_COMPILE_PATH cannot be opened');
165
+    exit('XOOPS_COMPILE_PATH cannot be opened');
166 166
 }
167 167
 
168 168
 if (empty($tplsvarsinfo_total)) {
169
-   exit(_TPLSADMIN_ERR_NOTPLSVARSINFO);
169
+    exit(_TPLSADMIN_ERR_NOTPLSVARSINFO);
170 170
 }
171 171
 
172 172
 //
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 
8 8
 error_reporting(0);
9 9
 
10
-require_once __DIR__ . '/include/gtickets.php';
11
-require_once __DIR__ . '/include/altsys_functions.php';
10
+require_once __DIR__.'/include/gtickets.php';
11
+require_once __DIR__.'/include/altsys_functions.php';
12 12
 
13 13
 // this page can be called only from altsys
14 14
 if ('altsys' != $xoopsModule->getVar('dirname')) {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                     continue;
45 45
                 }
46 46
 
47
-                convert_array2info_recursive($var_name . '.' . $key, $val, $sum_array_name);
47
+                convert_array2info_recursive($var_name.'.'.$key, $val, $sum_array_name);
48 48
             }
49 49
 
50 50
             return;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         case 'integer':
57 57
         case 'float':
58 58
         case 'double':
59
-            $GLOBALS[$sum_array_name][$var_name] = (string) $var_value;
59
+            $GLOBALS[$sum_array_name][$var_name] = (string)$var_value;
60 60
 
61 61
             return;
62 62
         case 'null':
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 {
82 82
     global $site_name;
83 83
 
84
-    return '<macromedia-extension name="XOOPS-' . $site_name . ' ' . $mxi_name . '" version="1.0" type="Suite" requires-restart="true">
84
+    return '<macromedia-extension name="XOOPS-'.$site_name.' '.$mxi_name.'" version="1.0" type="Suite" requires-restart="true">
85 85
     <products>
86 86
         <product name="Dreamweaver" version="6" primary="true">
87 87
     </products>
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     ]]></license-agreement>
97 97
     <description><![CDATA[
98 98
 
99
-Usable template variables in ' . $mxi_name . '
99
+Usable template variables in ' . $mxi_name.'
100 100
 
101 101
     ]]></description>
102 102
     <ui-access><![CDATA[
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     ]]></ui-access>
109 109
     <files>
110
-' . $file_entries . '
110
+' . $file_entries.'
111 111
     </files>
112 112
     <configuration-changes>
113 113
     </configuration-changes>
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 $tplsvarsinfo_mod_tpl = [];
122 122
 $tplsvarsinfo_total = [];
123 123
 
124
-if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
124
+if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
125 125
     while (false !== ($file = readdir($handler))) {
126 126
         // skip files other than tplsvars_* files
127 127
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             continue;
138 138
         }
139 139
 
140
-        $file_path = XOOPS_COMPILE_PATH . '/' . $file;
140
+        $file_path = XOOPS_COMPILE_PATH.'/'.$file;
141 141
 
142 142
         $file_body = implode('', file($file_path));
143 143
 
@@ -183,13 +183,13 @@  discard block
 block discarded – undo
183 183
 </snippet>';
184 184
 
185 185
 if (!empty($_POST['as_dw_extension_zip'])) {
186
-    require_once XOOPS_ROOT_PATH . '/class/zipdownloader.php';
186
+    require_once XOOPS_ROOT_PATH.'/class/zipdownloader.php';
187 187
 
188 188
     $downloader = new \XoopsZipDownloader();
189 189
 
190 190
     $do_download = true;
191 191
 } elseif (!empty($_POST['as_dw_extension_tgz'])) {
192
-    require_once XOOPS_ROOT_PATH . '/class/tardownloader.php';
192
+    require_once XOOPS_ROOT_PATH.'/class/tardownloader.php';
193 193
 
194 194
     $downloader = new \XoopsTarDownloader();
195 195
 
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
 
223 223
         $snippet_body = sprintf($snippet_format, $name, $description);
224 224
 
225
-        $file_name = strtr($key, '.', '_') . '.csn';
225
+        $file_name = strtr($key, '.', '_').'.csn';
226 226
 
227
-        $downloader->addFileData($snippet_body, $dw_snippets_dirname . '/' . $file_name);
227
+        $downloader->addFileData($snippet_body, $dw_snippets_dirname.'/'.$file_name);
228 228
     }
229 229
 
230 230
     // make a mxi file per module
@@ -236,15 +236,15 @@  discard block
 block discarded – undo
236 236
             foreach ($tplsvarsinfo as $key => $val) {
237 237
                 $name = mb_substr($key, 1);
238 238
 
239
-                $file_name = strtr($key, '.', '_') . '.csn';
239
+                $file_name = strtr($key, '.', '_').'.csn';
240 240
 
241
-                $file_entries .= "\t\t" . '<file name="' . $dw_snippets_dirname . '/' . $file_name . '" destination="$Dreamweaver/Configuration/Snippets/XOOPS-' . $site_name . '/' . $tpl_name . '">' . "\n";
241
+                $file_entries .= "\t\t".'<file name="'.$dw_snippets_dirname.'/'.$file_name.'" destination="$Dreamweaver/Configuration/Snippets/XOOPS-'.$site_name.'/'.$tpl_name.'">'."\n";
242 242
             }
243 243
         }
244 244
 
245 245
         $mxi_body = get_mxi_body($mod_name, $file_entries);
246 246
 
247
-        $downloader->addFileData($mxi_body, $mod_name . '.mxi');
247
+        $downloader->addFileData($mxi_body, $mod_name.'.mxi');
248 248
     }
249 249
 
250 250
     //bugfix by nao-pon ,echo is not necessary for downloader
Please login to merge, or discard this patch.