Merge remote-tracking branch 'chanaka/master'

This commit is contained in:
Michal Čihař 2012-05-29 09:43:50 +02:00
commit b6df92a527
2 changed files with 160 additions and 75 deletions

View File

@ -958,7 +958,8 @@ function PMA_reloadNavigation($jsonly = false)
}
echo '//<![CDATA[' . PHP_EOL;
echo 'if (typeof(window.parent) != "undefined"' . PHP_EOL;
echo ' && typeof(window.parent.frame_navigation) != "undefined"' . PHP_EOL;
echo ' && typeof(window.parent.frame_navigation) != "undefined"'
. PHP_EOL;
echo ' && window.parent.goTo) {' . PHP_EOL;
echo ' window.parent.goTo("' . $reload_url . '");' . PHP_EOL;
echo '}' . PHP_EOL;
@ -1076,7 +1077,8 @@ function PMA_getMessage(
$query_too_big = true;
$shortened_query_base = nl2br(
htmlspecialchars(
substr($sql_query, 0, $cfg['MaxCharactersInDisplayedSQL']) . '[...]'
substr($sql_query, 0, $cfg['MaxCharactersInDisplayedSQL'])
. '[...]'
)
);
} elseif (! empty($GLOBALS['parsed_sql'])
@ -1106,8 +1108,10 @@ function PMA_getMessage(
// Need to reparse query
$parsed_sql = PMA_SQP_parse($query_base);
// update the $analyzed_display_query
$analyzed_display_query[0]['section_before_limit'] .= $GLOBALS['sql_order_to_append'];
$analyzed_display_query[0]['order_by_clause'] = $GLOBALS['sorted_col'];
$analyzed_display_query[0]['section_before_limit']
.= $GLOBALS['sql_order_to_append'];
$analyzed_display_query[0]['order_by_clause']
= $GLOBALS['sorted_col'];
}
// Here we append the LIMIT added for navigation, to
@ -1139,7 +1143,9 @@ function PMA_getMessage(
try {
$query_base = PMA_validateSQL($query_base);
} catch (Exception $e) {
$retval .= PMA_Message::error(__('Failed to connect to SQL validator!'))->getDisplay();
$retval .= PMA_Message::error(
__('Failed to connect to SQL validator!')
)->getDisplay();
}
} elseif (isset($parsed_sql)) {
$query_base = PMA_formatSql($parsed_sql, $query_base);
@ -1182,13 +1188,17 @@ function PMA_getMessage(
$explain_params['sql_query'] = 'EXPLAIN ' . $sql_query;
$_message = __('Explain SQL');
$is_select = true;
} elseif (preg_match('@^EXPLAIN[[:space:]]+SELECT[[:space:]]+@i', $sql_query)) {
} elseif (
preg_match('@^EXPLAIN[[:space:]]+SELECT[[:space:]]+@i', $sql_query)
) {
$explain_params['sql_query'] = substr($sql_query, 8);
$_message = __('Skip Explain SQL');
}
if (isset($explain_params['sql_query'])) {
$explain_link = 'import.php' . PMA_generate_common_url($explain_params);
$explain_link = ' [' . PMA_linkOrButton($explain_link, $_message) . ']';
$explain_link = 'import.php'
. PMA_generate_common_url($explain_params);
$explain_link = ' ['
. PMA_linkOrButton($explain_link, $_message) . ']';
}
} //show explain
@ -1232,7 +1242,8 @@ function PMA_getMessage(
if (isset($GLOBALS['show_as_php'])) {
$runquery_link = 'import.php' . PMA_generate_common_url($url_params);
$php_link .= ' [' . PMA_linkOrButton($runquery_link, __('Submit Query')) . ']';
$php_link .= ' ['
. PMA_linkOrButton($runquery_link, __('Submit Query')) . ']';
}
} else {
$php_link = '';
@ -1244,7 +1255,8 @@ function PMA_getMessage(
&& preg_match('@^(SELECT|SHOW)[[:space:]]+@i', $sql_query)
) {
$refresh_link = 'import.php' . PMA_generate_common_url($url_params);
$refresh_link = ' [' . PMA_linkOrButton($refresh_link, __('Refresh')) . ']';
$refresh_link = ' ['
. PMA_linkOrButton($refresh_link, __('Refresh')) . ']';
} else {
$refresh_link = '';
} //refresh
@ -1260,8 +1272,10 @@ function PMA_getMessage(
$validate_message = __('Validate SQL');
}
$validate_link = 'import.php' . PMA_generate_common_url($validate_params);
$validate_link = ' [' . PMA_linkOrButton($validate_link, $validate_message) . ']';
$validate_link = 'import.php'
. PMA_generate_common_url($validate_params);
$validate_link = ' ['
. PMA_linkOrButton($validate_link, $validate_message) . ']';
} else {
$validate_link = '';
} //validator
@ -1298,7 +1312,9 @@ function PMA_getMessage(
// depend on the profiling support or on the refresh link
if (empty($refresh_link) || ! PMA_profilingSupported()) {
$retval .= '<form action="sql.php" method="post">';
$retval .= PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']);
$retval .= PMA_generate_common_hidden_inputs(
$GLOBALS['db'], $GLOBALS['table']
);
$retval .= '<input type="hidden" name="sql_query" value="'
. htmlspecialchars($sql_query) . '" />';
$retval .= '</form>';
@ -1323,7 +1339,8 @@ function PMA_getMessage(
"//]]>\n" .
"</script>";
}
$retval .= $edit_link . $explain_link . $php_link . $refresh_link . $validate_link;
$retval .= $edit_link . $explain_link . $php_link
. $refresh_link . $validate_link;
$retval .= '</div>';
}
$retval .= '</div>';
@ -1376,10 +1393,15 @@ function PMA_getProfilingForm($sql_query)
if (PMA_profilingSupported()) {
$retval .= '<form action="sql.php" method="post">' . "\n";
$retval .= PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']);
$retval .= '<input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />' . "\n";
$retval .= PMA_generate_common_hidden_inputs(
$GLOBALS['db'], $GLOBALS['table']
);
$retval .= '<input type="hidden" name="sql_query" value="'
. htmlspecialchars($sql_query) . '" />' . "\n";
$retval .= '<input type="hidden" name="profiling_form" value="1" />' . "\n";
$retval .= PMA_getCheckbox('profiling', __('Profiling'), isset($_SESSION['profiling']), true);
$retval .= PMA_getCheckbox(
'profiling', __('Profiling'), isset($_SESSION['profiling']), true
);
$retval .= ' </form>' . "\n";
}
@ -2131,7 +2153,9 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row,
if (isset($GLOBALS['analyzed_sql'][0]['select_expr'])
&& is_array($GLOBALS['analyzed_sql'][0]['select_expr'])
) {
foreach ($GLOBALS['analyzed_sql'][0]['select_expr'] as $select_expr) {
foreach (
$GLOBALS['analyzed_sql'][0]['select_expr'] as $select_expr
) {
// need (string) === (string)
// '' !== 0 but '' == 0
if ((string) $select_expr['alias'] === (string) $meta->name) {
@ -2207,7 +2231,8 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row,
$condition = '';
}
} elseif ($meta->type == 'bit') {
$con_val = "= b'" . PMA_printableBitValue($row[$i], $meta->length) . "'";
$con_val = "= b'"
. PMA_printableBitValue($row[$i], $meta->length) . "'";
} else {
$con_val = '= \'' . PMA_sqlAddSlashes($row[$i], false, true) . '\'';
}
@ -2460,7 +2485,8 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
$caption1 = '&lt;&lt;';
$caption2 = ' &lt; ';
$title1 = ' title="' . _pgettext('First page', 'Begin') . '"';
$title2 = ' title="' . _pgettext('Previous page', 'Previous') . '"';
$title2 = ' title="'
. _pgettext('Previous page', 'Previous') . '"';
} else {
$caption1 = _pgettext('First page', 'Begin') . ' &lt;&lt;';
$caption2 = _pgettext('Previous page', 'Previous') . ' &lt;';
@ -2477,7 +2503,8 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
. $frame . '">' . $caption2 . '</a>';
}
echo "\n", '<form action="', basename($script), '" method="post" target="', $frame, '">', "\n";
echo "\n", '<form action="', basename($script),
'" method="post" target="', $frame, '">', "\n";
echo PMA_generate_common_hidden_inputs($_url_params);
echo PMA_pageselector(
$max_count,
@ -2635,13 +2662,16 @@ function PMA_getRadioFields($html_field_name, $choices, $checked_choice = '',
}
$html_field_id = $html_field_name . '_' . $choice_value;
$radio_html .= '<input type="radio" name="' . $html_field_name . '" id="'
. $html_field_id . '" value="' . htmlspecialchars($choice_value) . '"';
. $html_field_id . '" value="'
. htmlspecialchars($choice_value) . '"';
if ($choice_value == $checked_choice) {
$radio_html .= ' checked="checked"';
}
$radio_html .= ' />' . "\n"
. '<label for="' . $html_field_id . '">'
. ($escape_label ? htmlspecialchars($choice_label) : $choice_label)
. ($escape_label
? htmlspecialchars($choice_label)
: $choice_label)
. '</label>';
if ($line_break) {
$radio_html .= '<br />';
@ -2748,7 +2778,8 @@ function PMA_toggleButton($action, $select_name, $options, $callback)
$retval = "<!-- TOGGLE START -->\n";
$retval .= "<div class='wrapper toggleAjax hide'>\n";
$retval .= " <div class='toggleButton'>\n";
$retval .= " <div title='" . __('Click to toggle') . "' class='container $state'>\n";
$retval .= " <div title='" . __('Click to toggle');
$retval .= "' class='container $state'>\n";
$retval .= " <img src='" . htmlspecialchars($GLOBALS['pmaThemeImage']);
$retval .= "toggle-" . htmlspecialchars($GLOBALS['text_dir']) . ".png'\n";
$retval .= " alt='' />\n";
@ -2758,15 +2789,15 @@ function PMA_toggleButton($action, $select_name, $options, $callback)
$retval .= " <td class='toggleOn'>\n";
$retval .= " <span class='hide'>$link_on</span>\n";
$retval .= " <div>";
$retval .= str_replace(' ', '&nbsp;', htmlspecialchars($options[1]['label'])) . "\n";
$retval .= " </div>\n";
$retval .= str_replace(' ', '&nbsp;', htmlspecialchars($options[1]['label']));
$retval .= "\n" . " </div>\n";
$retval .= " </td>\n";
$retval .= " <td><div>&nbsp;</div></td>\n";
$retval .= " <td class='toggleOff'>\n";
$retval .= " <span class='hide'>$link_off</span>\n";
$retval .= " <div>";
$retval .= str_replace(' ', '&nbsp;', htmlspecialchars($options[0]['label'])) . "\n";
$retval .= " </div>\n";
$retval .= str_replace(' ', '&nbsp;', htmlspecialchars($options[0]['label']));
$retval .= "\n" . " </div>\n";
$retval .= " </tr>\n";
$retval .= " </tbody>\n";
$retval .= " </table>\n";
@ -2985,7 +3016,8 @@ function PMA_extractColumnSpec($columnspec)
// Increment character index
$index++;
} // end while
$printtype = $type . '(' . str_replace("','", "', '", $spec_in_brackets) . ')';
$printtype = $type
. '(' . str_replace("','", "', '", $spec_in_brackets) . ')';
$binary = false;
$unsigned = false;
$zerofill = false;
@ -2999,7 +3031,9 @@ function PMA_extractColumnSpec($columnspec)
// this would be a BINARY or VARBINARY column type;
// by the way, a BLOB should not show the BINARY attribute
// because this is not accepted in MySQL syntax.
if (preg_match('@binary@', $printtype) && ! preg_match('@binary[\(]@', $printtype)) {
if (preg_match('@binary@', $printtype)
&& ! preg_match('@binary[\(]@', $printtype)
) {
$printtype = preg_replace('@binary@', '', $printtype);
$binary = true;
} else {
@ -3026,7 +3060,9 @@ function PMA_extractColumnSpec($columnspec)
$can_contain_collation = false;
if (! $binary
&& preg_match("@^(char|varchar|text|tinytext|mediumtext|longtext|set|enum)@", $type)
&& preg_match(
"@^(char|varchar|text|tinytext|mediumtext|longtext|set|enum)@", $type
)
) {
$can_contain_collation = true;
}
@ -3346,7 +3382,8 @@ function PMA_selectUploadFile($import_list, $uploaddir)
$matcher = '@\.(' . $extensions . ')(\.('
. PMA_supportedDecompressions() . '))?$@';
$active = (isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed'] && isset($local_import_file))
$active = (isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed']
&& isset($local_import_file))
? $local_import_file
: '';
$files = PMA_getFileSelectOptions(
@ -3360,7 +3397,8 @@ function PMA_selectUploadFile($import_list, $uploaddir)
)->display();
} elseif (! empty($files)) {
echo "\n";
echo ' <select style="margin: 5px" size="1" name="local_import_file" id="select_local_import_file">' . "\n";
echo ' <select style="margin: 5px" size="1" name="local_import_file" '
.'id="select_local_import_file">' . "\n";
echo ' <option value="">&nbsp;</option>' . "\n";
echo $files;
echo ' </select>' . "\n";
@ -3672,17 +3710,20 @@ function PMA_getDefaultFunctionForField($field, $insert_mode)
$default_function = $cfg['DefaultFunctions']['FUNC_' . $current_class];
}
}
$analyzed_sql_field_array = $analyzed_sql[0]['create_table_fields']
[$field['Field']];
// what function defined as default?
// for the first timestamp we don't set the default function
// if there is a default value for the timestamp
// (not including CURRENT_TIMESTAMP)
// and the column does not have the
// ON UPDATE DEFAULT TIMESTAMP attribute.
if ($field['True_Type'] == 'timestamp'
if (($field['True_Type'] == 'timestamp')
&& empty($field['Default'])
&& empty($data)
&& ! isset($analyzed_sql[0]['create_table_fields'][$field['Field']]['on_update_current_timestamp'])
&& $analyzed_sql[0]['create_table_fields'][$field['Field']]['default_value'] != 'NULL'
&& ! isset($analyzed_sql_field_array['on_update_current_timestamp'])
&& ($analyzed_sql_field_array['default_value'] != 'NULL')
) {
$default_function = $cfg['DefaultFunctions']['first_timestamp'];
}

View File

@ -393,7 +393,9 @@ function PMA_getTableNavigation($pos_next, $pos_prev, $sql_query,
} // end show all
// Move to the next page or to the last one
$endpos = $_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'];
$endpos = $_SESSION['tmp_user_values']['pos']
+ $_SESSION['tmp_user_values']['max_rows'];
if (($endpos < $unlim_num_rows)
&& ($num_rows >= $_SESSION['tmp_user_values']['max_rows'])
&& ($_SESSION['tmp_user_values']['max_rows'] != 'all')
@ -408,7 +410,8 @@ function PMA_getTableNavigation($pos_next, $pos_prev, $sql_query,
// show separator if pagination happen
if ($nbTotalPage > 1) {
$table_navigation_html .= '<td><div class="navigation_separator">|</div></td>';
$table_navigation_html
.= '<td><div class="navigation_separator">|</div></td>';
}
$table_navigation_html .= '<td>'
@ -435,13 +438,15 @@ function PMA_getTableNavigation($pos_next, $pos_prev, $sql_query,
. '(checkFormElementInRange('
. 'this, '
. '\'session_max_rows\', '
. '\'' . str_replace('\'', '\\\'', __('%d is not valid row number.')) . '\', '
. '\'' . str_replace('\'', '\\\'', __('%d is not valid row number.'))
. '\', '
. '1)'
. ' &amp;&amp; '
. 'checkFormElementInRange('
. 'this, '
. '\'pos\', '
. '\'' . str_replace('\'', '\\\'', __('%d is not valid row number.')) . '\', '
. '\'' . str_replace('\'', '\\\'', __('%d is not valid row number.'))
. '\', '
. '0'
. ($unlim_num_rows > 0 ? ', ' . ($unlim_num_rows - 1) : '') . ')'
. ')'
@ -575,7 +580,8 @@ function PMA_getMoveForwardButtonsForTableNavigation(
* Prepare feilds followed by Show button for table navigation
* Start row, Number of rows, Headers every
*
* @param string $html_sql_query the sql encoded by html special characters
* @param string $html_sql_query the sql encoded by html special
* characters
* @param string $goto the URL to go back in case of errors
* @param integer $pos_next the offset for the "next" page
* @param integer $unlim_num_rows the total number of rows returned by the
@ -845,8 +851,8 @@ function PMA_getTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0,
} elseif (($GLOBALS['cfg']['RowActionLinks'] == 'none')
&& ($directionCondition)
) {
// ... elseif display an empty column if the actions links are disabled to
// match the rest of the table
// ... elseif display an empty column if the actions links are disabled to
// match the rest of the table
$table_headers_html .= '<th></th>';
}
@ -1161,8 +1167,8 @@ function PMA_getSortByKeyDropDown(
. __('Descending') . ')</option>';
}
$drop_down_html .= '<option value="' . htmlspecialchars($unsorted_sql_query) . '"'
. ($used_index ? '' : ' selected="selected"') . '>' . __('None')
$drop_down_html .= '<option value="' . htmlspecialchars($unsorted_sql_query)
. '"' . ($used_index ? '' : ' selected="selected"') . '>' . __('None')
. '</option>'
. '</select>' . "\n"
. '</form>' . "\n";
@ -1921,7 +1927,8 @@ function PMA_getTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
// delete/edit options correctly for tables without keys.
$odd_row = true;
$directionCondition = ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal')
$directionCondition
= ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal')
|| ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped');
while ($row = PMA_DBI_fetch_row($dt_result)) {
@ -1975,7 +1982,9 @@ function PMA_getTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
} // end if (1.2.1)
// 1.2.2 Delete/Kill link(s)
if (($is_display['del_lnk'] == 'dr') || ($is_display['del_lnk'] == 'kp')) {
if (($is_display['del_lnk'] == 'dr')
|| ($is_display['del_lnk'] == 'kp')
) {
list($del_query, $del_url, $del_str, $js_conf)
= PMA_getDeleteAndKillLinks(
@ -2068,7 +2077,8 @@ function PMA_getTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
if (file_exists($include_file)) {
$transformfunction_name = 'PMA_transformation_' . str_replace(
$transformfunction_name = 'PMA_transformation_'
. str_replace(
'.inc.php', '',
$GLOBALS['mime_map'][$meta->name]['transformation']
);
@ -2080,8 +2090,11 @@ function PMA_getTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
$transform_function = $transformfunction_name;
$transform_options = PMA_transformation_getOptions(
isset($GLOBALS['mime_map'][$meta->name]['transformation_options'])
? $GLOBALS['mime_map'][$meta->name]['transformation_options']
isset($GLOBALS['mime_map'][$meta->name]
['transformation_options']
)
? $GLOBALS['mime_map'][$meta->name]
['transformation_options']
: ''
);
@ -2105,7 +2118,8 @@ function PMA_getTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
$_url_params['sql_query'] = $url_sql_query;
}
$transform_options['wrapper_link'] = PMA_generate_common_url($_url_params);
$transform_options['wrapper_link']
= PMA_generate_common_url($_url_params);
if ($meta->numeric == 1) {
// n u m e r i c
@ -2216,11 +2230,12 @@ function PMA_getTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
if (!empty($del_url) && ($is_display['del_lnk'] != 'kp')) {
$vertical_display['row_delete'][$row_no] .= PMA_getCheckboxForMultiRowSubmissions(
$del_url, $is_display, $row_no, $where_clause_html,
$condition_array, $del_query, '[%_PMA_CHECKBOX_DIR_%]',
$alternating_color_class . $vertical_class
);
$vertical_display['row_delete'][$row_no]
.= PMA_getCheckboxForMultiRowSubmissions(
$del_url, $is_display, $row_no, $where_clause_html,
$condition_array, $del_query, '[%_PMA_CHECKBOX_DIR_%]',
$alternating_color_class . $vertical_class
);
} else {
unset($vertical_display['row_delete'][$row_no]);
@ -2376,7 +2391,8 @@ function PMA_getVerticalDisplaySupportSegments(
}
if ($vertical_display['emptyafter'] > 0) {
$support_html .= ' <th colspan="' . $vertical_display['emptyafter'] . '">'
$support_html .= ' <th colspan="' . $vertical_display['emptyafter']
. '">'
. "\n" . ' &nbsp;</th>' . "\n";
}
$support_html .= '</tr>' . "\n";
@ -3100,7 +3116,8 @@ function PMA_getVerticalTable()
// assign appropriate key with current column order
$key = $col_order ? $col_order[$j] : $j;
$vertical_table_html .= '<tr' . (($col_visib && !$col_visib[$j]) ? ' class="hide"' : '')
$vertical_table_html .= '<tr'
. (($col_visib && !$col_visib[$j]) ? ' class="hide"' : '')
. '>' . "\n"
. $val;
@ -3285,7 +3302,9 @@ function PMA_setConfigParamsForDisplayTable()
$_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction']
= $_REQUEST['disp_direction'];
unset($_REQUEST['disp_direction']);
} elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction'])) {
} elseif (
empty($_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction'])
) {
$_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction']
= $GLOBALS['cfg']['DefaultDisplay'];
}
@ -3294,7 +3313,9 @@ function PMA_setConfigParamsForDisplayTable()
$_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells']
= $_REQUEST['repeat_cells'];
unset($_REQUEST['repeat_cells']);
} elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells'])) {
} elseif (
empty($_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells'])
) {
$_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells']
= $GLOBALS['cfg']['RepeatCells'];
}
@ -3324,7 +3345,9 @@ function PMA_setConfigParamsForDisplayTable()
$_SESSION['tmp_user_values']['query'][$sql_md5]['display_text']
= $_REQUEST['display_text'];
unset($_REQUEST['display_text']);
} elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['display_text'])) {
} elseif (
empty($_SESSION['tmp_user_values']['query'][$sql_md5]['display_text'])
) {
$_SESSION['tmp_user_values']['query'][$sql_md5]['display_text'] = 'P';
}
@ -3332,7 +3355,9 @@ function PMA_setConfigParamsForDisplayTable()
$_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display']
= $_REQUEST['relational_display'];
unset($_REQUEST['relational_display']);
} elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display'])) {
} elseif (
empty($_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display'])
) {
$_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display'] = 'K';
}
@ -3340,7 +3365,9 @@ function PMA_setConfigParamsForDisplayTable()
$_SESSION['tmp_user_values']['query'][$sql_md5]['geometry_display']
= $_REQUEST['geometry_display'];
unset($_REQUEST['geometry_display']);
} elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['geometry_display'])) {
} elseif (
empty($_SESSION['tmp_user_values']['query'][$sql_md5]['geometry_display'])
) {
$_SESSION['tmp_user_values']['query'][$sql_md5]['geometry_display'] = 'GEOM';
}
@ -3365,7 +3392,9 @@ function PMA_setConfigParamsForDisplayTable()
unset($_REQUEST['display_binary_as_hex']);
} elseif (isset($_REQUEST['display_options_form'])) {
// we know that the checkbox was unchecked
unset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex']);
unset(
$_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex']
);
} elseif (isset($_REQUEST['full_text_button'])) {
// do nothing to keep the value that is there in the session
} else {
@ -3392,7 +3421,9 @@ function PMA_setConfigParamsForDisplayTable()
unset($_REQUEST['hide_transformation']);
} elseif (isset($_REQUEST['display_options_form'])) {
// we know that the checkbox was unchecked
unset($_SESSION['tmp_user_values']['query'][$sql_md5]['hide_transformation']);
unset(
$_SESSION['tmp_user_values']['query'][$sql_md5]['hide_transformation']
);
}
// move current query to the last position, to be removed last
@ -3420,7 +3451,9 @@ function PMA_setConfigParamsForDisplayTable()
? true
: false;
$_SESSION['tmp_user_values']['display_binary_as_hex']
= isset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex'])
= isset(
$_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex']
)
? true
: false;
$_SESSION['tmp_user_values']['display_blob']
@ -3428,7 +3461,9 @@ function PMA_setConfigParamsForDisplayTable()
? true
: false;
$_SESSION['tmp_user_values']['hide_transformation']
= isset($_SESSION['tmp_user_values']['query'][$sql_md5]['hide_transformation'])
= isset(
$_SESSION['tmp_user_values']['query'][$sql_md5]['hide_transformation']
)
? true
: false;
$_SESSION['tmp_user_values']['pos']
@ -3510,7 +3545,10 @@ function PMA_getTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
$pre_count = '~';
$after_count = PMA_showHint(
PMA_sanitize(
__('May be approximate. See [a@./Documentation.html#faq3_11@Documentation]FAQ 3.11[/a]')
__(
'May be approximate.
See [a@./Documentation.html#faq3_11@Documentation]FAQ 3.11[/a]'
)
)
);
} else {
@ -3607,7 +3645,8 @@ function PMA_getTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
foreach ($analyzed_sql[0]['table_ref']
as $table_ref_position => $table_ref) {
$target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
$target[] = $analyzed_sql[0]['table_ref']
[$table_ref_position]['table_true_name'];
}
}
@ -3734,10 +3773,10 @@ function PMA_getOffsets()
/**
* Get sort parameters
*
* @param string $order_by_clause
* @param string $order_by_clause the order by clause of the sql query
*
* @return array 3 element array: $sort_expression,
* $sort_expression_nodirection, $sort_direction
* @return array 3 element array: $sort_expression,
* $sort_expression_nodirection, $sort_direction
*
* @see PMA_getTable()
*/
@ -3940,7 +3979,10 @@ function PMA_setMessageInformation(
) {
$message = PMA_Message::notice(
__('This view has at least this number of rows. Please refer to %sdocumentation%s.')
__(
'This view has at least this number of rows.
Please refer to %sdocumentation%s.'
)
);
$message->addParam('[a@./Documentation.html#cfg_MaxExactCount@_blank]');
@ -4431,7 +4473,8 @@ function PMA_getRowData($class, $condition_field, $analyzed_sql, $meta, $map,
$alias = $analyzed_sql[0]['select_expr'][$select_expr_position]['alias'];
if (isset($alias) && strlen($alias)) {
$true_column = $analyzed_sql[0]['select_expr'][$select_expr_position]['column'];
$true_column = $analyzed_sql[0]['select_expr']
[$select_expr_position]['column'];
if ($alias == $meta->name) {
// this change in the parameter does not matter
@ -4718,7 +4761,8 @@ function PMA_getDeleteLink($del_url, $del_str, $js_conf, $class)
*
* @param string $position the position of the checkbox and links
* @param string $del_url delete url
* @param array $is_display array with explicit indexes for all the display elements
* @param array $is_display array with explicit indexes for all the
* display elements
* @param string $row_no row number
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where cluase