|
1 | | -<?php |
2 | | - |
3 | | -declare(strict_types=1); |
| 1 | +<?php declare(strict_types=1); |
4 | 2 |
|
5 | 3 | namespace XoopsModules\Tag\Common; |
6 | 4 |
|
@@ -277,9 +275,9 @@ public function listBlocks(): void |
277 | 275 |
|
278 | 276 | // Actions |
279 | 277 |
|
280 | | - echo "<td class='$class' align='center'><a href='blocksadmin.php?op=edit&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/edit.png' . " alt='" . _EDIT . "' title='" . _EDIT . "'> |
281 | | - </a> <a href='blocksadmin.php?op=clone&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/editcopy.png' . " alt='" . _CLONE . "' title='" . _CLONE . "'> |
282 | | - </a>"; |
| 278 | + echo "<td class='$class' align='center'> |
| 279 | + <a href='blocksadmin.php?op=edit&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/edit.png' . " alt='" . _EDIT . "' title='" . _EDIT . "'></a> |
| 280 | + <a href='blocksadmin.php?op=clone&bid=" . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/editcopy.png' . " alt='" . _CLONE . "' title='" . _CLONE . "'></a>"; |
283 | 281 | // if ('S' !== $i->getVar('block_type') && 'M' !== $i->getVar('block_type')) { |
284 | 282 | // echo " <a href='" . XOOPS_URL . '/modules/system/admin.php?fct=blocksadmin&op=delete&bid=' . $i->getVar('bid') . "'><img src=" . $pathIcon16 . '/delete.png' . " alt='" . _DELETE . "' title='" . _DELETE . "'> |
285 | 283 | // </a>"; |
@@ -421,7 +419,7 @@ public function isBlockCloned(int $bid, string $bside, string $bweight, string $ |
421 | 419 | if ('' !== $clone->getVar('template')) { |
422 | 420 | /** @var \XoopsTplfileHandler $tplfileHandler */ |
423 | 421 | $tplfileHandler = \xoops_getHandler('tplfile'); |
424 | | - $btemplate = $tplfileHandler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $bid); |
| 422 | + $btemplate = $tplfileHandler->find($GLOBALS['xoopsConfig']['template_set'], 'block', (string)$bid); |
425 | 423 | if (\count($btemplate) > 0) { |
426 | 424 | $tplclone = $btemplate[0]->xoopsClone(); |
427 | 425 | $tplclone->setVar('tpl_id', 0); |
@@ -603,7 +601,7 @@ public function orderBlock( |
603 | 601 | $this->helper->redirect('admin/blocksadmin.php', 1, \constant('CO_' . $this->moduleDirNameUpper . '_' . 'UPDATE_SUCCESS')); |
604 | 602 | } |
605 | 603 |
|
606 | | - public function render(?array $block = null): void |
| 604 | + public function render(?array $block = null) |
607 | 605 | { |
608 | 606 | \xoops_load('XoopsFormLoader'); |
609 | 607 | \xoops_loadLanguage('common', $this->moduleDirNameUpper); |
|
0 commit comments