Code Duplication    Length = 6-6 lines in 2 locations

install/upgrade_run_2.1.26.php 1 location

@@ 176-181 (lines=6) @@
173
174
// check that API doesn't exist
175
$tmp = mysqli_num_rows(mysqli_query($db_link, "SELECT *  FROM `".$pre."users` WHERE id = '".API_USER_ID."'"));
176
if (intval($tmp) === 0) {
177
    mysqli_query(
178
        $db_link,
179
        "INSERT INTO `".$pre."users` (`id`, `login`, `read_only`) VALUES ('".API_USER_ID."', 'API', '1')"
180
    );
181
}
182
183
// check that SYSLOG doesn't exist
184
$tmp = mysqli_num_rows(mysqli_query($db_link, "SELECT *  FROM `".$pre."misc` WHERE `type` = 'admin' AND `intitule` = 'syslog_enable'"));

install/upgrade_run_2.1.27.php 1 location

@@ 513-518 (lines=6) @@
510
511
// add new admin setting "send_stats_time"
512
$tmp = mysqli_num_rows(mysqli_query($db_link, "SELECT * FROM `".$pre."misc` WHERE type = 'admin' AND intitule = 'send_stats_time'"));
513
if (intval($tmp) === 0) {
514
    mysqli_query(
515
        $db_link,
516
        "INSERT INTO `".$pre."misc` (`type`, `intitule`, `valeur`) VALUES ('admin', 'send_stats_time', '".(time() - 2592000)."')"
517
    );
518
}
519
520
// add new admin setting "agses_authentication_enabled"
521
$tmp = mysqli_num_rows(mysqli_query($db_link, "SELECT * FROM `".$pre."misc` WHERE type = 'admin' AND intitule = 'agses_authentication_enabled'"));