error if dot in the new table name
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2003-11-24 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
* libraries/common.lib.php: Use preg again, it just needs a bit more
|
* libraries/common.lib.php: Use preg again, it just needs a bit more
|
||||||
escaping of \ (once for PHP and once for PCRE).
|
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
|
* 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;
|
$old_name = $table;
|
||||||
$table = $new_name;
|
$table = $new_name;
|
||||||
|
|
||||||
@@ -95,7 +95,11 @@ if (isset($new_name) && trim($new_name) != '') {
|
|||||||
*/
|
*/
|
||||||
else {
|
else {
|
||||||
include('./header.inc.php');
|
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
|
* Back to the calling script
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_operations.php');
|
require('./tbl_properties_operations.php');
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user