mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-12 06:56:24 +00:00
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:
parent
d284f74b10
commit
36ccefa51f
3 changed files with 19 additions and 3 deletions
|
@ -6,4 +6,4 @@
|
||||||
// +---------------------------------------------------------------------------------------------------+ //
|
// +---------------------------------------------------------------------------------------------------+ //
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
0.10.8.1908 RC 4
|
0.10.8.1911 RC 4
|
|
@ -252,6 +252,21 @@ function loadController ($name)
|
||||||
*/
|
*/
|
||||||
function loadPluginController ($plugin, $controller)
|
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'))
|
if(!class_exists($controller.'Controller'))
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Dispatcher extends Object
|
||||||
$missingAction = false;
|
$missingAction = false;
|
||||||
$missingView = false;
|
$missingView = false;
|
||||||
$privateAction = false;
|
$privateAction = false;
|
||||||
|
$this->base = $this->baseUrl();
|
||||||
if (empty($params['controller']))
|
if (empty($params['controller']))
|
||||||
{
|
{
|
||||||
$missingController = true;
|
$missingController = true;
|
||||||
|
@ -128,6 +128,7 @@ class Dispatcher extends Object
|
||||||
$params = $this->_restructureParams($params);
|
$params = $this->_restructureParams($params);
|
||||||
$this->plugin = Inflector::underscore($ctrlName).DS;
|
$this->plugin = Inflector::underscore($ctrlName).DS;
|
||||||
loadPluginModels($this->plugin);
|
loadPluginModels($this->plugin);
|
||||||
|
$this->base = $this->base.'/'.Inflector::underscore($ctrlName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +151,7 @@ class Dispatcher extends Object
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->base = $this->baseUrl();
|
|
||||||
|
|
||||||
if ($missingController)
|
if ($missingController)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue