Permalink
Browse files

Utilize single parameter implode

  • Loading branch information...
1 parent 5050de5 commit 7f3ccd3b51a243afa8946fe729bac694e6c832c9 @vrana committed May 7, 2010
Showing with 5 additions and 5 deletions.
  1. +1 −1 adminer/drivers/mysql.inc.php
  2. +1 −1 adminer/drivers/pgsql.inc.php
  3. +2 −2 adminer/drivers/sqlite.inc.php
  4. +1 −1 compile.php
@@ -586,7 +586,7 @@ function alter_table($table, $name, $fields, $foreign, $comment, $engine, $colla
$alter = array();
foreach ($fields as $field) {
$alter[] = ($field[1]
- ? ($table != "" ? ($field[0] != "" ? "CHANGE " . idf_escape($field[0]) : "ADD") : " ") . " " . implode("", $field[1]) . ($table != "" ? " $field[2]" : "")
+ ? ($table != "" ? ($field[0] != "" ? "CHANGE " . idf_escape($field[0]) : "ADD") : " ") . " " . implode($field[1]) . ($table != "" ? " $field[2]" : "")
: "DROP " . idf_escape($field[0])
);
}
@@ -348,7 +348,7 @@ function alter_table($table, $name, $fields, $foreign, $comment, $engine, $colla
$val[1] = ($val[1] == "bigint" ? " big" : " ") . "serial";
}
if ($field[0] == "") {
- $alter[] = ($table != "" ? "ADD " : " ") . implode("", $val);
+ $alter[] = ($table != "" ? "ADD " : " ") . implode($val);
} else {
if ($column != $val[0]) {
$queries[] = "ALTER TABLE " . idf_escape($table) . " RENAME $column TO $val[0]";
@@ -394,7 +394,7 @@ function alter_table($table, $name, $fields, $foreign, $comment, $engine, $colla
$alter = array();
foreach ($fields as $field) {
if ($field[1]) {
- $alter[] = ($table != "" && $field[0] == "" ? "ADD " : " ") . implode("", $field[1]);
+ $alter[] = ($table != "" && $field[0] == "" ? "ADD " : " ") . implode($field[1]);
}
}
$alter = array_merge($alter, $foreign);
@@ -524,7 +524,7 @@ function use_sql($database) {
function trigger_sql($table, $style) {
global $connection;
- return implode("", get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND name = " . $connection->quote($table)));
+ return implode(get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND name = " . $connection->quote($table)));
}
function show_variables() {
View
@@ -106,7 +106,7 @@ function php_shrink($input) {
arsort($short_variables);
foreach (array_keys($short_variables) as $number => $key) {
- $short_variables[$key] = short_identifier($number, implode("", range('a', 'z')) . '_' . implode("", range('A', 'Z'))); // could use also numbers and \x7f-\xff
+ $short_variables[$key] = short_identifier($number, implode(range('a', 'z')) . '_' . implode(range('A', 'Z'))); // could use also numbers and \x7f-\xff
}
$set = array_flip(preg_split('//', '!"#$&\'()*+,-./:;<=>?@[\]^`{|}'));

0 comments on commit 7f3ccd3

Please sign in to comment.