diff --git a/tbl_copy.php3 b/tbl_copy.php3 index 360c58095..2924ba7b7 100755 --- a/tbl_copy.php3 +++ b/tbl_copy.php3 @@ -52,6 +52,11 @@ if (isset($new_name) && trim($new_name) != '') { } $new_name = stripslashes($new_name); } + if (MYSQL_INT_VERSION < 32306) { + check_reserved_words($db); + check_reserved_words($table); + } + $source = backquote($db) . '.' . backquote($table); $target = backquote($target_db) . '.' . backquote($new_name); diff --git a/tbl_rename.php3 b/tbl_rename.php3 index 78ca1b36e..9c8406483 100755 --- a/tbl_rename.php3 +++ b/tbl_rename.php3 @@ -13,8 +13,15 @@ require('./lib.inc.php3'); * A new name has been submitted -> do the work */ if (isset($new_name) && trim($new_name) != '') { - $old_name = $table; - $table = $new_name; + $old_name = $table; + $table = $new_name; + if (get_magic_quotes_gpc()) { + $new_name = stripslashes($new_name); + } + if (MYSQL_INT_VERSION < 32306) { + check_reserved_words($new_name); + } + include('./header.inc.php3'); mysql_select_db($db); $local_query = 'ALTER TABLE ' . backquote($old_name) . ' RENAME ' . backquote($new_name);