On Fri, Feb 20, 2009 at 3:22 PM, ramonmaruko <[email protected]> wrote:
>
> I know that this is more of a PHP OOP question, but is this possible:
> http://bin.cakephp.org/view/73084103 ?
A word of caution: it's not safe to allow the user to insert code
in an uncontrolled way. In a safer version you must limit the
user parameter:
$model = Inflector::classify($this->params['controller'])
switch($model):
case 'ShortTermLoan':
case 'LongTermLoan':
case 'EmergencyLoan':
$this->$model->Member->find('all', array(
// ...
default:
$this->redirect('/index');
endswitch;
or something like that.
Best regards.
--
MARCELO DE F. ANDRADE (aka "eleKtron")
Belem, PA, Amazonia, Brazil
Linux User #221105
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---