diff options
author | Atul Pratap Singh <atulpratapsingh05@gmail.com> | 2012-07-04 20:09:41 +0400 |
---|---|---|
committer | Atul Pratap Singh <atulpratapsingh05@gmail.com> | 2012-07-04 20:09:41 +0400 |
commit | 9eed63a622d58560fd6372b1d3cc150495381539 (patch) | |
tree | 20b97aebf8f7d5a8106097d3ac585eb7cad84dad /db_qbe.php | |
parent | a5d1887ee243514266d275724f26ba7d5ebf301d (diff) | |
parent | 15ab6eea39880983f1bc2b0e08d679a33a457876 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'db_qbe.php')
-rw-r--r-- | db_qbe.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/db_qbe.php b/db_qbe.php index 31254ef7f5..b68ce50612 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -12,6 +12,36 @@ require_once 'libraries/common.inc.php'; /** + * Sets globals from $_POST + */ +$post_params = array( + 'Field', + 'Show', + 'Sort' +); +foreach ($post_params as $one_post_param) { + if (isset($_POST[$one_post_param])) { + $GLOBALS[$one_post_param] = $_POST[$one_post_param]; + } +} + +/** + * Sets globals from $_POST patterns, for Or* variables + * (additional criteria lines) + */ + +$post_patterns = array( + '/^Or/i' +); +foreach (array_keys($_POST) as $post_key) { + foreach ($post_patterns as $one_post_pattern) { + if (preg_match($one_post_pattern, $post_key)) { + $GLOBALS[$post_key] = $_POST[$post_key]; + } + } +} + +/** * Gets the relation settings */ $cfgRelation = PMA_getRelationsParam(); |