fullTableName needs to check for empty schemaName

This commit is contained in:
Rachman Chavik 2011-12-29 19:18:37 +07:00
parent b1aae5b5ab
commit 1d333fd8b7
2 changed files with 3 additions and 3 deletions

View file

@ -413,7 +413,7 @@ class DataSource extends Object {
* @access public * @access public
*/ */
public function getSchemaName() { public function getSchemaName() {
return false; return null;
} }
/** /**

View file

@ -930,14 +930,14 @@ class DboSource extends DataSource {
} }
if ($quote) { if ($quote) {
if ($schema && isset($schemaName)) { if ($schema && !empty($schemaName)) {
if (false == strstr($table, '.')) { if (false == strstr($table, '.')) {
return $this->name($schemaName) . '.' . $this->name($table); return $this->name($schemaName) . '.' . $this->name($table);
} }
} }
return $this->name($table); return $this->name($table);
} }
if ($schema && isset($schemaName)) { if ($schema && !empty($schemaName)) {
if (false == strstr($table, '.')) { if (false == strstr($table, '.')) {
return $schemaName . '.' . $table; return $schemaName . '.' . $table;
} }