Closed (fixed)
Project:
Privatemsg
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2011 at 02:02 UTC
Updated:
31 Jan 2011 at 16:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
berdir- Why is $account optional here? I think we should define it as a required argument, makes implementing the hook easier.
- @see is usually at the end of a docblock.
- Maybe something like "An array which contains the thread ids on which the operation has been executed." instead of your current sentence?
No need to use module_implements directly?
This should be exactly the same:
module_invoke_all('privatemsg_operation_executed', $operation, $threads, $account);
Edit: Doing it manually is only required when you are passing arguments by reference but aren't using an _alter() hook.
Powered by Dreditor.
Comment #2
te-brian commented$account is optional in privatemsg_operation_execute(), from which this hook is invoked. So it can't require account unless we know there will be one.
The other changes make sense.
Comment #3
berdirAh, makes sense.
Looking at where the privatemsg_operation_execute() is called, this is a possible bug when viewing messages of an other user. Looks like we might need a separate issue that makes $account required for both.
Comment #4
te-brian commentedImplemented some of the discussed changes.
Comment #5
berdirThanks commited.
This will need to be added to 7.x too. Patch will likely apply there too, testbot can check that.
Comment #6
berdir#4: privatemsg-operation-execute.patch queued for re-testing.
Comment #7
berdirCommited.