Code Duplication    Length = 5-5 lines in 2 locations

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

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