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>2013-07-07 16:41:02 +0400
committerMarc Delisle <marc@infomarc.info>2013-07-07 16:41:02 +0400
commit3a519effc05da7f4e2d8cff85cbce807d31fdda4 (patch)
tree41d3106b91f53af9d52b019f0040eeadbf42c605 /tbl_get_field.php
parent72e9b4327c254f33f86927b5c7e9695238fb6d41 (diff)
Directly use the GET parameters
Diffstat (limited to 'tbl_get_field.php')
-rw-r--r--tbl_get_field.php22
1 files changed, 4 insertions, 18 deletions
diff --git a/tbl_get_field.php b/tbl_get_field.php
index e7ff05f338..e5ec269235 100644
--- a/tbl_get_field.php
+++ b/tbl_get_field.php
@@ -12,23 +12,9 @@
require_once 'libraries/common.inc.php';
require_once 'libraries/mime.lib.php';
-/**
- * Sets globals from $_GET
- */
-$get_params = array(
- 'where_clause',
- 'transform_key'
-);
-
-foreach ($get_params as $one_get_param) {
- if (isset($_GET[$one_get_param])) {
- $GLOBALS[$one_get_param] = $_GET[$one_get_param];
- }
-}
-
/* Check parameters */
PMA_Util::checkParameters(
- array('db', 'table', 'where_clause', 'transform_key')
+ array('db', 'table')
);
/* Select database */
@@ -45,9 +31,9 @@ if (!$GLOBALS['dbi']->getColumns($db, $table)) {
}
/* Grab data */
-$sql = 'SELECT ' . PMA_Util::backquote($transform_key)
+$sql = 'SELECT ' . PMA_Util::backquote($_GET['transform_key'])
. ' FROM ' . PMA_Util::backquote($table)
- . ' WHERE ' . $where_clause . ';';
+ . ' WHERE ' . $_GET['where_clause'] . ';';
$result = $GLOBALS['dbi']->fetchValue($sql);
/* Check return code */
@@ -59,7 +45,7 @@ if ($result === false) {
@ini_set('url_rewriter.tags', '');
PMA_downloadHeader(
- $table . '-' . $transform_key . '.bin',
+ $table . '-' . $_GET['transform_key'] . '.bin',
PMA_detectMIME($result),
strlen($result)
);