diff --git a/ChangeLog b/ChangeLog index 041cc059e..a3a73b032 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-11-24 Marc Delisle + * tbl_rename.php: give an error if the new table name has a dot + in its name, to avoid doing our automatic relation-table renames + 2003-11-24 Michal Cihar * libraries/common.lib.php: Use preg again, it just needs a bit more escaping of \ (once for PHP and once for PCRE). diff --git a/tbl_rename.php b/tbl_rename.php index e69a034a5..ce84724e6 100644 --- a/tbl_rename.php +++ b/tbl_rename.php @@ -21,7 +21,7 @@ $err_url = 'tbl_properties.php?' . PMA_generate_common_url($db, $table); /** * A new name has been submitted -> do the work */ -if (isset($new_name) && trim($new_name) != '') { +if (isset($new_name) && trim($new_name) != '' && strpos($new_name,'.') === FALSE) { $old_name = $table; $table = $new_name; @@ -95,7 +95,11 @@ if (isset($new_name) && trim($new_name) != '') { */ else { include('./header.inc.php'); - PMA_mysqlDie($strTableEmpty, '', '', $err_url); + if (strpos($new_name,'.') === FALSE) { + PMA_mysqlDie($strTableEmpty, '', '', $err_url); + } else { + PMA_mysqlDie($strError . ': ' . $new_name, '', '', $err_url); + } } @@ -103,4 +107,4 @@ else { * Back to the calling script */ require('./tbl_properties_operations.php'); -?> \ No newline at end of file +?>