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

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