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:
authorSebastian Mendel <cybot_tm@users.sourceforge.net>2005-12-12 17:28:28 +0300
committerSebastian Mendel <cybot_tm@users.sourceforge.net>2005-12-12 17:28:28 +0300
commit5b9cab5a91dbdeb4949e1e4b016bcd5eccf8ca6b (patch)
treeec9ac14aea3d7ffa20b5554630e37b42b4cbfaf0 /scripts
parent1b47c6c676c9ccc4516e7f03704b72ade8366db1 (diff)
check magic_quotes only once in common.inc.php
Diffstat (limited to 'scripts')
-rw-r--r--scripts/setup.php26
1 files changed, 5 insertions, 21 deletions
diff --git a/scripts/setup.php b/scripts/setup.php
index bb66395b6b..7a2c532d4d 100644
--- a/scripts/setup.php
+++ b/scripts/setup.php
@@ -16,22 +16,6 @@ $PMA_Config = new PMA_Config();
$script_info = 'phpMyAdmin ' . $PMA_Config->get('PMA_VERSION') . ' setup script by Michal Čihař <michal@cihar.com>';
$script_version = '$Id$';
-
-/**
- * Removes slashes from string if needed (eg. magic quotes are enabled)
- *
- * @param string prossibly escaped string
- *
- * @return string unsescaped string
- */
-function remove_slashes($val) {
- if (get_magic_quotes_gpc()) {
- return stripslashes($val);
- }
- return $val;
-}
-
-
// Grab action
if (isset($_POST['action'])) {
$action = $_POST['action'];
@@ -41,7 +25,7 @@ if (isset($_POST['action'])) {
if (isset($_POST['configuration']) && $action != 'clear' ) {
// Grab previous configuration, if it should not be cleared
- $configuration = unserialize(remove_slashes($_POST['configuration']));
+ $configuration = unserialize($_POST['configuration']);
} else {
// Start with empty configuration
$configuration = array();
@@ -538,17 +522,17 @@ function grab_values($list) {
break;
case 'serialized':
if (isset($_POST[$v[0]]) && strlen($_POST[$v[0]]) > 0) {
- $res[$v[0]] = unserialize(remove_slashes($_POST[$v[0]]));
+ $res[$v[0]] = unserialize($_POST[$v[0]]);
}
break;
case 'int':
if (isset($_POST[$v[0]]) && strlen($_POST[$v[0]]) > 0) {
- $res[$v[0]] = (int)remove_slashes($_POST[$v[0]]);
+ $res[$v[0]] = (int)$_POST[$v[0]];
}
break;
case 'tristate':
if (isset($_POST[$v[0]]) && strlen($_POST[$v[0]]) > 0) {
- $cur = remove_slashes($_POST[$v[0]]);
+ $cur = $_POST[$v[0]];
if ($cur == 'TRUE') {
$res[$v[0]] = TRUE;
} else if ($cur == 'FALSE') {
@@ -561,7 +545,7 @@ function grab_values($list) {
case 'string':
default:
if (isset($_POST[$v[0]]) && strlen($_POST[$v[0]]) > 0) {
- $res[$v[0]] = remove_slashes($_POST[$v[0]]);
+ $res[$v[0]] = $_POST[$v[0]];
}
break;
}