1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
You may not change or alter any portion of this comment or credits |
5
|
|
|
of supporting developers from this source code or any supporting source code |
6
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
7
|
|
|
|
8
|
|
|
This program is distributed in the hope that it will be useful, |
9
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
10
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* modulebuilder module. |
15
|
|
|
* |
16
|
|
|
* @copyright XOOPS Project (https://xoops.org) |
17
|
|
|
* @license GNU GPL 2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
18
|
|
|
* |
19
|
|
|
* @since 2.5.0 |
20
|
|
|
* |
21
|
|
|
* @author Txmod Xoops https://xoops.org |
22
|
|
|
* Goffy https://myxoops.org |
23
|
|
|
* |
24
|
|
|
*/ |
25
|
|
|
|
26
|
|
|
use Xmf\Module\Admin; |
27
|
|
|
use Xmf\Request; |
28
|
|
|
use XoopsModules\Modulebuilder\{ |
29
|
|
|
Common, |
30
|
|
|
Common\TestdataButtons, |
31
|
|
|
Forms, |
|
|
|
|
32
|
|
|
Helper, |
33
|
|
|
Utility |
34
|
|
|
}; |
35
|
|
|
|
36
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'modulebuilder_index.tpl'; |
37
|
|
|
|
38
|
|
|
require __DIR__ . '/header.php'; |
39
|
|
|
$countSettings = $helper->getHandler('Settings')->getCount(); |
40
|
|
|
$countModules = $helper->getHandler('Modules')->getCount(); |
41
|
|
|
$countTables = $helper->getHandler('Tables')->getCount(); |
42
|
|
|
$countFields = $helper->getHandler('Fields')->getCount(); |
43
|
|
|
$countFiles = $helper->getHandler('Morefiles')->getCount(); |
44
|
|
|
unset($criteria); |
45
|
|
|
|
46
|
|
|
//$templateMain = 'modulebuilder_index.tpl'; |
47
|
|
|
$adminObject->addInfoBox(\_AM_MODULEBUILDER_ADMIN_NUMMODULES); |
48
|
|
|
$adminObject->addInfoBoxLine(\sprintf('<label>' . \_AM_MODULEBUILDER_THEREARE_NUMSETTINGS . '</label>', $countSettings), 'Blue'); |
49
|
|
|
$adminObject->addInfoBoxLine(\sprintf('<label>' . \_AM_MODULEBUILDER_THEREARE_NUMMODULES . '</label>', $countModules), 'Green'); |
50
|
|
|
$adminObject->addInfoBoxLine(\sprintf('<label>' . \_AM_MODULEBUILDER_THEREARE_NUMTABLES . '</label>', $countTables), 'Orange'); |
51
|
|
|
$adminObject->addInfoBoxLine(\sprintf('<label>' . \_AM_MODULEBUILDER_THEREARE_NUMFIELDS . '</label>', $countFields), 'Gray'); |
52
|
|
|
$adminObject->addInfoBoxLine(\sprintf('<label>' . \_AM_MODULEBUILDER_THEREARE_NUMFILES . '</label>', $countFiles), 'Red'); |
53
|
|
|
// Upload Folders |
54
|
|
|
$folder = [ |
55
|
|
|
TDMC_UPLOAD_PATH, |
56
|
|
|
TDMC_UPLOAD_REPOSITORY_PATH, |
57
|
|
|
TDMC_UPLOAD_IMGMOD_PATH, |
58
|
|
|
TDMC_UPLOAD_IMGTAB_PATH, |
59
|
|
|
]; |
60
|
|
|
|
61
|
|
|
//------ check Upload Folders --------------- |
62
|
|
|
|
63
|
|
|
$adminObject->addConfigBoxLine(''); |
64
|
|
|
$redirectFile = $_SERVER['SCRIPT_NAME']; |
65
|
|
|
|
66
|
|
|
foreach (\array_keys($folder) as $i) { |
67
|
|
|
$adminObject->addConfigBoxLine(Common\DirectoryChecker::getDirectoryStatus($folder[$i], 0777, $redirectFile)); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
$adminObject->displayNavigation(\basename(__FILE__)); |
71
|
|
|
|
72
|
|
|
//------------- Test Data Buttons ---------------------------- |
73
|
|
|
if ($helper->getConfig('displaySampleButton')) { |
74
|
|
|
TestdataButtons::loadButtonConfig($adminObject); |
75
|
|
|
$adminObject->displayButton('left', ''); |
76
|
|
|
} |
77
|
|
|
$op = Request::getString('op', 0, 'GET'); |
78
|
|
|
switch ($op) { |
79
|
|
|
case 'hide_buttons': |
80
|
|
|
TestdataButtons::hideButtons(); |
81
|
|
|
break; |
82
|
|
|
case 'show_buttons': |
83
|
|
|
TestdataButtons::showButtons(); |
84
|
|
|
break; |
85
|
|
|
} |
86
|
|
|
//------------- End Test Data Buttons ---------------------------- |
87
|
|
|
|
88
|
|
|
$adminObject->displayIndex(); |
89
|
|
|
echo $utility::getServerStats(); |
90
|
|
|
|
91
|
|
|
//codeDump(__FILE__); |
92
|
|
|
require __DIR__ . '/footer.php'; |
93
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths