mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updated VERSION file
Merging: Revision: [1644] Bad merge last commit had second param in the class_exists() call Revision: [1643] Fixed errors introduced in last changes: Variable that was passed the loadController function was not expected controller class name, It was the name fo the class without Controller. This would cause the loading to fail, since it was possible that a class was already loaded with the name that was passed. Example NewsController and a model called News. Revision: [1642] Added patch for MySql 5 Revision: [1641] removing second parameter in the class_exists function calls. closes Ticket #209 git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1645 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
436f196f7f
commit
f0fe2102ec
14 changed files with 31 additions and 24 deletions
|
@ -6,4 +6,4 @@
|
|||
// +---------------------------------------------------------------------------------------------------+ //
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
0.10.4.1640_beta
|
||||
0.10.4.1645_beta
|
|
@ -61,7 +61,7 @@ if (!function_exists("ob_get_clean"))
|
|||
*/
|
||||
function loadModels ()
|
||||
{
|
||||
if(!class_exists('AppModel', FALSE))
|
||||
if(!class_exists('AppModel'))
|
||||
{
|
||||
if(file_exists(APP.'app_model.php'))
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ function loadModels ()
|
|||
*/
|
||||
function loadControllers ()
|
||||
{
|
||||
if(!class_exists('AppController', FALSE))
|
||||
if(!class_exists('AppController'))
|
||||
{
|
||||
if(file_exists(APP.'app_controller.php'))
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ function loadControllers ()
|
|||
}
|
||||
foreach (listClasses(CONTROLLERS) as $controller)
|
||||
{
|
||||
if(!class_exists($controller, FALSE))
|
||||
if(!class_exists($controller))
|
||||
{
|
||||
require_once (CONTROLLERS.$controller.'.php');
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ function loadControllers ()
|
|||
*/
|
||||
function loadController ($name)
|
||||
{
|
||||
if(!class_exists('AppController', FALSE))
|
||||
if(!class_exists('AppController'))
|
||||
{
|
||||
if(file_exists(APP.'app_controller.php'))
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ function loadController ($name)
|
|||
require_once(CAKE.'app_controller.php');
|
||||
}
|
||||
}
|
||||
if(!class_exists($name, FALSE))
|
||||
if(!class_exists($name.'Controller'))
|
||||
{
|
||||
$name = Inflector::underscore($name);
|
||||
if(file_exists(CONTROLLERS.$name.'_controller.php'))
|
||||
|
|
|
@ -122,16 +122,19 @@ class Dispatcher extends Object
|
|||
$ctrlName = Inflector::camelize($params['controller']);
|
||||
$ctrlClass = $ctrlName.'Controller';
|
||||
|
||||
if (!loadController($params['controller']) || !class_exists($ctrlClass, FALSE))
|
||||
if(!class_exists($ctrlClass))
|
||||
{
|
||||
if(preg_match('/([\\.]+)/',$ctrlName))
|
||||
if (!loadController($ctrlName))
|
||||
{
|
||||
$this->error404(strtolower($ctrlName),'Was not found on this server');
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$missingController = true;
|
||||
if(preg_match('/([\\.]+)/',$ctrlName))
|
||||
{
|
||||
$this->error404(strtolower($ctrlName),'Was not found on this server');
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$missingController = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* Included libraries.
|
||||
*
|
||||
*/
|
||||
if(!class_exists('Model', FALSE))
|
||||
if(!class_exists('Model'))
|
||||
{
|
||||
uses(DS.'model'.DS.'model');
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ class Component extends Object
|
|||
{
|
||||
require_once $componentFn;
|
||||
|
||||
if(class_exists($componentCn, FALSE)===true)
|
||||
if(class_exists($componentCn)===true)
|
||||
{
|
||||
if($componentCn == 'SessionComponent')
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* Included libraries.
|
||||
*
|
||||
*/
|
||||
if(!class_exists('Object', FALSE))
|
||||
if(!class_exists('Object'))
|
||||
{
|
||||
uses('object');
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* Included libraries.
|
||||
*
|
||||
*/
|
||||
if(!class_exists('Object', FALSE))
|
||||
if(!class_exists('Object'))
|
||||
{
|
||||
uses('object');
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* Included libraries.
|
||||
*
|
||||
*/
|
||||
if(!class_exists('Object', FALSE))
|
||||
if(!class_exists('Object'))
|
||||
{
|
||||
uses('object');
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* Included libraries.
|
||||
*
|
||||
*/
|
||||
if(!class_exists('Object', FALSE))
|
||||
if(!class_exists('Object'))
|
||||
{
|
||||
uses('object');
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* Included libraries.
|
||||
*
|
||||
*/
|
||||
if(!class_exists('File', FALSE))
|
||||
if(!class_exists('File'))
|
||||
{
|
||||
uses('file');
|
||||
}
|
||||
|
|
|
@ -795,6 +795,10 @@ class Model extends Object
|
|||
{
|
||||
if ($this->hasField($x))
|
||||
{
|
||||
if($x == $this->primaryKey && $y === '')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$fields[] = $x;
|
||||
$values[] = (ini_get('magic_quotes_gpc') == 1) ?
|
||||
$this->db->prepare(stripslashes($y)) : $this->db->prepare($y);
|
||||
|
|
|
@ -116,7 +116,7 @@ class Object
|
|||
*/
|
||||
function log ($msg, $type=LOG_ERROR)
|
||||
{
|
||||
if(!class_exists('Log', FALSE))
|
||||
if(!class_exists('Log'))
|
||||
{
|
||||
uses('log');
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* Included libraries.
|
||||
*
|
||||
*/
|
||||
if(!class_exists('Object', FALSE))
|
||||
if(!class_exists('Object'))
|
||||
{
|
||||
uses('object');
|
||||
}
|
||||
|
|
|
@ -613,7 +613,7 @@ class View extends Object
|
|||
$replace = strtolower(substr($helper, 0, 1));
|
||||
$camelBackedHelper = preg_replace('/\\w/', $replace, $helper, 1);
|
||||
|
||||
if(class_exists($helperCn, FALSE))
|
||||
if(class_exists($helperCn))
|
||||
{
|
||||
${$camelBackedHelper} =& new $helperCn;
|
||||
${$camelBackedHelper}->base = $this->base;
|
||||
|
|
Loading…
Reference in a new issue