adding check for dispatcher class in requestAction

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5116 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-05-18 15:02:34 +00:00
parent 5077bfc93e
commit c35c14ff39

View file

@ -83,6 +83,9 @@ class Object {
*/
function requestAction($url, $extra = array()) {
if (!empty($url)) {
if(!class_exists('dispatcher')) {
require CAKE . 'dispatcher.php';
}
$dispatcher =& new Dispatcher();
if(isset($this->plugin)){
$extra['plugin'] = $this->plugin;
@ -136,7 +139,7 @@ class Object {
* Allows setting of multiple properties of the object in a single line of code.
*
* @access public
* @param array $properties An associative array containing AuthComponent
* @param array $properties An associative array containing
* properties and corresponding values.
* @return void
*/