EfqDirUpgrade   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A prepare2upgrade() 0 9 1
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    {@link https://xoops.org/ XOOPS Project}
14
 * @license      {@link http://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
15
 * @package      efqdirectory
16
 * @since
17
 * @author       Martijn Hertog (aka wtravel)
18
 * @author       XOOPS Development Team,
19
 */
20
class EfqDirUpgrade
21
{
22
    /**
23
     * @param string $filename
24
     * @return string
25
     */
26
    public function prepare2upgrade($filename = '')
27
    {
28
        global $moddir, $xoopsConfig;
29
        require_once XOOPS_ROOT_PATH . '/modules/' . $moddir . '/upgrade/class/dbmanager.php';
0 ignored issues
show
Bug introduced by
The constant XOOPS_ROOT_PATH was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
30
        require_once XOOPS_ROOT_PATH . '/modules/' . $moddir . '/upgrade/language/' . $xoopsConfig['language'] . '/install.php';
31
        $dbm = new db_manager;
32
        $dbm->queryFromFile(XOOPS_ROOT_PATH . '/modules/' . $moddir . '/sql/' . $filename);
33
34
        return $dbm->report();
35
    }
36
}
37