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

@@ 503-508 (lines=6) @@
500
501
// add new admin setting "send_stats_time"
502
$tmp = mysqli_num_rows(mysqli_query($db_link, "SELECT * FROM `".$pre."misc` WHERE type = 'admin' AND intitule = 'send_stats_time'"));
503
if (intval($tmp) === 0) {
504
    mysqli_query(
505
        $db_link,
506
        "INSERT INTO `".$pre."misc` (`type`, `intitule`, `valeur`) VALUES ('admin', 'send_stats_time', '".(time() - 2592000)."')"
507
    );
508
}
509
510
// add new admin setting "agses_authentication_enabled"
511
$tmp = mysqli_num_rows(mysqli_query($db_link, "SELECT * FROM `".$pre."misc` WHERE type = 'admin' AND intitule = 'agses_authentication_enabled'"));