Quantcast
Viewing all articles
Browse latest Browse all 295024

Get rid of comment_count_unpublished() in favor of CommentManager method

Updated: Comment #8

Problem/Motivation

Function comment_count_unpublished() is used only as title of local task UnapprovedComments (added in #2032309: Use local tasks derivatives to provide local tasks for views ) and does not support a swapable comment storage, because could not be overriden

Proposed resolution

Implement CommentManagerInterface::getUnapprovedCount() that uses EntityQuery to count unapproved comments

API changes

remove comment_count_unpublished()
add CommentManagerInterface::getUnapprovedCount()

Original report by @andypost

Follow-up from #1978904: Convert comment_admin() to a Controller

Also usage of the function ('title callback' => 'comment_count_unpublished',) should be replaced with proper method in AdminController


Viewing all articles
Browse latest Browse all 295024

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>