Code Duplication    Length = 5-5 lines in 2 locations

main/inc/lib/document.lib.php 2 locations

@@ 403-407 (lines=5) @@
400
            header('Content-type: ' . $content_type);
401
            header('Content-Length: ' . $len);
402
            $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
403
            if (strpos($user_agent, 'msie')) {
404
                header('Content-Disposition: ; filename= ' . $filename);
405
            } else {
406
                header('Content-Disposition: inline; filename= ' . $filename);
407
            }
408
409
            if ($fixLinksHttpToHttps) {
410
                $content = file_get_contents($full_file_name);
@@ 491-495 (lines=5) @@
488
            header('Content-type: ' . $content_type);
489
            header('Content-Length: ' . $len);
490
            $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
491
            if (strpos($user_agent, 'msie')) {
492
                header('Content-Disposition: ; filename= ' . $filename);
493
            } else {
494
                header('Content-Disposition: inline; filename= ' . $filename);
495
            }
496
            echo($full_string);
497
            //You have to ensure that the calling script then stops processing (exit();)
498
            //otherwise it may cause subsequent use of the page to want to download