Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Feb 2012 at 21:26 UTC
Updated:
29 Jul 2014 at 20:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
liam morlandComment #2
jhodgdonThanks for bringing this up!
The patches need a bit of work though:
a) Read the help text under the Attachments field -- regarding the file name you need to use so that the test bot will recognize the files as patches to test.
b) If there is no return value, we don't use
See http://drupal.org/node/1354#functions
b) Instead of "uid", in documentation write out "User ID", or in this case perhaps "User IDs".
c) Generally the parameter documentation needs to follow the style of other parameter docs. Such as
Better:
The action to be taken, either "add_role" or "remove_role".
d) You might also check and see whether this function doc is already being cleaned up in this other issue:
#1326666: Clean up API docs for user module
If so, mark this issue as a duplicate of the other one.
Comment #3
liam morlandUpdated D8 patch attached. If accepted, I will create D7 version.
Comment #4
jhodgdonMy fault on this one... I should have said "user ID" rather than "User ID".
Maybe you could also fix up the first line of this function according to standards?
http://drupal.org/node/1354#functions
(should start with verb)
Actually though if it is a callback, then it should also have a line about that (see the bottom of that standards section on functions for details).
Comment #5
jhodgdonComment #6
liam morlandThanks. Update attached. I am not sure if the callback part is done correctly. The function is used as a callback, but can also be used directly.
Comment #7
jhodgdonGetting closer!
I took a look at user_user_operations and I think maybe for this function we can just omit the callback line, but maybe we should put in
@see user_user_operations()
(that would go at the end of the documentation block)
The first line looks much better. The verb tenses are incorrect though -- should be Adds/removes.
One more thing:
Array of user IDs (int; not string username).
==> How about:
Array of (integer) user IDs.
Thanks for all the iterations!
Comment #8
liam morlandUpdated.
Comment #9
jhodgdonOK! Thanks!
Comment #10
dries commentedCommitted to 7.x and 8.x. Thanks.