Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 5127-5131 (lines=5) @@
5124
        $webOdflist = DocumentManager::get_web_odf_extension_list();
5125
5126
        // Get the title or the basename depending on what we're using
5127
        if ($document_data['title'] != '') {
5128
            $title = $document_data['title'];
5129
        } else {
5130
            $title = basename($document_data['path']);
5131
        }
5132
5133
        $filetype = $document_data['filetype'];
5134
        $size = $filetype == 'folder' ? get_total_folder_size($document_data['path'], api_is_allowed_to_edit(null, true)) : $document_data['size'];

main/document/document.php 1 location

@@ 1729-1733 (lines=5) @@
1726
            $size = $document_data['filetype'] == 'folder' ? get_total_folder_size($document_data['path'], $is_allowed_to_edit) : $document_data['size'];
1727
1728
            // Get the title or the basename depending on what we're using
1729
            if ($document_data['title'] != '') {
1730
                $document_name = $document_data['title'];
1731
            } else {
1732
                $document_name = basename($document_data['path']);
1733
            }
1734
1735
            $row['name'] = $document_name;
1736
            // Data for checkbox