Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The comment_admin_overview()
function (in comment.admin.inc
) takes a first parameter called $type
. This parameter is not used. It's actually DOCUMENTED as "not used" in the comment's doxygen block. So... why is it still there?
Attached patch removes the parameter, the doxygen comment, and the argument (from the one spot where the function is called). No-brainer.
Comment | File | Size | Author |
---|---|---|---|
#6 | 415250-better-doc.patch | 1.11 KB | jhodgdon |
#4 | 415250.patch | 885 bytes | R.Muilwijk |
#2 | comment_module_unneeded_arg.patch | 1.23 KB | Jaza |
comment_module_unneeded_arg.patch | 1023 bytes | Jaza | |
Comments
Comment #2
Jaza CreditAttribution: Jaza commentedOops, the parameter can also be removed from comment_admin().
Comment #4
R.Muilwijk CreditAttribution: R.Muilwijk commentedReroll with small logic fix. Also did a grep to find more instances but found nothing.
Comment #5
R.Muilwijk CreditAttribution: R.Muilwijk commentedComment #6
jhodgdonThis patch brings the doc up to standards.
As a note, it appears that the unused argument to comment_admin_overview() was removed earlier on some other issue, but whoever did that didn't remove it from the calling function. So the code in the above patch is correctly removing it.
Comment #7
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.