[eluser]MadZad[/eluser]
My knee-jerk reaction is to reduce the amount of code in that controller (splitting into multiple controllers is one option). You mentioned a lot of validation - can that functionality be bundled up into a helper function?
My reasoning is that you should be able to look at your controller code and clearly see the paths through the code. That is what is really important in a controller. When there's a lot of validation code, you can get caught up in a lot of details and lose sight of the big picture.
This may sound like a style issue, but one thing to consider is how will this code look in 6 months when you, or someone else, returns to it. Rather than seeing all the validation code amongst the controller flow, you could simply have:
Code:
if (! ($val_result = validate_my_first_input())) {
//take error action, based on values in $val_result
}
Plus, when you make functionality modular, you facilitate refactoring and unit tests - two things that promote long-term code health.