Skip to content

Commit 4308d52

Browse files
authored
Merge pull request #166 from mambax7/master
updates
2 parents 899d26d + d0f50fa commit 4308d52

File tree

182 files changed

+1427
-990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+1427
-990
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![alt XOOPS CMS](https://xoops.org/images/logoXoops4GithubRepository.png)
1+
![alt XOOPS CMS](https://xoops.org/images/logoXoopsPhp8.png)
22
# Contributing to [XOOPS CMS](https://xoops.org)
33
[![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org)
44
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)

admin/about.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/** @var Admin $adminObject */
2626

27-
require __DIR__ . '/admin_header.php';
27+
require_once __DIR__ . '/admin_header.php';
2828
xoops_cp_header();
2929

3030
$adminObject->displayNavigation(basename(__FILE__));

admin/admin_footer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
use Xmf\Module\Admin;
2222

23-
$pathIcon32 = Admin::iconUrl('', 32);
23+
$pathIcon32 = Admin::iconUrl('', '32');
2424

2525
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>';
2626

admin/admin_header.php

+9-8
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,24 @@
2323
use XoopsModules\Publisher\Helper;
2424
use XoopsModules\Publisher\Common\Configurator;
2525

26-
require dirname(__DIR__) . '/preloads/autoloader.php';
26+
require \dirname(__DIR__) . '/preloads/autoloader.php';
2727

28-
require_once dirname(__DIR__, 3) . '/include/cp_header.php';
28+
require \dirname(__DIR__, 3) . '/include/cp_header.php';
2929
//require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
3030

31-
require_once dirname(__DIR__) . '/include/common.php';
31+
require_once \dirname(__DIR__) . '/include/common.php';
3232

33-
$moduleDirName = basename(dirname(__DIR__));
33+
$moduleDirName = \basename(\dirname(__DIR__));
3434

3535
$helper = Helper::getInstance();
3636
/** @var Admin $adminObject */
3737
$adminObject = Admin::getInstance();
3838

39-
$pathIcon16 = Admin::iconUrl('', 16);
40-
$pathIcon32 = Admin::iconUrl('', 32);
41-
if (is_object($helper->getModule())) {
42-
$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
39+
$pathIcon16 = Admin::iconUrl('', '16');
40+
$pathIcon32 = Admin::iconUrl('', '32');
41+
$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/';
42+
if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) {
43+
$pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32'));
4344
}
4445

4546
// Load language files

admin/blockform.php

+25-15
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,28 @@
77
* of supporting developers from this source code or any supporting source code
88
* which is considered copyrighted (c) material of the original comment or credit authors.
99
*
10-
* PHP version 5
1110
*
1211
* @category Module
1312
* @author XOOPS Development Team
1413
* @copyright XOOPS Project
1514
* @link https://xoops.org
1615
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
1716
*/
17+
18+
use Xmf\Module\Admin;
19+
use XoopsModules\Publisher\{
20+
Helper
21+
};
22+
23+
/** @var Admin $adminObject */
24+
/** @var Helper $helper */
25+
1826
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
1927

20-
$moduleDirName = basename(dirname(__DIR__));
21-
$moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName
28+
$moduleDirName = \basename(\dirname(__DIR__));
29+
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
30+
31+
$helper->loadLanguage('blocksadmin');
2232

2333
$form = new \XoopsThemeForm($block['form_title'], 'blockform', 'blocksadmin.php', 'post', true);
2434
if (isset($block['name'])) {
@@ -51,7 +61,7 @@
5161
ksort($moduleList);
5262
$moduleSelect->addOptionArray($moduleList);
5363
$form->addElement($moduleSelect);
54-
$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'TITLE'), 'btitle', 50, 255, $block['title']), false);
64+
$form->addElement(new \XoopsFormText(_AM_SYSTEM_BLOCKS_TITLE, 'btitle', 50, 255, $block['title']), false);
5565
if ($block['is_custom']) {
5666
$textarea = new \XoopsFormDhtmlTextArea(_AM_SYSTEM_BLOCKS_CONTENT, 'bcontent', $block['content'], 15, 70);
5767
$textarea->setDescription('<span style="font-size:x-small;font-weight:bold;">' . _AM_SYSTEM_BLOCKS_USEFULTAGS . '</span><br><span style="font-size:x-small;font-weight:normal;">' . sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL . '/') . '</span>');
@@ -87,17 +97,17 @@
8797
$cacheSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
8898
$cacheSelect->addOptionArray(
8999
[
90-
'0' => _NOCACHE,
91-
'30' => sprintf(_SECONDS, 30),
92-
'60' => _MINUTE,
93-
'300' => sprintf(_MINUTES, 5),
94-
'1800' => sprintf(_MINUTES, 30),
95-
'3600' => _HOUR,
96-
'18000' => sprintf(_HOURS, 5),
97-
'86400' => _DAY,
98-
'259200' => sprintf(_DAYS, 3),
99-
'604800' => _WEEK,
100-
'2592000' => _MONTH,
100+
0 => _NOCACHE,
101+
30 => sprintf(_SECONDS, 30),
102+
60 => _MINUTE,
103+
300 => sprintf(_MINUTES, 5),
104+
1800 => sprintf(_MINUTES, 30),
105+
3600 => _HOUR,
106+
18000 => sprintf(_HOURS, 5),
107+
86400 => _DAY,
108+
259200 => sprintf(_DAYS, 3),
109+
604800 => _WEEK,
110+
2592000 => _MONTH,
101111
]
102112
);
103113
$form->addElement($cacheSelect);

0 commit comments

Comments
 (0)