Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with user_pass_reset_url » user_pass_reset_url() has no documentation
Issue tags: +Needs documentation

Gracious! That function has been undocumented for several Drupal versions. Once it's fixed in D7, please also port fix to D6.

add1sun’s picture

Status: Active » Needs review
FileSize
779 bytes

Patch attached.

jhodgdon’s picture

Needs @param and @return... add1sun is repatching.

jhodgdon’s picture

Status: Needs review » Needs work
add1sun’s picture

Status: Needs work » Needs review
FileSize
895 bytes

Ok, trying again. Not sure my @return is descriptive enough....

add1sun’s picture

Will eventually sort this out. :-P

add1sun’s picture

Hehe.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Excellent, I like #7. :)

jhodgdon’s picture

Assuming the test bot says OK, of course.

webchick’s picture

Version: 7.x-dev » 6.x-dev
Status: Reviewed & tested by the community » Fixed

Awesome! Yay for fixing 40-year old bugs! Committed to HEAD. :)

Seems to apply to 6.x too, with a little fuzz.

jhodgdon’s picture

Status: Fixed » Reviewed & tested by the community

I don't think webchick actually applied it to Drupal 6?

webchick’s picture

LOL. Thanks. :) Yes, that's what I meant.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Unless I'm misinformed, our API documentation guidelines do not let types to be specified inbetween @param and the variable name, do they?

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

New guidelines are in place: Yes they do. It's standard in PHPDoc, and Drupal has adopted that standard.
http://drupal.org/node/1354#functions

Gábor Hojtsy’s picture

Ok, where was this applied to D6? I've looked at a few functions and could not find this pattern being used.

jhodgdon’s picture

It's a brand new standard. I'm not aware of it being used anywhere in D6, and there are probably only 3 or 4 places that now have it in D7, because only a few patches have been applied to D7 with @return or @param types. I don't think we're planning any wholesale effort to go back and put them in everywhere, just adding them incrementally as we update doc.

So, this is likely the first one that has come up for D6.

However, it's all over PHP doc in general, on php.net etc. It is an industry standard, in other words, and the general idea is to add clarity to documentation of functions...

andypost’s picture

# patch -p0 < doc-user_pass_reset_url-712598-7.patch
patching file modules/user/user.module
Hunk #1 succeeded at 1439 with fuzz 2 (offset -638 lines).

Anyway here's a patch against current D6

jhodgdon’s picture

Thanks for the reroll. Definitely looks the same as the D7 patch, aside from the context.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Ok, committed.

Status: Fixed » Closed (fixed)
Issue tags: -Needs documentation

Automatically closed -- issue fixed for 2 weeks with no activity.