From: <an...@io...> - 2005-06-02 21:49:48
|
I have filed a improvement request in JIRA on some improvements but after some more concideration I'd like to have some discussion on the Action class in general.. Maybe my needs are a bit odd. I want to manually create an action so that I personally specify things like language and additional parameters in addition to action and task. I would want this action to respect the environment I give to it and not use anything found in CTX->request. A quick look in the Action class seems to indicate that relatively few places in the action depend on CTX->request but they are vital parts like additional assigning, language handle (and thus $action->_msg), message passing from request, checking cache (because of an admin check and cache params in request) and fetching parameters from request. I think that is would be good if as much of this dependency would be cleared out so that one can determine how an action is executed without having a tweaked CTX->request handy. I think that most (if not all) of the data needed could be assigned to various keys in the action upon it's creation. Also after this, could it be possible to find out the task and additional parameters before execute? Now they are all being gathered in execute and it is thus pretty hard to do any security checks, or anything else, before the determined task is executed. So when you create an Action, it is pretty much a black box and you can just fire execute off and see what happens, since you can't know which task it chooses to execute and thus which additional parameters it will have set.. So what do you think? - Antti |