Code Duplication    Length = 6-9 lines in 2 locations

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

@@ 806-814 (lines=9) @@
803
804
        $viewBySession = api_get_setting('my_courses_view_by_session') === 'true';
805
806
        if (api_is_global_chat_enabled() || $viewBySession) {
807
            // Do not include the global chat in LP
808
            if ($this->show_learnpath == false &&
809
                $this->show_footer == true &&
810
                $this->hide_global_chat == false
811
            ) {
812
                $js_files[] = 'chat/js/chat.js';
813
            }
814
        }
815
816
        if (api_get_setting('accessibility_font_resize') == 'true') {
817
            $js_files[] = 'fontresize.js';
@@ 892-897 (lines=6) @@
889
    {
890
        global $disable_js_and_css_files, $htmlHeadXtra;
891
        $js_files = array();
892
        if (api_is_global_chat_enabled()) {
893
            //Do not include the global chat in LP
894
            if ($this->show_learnpath == false && $this->show_footer == true && $this->hide_global_chat == false) {
895
                $js_files[] = 'chat/js/chat.js';
896
            }
897
        }
898
        $js_file_to_string = null;
899
900
        foreach ($js_files as $js_file) {