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
This commit is contained in:
nate 2006-11-03 05:45:11 +00:00
parent e17610842c
commit 3b8b34114b

View file

@ -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;