Code Duplication    Length = 6-9 lines in 2 locations

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

@@ 766-774 (lines=9) @@
763
764
        $viewBySession = api_get_setting('my_courses_view_by_session') === 'true';
765
766
        if (api_is_global_chat_enabled() || $viewBySession) {
767
            // Do not include the global chat in LP
768
            if ($this->show_learnpath == false &&
769
                $this->show_footer == true &&
770
                $this->hide_global_chat == false
771
            ) {
772
                $js_files[] = 'chat/js/chat.js';
773
            }
774
        }
775
776
        if (api_get_setting('accessibility_font_resize') == 'true') {
777
            $js_files[] = 'fontresize.js';
@@ 852-857 (lines=6) @@
849
    {
850
        global $disable_js_and_css_files, $htmlHeadXtra;
851
        $js_files = array();
852
        if (api_is_global_chat_enabled()) {
853
            //Do not include the global chat in LP
854
            if ($this->show_learnpath == false && $this->show_footer == true && $this->hide_global_chat == false) {
855
                $js_files[] = 'chat/js/chat.js';
856
            }
857
        }
858
        $js_file_to_string = null;
859
860
        foreach ($js_files as $js_file) {