Hello,
I'm using admin routing for a personal site that I'm building:
mrjoelkemp.com. Admin routing was working on the appropriate modules
(namely software and writing), however, oddly, it seems that over the
past week the routing has been failing on the writing module, but not
the software module. I'm sure that, in general, the code is similar
between both modules (with the module name discrepancy):
if($session->read('User.admin') == 1)
echo $html->link('New Article', '/admin/articles/add');
Here's the admin_add controller function for the writing (article)
module:
function admin_add()
{
$this->checkAuthentication();
if (!empty($this->data['Article']))
{
if($this->Article->save($this->data['Article']))
{
$this->redirect('/articles/');
}
}
}
And here's that checkAuthentication() function:
function checkAuthentication()
{
if (!$this->Session->check('User'))
{
// Save intended URL in format '/controller/action/param'
$this->Session->write('intended_url', substr($this->here,
strlen($this->base)));
$this->redirect('/users/login');
}
}//end checkAuthentication()
If this is unrelated to code, and perhaps, has something to do with
session logs or tmp cache files, please let me know. I've cleared them
all, to no avail.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---