Coding standards fixes

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8260 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
DarkAngelBGE 2009-07-28 20:01:42 +00:00
parent 47cd941b53
commit f88cc56cfe
32 changed files with 106 additions and 111 deletions

View file

@ -105,9 +105,8 @@ class DboMysqli extends DboMysqlBase {
function _execute($sql) {
if (preg_match('/^\s*call/i', $sql)) {
return $this->_executeProcedure($sql);
} else {
return mysqli_query($this->connection, $sql);
}
return mysqli_query($this->connection, $sql);
}
/**
* Executes given SQL statement (procedure call).
@ -140,7 +139,8 @@ class DboMysqli extends DboMysqlBase {
if (!$result) {
return array();
} else {
}
$tables = array();
while ($line = mysqli_fetch_array($result)) {
@ -149,7 +149,6 @@ class DboMysqli extends DboMysqlBase {
parent::listSources($tables);
return $tables;
}
}
/**
* Returns an array of the fields in given table name.
*
@ -201,14 +200,15 @@ class DboMysqli extends DboMysqlBase {
if ($parent != null) {
return $parent;
}
if ($data === null) {
if ($data === null || (is_array($data) && empty($data))) {
return 'NULL';
}
if ($data === '' && $column !== 'integer' && $column !== 'float' && $column !== 'boolean') {
return "''";
}
if (empty($column)) {
$column = $this->introspectType($data);
}
switch ($column) {
case 'boolean':
@ -217,9 +217,6 @@ class DboMysqli extends DboMysqlBase {
case 'integer' :
case 'float' :
case null :
if ($data === '') {
return 'NULL';
}
if ((is_int($data) || is_float($data) || $data === '0') || (
is_numeric($data) && strpos($data, ',') === false &&
$data[0] != '0' && strpos($data, 'e') === false)) {
@ -278,7 +275,6 @@ class DboMysqli extends DboMysqlBase {
if ($id !== false && !empty($id) && !empty($id[0]) && isset($id[0]['insertID'])) {
return $id[0]['insertID'];
}
return null;
}
/**
@ -389,9 +385,8 @@ class DboMysqli extends DboMysqlBase {
$i++;
}
return $resultRow;
} else {
return false;
}
return false;
}
/**
* Gets the database encoding