Code Duplication    Length = 9-9 lines in 2 locations

main/install/install.lib.php 2 locations

@@ 2356-2364 (lines=9) @@
2353
                    break;
2354
            }
2355
2356
            if (!empty($sql) && !empty($newId)) {
2357
                $data = $connection->fetchAssoc($sql);
2358
                if (isset($data['iid'])) {
2359
                    $newId = $data['iid'];
2360
                }
2361
                $sql = "UPDATE c_item_property SET ref = $newId WHERE iid = $iid";
2362
                error_log($sql);
2363
                $connection->executeQuery($sql);
2364
            }
2365
        }
2366
2367
        if ($debug) {
@@ 2414-2422 (lines=9) @@
2411
                break;
2412
        }
2413
2414
        if (!empty($sql)) {
2415
            $data = $connection->fetchAssoc($sql);
2416
            if (isset($data) && isset($data['iid'])) {
2417
                $newId = $data['iid'];
2418
                $sql = "UPDATE gradebook_link SET ref_id = $newId
2419
                        WHERE id = $iid";
2420
                $connection->executeQuery($sql);
2421
            }
2422
        }
2423
    }
2424
2425
    if ($debug) {