Sorry, I'm such a noob and I'm swimming through batter.
I'm getting a weird action... After my expected action runs, I get a
second action of 'images' for some weird reason (I have no idea). My
process is really simple (no components, vendors, elements, etc).
Basically, I have this in a controller:
function beforeFilter()
{
$actionCheck;
if (!$this->Session->check('Username'))
{
$this->Session->write('Username', 'Anon');
}
switch($this->action)
{
case 'view':
case 'vote':
$actionCheck= null;
break;
default:
$actionCheck= 'update';
break;
}
if (!empty($action))
{
$this->access = @$this->Acl->check($this->Session-
>read('Username'), $this->name, $actionCheck);
}
else
{
$this->access = true;
}
if (!$this->access)
{
if ('Anon' != $this->Session->read('Username'))
{
$this->redirect('/login/denied');
}
else {
$this->Session->write('next_page','/'.$this->name.'/'.
$this->action);
$this->redirect('/login');
}
die();
}
}
The first time through $this->action is 'view' or some other expected
action. Then (after my action completes) it will run again with the
action of 'images'. In other words, if I set a breakpoint on the
switch in this controller it will hit that breakpoint twice, the first
with the expected action and the second with action set to 'images.'
Any ideas? Is this the expected operation of Cake?
Thanks,
Shawn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---