Code Duplication    Length = 9-9 lines in 2 locations

htdocs/modules/protector/include/precheck.inc.php 1 location

@@ 28-36 (lines=9) @@
25
define('PROTECTOR_VERSION', file_get_contents(__DIR__ . '/version.txt'));
26
27
// set $_SERVER['REQUEST_URI'] for IIS
28
if (empty($_SERVER['REQUEST_URI'])) { // Not defined by IIS
29
    // Under some configs, IIS makes SCRIPT_NAME point to php.exe :-(
30
    if (!($_SERVER['REQUEST_URI'] = @$_SERVER['PHP_SELF'])) {
31
        $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
32
    }
33
    if (isset($_SERVER['QUERY_STRING'])) {
34
        $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
35
    }
36
}
37
38
protector_precheck();
39

htdocs/xoops_lib/Xoops.php 1 location

@@ 526-534 (lines=9) @@
523
        /**
524
         * User Mulitbytes
525
         */
526
        if (empty($_SERVER['REQUEST_URI'])) { // Not defined by IIS
527
            // Under some configs, IIS makes SCRIPT_NAME point to php.exe :-(
528
            if (!($_SERVER['REQUEST_URI'] = @$_SERVER['PHP_SELF'])) {
529
                $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
530
            }
531
            if (isset($_SERVER['QUERY_STRING'])) {
532
                $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
533
            }
534
        }
535
    }
536
537
    /**