Code Duplication    Length = 9-9 lines in 2 locations

install/upgrade_run_db_original.php 1 location

@@ 135-143 (lines=9) @@
132
// 2.1.27 check with DEFUSE
133
// check if library defuse already on-going here
134
// if yes, then don't execute re-encryption
135
if (isset($_SESSION['tp_defuse_installed']) !== true) {
136
    $_SESSION['tp_defuse_installed'] = false;
137
    $columns = mysqli_query($dbTmp, "show columns from ".$_SESSION['pre']."items");
138
    while ($c = mysqli_fetch_assoc($columns)) {
139
        if ($c['Field'] === "encryption_type") {
140
            $_SESSION['tp_defuse_installed'] = true;
141
        }
142
    }
143
}
144
145
## Populate table MISC
146
$val = array(

install/upgrade_run_2.1.27.php 1 location

@@ 176-184 (lines=9) @@
173
174
// check if library defuse already on-going here
175
// if yes, then don't execute re-encryption
176
if (isset($_SESSION['tp_defuse_installed']) !== true) {
177
    $_SESSION['tp_defuse_installed'] = false;
178
    $columns = mysqli_query($dbTmp, "show columns from ".$_SESSION['pre']."items");
179
    while ($c = mysqli_fetch_assoc($columns)) {
180
        if ($c['Field'] === "encryption_type") {
181
            $_SESSION['tp_defuse_installed'] = true;
182
        }
183
    }
184
}
185
186
// alter table Items
187
mysqli_query($dbTmp, "ALTER TABLE `".$_SESSION['pre']."items` MODIFY pw_len INT(5) NOT NULL DEFAULT '0'");