Add functionality to change task owners.
Review Request #93 - Created Sept. 25, 2009 and submitted
Information | |
---|---|
Bogdan-Cristian Tătăroiu | |
infoarena | |
Reviewers | |
hackers | |
This has been requested a bunch of times already. People create tasks and then leave them unfinished and somebody else offers to finish them. I had to do this change in the database twice already.
The code works, you can ship it. However, I have 2 observations WRT coding style. Please have a look at them. Cristian
-
trunk/www/controllers/task.php (Diff revision 1) -
In loosely typed languages it's bad style to assign the same variable many types of values. It helps when you know what data type to expect.
-
trunk/www/controllers/task.php (Diff revision 1) -
As far as coding style goes, I'd rather initialize $new_task["user_id"] from $values["user"], once. It's quirky to assign $new_task['user'], then figure out $new_task['user_id'] and then unset $new_task['user']. As a matter of style, $new_task should resemble a valid task "object" at any point throughout the code. That's what task-related functions expect.
Review request changed
Change Summary:
Made changes with regard to coding style. Hopefully it's ok now.
Diff: |
Revision 2 (+40 -5) |
---|