Code Duplication    Length = 6-9 lines in 2 locations

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

@@ 770-778 (lines=9) @@
767
768
        $viewBySession = api_get_setting('my_courses_view_by_session') === 'true';
769
770
        if (api_is_global_chat_enabled() || $viewBySession) {
771
            // Do not include the global chat in LP
772
            if ($this->show_learnpath == false &&
773
                $this->show_footer == true &&
774
                $this->hide_global_chat == false
775
            ) {
776
                $js_files[] = 'chat/js/chat.js';
777
            }
778
        }
779
780
        if (api_get_setting('accessibility_font_resize') == 'true') {
781
            $js_files[] = 'fontresize.js';
@@ 857-862 (lines=6) @@
854
    {
855
        global $disable_js_and_css_files, $htmlHeadXtra;
856
        $js_files = array();
857
        if (api_is_global_chat_enabled()) {
858
            //Do not include the global chat in LP
859
            if ($this->show_learnpath == false && $this->show_footer == true && $this->hide_global_chat == false) {
860
                $js_files[] = 'chat/js/chat.js';
861
            }
862
        }
863
        $js_file_to_string = null;
864
865
        foreach ($js_files as $js_file) {