diff --git a/libraries/tbl_common.php b/libraries/tbl_common.php index 75dab272a..70279eca5 100644 --- a/libraries/tbl_common.php +++ b/libraries/tbl_common.php @@ -14,7 +14,7 @@ require_once './libraries/bookmark.lib.php'; // Check parameters PMA_checkParameters(array('db', 'table')); -if (PMA_MYSQL_INT_VERSION >= 50002 && $db === 'information_schema') { +if ($db === 'information_schema') { $db_is_information_schema = true; } else { $db_is_information_schema = false; diff --git a/libraries/tbl_indexes.lib.php b/libraries/tbl_indexes.lib.php index ee59d8370..74f9eec05 100644 --- a/libraries/tbl_indexes.lib.php +++ b/libraries/tbl_indexes.lib.php @@ -204,8 +204,7 @@ function PMA_show_indexes($table, &$indexes, &$indexes_info, &$indexes_data, . ' ' . "\n"; } - if ((PMA_MYSQL_INT_VERSION < 40002 && $indexes_info[$index_name]['Comment'] == 'FULLTEXT') - || (PMA_MYSQL_INT_VERSION >= 40002 && $indexes_info[$index_name]['Index_type'] == 'FULLTEXT')) { + if ($indexes_info[$index_name]['Index_type'] == 'FULLTEXT') { $index_type = 'FULLTEXT'; } elseif ($index_name == 'PRIMARY') { $index_type = 'PRIMARY'; diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php index 330007834..c7a532262 100644 --- a/libraries/tbl_links.inc.php +++ b/libraries/tbl_links.inc.php @@ -86,13 +86,10 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_ $tabs['operation']['link'] = 'tbl_operations.php'; $tabs['operation']['text'] = $strOperations; - $ln8_stt = (PMA_MYSQL_INT_VERSION >= 40000) - ? 'TRUNCATE TABLE ' - : 'DELETE FROM '; $tabs['empty']['link'] = 'sql.php'; - $tabs['empty']['args']['sql_query'] = $ln8_stt . PMA_backquote($table); + $tabs['empty']['args']['sql_query'] = 'TRUNCATE TABLE ' . PMA_backquote($table); $tabs['empty']['args']['zero_rows'] = sprintf($strTableHasBeenEmptied, htmlspecialchars($table)); - $tabs['empty']['attr'] = 'onclick="return confirmLink(this, \'' . $ln8_stt . PMA_jsFormat($table) . '\')"'; + $tabs['empty']['attr'] = 'onclick="return confirmLink(this, \'TRUNCATE TABLE ' . PMA_jsFormat($table) . '\')"'; $tabs['empty']['args']['goto'] = 'tbl_structure.php'; $tabs['empty']['class'] = 'caution'; $tabs['empty']['icon'] = 'b_empty.png'; diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php index 14e4d0562..5857ff7ae 100644 --- a/libraries/tbl_properties.inc.php +++ b/libraries/tbl_properties.inc.php @@ -41,8 +41,7 @@ document.onkeydown = onKeyDownArrowsHandler; // the default CURRENT TIMESTAMP checkbox and label // and, field_x_7a represents the checkbox itself -if (PMA_MYSQL_INT_VERSION >= 40102) { - ?> +?> -
' . PMA_showMySQLDocu('SQL-Syntax', 'data-types') . ''); $header_cells[] = $strLengthSet . '1'; -if (PMA_MYSQL_INT_VERSION >= 40100) { - $header_cells[] = $strCollation; -} +$header_cells[] = $strCollation; $header_cells[] = $strAttr; $header_cells[] = $strNull; $header_cells[] = $strDefault . '2'; @@ -156,18 +152,16 @@ $comments_map = array(); $mime_map = array(); $available_mime = array(); -if ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100) { - $comments_map = PMA_getComments($db, $table); - $header_cells[] = $strComments; +$comments_map = PMA_getComments($db, $table); +$header_cells[] = $strComments; - if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) { - $mime_map = PMA_getMIME($db, $table); - $available_mime = PMA_getAvailableMIMEtypes(); +if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) { + $mime_map = PMA_getMIME($db, $table); + $available_mime = PMA_getAvailableMIMEtypes(); - $header_cells[] = $strMIME_MIMEtype; - $header_cells[] = $strMIME_transformation; - $header_cells[] = $strMIME_transformation_options . '3'; - } + $header_cells[] = $strMIME_MIMEtype; + $header_cells[] = $strMIME_transformation; + $header_cells[] = $strMIME_transformation_options . '3'; } // garvin: workaround for field_fulltext, because its submitted indizes contain @@ -187,9 +181,7 @@ for ($i = 0 ; $i <= $num_fields; $i++) { $row['Field'] = (isset($field_name) && isset($field_name[$i]) ? $field_name[$i] : FALSE); $row['Type'] = (isset($field_type) && isset($field_type[$i]) ? $field_type[$i] : FALSE); - if (PMA_MYSQL_INT_VERSION >= 40100) { - $row['Collation'] = (isset($field_collation) && isset($field_collation[$i]) ? $field_collation[$i] : ''); - } + $row['Collation'] = (isset($field_collation) && isset($field_collation[$i]) ? $field_collation[$i] : ''); $row['Null'] = (isset($field_null) && isset($field_null[$i]) ? $field_null[$i] : ''); if (isset($field_type[$i]) && $row['Null'] == '') { $submit_null = TRUE; @@ -250,9 +242,7 @@ for ($i = 0 ; $i <= $num_fields; $i++) { $content_cells[$i][$ci] .= "\n" . ''; $ci++; $content_cells[$i][$ci] = '' . "\n"; $ci++; - if (PMA_MYSQL_INT_VERSION >= 40100) { - $tmp_collation = empty($row['Collation']) ? null : $row['Collation']; - $content_cells[$i][$ci] = PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'field_collation[]', 'field_' . $i . '_' . ($ci - $ci_offset), $tmp_collation, FALSE); - unset($tmp_collation); - $ci++; - } + $tmp_collation = empty($row['Collation']) ? null : $row['Collation']; + $content_cells[$i][$ci] = PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'field_collation[]', 'field_' . $i . '_' . ($ci - $ci_offset), $tmp_collation, FALSE); + unset($tmp_collation); + $ci++; $content_cells[$i][$ci] = ''; - if (PMA_MYSQL_INT_VERSION >= 40102) { - if ($type_upper == 'TIMESTAMP') { - $tmp_display_type = 'block'; - } else { - $tmp_display_type = 'none'; - $default_current_timestamp = FALSE; - } - $content_cells[$i][$ci] .= '
CURRENT_TIMESTAMP
'; + if ($type_upper == 'TIMESTAMP') { + $tmp_display_type = 'block'; + } else { + $tmp_display_type = 'none'; + $default_current_timestamp = FALSE; } + $content_cells[$i][$ci] .= '
CURRENT_TIMESTAMP
'; $ci++; $content_cells[$i][$ci] = ''; - $ci++; - } + $content_cells[$i][$ci] = ''; + $ci++; // garvin: MIME-types if ($cfgRelation['mimework'] && $cfg['BrowseMIME'] && $cfgRelation['commwork']) { @@ -656,12 +632,8 @@ if ($action == 'tbl_create.php') {   - = 40100) { - echo '  ' . "\n" - . ' ' . $strCollation . ': ' . "\n"; - } - ?> +   +   - - - = 40100) { - echo '  ' . "\n" - . ' ' . "\n" - . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, (isset($tbl_collation) ? $tbl_collation : null), FALSE, 3) - . ' ' . "\n"; - } + + +   + + +