diff --git a/mysql/mysql-lib.pl b/mysql/mysql-lib.pl
index 24511ebba..a432d10ed 100644
--- a/mysql/mysql-lib.pl
+++ b/mysql/mysql-lib.pl
@@ -449,6 +449,11 @@ else {
return $rv;
}
+sub quote_table
+{
+return "estr($_[0]);
+}
+
# quotestr(string)
sub quotestr
{
diff --git a/mysql/view_table.cgi b/mysql/view_table.cgi
index 2afc46418..ff345cba4 100755
--- a/mysql/view_table.cgi
+++ b/mysql/view_table.cgi
@@ -28,7 +28,7 @@ if (!$keyed && $module_name eq "postgresql") {
# Can use oid as key
eval { $main::error_must_die = 1;
$d = &execute_sql($in{'db'}, "select oid from ".
- "estr($in{'table'}).
+ "e_table($in{'table'}).
" where 0 = 1"); };
if (!$@) {
# Has an OID, so use it
@@ -44,7 +44,7 @@ $limitsql = &get_search_limit(\%in);
# Work out where clause for rows we are operating on
$where_select = "select ".($use_oids ? "oid" : "*").
- " from "."estr($in{'table'})." $search $sortsql $limitsql";
+ " from "."e_table($in{'table'})." $search $sortsql $limitsql";
if ($in{'delete'}) {
# Deleting selected rows
@@ -75,7 +75,7 @@ if ($in{'delete'}) {
}
}
&execute_sql_logged($in{'db'},
- "delete from "."estr($in{'table'}).
+ "delete from "."e_table($in{'table'}).
" where ".join(" and ", @where));
$count++;
}
@@ -123,7 +123,7 @@ elsif ($in{'save'}) {
push(@params, $ij eq '' ? undef : $ij);
}
&execute_sql_logged($in{'db'},
- "update "."estr($in{'table'})." set ".
+ "update "."e_table($in{'table'})." set ".
join(" , ", @set)." where ".
join(" and ", @where), @params);
$count++;
@@ -141,7 +141,7 @@ elsif ($in{'savenew'}) {
}
push(@set, $in{$j} eq '' ? undef : $in{$j});
}
- &execute_sql_logged($in{'db'}, "insert into "."estr($in{'table'}).
+ &execute_sql_logged($in{'db'}, "insert into "."e_table($in{'table'}).
" values (".join(" , ", map { "?" } @set).")", @set);
&redirect("view_table.cgi?db=$in{'db'}&".
"table=".&urlize($in{'table'})."&start=$in{'start'}".
@@ -156,7 +156,7 @@ $desc = &text('table_header', "$in{'table'}", "$in{'db'}");
&ui_print_header($desc, $text{'view_title'}, "");
$d = &execute_sql_safe($in{'db'},
- "select count(*) from "."estr($in{'table'})." ".$search);
+ "select count(*) from "."e_table($in{'table'})." ".$search);
$total = int($d->{'data'}->[0]->[0]);
if ($in{'jump'} > 0) {
$in{'start'} = int($in{'jump'} / $config{'perpage'}) *
@@ -238,7 +238,7 @@ $check = !defined($in{'row'}) && !$in{'new'} && $keyed;
if ($total || $in{'new'}) {
# Get the rows of data, and show the table header
$d = &execute_sql_safe($in{'db'},
- "select * from "."estr($in{'table'})." $search $sortsql $limitsql");
+ "select * from "."e_table($in{'table'})." $search $sortsql $limitsql");
@data = @{$d->{'data'}};
@tds = $check ? ( "width=5" ) : ( );
($has_blob) = grep { &is_blob($_) } @str;