Passed
Push — master ( d35171...b3de3c )
by Michael
02:47
created

include/config.php (1 issue)

Severity
1
<?php
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * @copyright    XOOPS Project (https://xoops.org)
14
 * @license      GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
15
 * @author      XOOPS Development Team
16
 */
17
18
use Xmf\Module\Admin;
19
20
require dirname(__DIR__, 3) . '/mainfile.php';
21
22
$moduleDirName      = \basename(\dirname(__DIR__));
23
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
24
25
if (!defined($moduleDirNameUpper . '_DIRNAME')) {
26
    //if (!defined(constant($capsDirName . '_DIRNAME'))) {
27
    define($moduleDirNameUpper . '_DIRNAME', $GLOBALS['xoopsModule']->dirname());
28
    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . constant($moduleDirNameUpper . '_DIRNAME'));
29
    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . constant($moduleDirNameUpper . '_DIRNAME'));
30
    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
31
    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . constant($moduleDirNameUpper . '_DIRNAME'));
32
    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
33
}
34
35
// Define here the place where main upload path
36
37
//$img_dir = $GLOBALS['xoopsModuleConfig']['uploaddir'];
38
39
define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
40
define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
41
42
//constant($cloned_lang . '_CATEGORY_NOTIFY')
43
44
//$uploadFolders = [
45
//    constant($capsDirName . '_UPLOAD_PATH'),
46
//    constant($capsDirName . '_UPLOAD_PATH') . '/images',
47
//    constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails'
48
//];
49
//
50
//$copyFiles = [
51
//    constant($capsDirName . '_UPLOAD_PATH'),
52
//    constant($capsDirName . '_UPLOAD_PATH') . '/images',
53
//    constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails'
54
//];
55
//
56
//$oldFiles = [
57
//    '/include/update_functions.php',
58
//    '/include/install_functions.php'
59
//];
60
61
/**
62
 * Class ModuleConfigurator
63
 */
64
class ContactConfigurator
65
{
66
    public $uploadFolders   = [];
67
    public $blankFiles      = [];
68
    public $templateFolders = [];
69
    public $oldFiles        = [];
70
    public $oldFolders      = [];
71
    public $renameTables    = [];
72
    public $name;
73
74
    /**
75
     * ModuleConfigurator constructor.
76
     */
77
    public function __construct()
78
    {
79
        $moduleDirName       = \basename(\dirname(__DIR__));
80
        $moduleDirNameUpper  = mb_strtoupper($moduleDirName);
0 ignored issues
show
The assignment to $moduleDirNameUpper is dead and can be removed.
Loading history...
81
        $this->name          = 'Contact Module Configurator';
82
        $this->uploadFolders = [
83
            //            constant($capsDirName . '_UPLOAD_PATH'),
84
            //            constant($capsDirName . '_UPLOAD_PATH') . '/midsize',
85
            //            constant($capsDirName . '_UPLOAD_PATH') . '/thumbs',
86
        ];
87
        $this->blankFiles    = [
88
            //            constant($capsDirName . '_UPLOAD_PATH'),
89
            //            constant($capsDirName . '_UPLOAD_PATH') . '/midsize',
90
            //            constant($capsDirName . '_UPLOAD_PATH') . '/thumbs',
91
        ];
92
93
        $this->templateFolders = [
94
            '/templates/',
95
            '/templates/blocks/',
96
            '/templates/admin/',
97
        ];
98
        $this->oldFiles        = [
99
            // '/include/functions.php',
100
            '/include/functions_update.php',
101
            '/LICENSE',
102
            '/readme.html',
103
        ];
104
        $this->oldFolders      = [
105
            '/images',
106
            '/css',
107
            '/js',
108
        ];
109
    }
110
}
111
112
// module information
113
$modCopyright = "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
114
                     <img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . '\' alt=\'XOOPS Project\' ></a>';
115