import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -134,8 +134,8 @@ class Zend_Controller_Dispatcher_Standard extends Zend_Controller_Dispatcher_Abs
|
||||
|
||||
/**
|
||||
* Remove a controller directory by module name
|
||||
*
|
||||
* @param string $module
|
||||
*
|
||||
* @param string $module
|
||||
* @return bool
|
||||
*/
|
||||
public function removeControllerDirectory($module)
|
||||
@ -259,9 +259,12 @@ class Zend_Controller_Dispatcher_Standard extends Zend_Controller_Dispatcher_Abs
|
||||
* arguments; throw exception if it's not an action controller
|
||||
*/
|
||||
$controller = new $className($request, $this->getResponse(), $this->getParams());
|
||||
if (!$controller instanceof Zend_Controller_Action) {
|
||||
if (!($controller instanceof Zend_Controller_Action_Interface) &&
|
||||
!($controller instanceof Zend_Controller_Action)) {
|
||||
require_once 'Zend/Controller/Dispatcher/Exception.php';
|
||||
throw new Zend_Controller_Dispatcher_Exception("Controller '$className' is not an instance of Zend_Controller_Action");
|
||||
throw new Zend_Controller_Dispatcher_Exception(
|
||||
'Controller "' . $className . '" is not an instance of Zend_Controller_Action_Interface'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -319,8 +322,8 @@ class Zend_Controller_Dispatcher_Standard extends Zend_Controller_Dispatcher_Abs
|
||||
public function loadClass($className)
|
||||
{
|
||||
$finalClass = $className;
|
||||
if (($this->_defaultModule != $this->_curModule)
|
||||
|| $this->getParam('prefixDefaultModule'))
|
||||
if (($this->_defaultModule != $this->_curModule)
|
||||
|| $this->getParam('prefixDefaultModule'))
|
||||
{
|
||||
$finalClass = $this->formatClassName($this->_curModule, $className);
|
||||
}
|
||||
|
Reference in New Issue
Block a user