Code Duplication    Length = 9-9 lines in 2 locations

manager/processors/login.processor.php 1 location

@@ 85-93 (lines=9) @@
82
if ($failedlogins >= $failed_allowed && $blockeduntildate > time()) {
83
    @session_destroy();
84
    session_unset();
85
    if ($cip = getenv("HTTP_CLIENT_IP")) {
86
        $ip = $cip;
87
    } elseif ($cip = getenv("HTTP_X_FORWARDED_FOR")) {
88
        $ip = $cip;
89
    } elseif ($cip = getenv("REMOTE_ADDR")) {
90
        $ip = $cip;
91
    } else {
92
        $ip = "UNKNOWN";
93
    }
94
    $log = new logHandler;
95
    $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip);
96
    jsAlert($_lang['login_processor_many_failed_logins']);

manager/includes/document.parser.class.inc.php 1 location

@@ 3456-3464 (lines=9) @@
3453
        $userId = $this->getLoginUserType() == 'manager' ? $this->getLoginUserID() : -$this->getLoginUserID();
3454
3455
        // Get user IP
3456
        if ($cip = getenv("HTTP_CLIENT_IP")) {
3457
            $ip = $cip;
3458
        } elseif ($cip = getenv("HTTP_X_FORWARDED_FOR")) {
3459
            $ip = $cip;
3460
        } elseif ($cip = getenv("REMOTE_ADDR")) {
3461
            $ip = $cip;
3462
        } else {
3463
            $ip = "UNKNOWN";
3464
        }
3465
        $_SESSION['ip'] = $ip;
3466
3467
        $sql = sprintf('REPLACE INTO %s (internalKey, lasthit, ip, sid)