diff --git a/db_structure.php b/db_structure.php index 9c2e045755..c0c1d33ec8 100644 --- a/db_structure.php +++ b/db_structure.php @@ -444,7 +444,7 @@ if ($is_show_stats) { 1)) { - $default_engine = PMA_DBI_get_default_engine(); + $default_engine = PMA_DBI_fetch_value('SHOW VARIABLES LIKE \'storage_engine\';', 0, 1); echo ' ' . "\n" . ' ' .$default_engine . '' . "\n"; diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 58307fea39..074715d659 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -899,7 +899,7 @@ function PMA_DBI_postConnect($link, $is_controluser = false) define('PMA_MYSQL_STR_VERSION', PMA_cacheGet('PMA_MYSQL_STR_VERSION', true)); } else { $mysql_version = PMA_DBI_fetch_value( - 'SELECT VERSION()', 0, 0, $link, PMA_DBI_QUERY_STORE); + 'SELECT VERSION()', 0, 0, $link); if ($mysql_version) { $match = explode('.', $mysql_version); define('PMA_MYSQL_MAJOR_VERSION', (int)$match[0]); @@ -950,16 +950,15 @@ function PMA_DBI_postConnect($link, $is_controluser = false) * @param integer|string $field field to fetch the value from, * starting at 0, with 0 beeing default * @param resource $link mysql link - * @param mixed $options * @return mixed value of first field in first row from result * or false if not found */ -function PMA_DBI_fetch_value($result, $row_number = 0, $field = 0, $link = null, $options = 0) +function PMA_DBI_fetch_value($result, $row_number = 0, $field = 0, $link = null) { $value = false; if (is_string($result)) { - $result = PMA_DBI_try_query($result, $link, $options | PMA_DBI_QUERY_STORE, false); + $result = PMA_DBI_try_query($result, $link, PMA_DBI_QUERY_STORE, false); } // return false if result is empty or false @@ -1174,16 +1173,6 @@ function PMA_DBI_fetch_result($result, $key = null, $value = null, return $resultrows; } -/** - * return default table engine for given database - * - * @return string default table engine - */ -function PMA_DBI_get_default_engine() -{ - return PMA_DBI_fetch_value('SHOW VARIABLES LIKE \'storage_engine\';', 0, 1); -} - /** * Get supported SQL compatibility modes * diff --git a/tbl_zoom_select.php b/tbl_zoom_select.php index ad90043308..7b1188975f 100644 --- a/tbl_zoom_select.php +++ b/tbl_zoom_select.php @@ -118,7 +118,7 @@ if (isset($inputs) && ($inputs[0] != 'pma_null' || $inputs[1] != 'pma_null')) { - /> +
@@ -137,15 +137,15 @@ for ($i = 0; $i < 4; $i++) { } ?> - + - + - + @@ -162,7 +162,7 @@ for ($i = 0; $i < 4; $i++) { foreach ($GLOBALS['cfg']['EnumOperators'] as $fc) { if (isset($zoomFunc[$i]) && $zoomFunc[$i] == htmlspecialchars($fc)) { echo "\n" . ' ' - . ''; } else { echo "\n" . ' ' @@ -174,7 +174,7 @@ for ($i = 0; $i < 4; $i++) { foreach ($GLOBALS['cfg']['TextOperators'] as $fc) { if (isset($zoomFunc[$i]) && $zoomFunc[$i] == $fc) { echo "\n" . ' ' - . ''; } else { echo "\n" . ' ' @@ -186,7 +186,7 @@ for ($i = 0; $i < 4; $i++) { foreach ($GLOBALS['cfg']['NumOperators'] as $fc) { if (isset($zoomFunc[$i]) && $zoomFunc[$i] == $fc) { echo "\n" . ' ' - . ''; } else { echo "\n" . ' ' @@ -200,7 +200,7 @@ for ($i = 0; $i < 4; $i++) { foreach ($GLOBALS['cfg']['NullOperators'] as $fc) { if (isset($zoomFunc[$i]) && $zoomFunc[$i] == $fc) { echo "\n" . ' ' - . ''; } else { echo "\n" . ' ' @@ -248,38 +248,42 @@ for ($i = 0; $i < 4; $i++) { */ //Set default datalabel if not selected - if(isset($zoom_submit) && $inputs[0] != 'pma_null' && $inputs[1] != 'pma_null') { - if ($dataLabel == '') - $dataLabel = PMA_getDisplayField($db,$table); +if (isset($zoom_submit) && $inputs[0] != 'pma_null' && $inputs[1] != 'pma_null') { + if ($dataLabel == '') { + $dataLabel = PMA_getDisplayField($db,$table); } - ?> +} +?> - + - + - - - +'; +?>
        
        
- -
@@ -293,10 +297,10 @@ for ($i = 0; $i < 4; $i++) { $row[$inputs[0]], $inputs[1] => $row[$inputs[1]], 'where_clause' => $uniqueCondition[0]); -else if($dataLabel) + } elseif ($dataLabel) { $data[] = array($inputs[0] => $row[$inputs[0]], $inputs[1] => $row[$inputs[1]], $dataLabel => $row[$dataLabel], 'where_clause' => $uniqueCondition[0]); -else + } else { $data[] = array($inputs[0] => $row[$inputs[0]], $inputs[1] => $row[$inputs[1]], $dataLabel => '', 'where_clause' => $uniqueCondition[0]); + } } - -?> - -
- +
-
+
+ } +?>
- - -