Code Duplication    Length = 5-9 lines in 2 locations

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

@@ 1003-1007 (lines=5) @@
1000
			$blog_post_actions .= '</a>';
1001
        }
1002
1003
		if (api_is_allowed('BLOG_' . $blog_id, 'article_delete', $task_id)) {
1004
			$blog_post_actions .= '<a href="blog.php?action=view_post&blog_id=' . $blog_id . '&post_id=' . $post_id . '&do=delete_article&article_id=' . $blog_post['post_id'] . '&task_id=' . $task_id . '" title="' . get_lang('DeleteThisArticle') . '" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset)). '\')) return false;">';
1005
            $blog_post_actions .= Display::return_icon('delete.png');
1006
            $blog_post_actions .= '</a>';
1007
        }
1008
1009
		if (api_is_allowed('BLOG_' . $blog_id, 'article_rate'))
1010
			$rating_select = Blog::display_rating_form('post',$blog_id,$post_id);
@@ 1228-1236 (lines=9) @@
1225
			$comment_text = make_clickable(stripslashes($comment['comment']));
1226
			$blog_comment_date = api_convert_and_format_date($comment['date_creation'], null, date_default_timezone_get());
1227
			$blog_comment_actions = "";
1228
            if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_delete', $task_id)) {
1229
                $blog_comment_actions .= '<a href="blog.php?action=view_post&blog_id='.$blog_id.'&post_id='.$post_id.'&do=delete_comment&comment_id='.$comment['comment_id'].'&task_id='.$task_id.'" title="'.get_lang(
1230
                        'DeleteThisComment'
1231
                    ).'" onclick="javascript:if(!confirm(\''.addslashes(
1232
                        api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset)
1233
                    ).'\')) return false;">';
1234
                $blog_comment_actions .= Display::return_icon('delete.png');
1235
                $blog_comment_actions .= '</a>';
1236
            }
1237
1238
            if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_rate')) {
1239
                $rating_select = Blog::display_rating_form('comment', $blog_id, $post_id, $comment['comment_id']);