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;