Code Duplication    Length = 18-18 lines in 2 locations

install/upgrade_ajax.php 1 location

@@ 158-175 (lines=18) @@
155
    return $res;
156
}
157
158
function tableExists($tablename)
159
{
160
    global $db_link, $database;
161
162
    $res = mysqli_query(
163
        $db_link,
164
        "SELECT COUNT(*) as count
165
        FROM information_schema.tables
166
        WHERE table_schema = '".$database."'
167
        AND table_name = '$tablename'"
168
    );
169
170
    if ($res > 0) {
171
        return true;
172
    } else {
173
        return false;
174
    }
175
}
176
177
if (isset($post_type)) {
178
    switch ($post_type) {

install/upgrade_run_db_original.php 1 location

@@ 77-94 (lines=18) @@
74
    return $res;
75
}
76
77
function tableExists($tablename)
78
{
79
    global $dbTmp, $database;
80
81
    $res = mysqli_query(
82
        $dbTmp,
83
        "SELECT COUNT(*) as count
84
        FROM information_schema.tables
85
        WHERE table_schema = '".$database."'
86
        AND table_name = '$tablename'"
87
    );
88
89
    if ($res > 0) {
90
        return true;
91
    }
92
93
    return false;
94
}
95
96
//define pbkdf2 iteration count
97
@define('ITCOUNT', '2072');