From 3b8b34114b341a8333b1a02d4cce9e2fd986fd21 Mon Sep 17 00:00:00 2001 From: nate Date: Fri, 3 Nov 2006 05:45:11 +0000 Subject: [PATCH] Adding path fixes for DataSource loading git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3809 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/connection_manager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/model/connection_manager.php b/cake/libs/model/connection_manager.php index 70a47e487..58399d918 100644 --- a/cake/libs/model/connection_manager.php +++ b/cake/libs/model/connection_manager.php @@ -154,10 +154,10 @@ class ConnectionManager extends Object { return false; } - if (fileExistsInPath(LIBS . 'model' . DS . 'datasources' . DS . $conn['filename'] . '.php')) { - require (LIBS . 'model' . DS . 'datasources' . DS . $conn['filename'] . '.php'); - } else if(file_exists(MODELS . 'datasources' . DS . $conn['filename'] . '.php')) { + if(file_exists(MODELS . 'datasources' . DS . $conn['filename'] . '.php')) { require (MODELS . 'datasources' . DS . $conn['filename'] . '.php'); + } else if (fileExistsInPath(LIBS . 'model' . DS . 'datasources' . DS . $conn['filename'] . '.php')) { + require (LIBS . 'model' . DS . 'datasources' . DS . $conn['filename'] . '.php'); } else { trigger_error('Unable to load DataSource file ' . $conn['filename'] . '.php', E_USER_ERROR); return null;