Fixed indentation

This commit is contained in:
ADmad 2012-02-28 02:04:43 +05:30
parent 0568746bfd
commit 12364cac8c

View file

@ -608,30 +608,30 @@ class Mysql extends DboSource {
public function listDetailedSources($name = null) { public function listDetailedSources($name = null) {
$condition = ''; $condition = '';
if (is_string($name)) { if (is_string($name)) {
$condition = ' WHERE name = ' . $this->value($name); $condition = ' WHERE name = ' . $this->value($name);
} }
$result = $this->_connection->query('SHOW TABLE STATUS ' . $condition, PDO::FETCH_ASSOC); $result = $this->_connection->query('SHOW TABLE STATUS ' . $condition, PDO::FETCH_ASSOC);
if (!$result) { if (!$result) {
$result->closeCursor(); $result->closeCursor();
return array(); return array();
} else { } else {
$tables = array(); $tables = array();
foreach ($result as $row) { foreach ($result as $row) {
$tables[$row['Name']] = (array) $row; $tables[$row['Name']] = (array) $row;
unset($tables[$row['Name']]['queryString']); unset($tables[$row['Name']]['queryString']);
if (!empty($row['Collation'])) { if (!empty($row['Collation'])) {
$charset = $this->getCharsetName($row['Collation']); $charset = $this->getCharsetName($row['Collation']);
if ($charset) { if ($charset) {
$tables[$row['Name']]['charset'] = $charset; $tables[$row['Name']]['charset'] = $charset;
} }
}
} }
$result->closeCursor(); }
if (is_string($name) && isset($tables[$name])) { $result->closeCursor();
return $tables[$name]; if (is_string($name) && isset($tables[$name])) {
} return $tables[$name];
return $tables; }
return $tables;
} }
} }