error if dot in the new table name
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-11-24 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* 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 <nijel@users.sourceforge.net>
|
||||
* libraries/common.lib.php: Use preg again, it just needs a bit more
|
||||
escaping of \ (once for PHP and once for PCRE).
|
||||
|
@@ -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');
|
||||
if (strpos($new_name,'.') === FALSE) {
|
||||
PMA_mysqlDie($strTableEmpty, '', '', $err_url);
|
||||
} else {
|
||||
PMA_mysqlDie($strError . ': ' . $new_name, '', '', $err_url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user