Permalink
Browse files

Improve if statement that sets default datalabel

  • Loading branch information...
zixtor committed Jun 7, 2012
1 parent 9b3ae37 commit 60ccfbef70249454e6a37af880e5d8beceedf1a3
Showing with 2 additions and 14 deletions.
  1. +2 −14 tbl_zoom_select.php
View
@@ -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
*/

0 comments on commit 60ccfbe

Please sign in to comment.