EllisLab/CodeIgniter — pull request #1538 by hArpanet (2012-06-26 18:58:39+00:00)
Title: Develop

Hi folks,

Please be gentle with me, I'm really just stumbling through this whole github thing.

I have added optional parameters to the Input controller for both post() and get() methods to allow a value to be returned instead of NULL.

So, instead of the long-winded and repeated:

$something = isset($_POST['something']) ? $_POST['something'] : 'My Value';

You can just do:

$something = $this->input->post('something', TRUE, 'My Value');

Similar for $this->input->get();

Also updated help file I think. Did I manage to do most of this correct? I don't know how to remove the first 'commit' from being sent to you, it was all done in the second commit.