Mon Aug 7 02:50:02 PHT 2006 Nimrod A. Abing * Fix two bugs in custom dispatcher handling. - Fix redefinition of CUSTOM_DISPATCHER_ERROR constant in multiple invocations of getDispatcherClass(). - Fix error message being generated even if we have loaded the custom dispatcher. diff -rN -u old-cake/cake/basics.php new-cake/cake/basics.php --- old-cake/cake/basics.php 2006-08-07 03:24:30.000000000 +0800 +++ new-cake/cake/basics.php 2006-08-07 03:24:31.000000000 +0800 @@ -195,10 +195,14 @@ if (defined('CUSTOM_DISPATCHER') && false !== CUSTOM_DISPATCHER) { if (loadDispatcher(CUSTOM_DISPATCHER)) { $dispatcherClass = CUSTOM_DISPATCHER; - define('CUSTOM_DISPACHER_ERROR', false); + if (!defined('CUSTOM_DISPATCHER_ERROR')) { + define('CUSTOM_DISPATCHER_ERROR', false); + } } else { - define('CUSTOM_DISPATCHER_ERROR', true); + if (!defined('CUSTOM_DISPATCHER_ERROR')) { + define('CUSTOM_DISPATCHER_ERROR', true); + } } } return $dispatcherClass; diff -rN -u old-cake/cake/dispatcher.php new-cake/cake/dispatcher.php --- old-cake/cake/dispatcher.php 2006-08-07 03:24:30.000000000 +0800 +++ new-cake/cake/dispatcher.php 2006-08-07 03:24:31.000000000 +0800 @@ -235,7 +235,7 @@ 'base' => $this->base))); } - if (defined('CUSTOM_DISPATCHER_ERROR')) { + if (defined('CUSTOM_DISPATCHER_ERROR') && CUSTOM_DISPATCHER_ERROR === true) { return $this->cakeError('missingDispatcher', array( array('className' => CUSTOM_DISPATCHER, 'dispatcher' => CUSTOM_DISPATCHER,