Suggestion : while it is possible to read _book_toc_recurse() code and understand that $exclude is an array of $mlid to be excluded, it would probably help the user to specify it in the documentation, exactly in these terms; well, just my two cents :-)

Comments

jhodgdon’s picture

Title: Documentation problem with _book_toc_recurse page » _book_toc_recurse documentation needs expansion

Yeah, that function header is not very useful at all.
http://api.drupal.org/api/function/_book_toc_recurse/7

Should also be backported to Drupal 6 after it is fixed.

jhodgdon’s picture

Seems like a good novice project

jhodgdon’s picture

Issue tags: +Novice

Whoops, selected wrong tag

fureigh’s picture

Issue tags: -Novice

I looked at this but it seems like it makes more sense to document all of the arguments in that function if documenting $exclude and $mlid... removing the novice tag for now. (Maybe I'll try again when it's not so late at night!)

caligan’s picture

Status: Active » Needs review
StatusFileSize
new1.48 KB
jhodgdon’s picture

Status: Needs review » Needs work

Nice doc writing!

Formatting has some problems:
- spaces at ends of some lines
- final */ needs to be on its own line
- return value not documented - is there one? If not, mention in @param blocks that the particular parameter is modified in place
- wrap as close to 80 characters as possible without going over

+ * @param &$toc
+ *   Reference to $toc array.

- we don't put & in the @param line (it's in the function signature only)
- 2nd line would be better s "Reference to the table of contents array.", I think? Saying $toc is a reference to $toc is not very useful. :)

caligan’s picture

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

Got it, thanks - I think this fixes everything you mention. :)

jhodgdon’s picture

Status: Needs review » Needs work

You need to not split words with hyphens. This documentation will be formatted differently when it's displayed on api.drupal.org, and that will cause it to appear as "incre- mented". Please just move that whole word to the next line.

Also, in this section:

+ * @param $tree
+ *   The data structure of the book's menu tree.  Includes all
+ *   links, including hidden items.

several more words could go up onto the first line, to try to wrap at as close to 80 characters as possible.

Other that those two spots, looks great, thanks!

caligan’s picture

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

Ah, I see. Gotcha! (And I don't know how I overlooked the too-short line. I re-checked several times, darn it.) Also tweaked wording a tiny bit for decreased redundancy.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Great!

dries’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your work, Caligan. Committed to CVS HEAD.

Status: Fixed » Closed (fixed)

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