Code Duplication    Length = 6-7 lines in 3 locations

main/group/group_space.php 2 locations

@@ 199-204 (lines=6) @@
196
                    'onclick' => " window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".api_get_course_id()."_".api_get_group_id()."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')"
197
                )
198
            );
199
        } else {
200
            $actions_array[] = array(
201
                'url' => api_get_path(WEB_CODE_PATH)."chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'],
202
                'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32)
203
            );
204
        }
205
    }
206
207
    $enabled = api_get_plugin_setting('bbb', 'tool_enable');
@@ 287-292 (lines=6) @@
284
                'url' => "javascript: void(0);\" onclick=\"window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".api_get_course_id()."_".api_get_group_id()."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no') \"",
285
                'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32)
286
            );
287
        } else {
288
            $actions_array[] = array(
289
                'url' => api_get_path(WEB_CODE_PATH)."chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'],
290
                'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32)
291
            );
292
        }
293
    }
294
295
    if (!empty($actions_array)) {

main/inc/lib/document.lib.php 1 location

@@ 5432-5438 (lines=7) @@
5429
                    $pdfPreview = null;
5430
                    if ($ext != 'pdf' && !in_array($ext, $webODFList)) {
5431
                        $url = 'showinframes.php?' . $courseParams . '&id=' . $document_data['id'];
5432
                    } else {
5433
                        $pdfPreview = Display::url(
5434
                            Display::return_icon('preview.gif', get_lang('Preview')),
5435
                            api_get_path(WEB_CODE_PATH).'document/showinframes.php?' . $courseParams . '&id=' . $document_data['id'],
5436
                            array('style' => 'float:right')
5437
                        );
5438
                    }
5439
                    // No plugin just the old and good showinframes.php page
5440
                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" style="float:left" ' . $visibility_class . ' >' . $title . '</a>' .
5441
                    $pdfPreview.$force_download_html . $send_to . $copy_to_myfiles . $open_in_new_window_link . $pdf_icon;