This comment in menu.module is incorrect. The Navigation block is actually provided by system.module. This should be fixed in 7.x, also.
foreach ($menus as $name => $title) {
// Default "Navigation" block is handled by user.module.
$blocks[$name]['info'] = check_plain($title);
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | incorrect_comment_on_menu_module-1452070-24.patch | 573 bytes | albert volkman |
| #20 | incorrect_comment_on_menu_module-1452070-20.patch | 520 bytes | kgoel |
| #16 | incorrect_comment_on_menu_module-1452070-16.patch | 542 bytes | kgoel |
| #13 | incorrect_comment_on_menu_module-1452070-13.patch | 613 bytes | kgoel |
| #12 | incorrect_comment_on_menu_module-1452070-12.patch | 635 bytes | kgoel |
Comments
Comment #1
Anonymous (not verified) commentedTagging as Novice
Comment #2
aloyr commentedComment #3
aloyr commentedfixed the comment on the menu.module file to reflect that the block is provided by system.module
Comment #4
brisho commentedComment #5
webchickSwitching components.
Comment #6
dries commentedCommitted to 8.x. Thanks!
Comment #7
jhodgdonSounds like it needs a backport to 7.x
Comment #8
Psikik commentedHere's the D7 patch.
Comment #9
jhodgdonComment #10
jhodgdonUmmm... How is this comment even relevant to the code around it? I don't see anything in the code there that is dealing with a 'Navigation' block at all, whether it's in the system or user module????
I'm putting this back to 8.x for consideration. I think probably the comment should just be removed? Here's the code, after the previously-committed patch:
I don't understand that comment at all????
Oh... So if you go all the way back to Drupal ***5*** menu_block() you can see where it came from:
But this check was removed in Drupal 6, hasn't come back in 7/8, and that comment has remained. It really just needs to be gone.
Comment #11
jhodgdontagging for backport
Comment #12
kgoel commentedHere is the patch with updated comment for D8 (In menu block sanitizing the title used on the block administration screens.)
Comment #13
kgoel commentedD7 patch.
Comment #14
kgoel commentedComment #15
jhodgdonThanks... but you can't just update a D7 patch on a D8 issue, and it's best to wait until D8 has been fixed anyway... Please read the "multiple versions" section at the bottom of:
http://drupal.org/node/1319154
Regarding the D8 patch, it doesn't follow our coding standards for comments:
http://drupal.org/node/1354#inline
Besides, I don't think we need a comment on that line of code at all (most Drupal developers reading the code know that check_plain is used for sanitizing, so we don't really need a code comment telling us that).
Comment #16
kgoel commentedThanks jhodgdon!
Removed the comment from D8.
Comment #17
kgoel commentedComment #18
jhodgdonThat looks fine for me. Since Dries committed the previous patch, I'll leave this here for a day or two to see if anyone disagrees about the wisdom of removing this (I think totally obsolete) code comment.
Comment #19
jhodgdonSeems like no one objected. Committed to 8.x. Needs port to 7.x next. Thanks!
Comment #20
kgoel commentedD7 patch.
Comment #21
kgoel commentedComment #22
longwaveTrivial patch.
Comment #23
jhodgdonThanks - committed to 7.x. We should also port this to 6.x.
Comment #26
albert volkman commentedQuick patch to close this issue out.
Comment #27
longwaveAgain, this is trivial.
Comment #28
star-szrRemoving novice tag since this just needs a commit now.
Comment #29
jhodgdonThanks again - committed to 6.x.