Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Delisle <marc@infomarc.info>2003-11-24 22:00:29 +0300
committerMarc Delisle <marc@infomarc.info>2003-11-24 22:00:29 +0300
commitd1e105a862d513791708dd27ca13913a2c28e037 (patch)
tree0ef3dcaf395bb59b712a7c2e90a353cf039d5b78 /tbl_rename.php
parenta4a1ca2f8276ebd99fb821a7d63230d671050f54 (diff)
error if dot in the new table name
Diffstat (limited to 'tbl_rename.php')
-rw-r--r--tbl_rename.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/tbl_rename.php b/tbl_rename.php
index e69a034a51..ce84724e65 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
+?>