Check if function A2 couldn't be in the model.
You can always prepend your function names with _ to make them
private. function _A2() { } for example.
On 11 fev, 11:22, AD7six <[email protected]> wrote:
> On Feb 11, 1:39 pm, Bogdan Ursu <[email protected]> wrote:
>
> > Hey guys,
>
> > I have this setup: Controller C has two actions A1 and A2. In the view
> > of A1, in a loop I am doing requestAction(A2). My problem is that A2
> > can also be requested directly, by writing in the address bar of the
> > browser: C/A2.
> > Is there anyway of preventing the execution of A2 directly?
>
> > PS: Don't argue with the current code structure, because I am not
> > willing to change it. I just want to disable direct access to A2, if
> > possible; so that it will only be accessible from A1's view via the
> > requestAction.
>
> Is that because you already realize it's a silly design? Leaving aside
> the usual logic/objections regarding requestAction, using it to get to
> a function on the *same controller*?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---