Passed
Push — master ( 37a2f2...290aa0 )
by Michael
02:35
created

ModuleConfigurator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 44
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
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 (http://www.gnu.org/licenses/gpl-2.0.html)
15
 * @package
16
 * @since
17
 * @author       XOOPS Development Team
18
 */
19
20
function getConfig()
21
{
22
    $moduleDirName      = basename(dirname(__DIR__));
23
    $moduleDirNameUpper = strtoupper($moduleDirName);
24
    return (object)[
25
        'name'           => strtoupper($moduleDirName) . ' Module Configurator',
26
        'paths'          => [
27
            'dirname'    => $moduleDirName,
28
            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
29
            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
30
            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
31
            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
32
            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
33
        ],
34
        'uploadFolders'  => [
35
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
36
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/midsize',
37
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/thumbs',
38
            //XOOPS_UPLOAD_PATH . '/flags'
39
        ],
40
        'copyBlankFiles' => [
41
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
42
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/midsize',
43
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/thumbs',
44
            //XOOPS_UPLOAD_PATH . '/flags'
45
        ],
46
47
        'copyTestFolders' => [
48
49
            [
50
                constant($moduleDirNameUpper . '_PATH') . '/testdata/uploads',
51
                XOOPS_UPLOAD_PATH . '/' . $moduleDirName ,
52
            ]
53
        ],
54
55
        'templateFolders' => [
56
            '/templates/',
57
            '/templates/blocks/',
58
            '/templates/admin/'
59
60
        ],
61
        'oldFiles'        => [
62
            '/class/request.php',
63
            '/class/registry.php',
64
            '/class/utilities.php',
65
            '/class/util.php',
66
            '/include/constants.php',
67
            '/include/functions.php',
68
            '/ajaxrating.txt',
69
        ],
70
        'oldFolders'      => [
71
            '/images',
72
            '/css',
73
            '/js',
74
            '/tcpdf',
75
            '/images',
76
        ],
77
        'renameTables'    => [
78
            //         'XX_archive'     => 'ZZZZ_archive',
79
        ],
80
        'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
81
                     <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>',
82
    ];
83
}
84