Code Duplication    Length = 6-10 lines in 3 locations

install/install.queries.php 3 locations

@@ 672-681 (lines=10) @@
669
                            `item_id` int(12) NOT NULL
670
                           ) CHARSET=utf8;"
671
                        );
672
                    } elseif ($task == "restriction_to_roles") {
673
                        $mysqli_result = mysqli_query(
674
                            $dbTmp,
675
                            "CREATE TABLE IF NOT EXISTS `".$var['tbl_prefix']."restriction_to_roles` (
676
                            `role_id` int(12) NOT NULL,
677
                            `item_id` int(12) NOT NULL,
678
                            KEY `role_id_idx`  (`role_id`)
679
                            ) CHARSET=utf8;"
680
                        );
681
                    } elseif ($task === "languages") {
682
                        $mysqli_result = mysqli_query(
683
                            $dbTmp,
684
                            "CREATE TABLE IF NOT EXISTS `".$var['tbl_prefix']."languages` (
@@ 893-898 (lines=6) @@
890
891
                        // check that API doesn't exist
892
                        $tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `".$var['tbl_prefix']."users` WHERE id = '".API_USER_ID."'"));
893
                        if ($tmp == 0) {
894
                            $mysqli_result = mysqli_query(
895
                                $dbTmp,
896
                                "INSERT INTO `".$var['tbl_prefix']."users` (`id`, `login`, `pw`, `groupes_visibles`, `derniers`, `key_tempo`, `last_pw_change`, `last_pw`, `admin`, `fonction_id`, `groupes_interdits`, `last_connexion`, `gestionnaire`, `email`, `favourites`, `latest_items`, `personal_folder`) VALUES ('".API_USER_ID."', 'API', '', '', '', '', '', '', '1', '', '', '', '0', '', '', '', '0')"
897
                            );
898
                        }
899
900
                        // check that OTV doesn't exist
901
                        $tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `".$var['tbl_prefix']."users` WHERE id = '".OTV_USER_ID."'"));
@@ 902-907 (lines=6) @@
899
900
                        // check that OTV doesn't exist
901
                        $tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `".$var['tbl_prefix']."users` WHERE id = '".OTV_USER_ID."'"));
902
                        if ($tmp == 0) {
903
                            $mysqli_result = mysqli_query(
904
                                $dbTmp,
905
                                "INSERT INTO `".$var['tbl_prefix']."users` (`id`, `login`, `pw`, `groupes_visibles`, `derniers`, `key_tempo`, `last_pw_change`, `last_pw`, `admin`, `fonction_id`, `groupes_interdits`, `last_connexion`, `gestionnaire`, `email`, `favourites`, `latest_items`, `personal_folder`) VALUES ('".OTV_USER_ID."', 'OTV', '', '', '', '', '', '', '1', '', '', '', '0', '', '', '', '0')"
906
                            );
907
                        }
908
                    }
909
                }
910
                // answer back