Permalink
Browse files

fullTableName needs to check for empty schemaName

  • Loading branch information...
1 parent b1aae5b commit 1d333fd8b7c80f7a342cb15244b653f812df9b9b @rchavik rchavik committed Dec 29, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/Cake/Model/Datasource/DataSource.php
  2. +2 −2 lib/Cake/Model/Datasource/DboSource.php
View
2 lib/Cake/Model/Datasource/DataSource.php
@@ -413,7 +413,7 @@ public function resolveKey(Model $model, $key) {
* @access public
*/
public function getSchemaName() {
- return false;
+ return null;
}
/**
View
4 lib/Cake/Model/Datasource/DboSource.php
@@ -930,14 +930,14 @@ public function fullTableName($model, $quote = true, $schema = true) {
}
if ($quote) {
- if ($schema && isset($schemaName)) {
+ if ($schema && !empty($schemaName)) {
if (false == strstr($table, '.')) {
return $this->name($schemaName) . '.' . $this->name($table);
}
}
return $this->name($table);
}
- if ($schema && isset($schemaName)) {
+ if ($schema && !empty($schemaName)) {
if (false == strstr($table, '.')) {
return $schemaName . '.' . $table;
}

0 comments on commit 1d333fd

Please sign in to comment.