upgrade.php:

- _pgsql_field_exists(), _mysql_field_exists():
  Those functions are always called with the expanded table name - don't
  expand it twice. (The better solution would be to change all calling
  code to provide non-expanded tablenames, but that's more work.)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1391 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 13 years ago
parent a211a95c39
commit 47bc9bb2ad

@ -25,7 +25,7 @@ function _pgsql_object_exists($name) {
}
function _pgsql_field_exists($table, $field) {
$table = table_by_key($table);
# $table = table_by_key($table); # _pgsql_field_exists is always called with the expanded table name - don't expand it twice
$sql = '
SELECT
a.attname,
@ -52,7 +52,7 @@ function _pgsql_field_exists($table, $field) {
}
function _mysql_field_exists($table, $field) {
$table = table_by_key($table);
# $table = table_by_key($table); # _mysql_field_exists is always called with the expanded table name - don't expand it twice
$sql = "SHOW COLUMNS FROM $table LIKE '$field'";
$r = db_query($sql);
$row = db_row($r['result']);

Loading…
Cancel
Save