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

@@ 515-523 (lines=9) @@
512
        /**
513
         * User Mulitbytes
514
         */
515
        if (empty($_SERVER['REQUEST_URI'])) { // Not defined by IIS
516
            // Under some configs, IIS makes SCRIPT_NAME point to php.exe :-(
517
            if (!($_SERVER['REQUEST_URI'] = @$_SERVER['PHP_SELF'])) {
518
                $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
519
            }
520
            if (isset($_SERVER['QUERY_STRING'])) {
521
                $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
522
            }
523
        }
524
    }
525
526
    /**