Just in case…
Posted by mkhairul - May 30, 2009 at 02:05:18 pm - 1 CommentCategories: blog
Just in case someone doesn’t understand my code.
function actions()
{
$projects = $this->input->post('project');
$this->_check_selected_item($projects);
$action = $this->input->post('action');
// So what the fuck does this do?
// When a form passes the value 'invoice' as an action
// (),
// $this calls for the method 'invoice' (e.g. $this->invoice())
$this->$action();
}
1 Comment »
RSS feed for comments on this post. TrackBack URI
Leave a comment
GimpStyle Theme design by Horacio Bella.

i’d have to agree with the with question minus the f*&^.
i’d use ‘frak’ instead.
anyway, the code would indeed have me asking the possibilities of what could happen when the submit button is pushed. I’d imagine my users telling to, say, use all caps on the wording of ‘invoice’ button and there i go changing the name of my controller’s invoice method into controller:Invoice().
then comes my arabic client and my bloody controller’s in arabic now.
wait till my indonesian friends comes. mau saja inbois pak!
so we’ll end up with Controller::alInvoish, Controller::inbois and for our hacker users Controller::_1nv0ic3().
and have some fun changing any of our code that refers to that method.
so yes i would indeed ask ye ‘what the frak does this do?’ as the tip of an ice burger.
Comment by zam3858 — July 24, 2009 #