Merging fixes and enhancements into trunk

Revision: [1910]
Adding fix to correct paths when using plugins

Revision: [1909]
Adding a fix to load plugin AppController if AppController is not present in memory already

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1911 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-02-03 02:37:59 +00:00
parent d284f74b10
commit 36ccefa51f
3 changed files with 19 additions and 3 deletions

View file

@ -6,4 +6,4 @@
// +---------------------------------------------------------------------------------------------------+ //
///////////////////////////////////////////////////////////////////////////////////////////////////////////
0.10.8.1908 RC 4
0.10.8.1911 RC 4

View file

@ -252,6 +252,21 @@ function loadController ($name)
*/
function loadPluginController ($plugin, $controller)
{
if(!class_exists('AppController'))
{
if(file_exists(APP.'plugins'.DS.$plugin.DS.'app_controller.php'))
{
require_once(APP.'plugins'.DS.$plugin.DS.'app_controller.php');
}
elseif(file_exists(APP.'app_controller.php'))
{
require_once(APP.'app_controller.php');
}
else
{
require_once(CAKE.'app_controller.php');
}
}
if(!class_exists($controller.'Controller'))
{

View file

@ -91,7 +91,7 @@ class Dispatcher extends Object
$missingAction = false;
$missingView = false;
$privateAction = false;
$this->base = $this->baseUrl();
if (empty($params['controller']))
{
$missingController = true;
@ -128,6 +128,7 @@ class Dispatcher extends Object
$params = $this->_restructureParams($params);
$this->plugin = Inflector::underscore($ctrlName).DS;
loadPluginModels($this->plugin);
$this->base = $this->base.'/'.Inflector::underscore($ctrlName);
}
}
}
@ -150,7 +151,7 @@ class Dispatcher extends Object
}
}
$this->base = $this->baseUrl();
if ($missingController)
{