Code Duplication    Length = 6-7 lines in 2 locations

install/upgrade_ajax.php 1 location

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

install/upgrade_run_2.1.27.php 1 location

@@ 385-390 (lines=6) @@
382
if (isset($session_tp_defuse_installed) === false || $session_tp_defuse_installed === false) {
383
    $filename = "../includes/config/settings.php";
384
    $settingsFile = file($filename);
385
    while (list($key, $val) = each($settingsFile)) {
386
        if (substr_count($val, 'require_once "') > 0 && substr_count($val, 'sk.php') > 0) {
387
            $superGlobal->put("sk_file", substr($val, 14, strpos($val, '";') - 14), "SESSION");
388
            $session_sk_file = $superGlobal->get("sk_file", "SESSION");
389
        }
390
    }
391
392
    copy(
393
        SECUREPATH."/teampass-seckey.txt",