Skip to content
Permalink
Browse files

Fixed indentation

  • Loading branch information...
ADmad committed Feb 27, 2012
1 parent 0568746 commit 12364cac8c5b66c0a39a3991da521b9120dd7b8e
Showing with 18 additions and 18 deletions.
  1. +18 −18 lib/Cake/Model/Datasource/Database/Mysql.php
@@ -608,30 +608,30 @@ protected function _alterIndexes($table, $indexes) {
public function listDetailedSources($name = null) {
$condition = '';
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);
if (!$result) {
$result->closeCursor();
return array();
$result->closeCursor();
return array();
} else {
$tables = array();
foreach ($result as $row) {
$tables[$row['Name']] = (array) $row;
unset($tables[$row['Name']]['queryString']);
if (!empty($row['Collation'])) {
$charset = $this->getCharsetName($row['Collation']);
if ($charset) {
$tables[$row['Name']]['charset'] = $charset;
}
}
}
$result->closeCursor();
if (is_string($name) && isset($tables[$name])) {
return $tables[$name];
$tables = array();
foreach ($result as $row) {
$tables[$row['Name']] = (array) $row;
unset($tables[$row['Name']]['queryString']);
if (!empty($row['Collation'])) {
$charset = $this->getCharsetName($row['Collation']);
if ($charset) {
$tables[$row['Name']]['charset'] = $charset;
}
}
return $tables;
}
$result->closeCursor();
if (is_string($name) && isset($tables[$name])) {
return $tables[$name];
}
return $tables;
}
}

0 comments on commit 12364ca

Please sign in to comment.
You can’t perform that action at this time.