Code Duplication    Length = 10-11 lines in 3 locations

upgrade/upd-2.4.x-to-2.5.0/index.php 2 locations

@@ 30-39 (lines=10) @@
27
     * Check if cpanel config already exists
28
     *
29
     */
30
    public function check_config()
31
    {
32
        $sql = 'SELECT COUNT(*) FROM `' . $GLOBALS['xoopsDB']->prefix('config') . "` WHERE `conf_name` IN ('break1', 'usetips')";
33
        if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
34
            return false;
35
        }
36
        list($count) = $GLOBALS['xoopsDB']->fetchRow($result);
37
38
        return ($count != 0);
39
    }
40
41
    /**
42
     * @return bool
@@ 44-53 (lines=10) @@
41
    /**
42
     * @return bool
43
     */
44
    public function check_templates()
45
    {
46
        $sql = 'SELECT COUNT(*) FROM `' . $GLOBALS['xoopsDB']->prefix('tplfile') . "` WHERE `tpl_file` IN ('system_header.html', 'system_header.tpl') AND `tpl_type` = 'admin'";
47
        if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
48
            return false;
49
        }
50
        list($count) = $GLOBALS['xoopsDB']->fetchRow($result);
51
52
        return ($count != 0);
53
    }
54
55
    /**
56
     * @return bool

upgrade/upd-2.5.4-to-2.5.5/index.php 1 location

@@ 82-92 (lines=11) @@
79
     *
80
     * @return bool
81
     */
82
    public function check_imptotal()
83
    {
84
        $sql = 'SELECT `imptotal` FROM `' . $GLOBALS['xoopsDB']->prefix('banner') . '` WHERE `bid` = 1';
85
        if ($result = $GLOBALS['xoopsDB']->queryF($sql)) {
86
            $fieldInfo = mysqli_fetch_field_direct($result, 0);
87
            $length = $fieldInfo->length;
88
89
            return ($length != 8);
90
        }
91
        return null;
92
    }
93
94
    /**
95
     * Apply imptotal