<?php
class IndexController extends Zend_Controller_Action
{
public function preDispatch()
{
$routeName = $this->_request->getRouteName();
$actionName = $this->_request->getActionName();
if ($actionName == 'menu' && $routename == 'default') {
// handle appropriately
}
}
}
-Hector
Giorgio Sironi wrote:
2008/8/8 Greg Freeman <greg@imagize.com.au>:How do you prevent an action from being called directly? I have an action that is used to render a menu response segment for the layout. I don't want people to be able to call it directly via a URL.Where is the problem, if you don't publish a link, people cannot guess the action name.. And even if they guess they only see a broken page, no security exploits.
没有评论:
发表评论