Code Duplication    Length = 10-19 lines in 2 locations

upgrade/upd-2.0.18-to-2.3.0/index.php 1 location

@@ 61-79 (lines=19) @@
58
     * Check if cache_model table already exists
59
     *
60
     */
61
    public function check_cache()
62
    {
63
        $sql    = "SHOW TABLES LIKE '" . $GLOBALS['xoopsDB']->prefix('cache_model') . "'";
64
        $result = $GLOBALS['xoopsDB']->queryF($sql);
65
        if (!$result) {
66
            return false;
67
        }
68
69
        return $GLOBALS['xoopsDB']->getRowsNum($result) > 0;
70
71
        /*
72
        $sql = "SELECT COUNT(*) FROM `" . $GLOBALS['xoopsDB']->prefix('cache_model') . "`";
73
        if ( !$result = $GLOBALS['xoopsDB']->queryF( $sql ) ) {
74
            return false;
75
        }
76
77
        return true;
78
        */
79
    }
80
81
    /**
82
     * Check if primary key for `block_module_link` is already set

upgrade/cnt-2.2.x-to-2.3.0/index.php 1 location

@@ 65-74 (lines=10) @@
62
     * Check if block table already converted
63
     *
64
     */
65
    public function check_block()
66
    {
67
        $sql    = "SHOW TABLES LIKE '" . $GLOBALS['xoopsDB']->prefix('block_instance') . "'";
68
        $result = $GLOBALS['xoopsDB']->queryF($sql);
69
        if (!$result) {
70
            return true;
71
        }
72
73
        return !($GLOBALS['xoopsDB']->getRowsNum($result) > 0);
74
    }
75
76
    /**
77
     * @return bool