Code Duplication    Length = 11-11 lines in 2 locations

install/upgrade_run_2.1.27.php 2 locations

@@ 203-213 (lines=11) @@
200
mysqli_query($db_link, "ALTER TABLE `".$pre."items` MODIFY pw_len INT(5) NOT NULL DEFAULT '0'");
201
202
// alter table MISC - rename ID is exists
203
if (columnExists($pre."misc", "id") === true) {
204
    // Change name of field
205
    mysqli_query($db_link, "ALTER TABLE `".$pre."misc` CHANGE `id` `increment_id` INT(12) NOT NULL AUTO_INCREMENT");
206
} else {
207
    // alter table misc to add an index
208
    $res = addColumnIfNotExist(
209
        $pre."misc",
210
        "increment_id",
211
        "INT(12) NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`increment_id`)"
212
    );
213
}
214
215
// alter table misc to add an index
216
mysqli_query(
@@ 582-592 (lines=11) @@
579
    "ALTER TABLE `".$pre."users` ADD `ga_temporary_code` VARCHAR(20) NOT NULL DEFAULT 'none' AFTER `ga`;"
580
);
581
// alter table USERS to add a new field "user_ip"
582
if (columnExists($pre."users", "user_ip") === true) {
583
    // Change name of field
584
    mysqli_query($db_link, "ALTER TABLE `".$pre."users` CHANGE `user_ip` `user_ip` VARCHAR(400) NOT NULL DEFAULT 'none'");
585
} else {
586
    // alter table misc to add an index
587
    $res = addColumnIfNotExist(
588
        $pre."users",
589
        "user_ip",
590
        "VARCHAR(400) NOT NULL DEFAULT 'none'"
591
    );
592
}
593
594
// alter table USERS to allow NULL on field "email"
595
mysqli_query(