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:
authorAtul Pratap Singh <atulpratapsingh05@gmail.com>2012-06-28 22:40:30 +0400
committerAtul Pratap Singh <atulpratapsingh05@gmail.com>2012-06-28 22:40:30 +0400
commit417856ee9f7e1aa9472120f3b5a316ee3c8de1a4 (patch)
tree7e756fe2626974de849b3c21e08a549210fe1a2d /db_search.php
parentf3d2f177000e8c3855798d14d442b68a1256e524 (diff)
Variable name improvements
Diffstat (limited to 'db_search.php')
-rw-r--r--db_search.php44
1 files changed, 24 insertions, 20 deletions
diff --git a/db_search.php b/db_search.php
index 329f7772ab..e96823447a 100644
--- a/db_search.php
+++ b/db_search.php
@@ -43,51 +43,55 @@ $url_params['goto'] = 'db_search.php';
*/
$tables_names_only = PMA_DBI_get_tables($GLOBALS['db']);
-$search_options = array(
+$searchTypes = array(
'1' => __('at least one of the words'),
'2' => __('all words'),
'3' => __('the exact phrase'),
'4' => __('as regular expression'),
);
-if (empty($_REQUEST['search_option'])
- || ! is_string($_REQUEST['search_option'])
- || ! array_key_exists($_REQUEST['search_option'], $search_options)
+if (empty($_REQUEST['criteriaSearchType'])
+ || ! is_string($_REQUEST['criteriaSearchType'])
+ || ! array_key_exists($_REQUEST['criteriaSearchType'], $searchTypes)
) {
- $search_option = 1;
+ $criteriaSearchType = 1;
unset($_REQUEST['submit_search']);
} else {
- $search_option = (int) $_REQUEST['search_option'];
- $option_str = $search_options[$_REQUEST['search_option']];
+ $criteriaSearchType = (int) $_REQUEST['criteriaSearchType'];
+ $option_str = $searchTypes[$_REQUEST['criteriaSearchType']];
}
-if (empty($_REQUEST['search_str']) || ! is_string($_REQUEST['search_str'])) {
+if (empty($_REQUEST['criteriaSearchString'])
+ || ! is_string($_REQUEST['criteriaSearchString'])
+) {
unset($_REQUEST['submit_search']);
$searched = '';
} else {
- $searched = htmlspecialchars($_REQUEST['search_str']);
+ $searched = htmlspecialchars($_REQUEST['criteriaSearchString']);
// For "as regular expression" (search option 4), we should not treat
// this as an expression that contains a LIKE (second parameter of
// PMA_sqlAddSlashes()).
//
// Usage example: If user is seaching for a literal $ in a regexp search,
// he should enter \$ as the value.
- $search_str = PMA_sqlAddSlashes(
- $_REQUEST['search_str'], ($search_option == 4 ? false : true)
+ $criteriaSearchString = PMA_sqlAddSlashes(
+ $_REQUEST['criteriaSearchString'], ($criteriaSearchType == 4 ? false : true)
);
}
-$tables_selected = array();
-if (empty($_REQUEST['table_select']) || ! is_array($_REQUEST['table_select'])) {
+$criteriaTables = array();
+if (empty($_REQUEST['criteriaTables']) || ! is_array($_REQUEST['criteriaTables'])) {
unset($_REQUEST['submit_search']);
} elseif (! isset($_REQUEST['selectall']) && ! isset($_REQUEST['unselectall'])) {
- $tables_selected = array_intersect($_REQUEST['table_select'], $tables_names_only);
+ $criteriaTables = array_intersect(
+ $_REQUEST['criteriaTables'], $tables_names_only
+ );
}
if (isset($_REQUEST['selectall'])) {
- $tables_selected = $tables_names_only;
+ $criteriaTables = $tables_names_only;
} elseif (isset($_REQUEST['unselectall'])) {
- $tables_selected = array();
+ $criteriaTables = array();
}
if (empty($_REQUEST['criteriaColumnName'])
@@ -114,8 +118,8 @@ if ( $GLOBALS['is_ajax_request'] != true) {
if (isset($_REQUEST['submit_search'])) {
$response->addHTML(
PMA_dbSearchGetSearchResults(
- $tables_selected, $searched, $option_str,
- $search_str, $search_option,
+ $criteriaTables, $searched, $option_str,
+ $criteriaSearchString, $criteriaSearchType,
(! empty($criteriaColumnName) ? $criteriaColumnName : '')
)
);
@@ -132,8 +136,8 @@ if ($GLOBALS['is_ajax_request'] == true) {
// Add search form
$response->addHTML(
PMA_dbSearchGetSelectionForm(
- $searched, $search_option, $tables_names_only, $tables_selected, $url_params,
- (! empty($criteriaColumnName) ? $criteriaColumnName : '')
+ $searched, $criteriaSearchType, $tables_names_only, $criteriaTables,
+ $url_params, (! empty($criteriaColumnName) ? $criteriaColumnName : '')
)
);
?>