API page: https://api.drupal.org/api/drupal/includes%21registry.inc/function/_regi...

Enter a descriptive title (above) relating to function _registry_parse_file, then describe the problem you have found:

The function _registry_parse_file(), and various functions up the tree of calling functions, document that they are listing both functions and classes.

However, the function listing was removed from the registry a long time back -- as you can see, this function is only looking for the words "class" and "interface", not "function".

The documentation was never updated, and it should be updated on this function, functions that call it, functions that call those functions, etc. I think there are about 10 or fewer functions that need to be updated this way -- you can trace them on api.drupal.org pretty easily, so I think this is probably a good Novice project.

Comments

jhodgdon’s picture

GoddamnNoise’s picture

Issue summary: View changes

I could fix that, but how can i update those api pages?. I can't see any edit link on them. Do i need another role on D.O. or more privileges?.

jhodgdon’s picture

Pages on api.drupal.org are generated from comments in the Drupal Core source code. So, to fix them you need to make a patch. See:
https://drupal.org/node/144223 for info on how to find which patch to create and
https://drupal.org/contributor-tasks/create-patch for how to make a patch

GoddamnNoise’s picture

Assigned: Unassigned » GoddamnNoise

Thanks, I'm on it.

GoddamnNoise’s picture

Assigned: GoddamnNoise » Unassigned
StatusFileSize
new775 bytes

I think it's done.

jhodgdon’s picture

Status: Active » Needs work

Thanks, looks good!

Can you also fix the documentation that says "functions and classes" in the @defgroup header at the top of registry.inc? That is what generates https://api.drupal.org/api/drupal/includes!registry.inc/group/registry/7 (see comment #1).

Also, when you upload a patch, you need to set the status to "Needs review", to alert people that you've added a patch. Thanks!

For extra credit... We normally want documentation lines to be <= 80 characters long, and each function doc header is supposed to start with a one-line summary. So if you feel adventurous, you could fix up the documentation of _registry_parse_files() so it complies with our documentation standards. But since this is Drupal 7 only, this is optional and I would commit the patch without that getting fixed.

GoddamnNoise’s picture

Thanks for your quick and helpful response. Sorry, i forgot to set the status to "Needs review" and the 80 characters limit. I'll fix that and i'll do the other things you've suggested.

jhodgdon’s picture

That will be great, thanks!

GoddamnNoise’s picture

Status: Needs work » Needs review
StatusFileSize
new1.18 KB

It's all fixed now. Let me know if there is something that is not ok.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Excellent, thanks! I'll get this committed probably tomorrow.

GoddamnNoise’s picture

Status: Reviewed & tested by the community » Needs review

Thanks to you for all your help!.

GoddamnNoise’s picture

Status: Needs review » Reviewed & tested by the community

  • Commit f2e4e10 on 7.x by jhodgdon:
    Issue #2051519 by GoddamnNoise: Fix errors in registry.inc docs
    
jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 7.x.

Incidentally I noticed you had left an extra space at the end of one of the documentation lines -- I fixed that in the commit. If you plan to contribute more patches to Drupal projects, you might want to investigate your editor settings. Most code editors either have a setting to highlight end-of-line extra spaces or remove them.

Status: Fixed » Closed (fixed)

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