Code Duplication    Length = 11-11 lines in 2 locations

sources/import.queries.php 2 locations

@@ 294-304 (lines=11) @@
291
            $newId = DB::insertId();
292
293
            //if asked, anyone in role can modify
294
            if (isset($_POST['import_csv_anyone_can_modify_in_role']) && $_POST['import_csv_anyone_can_modify_in_role'] == "true") {
295
                foreach ($_SESSION['arr_roles'] as $role) {
296
                    DB::insert(
297
                        prefix_table("restriction_to_roles"),
298
                        array(
299
                            'role_id' => $role['id'],
300
                            'item_id' => $newId
301
                        )
302
                    );
303
                }
304
            }
305
306
            // Insert new item in table LOGS_ITEMS
307
            DB::insert(
@@ 889-899 (lines=11) @@
886
                        $newId = DB::insertId();
887
888
                        //if asked, anyone in role can modify
889
                        if (isset($_POST['import_kps_anyone_can_modify_in_role']) && $_POST['import_kps_anyone_can_modify_in_role'] == "true") {
890
                            foreach ($_SESSION['arr_roles'] as $role) {
891
                                DB::insert(
892
                                    prefix_table("restriction_to_roles"),
893
                                    array(
894
                                        'role_id' => $role['id'],
895
                                        'item_id' => $newId
896
                                    )
897
                                );
898
                            }
899
                        }
900
901
                        //Add log
902
                        DB::insert(