Code Duplication    Length = 6-7 lines in 2 locations

install/upgrade_ajax.php 1 location

@@ 447-453 (lines=7) @@
444
                    '</span><br />';
445
                //copy some constants from this existing file
446
                $skFile = file($session_sk_file);
447
                while (list($key, $val) = each($skFile)) {
448
                    if (substr_count($val, "@define('SALT'") > 0) {
449
                        $superGlobal->put("encrypt_key", substr($val, 17, strpos($val, "')") - 17), "SESSION");
450
                        $session_encrypt_key = $superGlobal->get("encrypt_key", "SESSION");
451
                        echo '$("#session_salt").val("'.$session_encrypt_key.'");';
452
                    }
453
                }
454
            }
455
456
            // check if 2.1.27 already installed

install/upgrade_run_2.1.27.php 1 location

@@ 375-380 (lines=6) @@
372
if (isset($session_tp_defuse_installed) === false || $session_tp_defuse_installed === false) {
373
    $filename = "../includes/config/settings.php";
374
    $settingsFile = file($filename);
375
    while (list($key, $val) = each($settingsFile)) {
376
        if (substr_count($val, 'require_once "') > 0 && substr_count($val, 'sk.php') > 0) {
377
            $superGlobal->put("sk_file", substr($val, 14, strpos($val, '";') - 14), "SESSION");
378
            $session_sk_file = $superGlobal->get("sk_file", "SESSION");
379
        }
380
    }
381
382
    copy(
383
        SECUREPATH."/teampass-seckey.txt",