Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve if statement that sets default datalabel

  • Loading branch information...
commit 60ccfbef70249454e6a37af880e5d8beceedf1a3 1 parent 9b3ae37
@zixtor zixtor authored
Showing with 2 additions and 14 deletions.
  1. +2 −14 tbl_zoom_select.php
View
16 tbl_zoom_select.php
@@ -169,9 +169,6 @@
// foreign keys from innodb)
$foreigners = PMA_getForeigners($db, $table);
-if (! isset($zoom_submit) && ! isset($criteriaColumnNames)) {
- $dataLabel = PMA_getDisplayField($db, $table);
-}
?>
<div id="sqlqueryresults"></div>
<fieldset id="fieldset_subtab">
@@ -201,14 +198,9 @@
$db, $table, $columnNames, $columnTypes, $columnCollations, $columnNullFlags,
NULL, $foreigners, "zoom"
);
-
//Set default datalabel if not selected
-if (isset($_POST['zoom_submit'])
- && $_POST['criteriaColumnNames'][0] != 'pma_null'
- && $_POST['criteriaColumnNames'][1] != 'pma_null') {
- if ($_POST['dataLabel'] == '') {
- $dataLabel = PMA_getDisplayField($db, $table);
- }
+if ( !isset($_POST['zoom_submit']) || $_POST['dataLabel'] == '') {
+ $dataLabel = PMA_getDisplayField($db, $table);
}
echo PMA_tblSearchGetOptionsZoom($columnNames, $dataLabel);
?>
@@ -231,10 +223,6 @@
&& $criteriaColumnNames[1] != 'pma_null'
&& $criteriaColumnNames[0] != $criteriaColumnNames[1]
) {
- //Set default datalabel if not selected
- if ($_POST['dataLabel'] == '') {
- $dataLabel = PMA_getDisplayField($db, $table);
- }
/*
* Query generation part
*/
Please sign in to comment.
Something went wrong with that request. Please try again.