Code Duplication    Length = 9-9 lines in 2 locations

main/install/install.lib.php 2 locations

@@ 2278-2286 (lines=9) @@
2275
                    break;
2276
            }
2277
2278
            if (!empty($sql) && !empty($newId)) {
2279
                $data = $connection->fetchAssoc($sql);
2280
                if (isset($data['iid'])) {
2281
                    $newId = $data['iid'];
2282
                }
2283
                $sql = "UPDATE c_item_property SET ref = $newId WHERE iid = $iid";
2284
                error_log($sql);
2285
                $connection->executeQuery($sql);
2286
            }
2287
2288
            if ($debug) {
2289
                // Print a status in the log once in a while
@@ 2333-2341 (lines=9) @@
2330
                break;
2331
        }
2332
2333
        if (!empty($sql)) {
2334
            $data = $connection->fetchAssoc($sql);
2335
            if (isset($data) && isset($data['iid'])) {
2336
                $newId = $data['iid'];
2337
                $sql = "UPDATE gradebook_link SET ref_id = $newId
2338
                        WHERE id = $iid";
2339
                $connection->executeQuery($sql);
2340
            }
2341
        }
2342
    }
2343
2344
    if ($debug) {