Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Jul 4, 2020
1 parent 6e9fe1b commit 55b6326
Show file tree
Hide file tree
Showing 124 changed files with 3,044 additions and 3,307 deletions.
1 change: 0 additions & 1 deletion admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*
* @copyright The XOOPS Project (https://xoops.org)
* @license GNU GPL (https://www.gnu.org/licenses/gpl-2.0.html/)
* @package Publisher
* @since 1.0
* @author Mage, Mamba
*/
Expand Down
2 changes: 0 additions & 2 deletions admin/admin_footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
/**
* @copyright XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
* @author XOOPS Development Team
*/

$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);

echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
Expand Down
10 changes: 3 additions & 7 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@
/**
* @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package Publisher
* @since 1.0
* @author trabis <[email protected]>
* @author The SmartFactory <www.smartfactory.ca>
*/

use XoopsModules\Publisher;

require dirname(__DIR__) . '/preloads/autoloader.php';

require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
Expand All @@ -48,10 +44,10 @@
$helper->loadLanguage('main');

$imagearray = [
'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle'>",
'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle'>",
'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle'>",
'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle'>",
'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle'>",
'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle'>",
'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle'>",
];

$myts = \MyTextSanitizer::getInstance();
Expand Down
34 changes: 17 additions & 17 deletions admin/blockform.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';

$moduleDirName = basename(dirname(__DIR__));
$moduleDirName = basename(dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName

$form = new \XoopsThemeForm($block['form_title'], 'blockform', 'blocksadmin.php', 'post', true);
Expand All @@ -43,11 +43,11 @@
$mod_select = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN'), 'bmodule', $block['modules'], 5, true);
/** @var \XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
$criteria = new \CriteriaCompo(new \Criteria('hasmain', 1));
$criteria = new \CriteriaCompo(new \Criteria('hasmain', 1));
$criteria->add(new \Criteria('isactive', 1));
$module_list = $moduleHandler->getList($criteria);
$module_list = $moduleHandler->getList($criteria);
$module_list[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
$module_list[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
$module_list[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
ksort($module_list);
$mod_select->addOptionArray($module_list);
$form->addElement($mod_select);
Expand All @@ -70,7 +70,7 @@
if ('' !== $block['template']) {
/** @var \XoopsTplfileHandler $tplfileHandler */
$tplfileHandler = xoops_getHandler('tplfile');
$btemplate = $tplfileHandler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']);
$btemplate = $tplfileHandler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']);
if (count($btemplate) > 0) {
$form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $btemplate[0]->getVar('tpl_id') . '">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>'));
} else {
Expand All @@ -87,24 +87,24 @@
$cache_select = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
$cache_select->addOptionArray(
[
'0' => _NOCACHE,
'30' => sprintf(_SECONDS, 30),
'60' => _MINUTE,
'300' => sprintf(_MINUTES, 5),
'1800' => sprintf(_MINUTES, 30),
'3600' => _HOUR,
'18000' => sprintf(_HOURS, 5),
'86400' => _DAY,
'259200' => sprintf(_DAYS, 3),
'604800' => _WEEK,
'0' => _NOCACHE,
'30' => sprintf(_SECONDS, 30),
'60' => _MINUTE,
'300' => sprintf(_MINUTES, 5),
'1800' => sprintf(_MINUTES, 30),
'3600' => _HOUR,
'18000' => sprintf(_HOURS, 5),
'86400' => _DAY,
'259200' => sprintf(_DAYS, 3),
'604800' => _WEEK,
'2592000' => _MONTH,
]
);
$form->addElement($cache_select);

/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
$groups = $grouppermHandler->getGroupIds('block_read', $block['bid']);
$groups = $grouppermHandler->getGroupIds('block_read', $block['bid']);

$form->addElement(new \XoopsFormSelectGroup(_AM_SYSTEM_BLOCKS_GROUP, 'groups', true, $groups, 5, true));

Expand All @@ -119,7 +119,7 @@
}

//Submit buttons
$buttonTray = new \XoopsFormElementTray('', '');
$buttonTray = new \XoopsFormElementTray('', '');
$submit_button = new \XoopsFormButton('', 'submitblock', _SUBMIT, 'submit');
$buttonTray->addElement($submit_button);

Expand Down
Loading

0 comments on commit 55b6326

Please sign in to comment.