Skip to content

Commit b8dd09c

Browse files
authored
Merge pull request #139 from mambax7/master
1.08 Alpha 2
2 parents 17794f5 + dc2b3bd commit b8dd09c

File tree

182 files changed

+3429
-3017
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

+3429
-3017
lines changed

.gitattributes

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
*.cs diff=csharp
66

77
# Standard to msysgit
8-
*.doc diff=astextplain
9-
*.DOC diff=astextplain
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
1010
*.docx diff=astextplain
1111
*.DOCX diff=astextplain
1212
*.dot diff=astextplain
1313
*.DOT diff=astextplain
1414
*.pdf diff=astextplain
15-
*.PDF diff=astextplain
16-
*.rtf diff=astextplain
17-
*.RTF diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ We accept contributions via Pull Requests on [Github](https://github.com/XoopsMo
1111

1212
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
1313
- **Add tests!** - We encourage providing tests for your contributions.
14-
- **Document any change in behavior** - Make sure the `/docs/changelog.txt` and any other relevant documentation are kept up-to-date.
14+
- **Document any change in behavior** - Make sure the `/docs/changelog.txt` and any other relevant documentation are up-to-date.
1515
- **Consider our release cycle** - We try to follow [Semantic Versioning v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
1616
- **Create feature branches** - Don't ask us to pull from your master branch.
1717
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/
1919

2020
Please visit us on https://xoops.org
2121

22-
Current and upcoming "next generation" versions of XOOPS CMS are being crafted on GitHub at: https://github.com/XOOPS
22+
Current and upcoming "next generation" versions of XOOPS CMS are crafted on GitHub at: https://github.com/XOOPS

admin/about.php

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*
1717
* @copyright The XOOPS Project (https://xoops.org)
1818
* @license GNU GPL (https://www.gnu.org/licenses/gpl-2.0.html/)
19-
* @package Publisher
2019
* @since 1.0
2120
* @author Mage, Mamba
2221
*/

admin/admin_footer.php

-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
/**
1515
* @copyright XOOPS Project (https://xoops.org)
1616
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
17-
* @package
1817
* @since
1918
* @author XOOPS Development Team
2019
*/
21-
2220
$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
2321

2422
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>';

admin/admin_header.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,29 @@
1414
/**
1515
* @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
1616
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
17-
* @package Publisher
1817
* @since 1.0
1918
* @author trabis <lusopoemas@gmail.com>
2019
* @author The SmartFactory <www.smartfactory.ca>
2120
*/
2221

23-
use XoopsModules\Publisher;
22+
use Xmf\Module\Admin;
23+
use XoopsModules\Publisher\Helper;
2424

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

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

3030
require_once dirname(__DIR__) . '/include/common.php';
3131

3232
$moduleDirName = basename(dirname(__DIR__));
3333

34-
/** @var \XoopsModules\Publisher\Helper $helper */
35-
$helper = \XoopsModules\Publisher\Helper::getInstance();
34+
$helper = Helper::getInstance();
3635
/** @var Xmf\Module\Admin $adminObject */
37-
$adminObject = \Xmf\Module\Admin::getInstance();
36+
$adminObject = Admin::getInstance();
3837

39-
$pathIcon16 = \Xmf\Module\Admin::iconUrl('', 16);
40-
$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
38+
$pathIcon16 = Admin::iconUrl('', 16);
39+
$pathIcon32 = Admin::iconUrl('', 32);
4140
if (is_object($helper->getModule())) {
4241
$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
4342
}

admin/blockform.php

+21-21
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
if (isset($block['name'])) {
2525
$form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_NAME, $block['name']));
2626
}
27-
$side_select = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, 'bside', $block['side']);
28-
$side_select->addOptionArray(
27+
$sideSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, 'bside', $block['side']);
28+
$sideSelect->addOptionArray(
2929
[
3030
0 => _AM_SYSTEM_BLOCKS_SBLEFT,
3131
1 => _AM_SYSTEM_BLOCKS_SBRIGHT,
@@ -37,35 +37,35 @@
3737
9 => _AM_SYSTEM_BLOCKS_CBBOTTOM,
3838
]
3939
);
40-
$form->addElement($side_select);
40+
$form->addElement($sideSelect);
4141
$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT'), 'bweight', 2, 5, $block['weight']));
4242
$form->addElement(new \XoopsFormRadioYN(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE'), 'bvisible', $block['visible']));
43-
$mod_select = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN'), 'bmodule', $block['modules'], 5, true);
43+
$moduleSelect = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN'), 'bmodule', $block['modules'], 5, true);
4444
/** @var \XoopsModuleHandler $moduleHandler */
4545
$moduleHandler = xoops_getHandler('module');
4646
$criteria = new \CriteriaCompo(new \Criteria('hasmain', 1));
4747
$criteria->add(new \Criteria('isactive', 1));
48-
$module_list = $moduleHandler->getList($criteria);
49-
$module_list[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
50-
$module_list[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
51-
ksort($module_list);
52-
$mod_select->addOptionArray($module_list);
53-
$form->addElement($mod_select);
48+
$moduleList = $moduleHandler->getList($criteria);
49+
$moduleList[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
50+
$moduleList[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
51+
ksort($moduleList);
52+
$moduleSelect->addOptionArray($moduleList);
53+
$form->addElement($moduleSelect);
5454
$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'TITLE'), 'btitle', 50, 255, $block['title']), false);
5555
if ($block['is_custom']) {
5656
$textarea = new \XoopsFormDhtmlTextArea(_AM_SYSTEM_BLOCKS_CONTENT, 'bcontent', $block['content'], 15, 70);
5757
$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>');
5858
$form->addElement($textarea, true);
59-
$ctype_select = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'bctype', $block['ctype']);
60-
$ctype_select->addOptionArray(
59+
$ctypeSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'bctype', $block['ctype']);
60+
$ctypeSelect->addOptionArray(
6161
[
6262
'H' => _AM_SYSTEM_BLOCKS_HTML,
6363
'P' => _AM_SYSTEM_BLOCKS_PHP,
6464
'S' => _AM_SYSTEM_BLOCKS_AFWSMILE,
6565
'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE,
6666
]
6767
);
68-
$form->addElement($ctype_select);
68+
$form->addElement($ctypeSelect);
6969
} else {
7070
if ('' !== $block['template']) {
7171
/** @var \XoopsTplfileHandler $tplfileHandler */
@@ -84,8 +84,8 @@
8484
$form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_OPTIONS, $block['edit_form']));
8585
}
8686
}
87-
$cache_select = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
88-
$cache_select->addOptionArray(
87+
$cacheSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
88+
$cacheSelect->addOptionArray(
8989
[
9090
'0' => _NOCACHE,
9191
'30' => sprintf(_SECONDS, 30),
@@ -100,7 +100,7 @@
100100
'2592000' => _MONTH,
101101
]
102102
);
103-
$form->addElement($cache_select);
103+
$form->addElement($cacheSelect);
104104

105105
/** @var \XoopsGroupPermHandler $grouppermHandler */
106106
$grouppermHandler = xoops_getHandler('groupperm');
@@ -120,11 +120,11 @@
120120

121121
//Submit buttons
122122
$buttonTray = new \XoopsFormElementTray('', '');
123-
$submit_button = new \XoopsFormButton('', 'submitblock', _SUBMIT, 'submit');
124-
$buttonTray->addElement($submit_button);
123+
$submitButton = new \XoopsFormButton('', 'submitblock', _SUBMIT, 'submit');
124+
$buttonTray->addElement($submitButton);
125125

126-
$cancel_button = new \XoopsFormButton('', '', _CANCEL, 'button');
127-
$cancel_button->setExtra('onclick="history.go(-1)"');
128-
$buttonTray->addElement($cancel_button);
126+
$cancelButton = new \XoopsFormButton('', '', _CANCEL, 'button');
127+
$cancelButton->setExtra('onclick="history.go(-1)"');
128+
$buttonTray->addElement($cancelButton);
129129

130130
$form->addElement($buttonTray);

0 commit comments

Comments
 (0)