Code Duplication    Length = 10-12 lines in 2 locations

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

@@ 1022-1033 (lines=12) @@
1019
1020
		$file_name_array = get_blog_attachment($blog_id, $post_id);
1021
1022
        if (!empty($file_name_array)) {
1023
			echo ' <br />';
1024
			echo Display::return_icon('attachment.gif',get_lang('Attachment'));
1025
			echo '<a href="download.php?file=';
1026
			echo $file_name_array['path'];
1027
			echo ' "> '.$file_name_array['filename'].' </a>';
1028
			echo '</span>';
1029
			echo '<span class="attachment_comment">';
1030
			echo $file_name_array['comment'];
1031
			echo '</span>';
1032
			echo '<br />';
1033
		}
1034
        $username = api_htmlentities(sprintf(get_lang('LoginX'), $blog_post['username']), ENT_QUOTES);
1035
		echo '<span class="blogpost_info">'.get_lang('Author').': ' .Display::tag('span', api_get_person_name($blog_post['firstname'], $blog_post['lastname']), array('title'=>$username)).' - '.get_lang('Comments').': '.$blog_post_comments['number_of_comments'].' - '.get_lang('Rating').': '.Blog::display_rating('post',$blog_id,$post_id).$rating_select.'</span>';
1036
		echo '<span class="blogpost_actions">' . $blog_post_actions . '</span>';
@@ 1256-1265 (lines=10) @@
1253
				echo '<span class="blogpost_text">' . $comment_text . '</span>';
1254
1255
				$file_name_array = get_blog_attachment($blog_id,$post_id, $comment['comment_id']);
1256
				if (!empty($file_name_array)) {
1257
					echo '<br /><br />';
1258
					echo Display::return_icon('attachment.gif',get_lang('Attachment'));
1259
					echo '<a href="download.php?file=';
1260
					echo $file_name_array['path'];
1261
					echo ' "> '.$file_name_array['filename'].' </a>';
1262
					echo '<span class="attachment_comment">';
1263
					echo $file_name_array['comment'];
1264
					echo '</span><br />';
1265
				}
1266
                $username = api_htmlentities(sprintf(get_lang('LoginX'), $comment['username']), ENT_QUOTES);
1267
				echo '<span class="blogpost_comment_info">'.get_lang('Author').': '.Display::tag('span', api_get_person_name($comment['firstname'], $comment['lastname']), array('title'=>$username)).' - '.get_lang('Rating').': '.Blog::display_rating('comment', $blog_id, $comment['comment_id']).$rating_select.'</span>';
1268
				echo '<span class="blogpost_actions">' . $blog_comment_actions . '</span>';